/* Light theme - shared across app (mobile-first, heavily colorful) */
:root {
    --bg-body: #f0f4ff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --border-color: #dee2e6;
    --text-primary: #212529;
    --text-muted: #6c757d;
    --nav-text: #495057;
    --nav-text-active: #212529;
    --nav-bg: #ffffff;
    --nav-border: #e9ecef;
    --accent: #4361ee;
    --accent-success: #0d9488;
    --accent-info: #0891b2;
    --accent-warning: #d97706;
    --accent-coral: #e11d48;
    --accent-violet: #7c3aed;
    --accent-teal: #0d9488;
    --accent-amber: #f59e0b;
}

body {
    background: linear-gradient(160deg, #f0f4ff 0%, #fef3f8 35%, #f0fdfa 70%, #fefce8 100%);
    background-attachment: fixed;
    background-color: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
}
/* Mobile-first: prevent horizontal overflow */
.container, .container-fluid {
    max-width: 100%;
}
@media (max-width: 991.98px) {
    .table-responsive-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Rounded corners - global */
.btn {
    border-radius: 0.5rem;
}
.btn-lg {
    border-radius: 0.6rem;
}
.form-control,
.form-select {
    border-radius: 0.5rem;
}
.card {
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
.card:hover {
    box-shadow: 0 8px 24px rgba(67, 97, 238, 0.12), 0 0 0 1px rgba(67, 97, 238, 0.1);
}
.card.card-accent-primary { border-left: 4px solid var(--accent); }
.card.card-accent-success { border-left: 4px solid var(--accent-success); }
.card.card-accent-info { border-left: 4px solid var(--accent-info); }
.card.card-accent-violet { border-left: 4px solid var(--accent-violet); }
.card.card-accent-coral { border-left: 4px solid var(--accent-coral); }
.modal-content {
    border-radius: 1rem;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.card .card-title,
.card .card-text {
    color: var(--text-primary);
}
.card .text-muted {
    color: var(--text-muted) !important;
}

/* Forms */
.form-control,
.form-select {
    background-color: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.form-control:focus,
.form-select:focus {
    background-color: var(--bg-input);
    border-color: #4361ee;
    color: var(--text-primary);
}
.form-control::placeholder {
    color: var(--text-muted);
}
.form-label {
    color: var(--text-primary);
}

/* Primary button - shiny */
.btn-primary {
    background: linear-gradient(180deg, #5a7eff 0%, #4361ee 50%, #3a52d4 100%);
    border-color: #3a52d4;
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.35);
}
.btn-primary:hover {
    background: linear-gradient(180deg, #6b8cff 0%, #4d6cf5 50%, #4361ee 100%);
    border-color: #4361ee;
    box-shadow: 0 4px 14px rgba(67, 97, 238, 0.45);
}
.btn-success {
    background: linear-gradient(180deg, #14b8a6 0%, var(--accent-teal) 50%, #0f766e 100%);
    border-color: #0f766e;
    color: #fff;
}
.btn-success:hover {
    background: linear-gradient(180deg, #2dd4bf 0%, #14b8a6 50%, var(--accent-teal) 100%);
    border-color: var(--accent-teal);
    color: #fff;
}
.btn-info {
    background: linear-gradient(180deg, #22d3ee 0%, var(--accent-info) 50%, #0e7490 100%);
    border-color: #0e7490;
    color: #fff;
}
.btn-info:hover {
    background: linear-gradient(180deg, #67e8f9 0%, #22d3ee 50%, var(--accent-info) 100%);
    border-color: var(--accent-info);
    color: #fff;
}

/* Modals */
.modal-content {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.modal-header {
    border-bottom-color: var(--border-color);
}
.modal-footer {
    border-top-color: var(--border-color);
}
.modal-header .btn-close {
    filter: none;
}

/* Tables */
.table {
    color: var(--text-primary);
}
.table thead th {
    border-color: var(--border-color);
    color: var(--text-muted);
}
.table tbody td {
    border-color: var(--border-color);
}
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

/* Pagination */
.pagination .page-link {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.pagination .page-link:hover {
    background-color: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}
.pagination .page-item.active .page-link {
    background-color: #4361ee;
    border-color: #4361ee;
}
.pagination .page-item.disabled .page-link {
    background-color: var(--bg-card);
    color: var(--text-muted);
}

/* Navbar - keep primary, ensure toggler visible */
.navbar-dark .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}
.navbar-dark .navbar-toggler-icon {
    filter: none;
}

.brand-logo-xs,
.brand-logo-sm {
    width: 28px;
    height: 28px;
    border-radius: 0.45rem;
    object-fit: cover;
    flex-shrink: 0;
}

.brand-logo-xs {
    width: 20px;
    height: 20px;
    border-radius: 0.35rem;
}

/* Buttons in dark context */
.btn-outline-primary {
    border-color: #4361ee;
    color: #4361ee;
}
.btn-outline-primary:hover {
    background-color: #4361ee;
    color: #fff;
}
.btn-outline-secondary {
    border-color: var(--text-muted);
    color: var(--text-muted);
}
.btn-outline-secondary:hover {
    background-color: var(--text-muted);
    color: #fff;
}
.btn-outline-danger:hover {
    color: #fff;
}

/* ----- Public landing + auth pages (hero-style) ----- */
.landing-hero {
    background: linear-gradient(135deg, #fef3f8 0%, #fce7f3 25%, #fbcfe8 50%, #f9a8d4 75%, #ec4899 100%);
    min-height: 85vh;
    position: relative;
    overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(236,72,153,0.15) 0%, transparent 60%);
    pointer-events: none;
}
.landing-hero .display-1 {
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.landing-hero .lead {
    font-size: 1.35rem;
}
.landing-section {
    padding: 4rem 0;
}
.landing-section-how {
    background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 40%, #99f6e4 100%);
}
.landing-section-grow {
    background: linear-gradient(180deg, #faf5ff 0%, #ede9fe 50%, #ddd6fe 100%);
}
.landing-section-features {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 40%, #bfdbfe 100%);
}
.landing-section-pricing {
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 45%, #fde68a 100%);
}
.landing-feature-card {
    border: none;
    border-radius: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.landing-pricing-card {
    border: none;
    border-radius: 1.1rem;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}
.landing-pricing-card.featured {
    transform: translateY(-8px);
    box-shadow: 0 18px 50px rgba(67, 97, 238, 0.18);
    border: 1px solid rgba(67, 97, 238, 0.18);
}
.landing-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.landing-icon-wrap {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}
.landing-step-num {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.landing-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, #e11d48 0%, #ec4899 50%, #f472b6 100%);
    color: #fff;
}
.landing-cta .btn-light {
    border-radius: 2rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
}
.landing-footer {
    padding: 1.5rem 0 2rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(67, 97, 238, 0.1);
}
.landing-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.landing-footer-brand {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.landing-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.landing-footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.landing-footer-links a:hover {
    text-decoration: underline;
}

/* Auth pages that reuse landing gradient but focus on the form card */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef3f8 0%, #fce7f3 25%, #fbcfe8 50%, #f9a8d4 75%, #ec4899 100%);
}
.auth-page .auth-card {
    border-radius: 1rem;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.auth-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e11d48, #ec4899);
    color: #fff;
}
.auth-brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
}
.auth-back-link {
    font-size: 0.9rem;
    color: rgba(15,23,42,0.8);
}
.auth-back-link i {
    vertical-align: middle;
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(15, 23, 42, 0.12);
}
.btn-google-auth {
    border-color: rgba(15, 23, 42, 0.12);
    background: #fff;
    color: #111827;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.btn-google-auth:hover,
.btn-google-auth:focus {
    background: #f8fafc;
    color: #111827;
    border-color: rgba(15, 23, 42, 0.18);
}

/* Empty state / text muted */
.text-muted {
    color: var(--text-muted) !important;
}
#productsEmpty a,
#categoriesEmpty a {
    color: #6c9bcf;
}

/* Product card image placeholder in dark */
.product-card-img {
    background: var(--bg-input);
}
.product-card-img,
.products-grid .card .card-img-top {
    height: 200px;
    object-fit: cover;
}
.products-grid .card,
.product-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.products-grid .card:hover,
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.product-card-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 34px;
    margin-bottom: 0.85rem;
    color: var(--text-muted);
}
.product-card-brand-logo {
    max-width: 84px;
    max-height: 24px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
.product-card-brand-name {
    font-size: 0.82rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ----- App shell: sidebar + main ----- */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
}
.app-sidebar {
    width: 260px;
    min-width: 260px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 255, 0.96) 100%),
        linear-gradient(180deg, rgba(67, 97, 238, 0.08) 0%, rgba(124, 58, 237, 0.04) 100%);
    color: var(--nav-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--nav-border);
    box-shadow: 10px 0 30px rgba(67, 97, 238, 0.06);
    position: relative;
    z-index: 1030;
}
.app-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--nav-text-active);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--nav-border);
}
.app-sidebar .sidebar-nav {
    padding: 1rem 0.75rem;
    flex: 1;
}
.app-sidebar .nav-link {
    color: var(--nav-text);
    font-weight: 500;
    padding: 0.6rem 1rem;
    min-height: 44px;
    align-items: center;
    border-radius: 0.5rem;
    margin-bottom: 0.15rem;
    display: flex;
    gap: 0.5rem;
}
.app-sidebar .nav-link:hover {
    color: var(--nav-text-active);
    background: rgba(0, 0, 0, 0.06);
}
.app-sidebar .nav-link.active {
    color: var(--accent);
    background: rgba(67, 97, 238, 0.1);
    font-weight: 600;
}
.app-main {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem calc(7.5rem + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    box-sizing: border-box;
    background:
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.08), transparent 34%),
        radial-gradient(circle at bottom left, rgba(8, 145, 178, 0.08), transparent 30%);
}
.app-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    z-index: 1035;
    pointer-events: none;
}
.app-footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    border: 1px solid rgba(67, 97, 238, 0.16);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 255, 0.92) 46%, rgba(240, 253, 250, 0.92) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 12px 36px rgba(67, 97, 238, 0.14);
    pointer-events: auto;
}
.app-footer-copy,
.app-footer-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}
.app-footer-brand {
    color: var(--text-primary);
    font-weight: 600;
}
.app-footer-sep {
    color: rgba(108, 117, 125, 0.75);
}
.app-footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(67, 97, 238, 0.12);
}
.app-footer-badge .bi {
    color: var(--accent);
}
@media (min-width: 768px) {
    .app-main {
        padding: 1.25rem 1.5rem calc(8rem + env(safe-area-inset-bottom, 0px));
    }
}
@media (min-width: 992px) {
    .app-main {
        padding: 1.5rem 1.75rem calc(8.25rem + env(safe-area-inset-bottom, 0px));
    }
}
.app-sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    transition: opacity 0.2s;
}
.app-sidebar-backdrop.show {
    display: block;
}
body.sidebar-open {
    overflow: hidden;
}
@media (max-width: 991.98px) {
    .app-layout {
        flex-direction: column;
        width: 100%;
        min-width: 0;
    }
    .app-main {
        width: 100%;
        min-width: 0;
        flex: 1 1 auto;
        box-sizing: border-box;
    }
    .app-footer {
        padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
        z-index: 1020;
    }
    .app-footer-inner {
        justify-content: center;
        text-align: center;
    }
    .app-sidebar {
        display: none;
    }
    .app-sidebar.mobile-open {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        max-width: 85vw;
        min-width: 0;
        z-index: 1050;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s ease;
    }
}

/* Top bar (mobile) */
.app-topbar {
    display: none;
    background: var(--nav-bg);
    padding: 0.75rem 1rem;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--nav-border);
    flex-shrink: 0;
}
.app-topbar .navbar-brand {
    color: var(--nav-text-active);
    font-weight: 600;
    text-decoration: none;
}
.app-topbar .nav-link {
    color: var(--nav-text);
    font-weight: 500;
}
.app-topbar .btn-link {
    color: var(--nav-text-active);
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}
@media (max-width: 991.98px) {
    .app-topbar {
        display: flex;
        width: 100%;
    }
}

/* Navbar (when used standalone) - high contrast */
.navbar-dark .nav-link {
    color: var(--nav-text);
    font-weight: 500;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}
.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active {
    color: var(--nav-text-active);
}
.navbar-dark .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
}

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
}
.page-header .page-subtitle {
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 0;
}
/* Generate Content page - colorful header */
.page-header.generate-header {
    background: linear-gradient(120deg, rgba(225, 29, 72, 0.08) 0%, rgba(124, 58, 237, 0.08) 50%, rgba(67, 97, 238, 0.08) 100%);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--accent-coral);
}
.page-header.generate-header h1,
.page-header.generate-header .h4 {
    color: var(--accent-violet);
}
.page-header.generate-header .bi-balloon-heart {
    color: var(--accent-coral);
}

/* Product selector (reusable) */
.product-selector-card {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}
.product-selector-list {
    max-height: 220px;
    overflow-y: auto;
    background-color: var(--bg-input);
    border-radius: 0.5rem;
    padding: 0.5rem;
}
.product-selector-list .product-row {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.product-selector-list .product-row:hover {
    background: rgba(0, 0, 0, 0.06);
}
.product-selector-list .product-row.selected,
.product-selector-list .product-row.bg-primary {
    background: rgba(67, 97, 238, 0.15);
}
.selected-product-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: rgba(67, 97, 238, 0.2);
    border-radius: 0.5rem;
    font-size: 0.9rem;
}
@media (min-width: 992px) {
    .product-selector-card {
        height: 100%;
        min-height: 0;
        border-left: 4px solid var(--accent);
    }
    .generate-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Generate page */
.generate-actions .generate-card .card-header { padding-bottom: 0.5rem; }
.generation-queue-row.cursor-pointer { cursor: pointer; }
.generation-queue-row.cursor-pointer:hover { background: rgba(0, 0, 0, 0.04); }
.spin-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.design-card { transition: box-shadow 0.2s; }
.design-card:hover { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); }
.design-card .card-footer { min-height: 44px; }
.design-list-img {
    height: 200px;
    object-fit: cover;
    background: var(--bg-input);
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.generate-full-post-result .result-caption-label,
.generate-full-post-result .result-hashtags-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

/* Preview mock (FB / Instagram / Twitter) */
.preview-mock-wrapper {
    max-width: 420px;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.preview-mock {
    color: #1c1e21;
    font-size: 0.9rem;
}
.preview-mock-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}
.preview-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}
.preview-avatar-fb { background: #1877f2; }
.preview-avatar-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); width: 32px; height: 32px; }
.preview-avatar-tw { background: #1da1f2; }
.preview-name { font-weight: 600; }
.preview-meta { font-size: 0.75rem; color: #65676b; }
.preview-facebook .preview-mock-header { background: #f0f2f5; }
.preview-mock-img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}
.preview-mock-img-tw { border-radius: 0 0 1rem 1rem; }
.preview-mock-caption {
    padding: 0.75rem 1rem;
    line-height: 1.4;
}
.preview-mock-actions {
    padding: 0.5rem 1rem;
    border-top: 1px solid #e4e6eb;
    display: flex;
    justify-content: space-around;
    font-size: 0.8rem;
    color: #65676b;
}
.preview-mock-actions-ig { border-top: none; gap: 1rem; }

/* Dashboard - colorful */
.dashboard-hero {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-violet) 50%, var(--accent-coral) 100%);
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    color: #fff;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(67, 97, 238, 0.25);
}
@media (min-width: 768px) {
    .dashboard-hero {
        padding: 1.5rem 2rem;
        margin-bottom: 2rem;
    }
}
.dashboard-hero h1,
.dashboard-hero .h3 {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.dashboard-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    color: var(--text-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
#statsRow > div:nth-child(1) .dashboard-stat .stat-value { color: var(--accent); }
#statsRow > div:nth-child(2) .dashboard-stat .stat-value { color: var(--accent-coral); }
#statsRow > div:nth-child(3) .dashboard-stat .stat-value { color: var(--accent-teal); }
.dashboard-stat .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
}
.dashboard-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.product-card-dash {
    height: 100%;
    transition: transform 0.2s;
}
.product-card-dash:hover {
    transform: translateY(-2px);
}
.product-card-dash .card-img-top {
    height: 140px;
    object-fit: cover;
}
.product-card-dash .card-body {
    padding-bottom: 0.5rem;
}
.product-card-dash-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem 0.75rem;
    min-height: 36px;
}
.product-card-dash-brand.text-only {
    padding-top: 0;
}
.product-card-dash-brand-logo {
    max-width: 72px;
    max-height: 22px;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}
.product-card-dash-brand-name {
    font-size: 0.75rem;
    line-height: 1.2;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.liked-strip {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    min-height: 120px;
}
.liked-strip img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
}
.action-card {
    height: 100%;
    border: none;
    border-radius: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.action-card .rounded-3.bg-primary { background: linear-gradient(135deg, rgba(67, 97, 238, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%) !important; }
.action-card .rounded-3.bg-success { background: linear-gradient(135deg, rgba(13, 148, 136, 0.2) 0%, rgba(8, 145, 178, 0.2) 100%) !important; }
.action-card .rounded-3.bg-info { background: linear-gradient(135deg, rgba(8, 145, 178, 0.2) 0%, rgba(67, 97, 238, 0.2) 100%) !important; }
.action-card .text-primary { color: var(--accent) !important; }
.action-card .text-success { color: var(--accent-success) !important; }
.action-card .text-info { color: var(--accent-info) !important; }

/* Tabs (dark theme) */
.nav-tabs-dark .nav-link {
    color: var(--text-muted);
    border-color: var(--border-color);
    background: transparent;
}
.nav-tabs-dark .nav-link:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
}
.nav-tabs-dark .nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
    border-color: var(--border-color) var(--border-color) var(--bg-card);
}
.tab-content .tab-pane {
    padding-top: 1rem;
}

/* Import page */
.page-import .product-image {
    max-height: 200px;
    object-fit: cover;
    border-radius: 0.35rem;
}
.page-import .tab-content {
    min-height: 400px;
}
.loading-spinner {
    display: none;
}
.loading-spinner.show {
    display: inline-block;
}
.error-message,
.success-message {
    display: none;
}
.error-message.show,
.success-message.show {
    display: block;
}

/* Alerts - light theme */
.alert {
    border-width: 1px;
}
.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.4);
    color: #721c24;
}
.alert-success {
    background: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.4);
    color: #0f5132;
}

/* Schedule list cards */
.schedule-card {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: box-shadow 0.2s;
}
.schedule-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.schedule-modal-dialog {
    max-width: 760px;
}
#scheduleModal .modal-content > .schedule-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}
#scheduleModal .schedule-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.schedule-step-indicator {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.schedule-step-pill {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.95rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(67, 97, 238, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: var(--text-muted);
    transition: all 0.2s ease;
}
.schedule-step-pill.active {
    border-color: rgba(67, 97, 238, 0.3);
    background: linear-gradient(135deg, rgba(90, 126, 255, 0.16) 0%, rgba(13, 148, 136, 0.1) 100%);
    color: var(--text-primary);
    box-shadow: 0 10px 24px rgba(67, 97, 238, 0.1);
}
.schedule-step-pill-num {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: rgba(67, 97, 238, 0.12);
    color: var(--accent);
    flex-shrink: 0;
}
.schedule-step-pill-title {
    display: block;
    font-weight: 600;
    color: inherit;
}
.schedule-step-pill-copy {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.schedule-step-panel {
    display: none;
}
.schedule-step-panel.active {
    display: block;
}
.schedule-panel-card {
    border: 1px solid rgba(67, 97, 238, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.92));
    border-radius: 1rem;
    padding: 1rem;
}
.schedule-selected-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(13, 148, 136, 0.16);
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.95), rgba(239, 246, 255, 0.92));
    border-radius: 0.95rem;
}
.schedule-selected-summary-card .selected-product-chip {
    margin: 0;
}
.schedule-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 1.25rem;
}
.schedule-step-actions-end {
    justify-content: flex-end;
}

/* Compatibility badge helpers for Bootstrap 5.1 */
.bg-primary-subtle {
    background: rgba(67, 97, 238, 0.12) !important;
}
.bg-info-subtle {
    background: rgba(8, 145, 178, 0.12) !important;
}
.text-primary-emphasis {
    color: #2947c7 !important;
}
.text-info-emphasis {
    color: #0c728f !important;
}
.text-bg-light {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(67, 97, 238, 0.12);
}
.text-bg-primary {
    background: var(--accent) !important;
    color: #fff !important;
}

/* Account page */
.account-summary-card {
    border: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 255, 0.96));
}
.account-avatar {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.2), rgba(225, 29, 72, 0.18));
    color: var(--accent);
    font-size: 1.6rem;
}
.account-summary-meta {
    display: grid;
    gap: 0.75rem;
}
.account-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(67, 97, 238, 0.08);
}
.account-summary-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.account-plan-card {
    border: 1px solid rgba(67, 97, 238, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.account-plan-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(67, 97, 238, 0.14);
}
.account-plan-card.featured {
    border-color: rgba(67, 97, 238, 0.24);
    box-shadow: 0 14px 38px rgba(67, 97, 238, 0.16);
}
.account-plan-card.active {
    border-color: rgba(13, 148, 136, 0.32);
    box-shadow: 0 16px 38px rgba(13, 148, 136, 0.14);
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.96));
}

/* Super admin */
.super-auth-page,
.super-admin-page {
    min-height: 100vh;
    background: linear-gradient(160deg, #eff6ff 0%, #fef3f8 45%, #f0fdfa 100%);
}
.super-auth-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-violet));
    color: #fff;
    font-size: 1.6rem;
}
.super-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
}
.super-sidebar,
.super-main > .card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.super-sidebar {
    border-radius: 1.25rem;
    padding: 1.25rem;
    border: 1px solid rgba(67, 97, 238, 0.1);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.super-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.super-nav {
    display: grid;
    gap: 0.6rem;
}
.super-nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.8rem;
    text-decoration: none;
    color: var(--text-primary);
    background: rgba(67, 97, 238, 0.06);
}
.super-nav-link.active {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.14), rgba(124, 58, 237, 0.12));
    font-weight: 600;
}
.super-main {
    min-width: 0;
}
.super-admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(67, 97, 238, 0.12);
    border-radius: 999px;
    font-weight: 600;
}
.super-users-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

/* Empty states */
.empty-state {
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}
.empty-state .display-4,
.empty-state .bi {
    opacity: 0.7;
}
.empty-state a.btn,
.empty-state .btn {
    margin-top: 0.75rem;
}
@media (max-width: 575.98px) {
    .app-main {
        padding-bottom: calc(9rem + env(safe-area-inset-bottom, 0px));
    }
    .app-footer-copy,
    .app-footer-badges {
        justify-content: center;
    }
    .landing-footer-inner,
    .account-summary-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .schedule-selected-summary-card,
    .schedule-step-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
@media (max-width: 991.98px) {
    .super-shell {
        grid-template-columns: 1fr;
    }
}
