:root {
    /* Emerald / Forest Green Theme */
    --hue-brand: 150;
    --hue-ink: 220;

    /* Extended Palette */
    --clr-emerald: hsl(150, 70%, 40%);
    --clr-teal: hsl(170, 75%, 38%);
    --clr-lime: hsl(90, 65%, 42%);
    --clr-amber: hsl(38, 95%, 52%);
    --clr-violet: hsl(260, 75%, 60%);
    --clr-sky: hsl(205, 80%, 55%);

    /* Light Theme Defaults */
    --bg: hsl(var(--hue-ink), 10%, 98%);
    --ink: hsl(var(--hue-ink), 40%, 10%);
    --muted: hsl(var(--hue-ink), 15%, 45%);
    --card: rgba(255, 255, 255, 0.9);
    --card-border: rgba(255, 255, 255, 0.6);
    --line: hsl(var(--hue-ink), 20%, 90%);

    /* Primary Brand Colors */
    --brand: hsl(var(--hue-brand), 70%, 40%);
    --brand-light: hsl(var(--hue-brand), 70%, 95%);
    --brand-dark: hsl(var(--hue-brand), 75%, 25%);
    --brand-glow: hsl(var(--hue-brand), 70%, 40%, 0.35);

    --danger: hsl(0, 80%, 50%);
    --danger-light: hsl(0, 80%, 95%);

    --success: hsl(140, 70%, 40%);
    --success-light: hsl(140, 70%, 95%);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 8px 28px var(--brand-glow);

    --transition: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-theme="dark"] {
    --bg: hsl(var(--hue-ink), 30%, 8%);
    --ink: hsl(var(--hue-ink), 20%, 95%);
    --muted: hsl(var(--hue-ink), 15%, 65%);
    --card: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --line: hsl(var(--hue-ink), 20%, 20%);

    --brand: hsl(var(--hue-brand), 70%, 50%);
    --brand-light: hsl(var(--hue-brand), 70%, 15%);
    --brand-dark: hsl(var(--hue-brand), 60%, 65%);
    --brand-glow: hsl(var(--hue-brand), 70%, 50%, 0.25);

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Outfit", "Inter", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Background Blobs for Glassmorphism effect */
body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s ease-in-out infinite alternate;
}

body::before {
    width: 600px;
    height: 600px;
    background: hsl(var(--hue-brand), 80%, 85%);
    top: -200px;
    right: -100px;
}

body::after {
    width: 500px;
    height: 500px;
    background: hsl(220, 80%, 90%);
    bottom: -100px;
    left: -200px;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(50px, 30px) scale(1.05);
    }

    100% {
        transform: translate(-30px, 80px) scale(0.95);
    }
}

a {
    color: var(--brand-dark);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--brand);
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

main.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px 0;
    animation: fade-in-up 0.6s var(--transition) both;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    color: var(--ink);
}

/* -- Topbar (Glassmorphism) -- */
.topbar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .topbar {
    background: rgba(15, 23, 42, 0.7);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
}

.brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.nav a:hover {
    color: var(--ink);
    background: rgba(100, 116, 139, 0.1);
}

.theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--ink);
    background: rgba(100, 116, 139, 0.1);
}

/* Active states or primary actions in nav */
.nav a.btn {
    padding: 10px 20px;
}

/* Navigation Links with Icons */
.nav-link-primary {
    display: inline-flex;
    align-items: center;
    font-weight: 600 !important;
    color: var(--brand) !important;
}

.nav-link-primary:hover {
    background: var(--brand-light) !important;
}

/* Navigation Dropdowns */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.nav-dropdown-toggle:hover {
    color: var(--ink);
    background: rgba(100, 116, 139, 0.1);
}

.nav-dropdown-toggle.admin-link {
    color: var(--brand);
    font-weight: 600;
}

.nav-dropdown-toggle.nav-account {
    padding: 4px 8px;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    display: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    margin-top: 8px;
    padding: 8px 0;
    animation: dropdownSlideIn 0.2s ease-out;
}

/* Persistent open state for desktop */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu-right {
    left: auto;
    right: 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--ink);
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 0;
}

.nav-dropdown-menu a:hover {
    background: rgba(100, 116, 139, 0.1);
    color: var(--brand);
}

.nav-dropdown-menu a.highlight {
    color: var(--brand);
    font-weight: 600;
}

.nav-dropdown-menu a.admin-link {
    color: var(--brand);
}

.nav-dropdown-menu a.text-danger {
    color: var(--danger);
}

.nav-dropdown-menu a.text-danger:hover {
    background: var(--danger-light);
}

.nav-dropdown-menu svg {
    flex-shrink: 0;
}

/* ==========================================
   IMPROVED NAVIGATION STYLES
   ========================================== */

/* Brand Logo Styles */
.brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-text {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Search Bar */
.search-bar {
    display: none;
    position: relative;
    flex: 1;
    max-width: 280px;
}

.search-bar .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.search-bar .search-input {
    width: 100%;
    padding: 8px 36px 8px 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(100, 116, 139, 0.05);
    color: var(--ink);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.search-bar .search-input:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px var(--brand-glow);
}

/* Improved Nav Links */
.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    position: relative;
}

.nav-link:hover {
    color: var(--ink);
    background: rgba(32, 201, 151, 0.1);
}

.nav-link.active {
    color: var(--brand);
    background: var(--brand-light);
    font-weight: 600;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--brand);
    border-radius: 50%;
}

/* Account Badge */
.account-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
}

.account-email {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
}

.account-arrow {
    transition: transform 0.3s ease;
}

.nav-dropdown.open .account-arrow {
    transform: rotate(180deg);
}

/* Header Notification Badge */
.notification-badge.notification-badge-header {
    top: -2px;
    right: -4px;
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    animation: pulse 2s infinite;
}

/* Active links in dropdown */
.active-link {
    color: var(--brand) !important;
    font-weight: 600;
}

/* Header Email in Dropdown */
.header-email {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Notifications Panel Container */
.notifications-panel-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
}

@media (min-width: 769px) {
    .notifications-panel-container {
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.3);
    }
}

.notifications-panel-container.open {
    display: flex;
}

.notifications-panel-wrapper {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 360px;
    max-height: 480px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 24px;
    transition: all 0.3s ease;
}

@media (min-width: 769px) {
    .notifications-panel-wrapper {
        margin: 0;
    }
}

.notifications-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notifications-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.mark-all-read {
    font-size: 0.75rem;
    color: var(--muted);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.mark-all-read:hover {
    background: rgba(32, 201, 151, 0.1);
    color: var(--brand);
}

.notifications-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
}

.notifications-empty p {
    margin-top: 12px;
    font-size: 0.9rem;
}

.notification-item {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: rgba(32, 201, 151, 0.05);
}

.notification-item.unread {
    background: rgba(32, 201, 151, 0.03);
}

.notification-item.unread::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--brand);
    border-radius: 0 4px 4px 0;
}

.notification-content {
    margin-bottom: 4px;
}

.notification-type {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 0.88rem;
    color: var(--ink);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--muted);
}

/* Dropcap Animation */
@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   DROPDOWN HEADER (ORIGINAL)
   ========================================== */
.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dropdown-divider {
    height: 1px;
    background: var(--line);
    margin: 8px 0;
}

.dropdown-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Notifications */
.nav-notifications {
    position: relative;
    display: inline-block;
}

.nav-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--muted);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-btn:hover {
    color: var(--ink);
    background: rgba(100, 116, 139, 0.1);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--brand);
    color: white;
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.notifications-panel {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    transition: background 0.2s;
    cursor: pointer;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: rgba(100, 116, 139, 0.05);
}

.notification-message {
    font-size: 0.9rem;
    color: var(--ink);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
}

.badge-admin {
    display: inline-block;
    padding: 3px 8px;
    background: linear-gradient(135deg, var(--brand), #8b5cf6);
    color: white;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dropdown Animation */
@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   NAVIGATION DROPDOWNS - Persistent Open State
   ========================================== */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

/* Desktop hover behavior */
@media (hover: hover) {
    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }
}

/* Mobile behavior */
@media (hover: none) {
    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }
}

/* -- UI Components -- */

/* Cards */
.card {
    background: var(--card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
    position: relative;
    overflow: hidden;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(32, 201, 151, 0.3);
}

/* Colored top-border accent cards */
.card-accent-emerald {
    border-top: 3px solid var(--clr-emerald);
}

.card-accent-teal {
    border-top: 3px solid var(--clr-teal);
}

.card-accent-lime {
    border-top: 3px solid var(--clr-lime);
}

.card-accent-amber {
    border-top: 3px solid var(--clr-amber);
}

.card-accent-violet {
    border-top: 3px solid var(--clr-violet);
}

.card-accent-sky {
    border-top: 3px solid var(--clr-sky);
}

/* Gradient background utility cards */
.card-gradient {
    background: linear-gradient(
        135deg,
        var(--brand-dark) 0%,
        hsl(170, 75%, 22%) 100%
    );
    color: #fff;
    border: none;
}

/* Icon pill */
.icon-pill {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.icon-pill-emerald {
    background: rgba(32, 201, 151, 0.15);
    color: var(--clr-emerald);
}

.icon-pill-teal {
    background: rgba(20, 184, 166, 0.15);
    color: var(--clr-teal);
}

.icon-pill-lime {
    background: rgba(132, 204, 22, 0.15);
    color: var(--clr-lime);
}

.icon-pill-amber {
    background: rgba(245, 158, 11, 0.15);
    color: var(--clr-amber);
}

.icon-pill-violet {
    background: rgba(139, 92, 246, 0.15);
    color: var(--clr-violet);
}

.icon-pill-sky {
    background: rgba(56, 189, 248, 0.15);
    color: var(--clr-sky);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    line-height: 1;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, hsl(150, 72%, 48%), hsl(150, 78%, 30%));
    color: #fff !important;
    box-shadow: 0 4px 20px hsla(150, 70%, 38%, 0.45);
}

[data-theme="dark"] .btn-primary {
    color: #fff !important;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 36px hsla(150, 70%, 38%, 0.55);
    filter: brightness(1.08);
}

.btn-primary:active {
    transform: translateY(0) scale(0.99);
}

.btn-outline {
    background: transparent;
    color: var(--brand) !important;
    border: 2px solid var(--brand);
}

.btn-outline:hover {
    background: var(--brand);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-muted {
    background: rgba(100, 116, 139, 0.1);
    color: var(--ink) !important;
    border: 1px solid var(--line);
}

.btn-muted:hover {
    background: rgba(100, 116, 139, 0.2);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.15);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}

.form-input {
    width: 100%;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 1rem;
    background: rgba(100, 116, 139, 0.05);
    color: var(--ink);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.02),
        0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all var(--transition);
    font-family: inherit;
}

.form-input:hover {
    background: rgba(100, 116, 139, 0.1);
}

.form-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-glow);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slide-in 0.4s var(--transition);
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert.success {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(22, 101, 52, 0.2);
}

.alert.error {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(180, 35, 24, 0.2);
}

/* Grids */
.grid {
    display: grid;
    gap: 24px;
}

.cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.mt-0 {
    margin-top: 0;
}

.text-muted {
    color: var(--muted);
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 16px;
}

/* -- Specific Page Styles -- */

/* Hero Section */
.hero-modern {
    padding: 100px 0 80px;
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(32, 201, 151, 0.12);
    border: 1px solid rgba(32, 201, 151, 0.3);
    color: var(--brand);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-modern h1 {
    font-size: clamp(2.8rem, 7vw, 4.8rem);
    letter-spacing: -2px;
    margin-bottom: 24px;
    line-height: 1.05;
    background: linear-gradient(
        135deg,
        var(--brand-dark) 0%,
        var(--brand) 40%,
        var(--clr-teal) 80%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-modern p {
    font-size: 1.25rem;
    color: var(--muted);
    margin-bottom: 40px;
    line-height: 1.65;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Sections */
.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand);
    margin-bottom: 12px;
}

.section-heading {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    letter-spacing: -0.75px;
    margin-bottom: 16px;
    margin-top: 0;
}

.section-subheading {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.65;
}

/* Dark-background bands */
.band-dark {
    background: linear-gradient(
        135deg,
        hsl(220, 35%, 11%) 0%,
        hsl(220, 40%, 8%) 100%
    );
    color: #fff;
    padding: 80px 0;
    margin: 60px -4vw;
    padding-left: 4vw;
    padding-right: 4vw;
    border-radius: var(--radius-lg);
}

.band-dark h2,
.band-dark h3,
.band-dark h4 {
    color: #fff;
}

.band-dark p {
    color: rgba(255, 255, 255, 0.65);
}

.band-gradient {
    background: linear-gradient(
        135deg,
        var(--brand-dark) 0%,
        hsl(170, 75%, 22%) 100%
    );
    color: #fff;
    padding: 80px 0;
    margin: 60px -4vw;
    padding-left: 4vw;
    padding-right: 4vw;
    border-radius: var(--radius-lg);
}

.band-gradient h2,
.band-gradient h3,
.band-gradient h4 {
    color: #fff;
}

.band-gradient p {
    color: rgba(255, 255, 255, 0.75);
}

/* Step Numbers for How it Works */
.step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px var(--brand-glow);
}

/* Auth Pages */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* Dashboard Layout */
.dashboard-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Split Layout for Designer */
.split-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: start;
}

@media (min-width: 900px) {
    .split-layout {
        grid-template-columns: 400px 1fr;
        gap: 48px;
    }
}

.sticky-preview {
    position: sticky;
    top: 100px;
}

/* Card Preview Generator */
.card-preview-container {
    aspect-ratio: 1.586;
    /* Standard CR80 / ID-1 */
    width: 100%;
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.5s ease;
}

.card-preview-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
}

.card-details h3 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.card-details p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.8;
    font-family: monospace;
    letter-spacing: 2px;
}

/* Color Scheme Cards */
.color-scheme-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.color-scheme-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.color-scheme-card.active {
    border-color: var(--brand);
}

/* Layout Preview Cards */
.layout-preview-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.layout-preview-card:hover {
    transform: scale(1.03);
}

.layout-preview-card.active {
    border-color: var(--brand);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    background: var(--card);
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.table th {
    background: rgba(0, 0, 0, 0.02);
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.table tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pending {
    background: #fef3c7;
    color: #b45309;
}

.badge-processing {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-completed {
    background: rgba(21, 128, 61, 0.15);
    color: #15803d;
}

[data-theme="dark"] .badge-completed {
    color: #4ade80;
}

/* Footer modern styles */
.footer-modern {
    margin-top: auto;
    padding: 56px 0 32px;
    border-top: 1px solid var(--line);
    background: rgba(100, 116, 139, 0.03);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all var(--transition);
}

.footer-links a:hover {
    color: var(--brand);
    background: var(--brand-light);
}

.footer-copy {
    color: var(--muted);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Pulse Glow Keyframes */
@keyframes pulse-glow {
    0%,
    100% {
        box-shadow: 0 0 0 0 var(--brand-glow);
    }

    50% {
        box-shadow: 0 0 0 12px transparent;
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2.5s ease-in-out infinite;
}

/* Float animation for 3D card */
@keyframes float-card {
    0% {
        transform: rotate(-4deg) translateY(0px) scale(1.03);
    }

    50% {
        transform: rotate(-4deg) translateY(-12px) scale(1.03);
    }

    100% {
        transform: rotate(-4deg) translateY(0px) scale(1.03);
    }
}

.animate-float-card {
    animation: float-card 5s ease-in-out infinite;
}

/* ==========================================
   HAMBURGER MENU BUTTON
   ========================================== */
.menu-toggle-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    z-index: 100;
}

.menu-toggle-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
    transform-origin: center;
}

.menu-toggle-btn.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle-btn.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle-btn.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================
   TABLET (≤900px)
   ========================================== */
@media (max-width: 900px) {
    .cols-3 {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .split-layout {
        grid-template-columns: 1fr;
    }

    .sticky-preview {
        position: static;
    }
}

/* ==========================================
   MOBILE (≤768px)
   ========================================== */
@media (max-width: 768px) {
    /* Nav */
    .topbar-inner {
        flex-wrap: nowrap;
        position: relative;
    }

    .menu-toggle-btn {
        display: flex;
        margin-left: auto;
    }

    .nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--card-border);
        border-top: none;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        padding: 12px 16px 16px;
        box-shadow: var(--shadow-md);
        z-index: 99;
    }

    .nav.nav-open {
        display: flex;
    }

    .nav a,
    .nav-dropdown-toggle {
        padding: 10px 14px;
        border-radius: var(--radius-sm);
        width: 100%;
        justify-content: flex-start;
        font-size: 1rem;
    }

    /* Mobile Dropdowns */
    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        width: 100%;
        text-align: left;
    }

    .nav-dropdown-menu {
        position: static;
        margin: 4px 0 8px 16px;
        width: auto;
        border: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.03);
        animation: none;
    }

    .nav-dropdown-menu a {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .nav-notifications {
        width: 100%;
    }

    .nav-icon-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 14px;
    }

    .notifications-panel {
        position: static;
        width: auto;
        margin: 4px 0 8px 16px;
        max-height: 300px;
    }

    .nav .btn {
        display: block;
        text-align: center;
    }
    </text > <old_text line=1367 > .theme-toggle-btn {
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
        padding: 8px;
        margin: 0;
    }

    .theme-toggle-btn {
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        padding: 10px 14px;
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    /* Grids */
    main.container {
        padding: 24px 0;
    }

    .cols-2,
    .cols-3 {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    /* Hero */
    .hero-modern {
        padding: 60px 0 40px;
    }

    .hero-modern h1 {
        font-size: clamp(2rem, 9vw, 3rem);
        letter-spacing: -1.5px;
    }

    .hero-modern p {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 320px;
    }

    /* Bands */
    .band-dark,
    .band-gradient {
        margin: 40px -4vw;
        padding: 60px 6vw;
        border-radius: var(--radius-md);
    }

    .section-heading {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }

    /* Card demo */
    .animate-float-card {
        animation: none;
        transform: scale(1.02);
    }

    /* Tables — horizontal scroll */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Forms */
    .form-input {
        padding: 12px 14px;
    }

    .auth-card {
        padding: 28px 20px;
    }

    .card {
        padding: 20px;
    }
}

/* ==========================================
   SMALL PHONES (≤480px)
   ========================================== */
@media (max-width: 480px) {
    .container {
        width: 94vw;
    }

    .hero-modern h1 {
        font-size: 1.9rem;
        letter-spacing: -0.8px;
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    .btn {
        padding: 11px 18px;
        font-size: 0.92rem;
    }

    .footer-links a {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
}

/* Notification Dropdown */
#notificationsDropdown {
    max-height: 300px;
    overflow-y: auto;
}

/* Progress Bar */
.progress-bar {
    height: 12px;
    background: var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--brand);
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* Quick Action Cards */
.quick-action-card {
    text-align: center;
    padding: 24px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.quick-action-card:hover {
    transform: translateY(-5px);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Profile Page Enhancements */
.profile-card {
    animation: fadeIn 0.6s ease-out;
}

.profile-cover {
    transition: all 0.3s ease;
}

.profile-avatar-wrapper {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.profile-avatar-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.social-link {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.social-link:active {
    transform: scale(0.95);
}

.contact-card {
    transition: all 0.3s ease;
}

.contact-card:active {
    transform: translateX(2px);
}

.portfolio-item {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.portfolio-item:nth-child(1) {
    animation-delay: 0.1s;
}
.portfolio-item:nth-child(2) {
    animation-delay: 0.2s;
}
.portfolio-item:nth-child(3) {
    animation-delay: 0.3s;
}
.portfolio-item:nth-child(4) {
    animation-delay: 0.4s;
}
.portfolio-item:nth-child(5) {
    animation-delay: 0.5s;
}
.portfolio-item:nth-child(6) {
    animation-delay: 0.6s;
}

.skill-badge {
    animation: scaleIn 0.4s ease-out;
    animation-fill-mode: both;
    transition: transform 0.2s ease;
}

.skill-badge:hover {
    transform: translateY(-2px);
}

/* Loading States */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--line) 25%,
        rgba(0, 0, 0, 0.05) 50%,
        var(--line) 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }

    .social-link {
        min-width: 48px;
        min-height: 48px;
    }

    .contact-card {
        padding: 20px;
        touch-action: manipulation;
    }

    a,
    button {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* Enhanced Mobile Optimizations */
@media (max-width: 900px) {
    .profile-container {
        padding: 16px;
    }

    .profile-card {
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 640px) {
    .profile-cover {
        height: 160px;
        padding: 0 20px 20px;
    }

    .profile-header {
        padding: 70px 20px 24px;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .skill-list {
        gap: 10px;
    }

    .skill-badge {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    .contact-card {
        padding: 16px;
        gap: 12px;
    }

    .contact-icon {
        width: 44px;
        height: 44px;
    }
}

/* Print Styles */
@media print {
    .profile-actions,
    .cta-footer,
    .topbar,
    .footer-modern {
        display: none !important;
    }

    .profile-card {
        box-shadow: none;
        break-inside: avoid;
    }

    .profile-cover {
        height: 120px;
    }

    a {
        color: var(--ink);
        text-decoration: none;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--muted);
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }

    .card {
        border: 2px solid var(--line);
    }

    .social-link {
        border: 2px solid currentColor;
    }
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

/* Featured designs */
.featured-showcase {
    margin: 64px auto 80px;
    max-width: 1100px;
    padding: 0 16px;
}

.featured-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    text-align: center;
    margin-bottom: 28px;
}

.featured-logo {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

.featured-logo img {
    max-width: 72px;
    height: auto;
}

.featured-copy h2 {
    margin: 0 0 8px;
    font-size: 1.8rem;
}

.featured-copy p {
    margin: 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.featured-card {
    margin: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.featured-card img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: radial-gradient(
        circle at 30% 20%,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0.25)
    );
}

.featured-card figcaption {
    margin-top: 12px;
    font-weight: 600;
    color: var(--ink);
}

@media (max-width: 640px) {
    .featured-logo {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }

    .featured-logo img {
        max-width: 60px;
    }

    .featured-copy h2 {
        font-size: 1.5rem;
    }
}
