.app-header {
    position: sticky; top: 0; z-index: 1000;
    background: linear-gradient(135deg, #E8A000, #F5C030); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.08); padding: 0 24px; height: 60px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(180,130,0,0.15);
}
.header-logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: #2D1F00; }
.header-logo span { color: #2D1F00; -webkit-text-fill-color: #2D1F00; }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
    padding: 8px 16px; border-radius: var(--radius-sm); color: #3D2800;
    font-size: 14px; font-weight: 500; transition: var(--transition);
}
.header-nav a:hover { color: #2D1F00; background: rgba(255,255,255,0.35); }
.header-nav a.active { color: #2D1F00; background: rgba(255,255,255,0.45); font-weight: 600; }
.header-user { display: flex; align-items: center; gap: 12px; }
.header-credits { font-size: 13px; color: #2D1F00; font-weight: 600; }
.header-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    border: 2px solid rgba(255,255,255,0.4); overflow: hidden; color: #2D1F00;
}
.btn-header-login {
    background: rgba(255,255,255,0.9) !important; color: #2D1F00 !important;
    font-weight: 600; border: none; box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.btn-header-login:hover { background: #ffffff !important; }
.header-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-dropdown {
    position: absolute; top: 56px; right: 24px; background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 8px;
    min-width: 160px; box-shadow: var(--shadow-lg); display: none;
}
.user-dropdown.show { display: block; }
.user-dropdown a {
    display: block; padding: 8px 16px; color: var(--text-primary); border-radius: var(--radius-sm);
    font-size: 14px;
}
.user-dropdown a:hover { background: var(--bg-tertiary); }

.app-footer {
    text-align: center; padding: 24px; color: var(--text-tertiary); font-size: 13px;
    border-top: 1px solid var(--border); margin-top: 40px;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 24px; }

@media (max-width: 768px) {
    .app-header { padding: 0 16px; }
    .header-nav { display: none; }
    .container { padding: 16px; }
    .mobile-nav { display: flex; }
}

.mobile-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: linear-gradient(135deg, #E8A000, #F5C030); backdrop-filter: blur(20px);
    border-top: none; padding: 8px 0;
    z-index: 1000; justify-content: space-around;
    box-shadow: 0 -2px 8px rgba(180,130,0,0.15);
}
.mobile-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    color: #5C4400; font-size: 11px; padding: 4px 12px;
}
.mobile-nav a.active { color: #2D1F00; font-weight: 600; }
.mobile-nav svg { width: 22px; height: 22px; }

/* Primary sidebar (first-level nav) */
.primary-nav {
    width: 220px; min-width: 220px; background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    padding: 20px 0; gap: 0;
    height: calc(100vh - 60px); position: sticky; top: 60px;
    overflow-y: auto;
}
.primary-nav-group { padding: 0 14px; margin-bottom: 12px; }
.primary-nav-group-title {
    font-size: 15px; font-weight: 700; color: #1a1a1a;
    letter-spacing: 0.3px;
    padding: 12px 14px 10px; margin-bottom: 4px;
    display: flex; align-items: center; gap: 8px;
}
.primary-nav-group-title::before {
    content: '';
    display: inline-block;
    width: 4px; height: 18px;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}
.primary-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; width: 100%; border-radius: var(--radius-sm);
    cursor: pointer; color: #3d3835; font-size: 15px;
    transition: var(--transition); text-decoration: none;
    border: none; background: none; text-align: left; line-height: 1.4;
    font-weight: 500;
}
.primary-nav-item:hover { background: var(--bg-tertiary); color: #1a1a1a; }
.primary-nav-item.active { background: var(--accent-light); color: #b37800; font-weight: 600; }
.primary-nav-item svg { width: 22px; height: 22px; flex-shrink: 0; stroke-width: 1.8; }

@media (max-width: 768px) {
    .primary-nav { display: none; }
}
