:root {
    --accent: #d4a017;
    --accent-hover: #b8890f;
    --body-bg: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --navbar-bg: #0f172a;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
}

* {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--body-bg);
    color: var(--text-primary);
    min-height: 100vh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ── Top Navbar ── */
.top-navbar {
    background: var(--navbar-bg);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1040;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.navbar-brand-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    color: #0f172a;
}

.brand-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    display: block;
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}

.navbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 8px 16px;
    width: 360px;
    transition: all 0.2s;
}

.navbar-search:focus-within {
    background: rgba(255,255,255,0.12);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212,160,23,0.15);
}

.navbar-search i {
    color: rgba(255,255,255,0.35);
    font-size: 0.9rem;
}

.navbar-search input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.85rem;
    width: 100%;
}

.navbar-search input::placeholder {
    color: rgba(255,255,255,0.35);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #0f172a;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.user-role {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
}

/* ── Page Container ── */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 36px 32px 60px;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h2 {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.page-header p {
    font-size: 0.875rem;
    margin: 0;
}

/* ── Module Categories ── */
.module-category {
    margin-bottom: 32px;
}

.category-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    padding-left: 4px;
}

/* ── Modules Grid ── */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ── Module Card ── */
.module-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.module-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
    color: var(--text-primary);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: transparent;
    transition: background 0.2s;
}

.module-card:hover::before {
    background: var(--accent);
}

.module-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.module-info {
    flex: 1;
    min-width: 0;
}

.module-info h6 {
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.module-info p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.module-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(212,160,23,0.12);
    color: var(--accent);
}

.module-badge.soon {
    background: rgba(100,116,139,0.1);
    color: var(--text-secondary);
}

/* ── Footer ── */
.page-footer {
    text-align: center;
    padding: 24px 32px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.page-footer a {
    color: var(--accent);
    text-decoration: none;
}

.page-footer a:hover {
    text-decoration: underline;
}

/* ── No Results ── */
.no-results {
    text-align: center;
    padding: 48px 20px;
    display: none;
}

.no-results i {
    font-size: 3rem;
    color: #cbd5e1;
}

.no-results p {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .top-navbar {
        padding: 0 16px;
        gap: 12px;
    }

    .navbar-search {
        width: 180px;
    }

    .user-info {
        display: none;
    }

    .page-container {
        padding: 24px 16px 48px;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }
}
