/* ==========================================================================
   FLATSPHERE — High-Grid Minimalist
   Clean · Industrial · Organized
   Swiss-style grid system, monochrome slate + single accent, hairline borders.
   ========================================================================== */

:root {
    /* Core brand */
    --brand: #1f2937;            /* near-black slate (buttons, active states)   */
    --brand-dark: #111827;       /* darker slate (hover)                         */
    --accent: #ea580c;           /* safety orange (single industrial accent)     */
    --accent-darker: #c2410c;    /* orange hover                                 */
    --dark-bg: #0f172a;          /* ink band background (footer, hero, cta)      */

    /* Surfaces */
    --card-bg: #ffffff;
    --card-border: #e2e8f0;      /* hairline border                               */
    --card-border-strong: #cbd5e1;
    --page-bg: #f8fafc;
    --panel-bg: #f1f5f9;

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Semantics */
    --success: #059669;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --warning: #b45309;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --info: #1d4ed8;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;

    /* Grid + structure */
    --grid-gap: 1.5rem;
    --container-max: 1240px;

    /* Radius — sharp / technical */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Shadows — flat, no glow */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 2px 6px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 8px 20px rgba(15, 23, 42, 0.1);
    --shadow-glow: none;
    --shadow-accent-glow: none;

    /* Motion — restrained */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Typography */
    --font-sans: "Outfit", system-ui, "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

body {
    font-family: var(--font-sans);
    background: #f8fafc;
    color: var(--text-primary);
}
/* Force one continuous page color (beat body.bg-light-subtle) */
body.bg-light-subtle { background: #f8fafc !important; }

/* Monochromatic accents for technical labels */
.font-monospace {
    font-family: var(--font-mono) !important;
    letter-spacing: 0.02em;
}

/* ---------- Navbar ---------- */
.site-navbar {
    background: #f8fafc;
    backdrop-filter: none;
    border-bottom: none !important;
    box-shadow: none !important;
}
.site-navbar .nav-link {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    border-radius: var(--radius-xs);
    padding-inline: 0.7rem !important;
    white-space: nowrap;
    transition: all var(--transition-fast);
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: var(--brand);
    background: none;
    box-shadow: inset 0 -2px 0 var(--accent);
}
.brand-badge {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    box-shadow: none;
}
.brand-badge-lg {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    border-radius: var(--radius-md);
}
.lang-btn { white-space: nowrap; border-radius: var(--radius-xs); }
.cart-btn { white-space: nowrap; border-radius: var(--radius-xs); }
.site-navbar .btn-warning {
    background: #ffffff;
    border: 1px solid var(--card-border-strong);
    color: var(--brand);
    border-radius: var(--radius-xs);
}
.site-navbar .btn-warning:hover { border-color: var(--accent); color: var(--accent); }

.btn-brand {
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
    border-radius: var(--radius-xs);
    font-weight: 600;
    letter-spacing: 0.03em;
    box-shadow: none;
    transition: all var(--transition-fast);
}
.btn-brand:hover,
.btn-brand:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
    box-shadow: none;
    transform: none;
}
.text-brand { color: var(--brand) !important; }

.btn-outline-brand {
    border: 1px solid var(--card-border-strong);
    background: #fff;
    color: var(--brand);
    border-radius: var(--radius-xs);
    font-weight: 600;
    transition: all var(--transition-fast);
}
.btn-outline-brand:hover,
.btn-outline-brand:focus {
    border-color: var(--brand);
    color: var(--brand-dark);
    background: var(--panel-bg);
}

/* ---------- Hero ---------- */
.hero-section {
    position: relative;
    background: #f8fafc;
    border-bottom: none !important;
    overflow: hidden;
}
.hero-bg-gradient,
.hero-mesh-gradient { display: none; }
.hero-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.08;
    text-transform: none;
    color: var(--text-primary);
    text-shadow: none;
}
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--card-border-strong);
    background: #ffffff;
    color: var(--text-secondary);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    font-weight: 600;
    text-transform: uppercase;
}
.hero-trust { color: var(--text-muted) !important; font-size: 0.85rem; letter-spacing: 0.02em; }

/* Optional cutout image behind the hero text (left side) */
.hero-section .row > .col-lg-7 { position: relative; z-index: 0; }
.hero-text-bg {
    position: absolute;
    top: 50%;
    left: -10%;
    transform: translateY(-50%);
    width: 120%;
    height: 125%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: saturate(0.9);
    pointer-events: none;
    z-index: -1;
}
.hero-trust i { color: var(--brand) !important; font-size: 1rem; }
.hero-flag-sticker {
    width: 22px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
    flex-shrink: 0;
}
.hero-section.text-white,
.hero-section .text-white { color: var(--text-primary) !important; }
.hero-section .text-white-75 { color: var(--text-secondary) !important; }
.hero-section .btn-light { color: var(--brand-dark); }
.hero-section .btn-light:hover { color: var(--brand-dark); }

/* Hero drone container — transparent, cutout photo floating on page */
.hero-drone-container {
    position: relative;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1 / 1;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-drone-container::before {
    content: "";
    position: absolute;
    inset: 6%;
    background: radial-gradient(closest-side, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.04) 55%, transparent 72%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}
.hero-drone-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(0.35);
    opacity: 0.92;
}
.hero-drone-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 34px rgba(15, 23, 42, 0.28));
}
.hero-drone-ring { display: none; }
.wave-bottom { display: none; }

@media (max-width: 991.98px) {
    .hero-drone-container {
        max-width: 300px;
        margin: 0 auto;
    }
}

.features-strip { margin-top: -34px; position: relative; z-index: 2; }

.feature-card {
    transition: transform var(--transition-base), border-color var(--transition-base);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md) !important;
    background: #fff;
}
.feature-card:hover {
    transform: none;
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--panel-bg);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--card-border);
}

.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
.section-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    border-radius: 0;
    background: var(--accent);
    margin: 10px auto 0;
}

/* ---------- Category tiles ---------- */
.category-tile {
    transition: transform var(--transition-base), border-color var(--transition-base);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: none !important;
}
.category-tile:hover {
    transform: none;
    box-shadow: var(--shadow-md) !important;
    border-color: var(--accent);
}
.category-img-wrapper {
    position: relative;
    height: 170px;
    overflow: hidden;
    background: var(--panel-bg);
}
.category-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.category-tile:hover .category-img {
    transform: scale(1.04);
}
.category-img-overlay,
.category-img-frame { display: none; }
.card-body { padding: 1rem; }
.tile-arrow {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.category-tile:hover .tile-arrow {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateX(4px);
}

/* ---------- Product cards ---------- */
.product-card {
    transition: transform var(--transition-base), border-color var(--transition-base);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: none !important;
}
.product-card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
    border-color: var(--card-border-strong);
}
.product-img-wrapper,
.product-frame {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--panel-bg);
}
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.product-card:hover .product-img {
    transform: scale(1.04);
}
.product-img-frame { display: none; }
.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 3;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-xs);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.badge-featured {
    background: var(--brand);
    color: #fff;
}
.badge-new {
    background: var(--accent);
    color: #fff;
}

/* Category sticker / SKU mono label */
.category-sticker {
    filter: grayscale(0.2);
    opacity: 0.85;
}

/* ---------- Product tables ---------- */
.product-table th { white-space: nowrap; font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table-thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: var(--radius-xs);
    border: 1px solid var(--card-border);
    background: var(--panel-bg);
}
.cart-thumb {
    width: 76px;
    height: 57px;
    object-fit: cover;
    border-radius: var(--radius-xs);
    flex: 0 0 auto;
    border: 1px solid var(--card-border);
    background: var(--panel-bg);
}
.stock-badge { font-weight: 700; border-radius: var(--radius-xs); }
.stock-ok { background: var(--success-bg); color: #065f46; border: 1px solid var(--success-border); }
.stock-low { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.stock-out { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }

.detail-img-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
    aspect-ratio: 4 / 3;
}
.detail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-img-frame { display: none; }
.qty-input { max-width: 90px; }
.qty-input-sm { max-width: 74px; }
.specs-table td { background: #fff !important; }
.specs-table td:first-child {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- Page headers / bands ---------- */
/* Match the navbar exactly so the band under the header reads as one surface */
.page-header {
    background: #f8fafc;
    border-bottom: none !important;
    /* Small gap before page detail (categories, products, …) */
    margin-bottom: 1.25rem;
}
/* ~50% shorter than py-4 / py-5 defaults */
.page-header > .container {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
}
.featured-band { background: var(--page-bg); border-top: none; border-bottom: none; }
.cta-banner {
    background:
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.06) 0,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px,
            transparent calc(var(--container-max) / 12)
        ),
        var(--dark-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md) !important;
}
.cta-bg-gradient,
.cta-mesh { display: none; }
.about-orb {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: #fff;
    background: var(--brand);
    transform: none;
    box-shadow: none;
    border: 1px solid var(--brand-dark);
}
.value-icon span {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-xs);
    background: var(--brand);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    border: 1px solid var(--brand-dark);
}
.stats-band { background: var(--brand); border-block: 1px solid var(--brand-dark); }
.info-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: var(--radius-xs);
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

/* ---------- Cart / checkout / success ---------- */
.summary-list li { border: none; }
.empty-cart-icon {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    box-shadow: none;
}
.success-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    animation: pop 0.4s ease;
    box-shadow: none;
}
@keyframes pop {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.order-number-chip {
    background: var(--panel-bg);
    border: 1px dashed var(--card-border-strong);
    border-radius: var(--radius-xs);
    padding: 14px 26px;
    font-family: var(--font-mono);
}

/* ---------- Auth ---------- */
.auth-card {
    max-width: 100%;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}
.auth-card .card-header {
    background: var(--panel-bg);
    border-bottom: 1px solid var(--card-border);
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

/* ---------- Staff auth (admin panel) ---------- */
.auth-staff-body {
    background: radial-gradient(ellipse at top left, #1e293b 0%, #0f172a 55%, #020617 100%);
}
.auth-staff-card {
    display: grid;
    grid-template-columns: 1fr;
}
.auth-staff-side {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 34px 34px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-bottom: 3px solid var(--accent);
}
.auth-staff-main .btn-dark {
    background: #0f172a;
    border-color: #0f172a;
}
.auth-staff-main .btn-dark:hover {
    background: #1e293b;
    border-color: #1e293b;
}
@media (min-width: 768px) {
    .auth-staff-card {
        grid-template-columns: 38% 62%;
    }
    .auth-staff-side {
        border-bottom: 0;
        border-inline-end: 3px solid var(--accent);
        justify-content: center;
    }
}

/* ---------- Test mode banner ---------- */
.test-mode-banner {
    background: repeating-linear-gradient(45deg, #b91c1c 0 12px, #991b1b 12px 24px);
}

/* ---------- Image Frames (Global) ---------- */
.img-frame {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.img-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid var(--card-border);
    border-radius: inherit;
    pointer-events: none;
    transition: border-color var(--transition-base);
}
.img-frame:hover::before {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.img-frame img {
    transition: transform var(--transition-slow);
}
.img-frame:hover img {
    transform: scale(1.03);
}

.category-frame {
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    overflow: hidden;
    background: var(--panel-bg);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.category-frame:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

/* ---------- Footer ---------- */
/* Same continuous page color top→bottom (matches body / header / hero) */
.site-footer {
    background: #f8fafc;
    border-top: none !important;
    box-shadow: none !important;
}
.site-footer hr {
    display: block;
    border: 0;
    border-top: 1px solid var(--card-border);
    opacity: 1;
    margin: 0 0 2.5rem;
}
.site-footer.text-white,
.site-footer .text-white { color: var(--text-primary) !important; }
.site-footer .text-white-50,
.site-footer .text-white-75 { color: var(--text-secondary) !important; }
.site-footer .footer-links a { color: var(--text-secondary); }
.site-footer .footer-links a:hover { color: var(--text-primary); }
.site-footer .text-info { color: var(--accent) !important; }
.site-footer hr,
.site-footer .border-secondary { border-color: var(--card-border) !important; }
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-block;
    padding: 3px 0;
    transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--text-primary); }
.site-footer .text-info { color: var(--accent) !important; }

/* Dark: footer joins the same #0b1220 band, text stays light */
[data-theme="dark"] .site-footer { background: #0b1220; }
[data-theme="dark"] .site-footer.text-white,
[data-theme="dark"] .site-footer .text-white { color: #ffffff !important; }
[data-theme="dark"] .site-footer .text-white-50,
[data-theme="dark"] .site-footer .text-white-75 { color: rgba(255, 255, 255, 0.5) !important; }
[data-theme="dark"] .site-footer .footer-links a { color: rgba(255, 255, 255, 0.62); }
[data-theme="dark"] .site-footer .footer-links a:hover { color: #ffffff; }
[data-theme="dark"] .site-footer .text-info { color: #ffffff !important; }

/* ---------- Print support ---------- */
@media print {
    .no-print,
    .site-navbar,
    .site-footer,
    .btn,
    .cta-banner,
    .hero-section .hero-trust {
        display: none !important;
    }
    .hero-section {
        background: var(--dark-bg) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .hero-drone-video,
    .hero-drone-img {
        max-width: 300px !important;
    }
    .category-tile,
    .product-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
    }
    body { font-size: 11pt; line-height: 1.5; }
    .container { max-width: 100% !important; padding: 0 !important; }
    a[href]::after { content: none !important; }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .animate-fade-in-up,
    .animate-fade-in-up *,
    .success-icon { animation: none !important; transition: none !important; }
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Additional Utilities ---------- */
.bg-gradient-brand {
    background: var(--brand) !important;
    border: none;
}
.bg-gradient-subtle {
    background: var(--panel-bg);
    border: 1px dashed var(--card-border-strong) !important;
}
.text-white-75 { color: rgba(255, 255, 255, 0.75) !important; }

/* ---------- Customer Portal ---------- */
.customer-portal-header {
    background: var(--brand);
    border-bottom: 1px solid var(--brand-dark);
}
.customer-hero-card {
    background: var(--brand);
    border-radius: var(--radius-md);
    border: 1px solid var(--brand-dark);
}
.customer-stat {
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border) !important;
}

.stat-chip {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
    color: var(--brand);
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}
a:hover .stat-chip {
    border-color: var(--accent);
    color: var(--accent);
}
.customer-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--card-border);
}
.customer-nav .list-group-item {
    padding: 10px 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-inline-start: 3px solid transparent;
    transition: all var(--transition-fast);
}
.customer-nav .list-group-item:hover {
    background: var(--panel-bg);
    color: var(--brand);
    transform: none;
}
.customer-nav .list-group-item.active {
    background: var(--panel-bg) !important;
    color: var(--brand) !important;
    border-inline-start-color: var(--accent);
    box-shadow: none;
}

.transition-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.transition-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}
.hover-item {
    transition: background-color var(--transition-fast);
}
.hover-item:hover {
    background-color: var(--panel-bg);
}
.hover-brand {
    transition: color var(--transition-fast);
}
.hover-brand:hover {
    color: var(--brand) !important;
}

.user-avatar-badge {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-xs);
    background: var(--brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}
.user-dropdown-menu {
    min-width: 240px;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
}
.user-dropdown-menu .dropdown-item {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: background-color var(--transition-fast);
}

/* ---------- Order Status Stepper ---------- */
.order-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding: 10px 0;
}
.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}
.step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--panel-bg);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 2px solid var(--card-border);
    transition: all 0.3s ease;
    margin-bottom: 10px;
}
.step-completed .step-icon {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-border);
    box-shadow: none;
}
.step-active .step-icon {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand-dark);
    box-shadow: none;
    transform: scale(1.1);
}
.stepper-line {
    flex: 1;
    height: 2px;
    background: var(--card-border);
    position: relative;
    top: 22px;
    z-index: 1;
    transition: background 0.3s ease;
}
.stepper-line.line-active {
    background: var(--success);
}
.step-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.step-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    max-width: 150px;
    line-height: 1.3;
}
.step-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

@media (max-width: 767.98px) {
    .order-stepper {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }
    .stepper-line {
        display: none;
    }
    .stepper-step {
        flex-direction: row;
        text-align: start;
        gap: 16px;
        width: 100%;
    }
    .step-icon {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .step-desc {
        max-width: 100%;
    }
}

/* ---------- Status Badges ---------- */
.status-badge {
    font-weight: 700;
    padding: 0.38em 0.7em;
    border-radius: var(--radius-xs);
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    border: 1px solid transparent;
}
.st-pending { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.st-processing { background: var(--info-bg); color: #1e40af; border-color: var(--info-border); }
.st-shipped { background: var(--info-bg); color: #3730a3; border-color: #c7d2fe; }
.st-delivered { background: var(--success-bg); color: #065f46; border-color: var(--success-border); }
.st-cancelled { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }

/* Offer statuses */
.st-draft { background: var(--panel-bg); color: var(--text-secondary); border-color: var(--card-border-strong); }
.st-sent { background: var(--info-bg); color: #1e40af; border-color: var(--info-border); }
.st-accepted { background: var(--success-bg); color: #065f46; border-color: var(--success-border); }
.st-rejected { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.st-expired { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

/* ---------- RTL Utilities ---------- */
[dir="rtl"] .flip-x {
    transform: scaleX(-1);
    display: inline-block;
}

/* ---------- Generic button + form alignment ---------- */
.btn { border-radius: var(--radius-xs); font-weight: 600; letter-spacing: 0.02em; }
.btn-outline-dark { border-radius: var(--radius-xs); }
.btn-outline-light { border-radius: var(--radius-xs); }
.btn-light { border-radius: var(--radius-xs); }
.form-control, .form-select {
    border-radius: var(--radius-xs);
    border: 1px solid var(--card-border-strong);
}
.card {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
}
.rounded-4 { border-radius: var(--radius-md) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }

/* ---------- Badges (Bootstrap) ---------- */
.badge { border-radius: var(--radius-xs); font-weight: 700; }

/* ---------- Inputs focus ---------- */
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.list-group-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: none;
}

/* ---------- Screenshot / data sheet tables ---------- */
.table {
    --bs-table-striped-bg: #f8fafc;
}
.table thead th {
    background: var(--panel-bg);
    text-transform: uppercase;
    font-size: 0.76rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--card-border-strong);
}

/* ==========================================================================
   Dark theme
   ========================================================================== */
[data-theme="dark"] {
    color-scheme: dark;

    --page-bg: #0b1220;
    --card-bg: #111a2c;
    --card-border: #22304a;
    --card-border-strong: #33415c;
    --panel-bg: #17233b;
    --dark-bg: #050a14;

    --text-primary: #e2e8f0;
    --text-secondary: #a8b8cd;
    --text-muted: #8fa0bc;

    --success-bg: #0c2b22;
    --warning-bg: #2b2410;
    --danger-bg: #2b1215;
    --info-bg: #0f2240;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.5);

    --bs-success-text-emphasis: #86efac;
    --bs-danger-text-emphasis: #fca5a5;
    --bs-warning-text-emphasis: #fde68a;
    --bs-info-text-emphasis: #93c5fd;
    --bs-primary-text-emphasis: #93c5fd;
    --bs-secondary-text-emphasis: #cbd5e1;
    --bs-success-bg-subtle: #0c2b22;
    --bs-success-border-subtle: #14532d;
    --bs-danger-bg-subtle: #2b1215;
    --bs-danger-border-subtle: #7f1d1d;
    --bs-warning-bg-subtle: #2b2410;
    --bs-warning-border-subtle: #78350f;
    --bs-info-bg-subtle: #0f2240;
    --bs-info-border-subtle: #1e3a8a;
    --bs-secondary-bg-subtle: #17233b;
    --bs-secondary-border-subtle: #33415c;
    --bs-primary-bg-subtle: #0f2240;
    --bs-primary-border-subtle: #1e3a8a;
    --bs-tertiary-bg-rgb: 23, 35, 59;
    --bs-body-bg-tertiary: #17233b;

    /* Text emphasis — Bootstrap defaults (#000 / #212529) stay black otherwise;
       fixes unreadable product names in tables (text-reset inherits --bs-table-color) */
    --bs-body-color: #e2e8f0;
    --bs-emphasis-color: #e2e8f0;
    --bs-emphasis-color-rgb: 226, 232, 240;
    --bs-heading-color: #e2e8f0;
    --bs-secondary-color: rgba(168, 184, 205, 0.75);
}

[data-theme="dark"] body,
[data-theme="dark"] body.bg-light-subtle {
    background: #0b1220 !important;
}

/* Brand elements */
[data-theme="dark"] .btn-brand {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}
[data-theme="dark"] .btn-brand:hover,
[data-theme="dark"] .btn-brand:focus {
    background: var(--accent-darker);
    border-color: var(--accent-darker);
    color: #ffffff;
}
[data-theme="dark"] .text-brand { color: var(--accent) !important; }
[data-theme="dark"] .btn-outline-brand {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}
[data-theme="dark"] .btn-outline-brand:hover,
[data-theme="dark"] .btn-outline-brand:focus {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}
[data-theme="dark"] .hero-trust {
    color: #e2e8f0 !important;
}
[data-theme="dark"] .hero-trust i { color: #ffffff !important; }

/* White stickers/icons in dark mode */
[data-theme="dark"] .feature-icon,
[data-theme="dark"] .info-icon,
[data-theme="dark"] .stat-chip {
    color: #ffffff;
    background: rgba(234, 88, 12, 0.16);
    border-color: var(--card-border-strong);
}
[data-theme="dark"] a:hover .stat-chip { color: #ffffff; }
[data-theme="dark"] .feature-card .fw-bold { color: #ffffff; }
[data-theme="dark"] .feature-card .text-muted { color: var(--text-secondary) !important; }

/* Navbar — same solid band color as hero + footer */
[data-theme="dark"] .site-navbar {
    background: #0b1220;
    border-bottom: none !important;
    box-shadow: none !important;
}
[data-theme="dark"] .site-navbar .nav-link { color: var(--text-secondary); }
[data-theme="dark"] .site-navbar .nav-link:hover,
[data-theme="dark"] .site-navbar .nav-link.active { color: #ffffff; }
[data-theme="dark"] .site-navbar .btn-warning {
    background: var(--card-bg);
    border-color: var(--card-border-strong);
    color: var(--text-primary);
}
[data-theme="dark"] .user-nav-dropdown .btn { color: var(--text-primary); }

/* Page-header band under the navbar — same color as header/hero/footer on every page */
[data-theme="dark"] .page-header {
    background: #0b1220;
    border-bottom: none !important;
}
[data-theme="dark"] .page-header .breadcrumb-item a { color: var(--text-muted); }
[data-theme="dark"] .page-header .breadcrumb-item.active { color: var(--text-secondary); }

/* Hero + footer share the exact same band color as the header */
[data-theme="dark"] .site-footer {
    background: #0b1220;
    border-top: none !important;
}

/* Product spec cells stay hardcoded white in light mode — flip for dark */
[data-theme="dark"] .specs-table td { background: var(--card-bg) !important; }

/* Hero */
[data-theme="dark"] .hero-section {
    background: #0b1220;
    border-bottom: none !important;
}
[data-theme="dark"] .hero-chip {
    background: var(--card-bg);
    border-color: var(--card-border-strong);
    color: var(--text-secondary);
}
[data-theme="dark"] .hero-section .text-white { color: var(--text-primary) !important; }
[data-theme="dark"] .hero-section .text-white-75 { color: var(--text-secondary) !important; }
[data-theme="dark"] .hero-drone-container::before {
    background: radial-gradient(closest-side, rgba(120, 160, 255, 0.16), rgba(120, 160, 255, 0.05) 55%, transparent 72%);
}
[data-theme="dark"] .hero-drone-img {
    filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.6));
}

/* Hardcoded Bootstrap utility overrides */
[data-theme="dark"] .bg-white { background-color: var(--card-bg) !important; }
[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-light-subtle { background-color: var(--panel-bg) !important; }
[data-theme="dark"] .bg-body-tertiary { background-color: var(--panel-bg) !important; }
/* Body must stay the same band color as header→footer (overrides bg-light-subtle) */
[data-theme="dark"] body.bg-light-subtle { background-color: #0b1220 !important; }
[data-theme="dark"] .bg-gradient-subtle { background: var(--panel-bg) !important; }
[data-theme="dark"] .text-dark { color: var(--text-primary) !important; }
[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }
[data-theme="dark"] .text-secondary { color: var(--text-secondary) !important; }

/* Cards */
[data-theme="dark"] .card { background-color: var(--card-bg); }
[data-theme="dark"] .card-header {
    background-color: var(--card-bg) !important;
    border-color: var(--card-border);
}
[data-theme="dark"] .card-footer {
    background-color: var(--card-bg) !important;
    border-color: var(--card-border);
}
[data-theme="dark"] .category-tile { background: var(--card-bg); }
[data-theme="dark"] .category-tile .text-dark { color: var(--text-primary) !important; }

/* Tables */
[data-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-color: var(--card-border);
}
[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .table-light,
[data-theme="dark"] thead.table-light th,
[data-theme="dark"] .table tfoot.table-light {
    background-color: var(--panel-bg) !important;
    color: var(--text-secondary);
    border-color: var(--card-border);
}

/* Lists & menus */
[data-theme="dark"] .list-group-item {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--card-border);
}
[data-theme="dark"] .dropdown-menu {
    background-color: var(--card-bg);
    border-color: var(--card-border);
}
[data-theme="dark"] .dropdown-item { color: var(--text-primary); }
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: var(--panel-bg);
    color: var(--text-primary);
}
[data-theme="dark"] .dropdown-divider { border-color: var(--card-border); }

/* Forms */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .input-group-text {
    background-color: var(--card-bg);
    border-color: var(--card-border-strong);
    color: var(--text-primary);
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--card-bg);
    color: var(--text-primary);
}
[data-theme="dark"] .form-control::placeholder { color: var(--text-muted); }
[data-theme="dark"] .form-check-input {
    background-color: var(--card-bg);
    border-color: var(--card-border-strong);
}
[data-theme="dark"] .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* Buttons */
[data-theme="dark"] .btn-outline-dark {
    color: var(--text-primary);
    border-color: var(--card-border-strong);
}
[data-theme="dark"] .btn-outline-dark:hover {
    background: var(--panel-bg);
    border-color: var(--card-border-strong);
    color: #ffffff;
}
[data-theme="dark"] .btn-outline-secondary { color: var(--text-secondary); }
[data-theme="dark"] .btn-light {
    background: #e2e8f0;
    color: #0f172a;
}
[data-theme="dark"] .btn-link { color: var(--accent); }

/* Pagination */
[data-theme="dark"] .page-link {
    background-color: var(--card-bg);
    border-color: var(--card-border);
    color: var(--text-secondary);
}
[data-theme="dark"] .page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}
[data-theme="dark"] .page-item.disabled .page-link {
    background-color: var(--card-bg);
    border-color: var(--card-border);
    color: var(--text-muted);
}

/* Breadcrumbs & alerts */
[data-theme="dark"] .breadcrumb-item.active { color: var(--text-secondary); }
[data-theme="dark"] .breadcrumb-item a { color: var(--text-muted); }
[data-theme="dark"] .alert-success {
    --bs-alert-bg: #0c2b22;
    --bs-alert-color: #86efac;
    --bs-alert-border-color: #14532d;
}
[data-theme="dark"] .alert-danger {
    --bs-alert-bg: #2b1215;
    --bs-alert-color: #fca5a5;
    --bs-alert-border-color: #7f1d1d;
}
[data-theme="dark"] .alert-warning {
    --bs-alert-bg: #2b2410;
    --bs-alert-color: #fde68a;
    --bs-alert-border-color: #78350f;
}
[data-theme="dark"] .alert-info {
    --bs-alert-bg: #0f2240;
    --bs-alert-color: #93c5fd;
    --bs-alert-border-color: #1e3a8a;
}

/* Badges with fixed light backgrounds */
[data-theme="dark"] .badge.bg-dark-subtle {
    background-color: var(--panel-bg) !important;
    color: var(--text-secondary) !important;
}
[data-theme="dark"] .badge.bg-secondary-subtle {
    background-color: var(--panel-bg) !important;
    color: var(--text-muted) !important;
}
[data-theme="dark"] .badge.bg-light {
    background-color: var(--panel-bg) !important;
    color: var(--text-secondary) !important;
}

/* Misc surfaces */
[data-theme="dark"] .empty-cart-icon,
[data-theme="dark"] .empty-icon-box { color: var(--text-muted); }
[data-theme="dark"] .offcanvas { background-color: var(--card-bg); color: var(--text-primary); }
[data-theme="dark"] .admin-topbar { background: var(--card-bg) !important; }
[data-theme="dark"] .modal-content { background-color: var(--card-bg); color: var(--text-primary); }

/* Smooth theme transition */
body, .card, .site-navbar, .dropdown-menu, .form-control, .table,
.list-group-item, .btn, .hero-section, .admin-topbar, .card-header {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* ==========================================================================
   B2B CONTENT BLOCKS — How it works · Product experience · Solutions pages
   ========================================================================== */

/* ---------- How it works ---------- */
.step-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-md) !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.step-card:hover {
    border-color: var(--accent) !important;
    box-shadow: var(--shadow-md);
}
.step-badge {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    background: var(--brand);
    border: 1px solid var(--brand-dark);
    border-radius: var(--radius-sm);
}
.how-it-works .feature-icon { margin-bottom: 0.5rem; }

/* ---------- Product experience ---------- */
.track-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-md) !important;
}
.track-card:hover { border-color: var(--accent) !important; }
.track-card h4 { font-size: 1.2rem; }
.track-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
}

/* ---------- Generic B2B cards ---------- */
.b2b-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-md) !important;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.b2b-card:hover {
    border-color: var(--accent) !important;
    box-shadow: var(--shadow-md);
}
.b2b-card h5 { font-size: 1.05rem; }
.b2b-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
}
.b2b-icon.mx-auto { display: flex; }

/* ---------- CTA / closing / notice ---------- */
.b2b-cta {
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
}
.b2b-closing {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
}
.b2b-notice {
    background: var(--panel-bg);
    border: 1px dashed var(--card-border-strong);
}
.b2b-notice-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--accent);
    font-size: 1.35rem;
}

/* ---------- Partner / guide cards ---------- */
.partner-logo {
    width: 100%;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 1.6rem;
    overflow: hidden;
}
.partner-logo img { max-width: 80%; max-height: 56px; object-fit: contain; }

/* ---------- Admin: repeatable content rows ---------- */
.cms-list {
    background: var(--panel-bg);
    border-color: var(--card-border) !important;
}
.cms-row {
    background: var(--card-bg) !important;
    border-color: var(--card-border) !important;
}
.cms-row .form-control,
.cms-row .form-select { border-color: var(--card-border); }
.cms-count { font-variant-numeric: tabular-nums; }

/* ---------- Solutions dropdown (storefront nav) ---------- */
.site-navbar .dropdown-menu {
    min-width: 220px;
    padding: 0.5rem 0;
    border: 1px solid var(--card-border) !important;
    background: var(--card-bg);
}
.site-navbar .dropdown-item {
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: normal;
}
.site-navbar .dropdown-item:hover,
.site-navbar .dropdown-item:focus,
.site-navbar .dropdown-item.active {
    background: var(--panel-bg);
    color: var(--text-primary);
}
