:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --success: #16a34a;
    --success-light: #dcfce7;
    --error: #dc2626;
    --error-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #0891b2;
    --info-light: #cffafe;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --radius: 10px;
    --radius-lg: 14px;
    --sidebar-w: 240px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
}

.navbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar .brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.navbar nav a {
    margin-left: 1.5rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
}

.navbar nav a:hover {
    color: var(--primary);
}

.navbar nav a.active {
    color: var(--primary);
    font-weight: 700;
}

.navbar .brand a {
    color: var(--primary);
    text-decoration: none;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.lang-switcher a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.lang-switcher a.active {
    color: var(--primary);
    background: #eff6ff;
}

.lang-switcher a:hover {
    color: var(--primary);
}

.lang-switcher span {
    color: var(--border);
}

.container {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--muted);
    font-size: 1.1rem;
}

.status, .features {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.status h2, .features h2 {
    margin-top: 0;
}

.status ul, .features ul {
    padding-left: 1.2rem;
}

.features li {
    margin-bottom: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
    white-space: nowrap;
    line-height: 1.4;
}

.btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.15);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.alert.success {
    background: #dcfce7;
    color: var(--success);
    border: 1px solid #86efac;
}

.alert.error {
    background: #fee2e2;
    color: var(--error);
    border: 1px solid #fca5a5;
}

.note {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 1.5rem;
}

.center {
    text-align: center;
    padding-top: 4rem;
}

/* Auth page */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    margin: 0;
}

.auth-box {
    background: var(--card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.auth-box h1 {
    margin: 0 0 0.25rem;
    color: var(--primary);
}

.auth-box .subtitle {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.92rem;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    font-family: inherit;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #cbd5e1;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 12px;
    padding-right: 2.2rem;
    cursor: pointer;
}

.form-group input[type="datetime-local"],
.form-group input[type="date"],
.form-group input[type="time"] {
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
    align-items: center;
    margin-top: 1.5rem;
}

.form-actions .btn {
    flex-shrink: 0;
}

.btn.full {
    width: 100%;
}

.btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    border-radius: 8px;
}

.btn.secondary {
    background: #f1f5f9;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.btn.secondary:hover {
    background: #e2e8f0;
    box-shadow: var(--shadow);
}

.btn.danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.15);
}

.btn.danger:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn.success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.15);
}

.btn.success:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.btn.info {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    box-shadow: 0 2px 4px rgba(8, 145, 178, 0.15);
}

.btn.info:hover {
    background: linear-gradient(135deg, #0e7490, #155e75);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25);
}

/* Dashboard stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

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

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Cards and tables */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    margin: 0;
    font-size: 1.15rem;
}

.card-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    flex-wrap: nowrap;
}

.card-search input,
.card-search select {
    min-width: 160px;
}

.card-search select {
    flex-shrink: 0;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

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

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

.table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
}

.table tr:hover {
    background: var(--primary-light);
}

.actions a,
.actions button {
    margin-right: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #e2e8f0;
    color: var(--text);
}

.badge.pending { background: #fef3c7; color: #92400e; }
.badge.inspection { background: #dbeafe; color: #1e40af; }
.badge.waiting_approval { background: #ffedd5; color: #9a3412; }
.badge.in_progress { background: #e0e7ff; color: #3730a3; }
.badge.completed { background: #d1fae5; color: #065f46; }
.badge.invoiced { background: #ccfbf1; color: #115e59; }
.badge.delivered { background: #dcfce7; color: #166534; }
.badge.cancelled { background: #fee2e2; color: #991b1b; }
.badge.draft { background: #f1f5f9; color: #475569; }
.badge.sent { background: #dbeafe; color: #1e40af; }
.badge.paid { background: #d1fae5; color: #065f46; }
.badge.overdue { background: #fee2e2; color: #991b1b; }
.badge.booked { background: #e0e7ff; color: #3730a3; }
.badge.confirmed { background: #dbeafe; color: #1e40af; }
.badge.no_show { background: #fef3c7; color: #92400e; }
.badge.queued { background: #ffedd5; color: #9a3412; }
.badge.failed { background: #fee2e2; color: #991b1b; }
.badge.received { background: #d1fae5; color: #065f46; }
.badge.refunded { background: #f1f5f9; color: #475569; }

footer {
    text-align: center;
    color: var(--muted);
    padding: 2rem 0;
    font-size: 0.9rem;
}

/* Table wrapper for horizontal scroll on small screens */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .navbar .brand {
        font-size: 1.1rem;
    }

    .navbar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
        order: 3;
    }

    .navbar nav a {
        margin-left: 0;
        margin-right: 0;
        font-size: 0.9rem;
    }

    .lang-switcher {
        order: 2;
        margin-left: auto;
    }

    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .hero {
        padding: 2rem 0.75rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

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

    .card {
        padding: 1rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .card-search {
        width: 100%;
        flex-wrap: wrap;
    }

    .card-search input {
        min-width: 0;
        flex: 1;
    }

    .card-actions {
        width: 100%;
    }

    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .auth-box {
        padding: 1.5rem;
        margin: 1rem;
    }

    /* Convert tables to card-style on mobile */
    .table-wrapper:not(.no-card) .table thead {
        display: none;
    }

    .table-wrapper:not(.no-card) .table,
    .table-wrapper:not(.no-card) .table tbody,
    .table-wrapper:not(.no-card) .table tr,
    .table-wrapper:not(.no-card) .table td {
        display: block;
        width: 100%;
    }

    .table-wrapper:not(.no-card) .table tr {
        margin-bottom: 0.75rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 0.5rem;
        background: var(--card);
    }

    .table-wrapper:not(.no-card) .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        border-bottom: 1px solid var(--border);
        padding: 0.5rem 0.25rem;
    }

    .table-wrapper:not(.no-card) .table td:last-child {
        border-bottom: none;
    }

    .table-wrapper:not(.no-card) .table td::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        padding-right: 1rem;
    }

    .table-wrapper:not(.no-card) .table td.actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .table-wrapper:not(.no-card) .table td.actions::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .navbar nav a {
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== Landing Page ===== */
.landing-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.landing-nav .brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-nav .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #0891b2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
}

.landing-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.landing-nav .nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.landing-nav .nav-links a:hover {
    color: var(--primary);
}

.landing-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    padding: 5rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.landing-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.landing-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-hero p {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.landing-hero .btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary-lg {
    background: var(--primary);
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    display: inline-block;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-outline-lg {
    background: transparent;
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    transition: border-color 0.15s;
}

.btn-outline-lg:hover {
    border-color: #fff;
}

.landing-features {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.landing-features h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.landing-features .subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 1rem;
    color: #fff;
}

.feature-icon.blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.feature-icon.cyan { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.feature-icon.green { background: linear-gradient(135deg, #16a34a, #22c55e); }
.feature-icon.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.feature-icon.orange { background: linear-gradient(135deg, #ea580c, #f97316); }
.feature-icon.red { background: linear-gradient(135deg, #dc2626, #ef4444); }

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.landing-cta {
    background: linear-gradient(135deg, var(--primary), #0891b2);
    color: #fff;
    text-align: center;
    padding: 4rem 2rem;
}

.landing-cta h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.landing-cta p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.landing-cta .btn-white {
    background: #fff;
    color: var(--primary);
    padding: 0.85rem 2.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
    transition: transform 0.15s;
}

.landing-cta .btn-white:hover {
    transform: translateY(-2px);
}

.landing-footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

.landing-footer a {
    color: #94a3b8;
    text-decoration: none;
}

.landing-footer a:hover {
    color: #fff;
}

/* ===== Auth Pages (Login/Register) ===== */
.auth-page {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.auth-box .auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-box .auth-logo .brand-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), #0891b2);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.auth-box .auth-logo h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

.auth-box .auth-logo p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}

.auth-box .form-group {
    margin-bottom: 1.25rem;
}

.auth-box label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.auth-box input,
.auth-box select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.15s;
}

.auth-box input:focus,
.auth-box select:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-box .btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.05rem;
    border: none;
    cursor: pointer;
}

.auth-box .auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.auth-box .auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

/* ===== Dashboard Redesign ===== */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--primary), #0891b2);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-welcome h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.dashboard-welcome p {
    margin: 0.25rem 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.dashboard-welcome .quick-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dashboard-welcome .quick-actions a {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.dashboard-welcome .quick-actions a:hover {
    background: rgba(255, 255, 255, 0.3);
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
}

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

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 0.75rem;
    color: #fff;
}

.stat-card .stat-icon.blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.stat-card .stat-icon.green { background: linear-gradient(135deg, #16a34a, #22c55e); }
.stat-card .stat-icon.orange { background: linear-gradient(135deg, #ea580c, #f97316); }
.stat-card .stat-icon.cyan { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.stat-card .stat-icon.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
}

.stat-card .stat-label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* ===== Admin Navbar ===== */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.admin-topbar {
    background: #0f172a;
    color: #fff;
    padding: 0.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.2rem;
}

.admin-brand a {
    color: #fff;
    text-decoration: none;
}

.admin-logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #0891b2);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
}

.admin-shop-name {
    color: #93c5fd;
    font-weight: 600;
}

.admin-user-name {
    color: #94a3b8;
}

.admin-topbar-right .lang-switcher a {
    color: #94a3b8;
}

.admin-topbar-right .lang-switcher a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.admin-logout {
    color: #f87171 !important;
    text-decoration: none;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    background: rgba(248, 113, 113, 0.1);
    transition: background 0.15s;
}

.admin-logout:hover {
    background: rgba(248, 113, 113, 0.2);
}

.admin-nav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.admin-nav::-webkit-scrollbar {
    height: 4px;
}

.admin-nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.nav-group a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.7rem 0.85rem;
    border-bottom: 3px solid transparent;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    white-space: nowrap;
}

.nav-group a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-group a.active {
    color: var(--primary);
    font-weight: 700;
    border-bottom-color: var(--primary);
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .admin-topbar {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
    }

    .admin-topbar-right {
        gap: 0.75rem;
        font-size: 0.8rem;
    }

    .admin-shop-name {
        display: none;
    }

    .admin-nav {
        padding: 0 0.5rem;
    }

    .nav-group a {
        padding: 0.6rem 0.6rem;
        font-size: 0.8rem;
    }

    .nav-divider {
        margin: 0 0.25rem;
    }
}
