/* ============================================================
   KINTO UWP MICROSITE — DESIGN SYSTEM
   Tokens + component recipes ported from
   prototype/kinto-warranty-prototype-dark.html. Structural classes
   the RHP JavaScript depends on (wizard-*, summary-*, outlet-picker*,
   tyre-entry, invoice-dropzone, ai-filled, ts-*, …) keep their names
   and are only restyled. The DARK THEME block is appended LAST so it
   overrides every light rule above it.
   ============================================================ */

/* ===== Tokens (light — from the prototype) ===== */
:root {
    --k-red: #E30613; --k-red-light: #ff2a3b; --k-red-dark: #b3040f;
    --k-red-glow: rgba(227, 6, 19, .22);
    --k-black: #0d0e11; --k-charcoal: #16181d; --k-steel: #232830;
    --k-gray-50: #fafafa; --k-gray-100: #f4f5f6; --k-gray-200: #e9ebee;
    --k-gray-300: #dcdfe3; --k-gray-400: #b6bcc3; --k-gray-500: #8b929b;
    --k-gray-600: #666d76;
    --k-text: #14161a; --k-text-secondary: #5f6772; --k-white: #fff;
    --k-radius-sm: 8px; --k-radius: 12px; --k-radius-lg: 16px; --k-radius-xl: 24px;
    --k-shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
    --k-shadow-sm: 0 1px 3px rgba(0, 0, 0, .09), 0 1px 2px rgba(0, 0, 0, .06);
    --k-shadow: 0 4px 6px -1px rgba(0, 0, 0, .08), 0 2px 4px -2px rgba(0, 0, 0, .05);
    --k-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .05);
    --k-shadow-lg: 0 20px 30px -8px rgba(0, 0, 0, .16), 0 8px 10px -6px rgba(0, 0, 0, .05);
    --k-shadow-red: 0 4px 14px rgba(227, 6, 19, .32);
    --k-trans: all .3s cubic-bezier(.4, 0, .2, 1);
    --k-trans-fast: all .15s cubic-bezier(.4, 0, .2, 1);
    --k-trans-bounce: all .4s cubic-bezier(.34, 1.56, .64, 1);
    /* surfaces — same as the page in light mode, swapped by the dark block */
    --surface: #fff; --surface-2: #f4f5f6; --border: #e9ebee; --border-2: #dcdfe3;
    --k-success: #16a34a; --k-success-text: #15803d;
    --k-warning: #ea580c; --k-warning-text: #c2410c;
    --k-info: #0284c7; --k-info-text: #075985;
    --k-danger-text: #b91c1c;
    color-scheme: light;
}

/* ===== Base & typography ===== */
* { box-sizing: border-box; }
html, body { max-width: 100vw; overflow-x: hidden; }
html { font-size: 15px; min-height: 100%; scroll-behavior: smooth; }
@media (min-width: 768px) { html { font-size: 16px; } }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--k-text);
    background: linear-gradient(180deg, #f6f7f9 0%, var(--k-gray-50) 30%, var(--k-gray-50) 70%, #f4f4f5 100%);
    min-height: 100vh; display: flex; flex-direction: column; margin: 0; line-height: 1.6;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, .section-title, .brand-hero-title { font-family: 'Saira', 'Inter', sans-serif; }
a { color: var(--k-red); text-decoration: none; transition: var(--k-trans-fast); }
a:hover { color: var(--k-red-dark); }
::selection { background: var(--k-red); color: #fff; }
.text-red { color: var(--k-red) !important; }
.small-note { font-size: .75rem; color: var(--k-text-secondary); }
.divider-txt { display: flex; align-items: center; gap: 1rem; color: var(--k-text-secondary); }
.divider-txt hr { flex: 1; opacity: .4; }

/* ===== Scroll animations ===== */
.fade-in-up { opacity: 0; transform: translateY(30px); transition: opacity .6s ease-out, transform .6s ease-out; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }
.fade-in-left { opacity: 0; transform: translateX(-30px); transition: opacity .6s ease-out, transform .6s ease-out; }
.fade-in-left.visible { opacity: 1; transform: translateX(0); }
.fade-in-right { opacity: 0; transform: translateX(30px); transition: opacity .6s ease-out, transform .6s ease-out; }
.fade-in-right.visible { opacity: 1; transform: translateX(0); }
.scale-in { opacity: 0; transform: scale(.9); transition: opacity .5s ease-out, transform .5s ease-out; }
.scale-in.visible { opacity: 1; transform: scale(1); }
.delay-1 { transition-delay: .1s; } .delay-2 { transition-delay: .2s; } .delay-3 { transition-delay: .3s; } .delay-4 { transition-delay: .4s; }

/* ===== Navbar ===== */
.navbar-k {
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, .06); box-shadow: var(--k-shadow-xs);
    padding: .35rem 0; transition: var(--k-trans); z-index: 1030;
}
.navbar-k.scrolled { box-shadow: var(--k-shadow-md); padding: .2rem 0; }
.navbar-k .navbar-brand { transition: var(--k-trans); }
.navbar-k .navbar-brand:hover { transform: scale(1.02); }
.navbar-k .brand-logo { height: 46px; width: auto; }
@media (max-width: 575.98px) { .navbar-k .brand-logo { height: 34px; } }
.navbar-k .nav-link {
    color: var(--k-text) !important; font-weight: 600; font-size: .9rem;
    padding: .55rem .95rem !important; border-radius: var(--k-radius-sm); transition: var(--k-trans-fast); cursor: pointer;
}
.navbar-k .nav-link:hover { color: var(--k-red) !important; background: rgba(227, 6, 19, .06); }
.navbar-k .nav-link.active { color: var(--k-red) !important; background: rgba(227, 6, 19, .09); }
.navbar-k .nav-user { color: var(--k-text-secondary) !important; font-size: .85rem; font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Two logos in the navbar — one per theme (the dark block swaps them) */
.brand-logo-dark { display: none; }
/* Light / dark switch (navbar). Icon shows the theme you'd switch TO. */
.theme-toggle {
    width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1.5px solid var(--border-2); color: var(--k-text); font-size: 1rem;
    transition: var(--k-trans-fast); flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--k-red); color: var(--k-red); }
.theme-toggle .bi-sun-fill { display: none; }
html[data-theme="dark"] .theme-toggle .bi-sun-fill { display: inline; }
html[data-theme="dark"] .theme-toggle .bi-moon-stars-fill { display: none; }

/* ===== Buttons ===== */
.btn-k-red {
    background: linear-gradient(135deg, var(--k-red) 0%, var(--k-red-light) 100%);
    color: #fff; border: none; border-radius: var(--k-radius-sm); font-weight: 700; font-size: .9rem;
    padding: .65rem 1.8rem; box-shadow: var(--k-shadow-red); transition: var(--k-trans); position: relative; overflow: hidden;
}
.btn-k-red::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); transition: left .5s ease; }
.btn-k-red:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 22px rgba(227, 6, 19, .45); }
.btn-k-red:hover::after { left: 100%; }
.btn-k-red:active { transform: translateY(0); }
.btn-k-red:disabled { opacity: .7; transform: none; }
.btn-k-dark {
    background: linear-gradient(135deg, var(--k-black) 0%, var(--k-steel) 100%);
    color: #fff; border: none; border-radius: var(--k-radius-sm); font-weight: 700; font-size: .9rem;
    padding: .65rem 1.8rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); transition: var(--k-trans);
}
.btn-k-dark:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 7px 22px rgba(0, 0, 0, .35); }
.btn-k-dark:active { transform: translateY(0); }
.btn-k-dark:disabled { opacity: .7; transform: none; color: #fff; }
.btn-k-outline {
    background: transparent; color: var(--k-red); border: 2px solid var(--k-red);
    border-radius: var(--k-radius-sm); font-weight: 700; font-size: .9rem; padding: .5rem 1.7rem;
    transition: var(--k-trans); position: relative; overflow: hidden; z-index: 1;
}
.btn-k-outline::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 0; height: 100%;
    background: var(--k-red); transition: width .3s ease; z-index: -1; }
.btn-k-outline:hover { color: #fff; transform: translateY(-2px); }
.btn-k-outline:hover::before { width: 100%; }
/* Find Outlets filter (All / KINTO Store): compact, active = filled red */
.filter-btn { padding: .35rem 1rem; font-size: .82rem; }
.filter-btn.active { color: #fff; }
.filter-btn.active::before { width: 100%; }
.btn-k-ghost-dark {
    background: transparent; color: var(--k-text); border: 2px solid var(--k-gray-300);
    border-radius: var(--k-radius-sm); font-weight: 600; font-size: .9rem; padding: .5rem 1.4rem; transition: var(--k-trans-fast);
}
.btn-k-ghost-dark:hover { border-color: var(--k-black); color: var(--k-black); }
.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px var(--k-red-glow) !important; border-color: var(--k-red) !important; outline: none;
}
.form-check-input:checked { background-color: var(--k-red); border-color: var(--k-red); }

/* ===== Cards & sections ===== */
.card-k {
    background: var(--surface); border: 1px solid rgba(0, 0, 0, .05); border-radius: var(--k-radius);
    box-shadow: var(--k-shadow-sm); transition: var(--k-trans); overflow: hidden; position: relative;
}
.card-k::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--k-red), var(--k-black)); opacity: 0; transition: opacity .3s ease; }
.card-k:hover { box-shadow: var(--k-shadow-lg); transform: translateY(-5px); border-color: transparent; }
.card-k:hover::before { opacity: 1; }
.card-k .card-body { padding: 1.5rem; }
.card-k.no-lift:hover { transform: none; box-shadow: var(--k-shadow-sm); }

.form-section {
    background: var(--surface); border: 1px solid rgba(0, 0, 0, .05); border-radius: var(--k-radius);
    box-shadow: var(--k-shadow-sm); margin-bottom: 1.5rem; overflow: hidden; transition: var(--k-trans);
}
.form-section:hover { box-shadow: var(--k-shadow); }
.form-section-header {
    background: linear-gradient(135deg, var(--k-black) 0%, var(--k-steel) 100%);
    color: #fff; font-weight: 700; padding: .7rem 1.25rem; font-size: .82rem; letter-spacing: .8px;
    text-transform: uppercase; font-family: 'Saira', 'Inter', sans-serif;
}
.form-section-header .float-end { font-family: 'Inter', sans-serif; }
.form-section-body { padding: 1.5rem; background: var(--surface); }

.section-title {
    position: relative; font-weight: 800; padding-bottom: .7rem; margin-bottom: 1.4rem;
    text-transform: uppercase; letter-spacing: .3px; font-size: 1.15rem; color: var(--k-text);
}
.section-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 46px; height: 4px;
    background: linear-gradient(90deg, var(--k-red), var(--k-black)); border-radius: 2px; transition: width .3s ease; }
.card-k:hover .section-title::after, .section-title:hover::after { width: 78px; }
.section-title.text-center::after { left: 50%; transform: translateX(-50%); }
.step-badge {
    width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .85rem; background: var(--k-red); color: #fff; flex-shrink: 0; font-family: 'Saira', sans-serif;
}
.step-badge.dark { background: var(--k-black); }
.check-list li { padding: .45rem 0; display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; }
.check-list li i { margin-top: 3px; flex-shrink: 0; color: var(--k-red); }

/* ===== Hero ===== */
.hero-k {
    position: relative; border-radius: var(--k-radius-lg); overflow: hidden; color: #fff;
    padding: 3.2rem 2.2rem; min-height: 280px; display: flex; flex-direction: column; justify-content: center;
    background:
        linear-gradient(115deg, rgba(13, 14, 17, .94) 0%, rgba(13, 14, 17, .80) 45%, rgba(179, 4, 15, .55) 100%),
        radial-gradient(circle at 82% 18%, rgba(227, 6, 19, .5) 0%, transparent 42%),
        #0d0e11;
}
.hero-k::before { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(115deg, transparent 0 26px, rgba(227, 6, 19, .10) 26px 30px);
    -webkit-mask: linear-gradient(115deg, #000, transparent 60%); mask: linear-gradient(115deg, #000, transparent 60%); }
.hero-k > * { position: relative; z-index: 1; }
.hero-k .hero-kicker {
    display: inline-flex; align-items: center; gap: 8px; font-family: 'Saira', sans-serif; font-weight: 700;
    font-size: .72rem; letter-spacing: 3px; text-transform: uppercase; color: var(--k-red-light);
    background: rgba(227, 6, 19, .14); border: 1px solid rgba(227, 6, 19, .4); padding: 5px 14px; border-radius: 999px;
    width: fit-content; margin-bottom: 1rem;
}
.hero-k h1 { font-weight: 900; font-style: italic; font-size: 2.5rem; line-height: 1.02; letter-spacing: -.5px;
    text-transform: uppercase; margin-bottom: .6rem; color: #fff; }
.hero-k p { max-width: 520px; color: rgba(255, 255, 255, .82); margin-bottom: 1.4rem; }
.hero-k .hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-k .hero-stats .num { font-family: 'Saira', sans-serif; font-weight: 800; font-size: 1.6rem; color: #fff; line-height: 1; }
.hero-k .hero-stats .lbl { font-size: .72rem; color: rgba(255, 255, 255, .6); text-transform: uppercase; letter-spacing: 1px; }
@media (max-width: 575.98px) { .hero-k { padding: 2.2rem 1.4rem; min-height: auto; } .hero-k h1 { font-size: 1.8rem; } .hero-k .hero-stats { gap: 1.25rem; } }

/* ===== How it works strip ===== */
.hiw-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.hiw-step {
    display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--k-radius); box-shadow: var(--k-shadow-xs);
    transition: var(--k-trans);
}
.hiw-step:hover { border-color: var(--k-red); transform: translateY(-3px); }
.hiw-step .hiw-title { font-weight: 700; font-size: .9rem; color: var(--k-text); }
.hiw-step .hiw-desc { font-size: .78rem; color: var(--k-text-secondary); line-height: 1.4; }
@media (max-width: 991.98px) { .hiw-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .hiw-strip { grid-template-columns: 1fr; } }

/* ===== Action cards ===== */
.action-row .col-md-4, .action-row .col-md-6 { display: flex; }
.action-card {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end; width: 100%;
    border-radius: 16px; padding: 1.5rem; color: #fff; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease;
    min-height: 190px; cursor: pointer; text-decoration: none;
}
.action-card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(0, 0, 0, .22); color: #fff; }
.action-card:active { transform: translateY(-2px); }
.action-card-bg-icon { position: absolute; top: -10px; right: -8px; font-size: 6.5rem; opacity: .10; transform: rotate(-10deg);
    pointer-events: none; transition: transform .4s ease, opacity .3s ease; }
.action-card:hover .action-card-bg-icon { opacity: .16; transform: rotate(-5deg) scale(1.05); }
.action-card-inner { position: relative; z-index: 1; }
.action-card-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .2);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: .7rem; transition: background .2s; }
.action-card:hover .action-card-icon { background: rgba(255, 255, 255, .32); }
.action-card h5 { font-size: 1.12rem; font-weight: 800; font-style: italic; text-transform: uppercase; margin-bottom: .25rem; color: #fff; }
.action-card p { font-size: .8rem; opacity: .82; line-height: 1.4; margin: 0; }
.action-card-arrow { position: absolute; top: 1.25rem; right: 1.25rem; width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; font-size: .85rem;
    opacity: .55; transition: .2s; z-index: 1; }
.action-card:hover .action-card-arrow { opacity: 1; background: rgba(255, 255, 255, .28); transform: translateX(3px); }
.ac-red { background: linear-gradient(150deg, #ff2a3b 0%, var(--k-red) 48%, #8a0009 100%); box-shadow: 0 6px 20px rgba(227, 6, 19, .28); }
.ac-black { background: linear-gradient(150deg, #33383f 0%, var(--k-charcoal) 48%, #000 100%); box-shadow: 0 6px 20px rgba(0, 0, 0, .28); border: 1px solid rgba(227, 6, 19, .18); }
.ac-black .action-card-icon, .ac-steel .action-card-icon { background: rgba(227, 6, 19, .22); color: #fff; }
.ac-steel { background: linear-gradient(150deg, #4a515b 0%, var(--k-steel) 50%, #14161a 100%); box-shadow: 0 6px 20px rgba(0, 0, 0, .22); }
@media (max-width: 767.98px) {
    .action-card { min-height: 120px; padding: 1.15rem; flex-direction: row; align-items: center; gap: 1rem; }
    .action-card-inner { flex: 1; } .action-card-bg-icon { font-size: 4.2rem; }
    .action-card h5 { font-size: .98rem; } .action-card p { font-size: .72rem; }
    .action-card-icon { width: 40px; height: 40px; font-size: 1.1rem; margin-bottom: .5rem; }
    .action-card-arrow { position: static; flex-shrink: 0; width: 28px; height: 28px; font-size: .75rem; }
}

/* ===== Plan card (home) ===== */
.plan-card { border: 1.5px solid rgba(227, 6, 19, .45) !important; }
.plan-pill { background: var(--k-red); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .6px;
    padding: .28rem .65rem; border-radius: 50rem; white-space: nowrap; font-family: 'Saira', sans-serif; }
.plan-cov { display: flex; gap: .8rem; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 10px; padding: .7rem .85rem; }
.plan-cov-icon { width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0; background: rgba(227, 6, 19, .12); color: var(--k-red);
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.plan-strong { color: var(--k-text); }
.plan-foot { border-top: 1px solid var(--border); padding-top: .75rem; font-size: .75rem; color: var(--k-text-secondary); }

/* ===== Resource / document list ===== */
.resource-list { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 768px) { .resource-list { grid-template-columns: repeat(2, 1fr); column-gap: 1.25rem; } }
.resource-item { display: flex; align-items: center; gap: .875rem; padding: .9rem 1rem; min-height: 60px; text-decoration: none;
    color: var(--k-text); border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.resource-item:hover, .resource-item:focus { border-color: var(--k-red); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); color: var(--k-text); }
.resource-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; color: #fff; }
.resource-icon-red { background: var(--k-red); }
.resource-icon-dark { background: var(--k-steel); }
.resource-icon-gray { background: var(--k-gray-400); }
.resource-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.resource-title { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.resource-badge { align-self: flex-start; font-size: .68rem; font-weight: 600; color: var(--k-red); background: rgba(227, 6, 19, .12); padding: 1px 8px; border-radius: 999px; }
.resource-action { flex-shrink: 0; color: var(--k-gray-400); font-size: 1.1rem; }
.resource-item:hover .resource-action { color: var(--k-red); }

/* ===== Login ===== */
.login-card { max-width: 460px; margin: 0 auto; background: var(--surface); border: none; border-radius: var(--k-radius-lg);
    box-shadow: var(--k-shadow-lg); overflow: hidden; animation: card-enter .6s ease-out; }
@keyframes card-enter { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.login-header { background: linear-gradient(135deg, var(--k-black) 0%, var(--k-steel) 60%, #3a0207 100%);
    color: #fff; text-align: center; padding: 2rem 1.5rem; position: relative; overflow: hidden; }
.login-header::after { content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(227, 6, 19, .14) 22px 26px);
    -webkit-mask: linear-gradient(115deg, #000, transparent 55%); mask: linear-gradient(115deg, #000, transparent 55%); }
.login-header > * { position: relative; z-index: 1; }
.login-header h4 { font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 1.1rem; margin: 0; color: #fff; }
.instructions-box { background: linear-gradient(135deg, var(--k-gray-50) 0%, rgba(227, 6, 19, .03) 100%);
    border: 1px solid var(--k-gray-200); border-radius: var(--k-radius-sm); padding: 1rem 1.25rem; }

/* ===== Forms ===== */
.form-control, .form-select { border-radius: var(--k-radius-sm); border: 1.5px solid var(--k-gray-300); padding: .55rem .85rem;
    font-size: .92rem; transition: var(--k-trans-fast); background-color: var(--surface); color: var(--k-text); }
.form-control:hover, .form-select:hover { border-color: var(--k-gray-400); }
.form-control:focus, .form-select:focus { border-color: var(--k-red); box-shadow: 0 0 0 3px var(--k-red-glow); }
.form-control[readonly] { background: var(--k-gray-100); color: var(--k-text-secondary); }
.form-label { font-weight: 700; font-size: .78rem; color: var(--k-text-secondary); text-transform: uppercase; letter-spacing: .3px; margin-bottom: .35rem; }
.form-label.required::after, .form-check-label.required::after { content: " *"; color: var(--k-red); font-weight: 700; }
.input-group-text { background: var(--k-gray-100); border: 1.5px solid var(--k-gray-300); font-size: .85rem; color: var(--k-text-secondary); }
.info-chip { display: flex; flex-direction: column; gap: 2px; padding: .5rem .75rem; border-radius: 8px;
    background: var(--k-gray-50); border: 1px solid var(--k-gray-200); min-height: 56px; justify-content: center; }
.info-chip .chip-label { font-size: .68rem; font-weight: 700; color: var(--k-gray-500); text-transform: uppercase; letter-spacing: .4px; }
.info-chip .chip-value { font-size: .95rem; font-weight: 600; color: var(--k-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-chip .chip-value.is-empty { color: var(--k-gray-400); font-weight: 400; }
.info-chip.info-chip-sm { min-height: 36px; padding: .35rem .55rem; border-radius: 6px; gap: 1px; }
.info-chip.info-chip-sm .chip-label { font-size: .6rem; line-height: 1; }
.info-chip.info-chip-sm .chip-value { font-size: .8rem; line-height: 1.2; }
.is-invalid { border-color: #dc3545 !important; box-shadow: 0 0 0 3px rgba(220, 53, 69, .15) !important; }
.is-invalid ~ .invalid-feedback, .is-invalid + .invalid-feedback { display: block; }
.invalid-feedback { display: none; font-size: .8rem; color: #dc3545; margin-top: 4px; font-weight: 500; }

/* ===== Wizard stepper ===== */
.wizard-stepper { display: flex; align-items: center; justify-content: center; gap: 0; padding: 1.15rem 1.4rem;
    background: var(--surface); border-radius: var(--k-radius); box-shadow: var(--k-shadow-sm); }
.wizard-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; cursor: default; }
.wizard-step-circle { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .9rem; background: var(--k-gray-200); color: var(--k-gray-500);
    transition: all .4s cubic-bezier(.34, 1.56, .64, 1); border: 2px solid transparent; font-family: 'Saira', sans-serif; }
.wizard-step.active .wizard-step-circle { background: var(--k-red); color: #fff; border-color: var(--k-red);
    box-shadow: 0 0 0 4px var(--k-red-glow); transform: scale(1.1); }
.wizard-step.completed .wizard-step-circle { background: var(--k-black); color: #fff; border-color: var(--k-black); transform: scale(1); box-shadow: none; }
.wizard-step-label { font-size: .66rem; font-weight: 800; letter-spacing: .8px; color: var(--k-gray-400); text-transform: uppercase; transition: color .3s ease; }
.wizard-step.active .wizard-step-label { color: var(--k-red); }
.wizard-step.completed .wizard-step-label { color: var(--k-black); }
.wizard-step-line { flex: 1; height: 3px; background: var(--k-gray-200); margin: 0 8px 22px; border-radius: 2px; position: relative; overflow: hidden; min-width: 20px; }
.wizard-step-line::after { content: ''; position: absolute; inset: 0 auto 0 0; height: 100%; width: 0; background: var(--k-red); border-radius: 2px;
    transition: width .5s cubic-bezier(.4, 0, .2, 1); }
.wizard-step-line.active::after { width: 100%; }

/* Wizard panels — slide transitions the RHP JS drives */
.wizard-panel { display: none; opacity: 0; transform: translateX(0); }
.wizard-panel.active { display: block; opacity: 1; transform: translateX(0); }
.wizard-panel.wizard-ready { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; z-index: 2; }
.wizard-panel.wizard-from-right { transform: translateX(60px); }
.wizard-panel.wizard-from-left { transform: translateX(-60px); }
.wizard-panel.wizard-sliding-in { opacity: 1; transform: translateX(0);
    transition: opacity .4s cubic-bezier(.25, .46, .45, .94), transform .4s cubic-bezier(.25, .46, .45, .94); }
.wizard-panel.wizard-exit-left { opacity: 0; transform: translateX(-40px); transition: opacity .3s ease-in, transform .3s ease-in; }
.wizard-panel.wizard-exit-right { opacity: 0; transform: translateX(40px); transition: opacity .3s ease-in, transform .3s ease-in; }
.wizard-shake { animation: wizardShake .4s ease-in-out; }
@keyframes wizardShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.wizard-nav { display: flex; align-items: center; gap: 12px; }

/* Wizard summary sidebar */
.wizard-summary .form-section { margin-bottom: 0; }
.summary-row { display: flex; align-items: flex-start; gap: 12px; padding: 1rem 1.25rem; border-bottom: 1px solid var(--k-gray-100); transition: all .3s ease; }
.summary-row.summary-active { background: rgba(227, 6, 19, .04); border-left: 3px solid var(--k-red); }
.summary-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--k-gray-100); color: var(--k-gray-500);
    display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; transition: all .3s ease; }
.summary-active .summary-icon { background: var(--k-red); color: #fff; }
.summary-label { font-size: .66rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--k-text-secondary); }
.summary-value { font-weight: 600; font-size: .88rem; color: var(--k-text); word-break: break-word; }
.summary-sub { font-size: .78rem; color: var(--k-text-secondary); word-break: break-word; }

@media (max-width: 991px) {
    .wizard-summary { position: static !important; }
    .wizard-stepper { padding: .75rem .5rem; }
    .wizard-step-circle { width: 32px; height: 32px; font-size: .8rem; }
    .wizard-step-label { font-size: .58rem; }
    .wizard-step-line { min-width: 16px; }
}
@media (max-width: 767px) {
    .wizard-stepper { padding: .6rem .25rem; }
    .wizard-step-circle { width: 28px; height: 28px; font-size: .75rem; }
    .wizard-step-label { font-size: .5rem; letter-spacing: .3px; }
    .wizard-step-line { margin: 0 4px 22px; min-width: 12px; }
    .wizard-nav { flex-wrap: wrap; }
    .wizard-nav .btn { flex: 1; min-width: 120px; white-space: nowrap; padding-left: 1rem; padding-right: 1rem;
        display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; }
    .wizard-nav .btn i { margin: 0 !important; }
}

/* Mobile summary bottom bar */
.mobile-summary-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; background: var(--surface);
    border-top: 2px solid var(--k-red); box-shadow: 0 -4px 20px rgba(0, 0, 0, .08); }
.mob-tab-row { display: flex; align-items: center; gap: 10px; padding: .55rem 1rem; border-bottom: 1px solid var(--k-gray-100); }
.mob-tab-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: .45rem .75rem; cursor: pointer;
    font-size: .78rem; font-weight: 600; color: var(--k-text-secondary); background: var(--k-gray-100); border: 1.5px solid transparent;
    border-radius: 999px; -webkit-tap-highlight-color: transparent; user-select: none;
    transition: transform .12s cubic-bezier(.34, 1.56, .64, 1), background .15s ease, color .15s ease, box-shadow .15s ease; will-change: transform; }
.mob-tab-btn:active { transform: scale(.93); }
.mob-tab-btn.active-tab { color: #fff; background: var(--k-red); border-color: var(--k-red); box-shadow: 0 4px 12px rgba(227, 6, 19, .35);
    animation: mob-tab-pop .25s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes mob-tab-pop { 0% { transform: scale(.88); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.mobile-summary-info { display: flex; flex-direction: column; line-height: 1.2; }
.mobile-summary-step-dots { display: flex; gap: 5px; align-items: center; }
.mobile-summary-step-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k-gray-300); transition: all .3s ease; }
.mobile-summary-step-dots .dot.active { background: var(--k-red); }
.mobile-summary-step-dots .dot.current { width: 20px; border-radius: 4px; background: var(--k-red); box-shadow: 0 0 0 3px var(--k-red-glow); }
.mobile-summary-detail { display: none; padding: .6rem 1rem .75rem; max-height: 40vh; overflow-y: auto; }
.mobile-summary-bar.expanded .mobile-summary-detail:not(.d-none) { display: block; }
.mobile-summary-items { display: flex; flex-direction: column; gap: 8px; padding-top: .75rem; }
.mobile-sum-item { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--k-text); }
.mobile-sum-item i { font-size: .9rem; width: 20px; text-align: center; flex-shrink: 0; }
@media (max-width: 991px) { body { padding-bottom: 64px; } }

/* ===== Invoice upload (wizard hero) ===== */
.invoice-hero, .invoice-upload-hero { background: linear-gradient(135deg, var(--surface) 0%, rgba(227, 6, 19, .03) 100%);
    border: 1px solid var(--k-gray-200); border-radius: var(--k-radius); padding: 1.25rem 1.4rem; }
.invoice-badge, .invoice-upload-badge { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--k-red), var(--k-red-light));
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.invoice-dropzone { border: 2px dashed var(--k-gray-300); border-radius: var(--k-radius); padding: 1.6rem 1.5rem; text-align: center;
    cursor: pointer; transition: all .3s ease; background: var(--k-gray-50); }
.invoice-dropzone:hover { border-color: var(--k-red); background: rgba(227, 6, 19, .03); }
.invoice-dropzone.dragover { border-color: var(--k-red); background: rgba(227, 6, 19, .06); transform: scale(1.01); box-shadow: 0 0 0 4px var(--k-red-glow); }
.invoice-dropzone.has-file { border-style: solid; border-color: var(--k-red); background: rgba(227, 6, 19, .04); text-align: left; padding: 1.25rem 1.5rem; }
.dz-icon, .invoice-dropzone-icon { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, rgba(227, 6, 19, .12), rgba(227, 6, 19, .05));
    color: var(--k-red); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin: 0 auto .6rem; transition: transform .3s ease; }
.invoice-dropzone:hover .invoice-dropzone-icon { transform: translateY(-3px); }
.invoice-file-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(227, 6, 19, .1); color: var(--k-red);
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.invoice-extract-status { padding: 10px 14px; background: var(--k-gray-50); border-radius: 8px; border: 1px solid var(--k-gray-200); }
/* Auto-filled by the invoice / DOT scan — info blue, so it never reads as a red validation error. */
.ai-filled { border-color: var(--k-info) !important; background-color: rgba(2, 132, 199, .06) !important; }
.ai-highlight { animation: aiPulse .6s ease-in-out 2; }
@keyframes aiPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); } 50% { box-shadow: 0 0 0 4px rgba(2, 132, 199, .25); } }
.extract-overlay { position: fixed; inset: 0; z-index: 1090; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.extract-overlay.show { opacity: 1; visibility: visible; }
.extract-overlay-card { background: var(--surface); color: var(--k-text); border-radius: 16px; padding: 40px 36px; text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .3); max-width: 360px; width: 90%; border: 1px solid var(--border); }
.extract-overlay-card .spinner-border { width: 3rem; height: 3rem; border-width: .3rem; }
.extract-overlay-card .overlay-icon { font-size: 3rem; }
.extract-overlay-card .btn-skip { margin-top: 16px; font-size: .85rem; color: var(--k-text-secondary); text-decoration: underline; background: none; border: none; cursor: pointer; }
.extract-overlay-card .btn-skip:hover { color: var(--k-text); }

/* ===== Tyre entry (wizard step 3) ===== */
.tyre-entry { border: 1px solid var(--k-gray-200); border-radius: var(--k-radius); padding: 1rem; margin-bottom: 1rem; background: var(--surface); }
.tyre-entry .tyre-num, .tyre-num { width: 26px; height: 26px; border-radius: 7px; background: var(--k-red); color: #fff; display: inline-flex;
    align-items: center; justify-content: center; font-weight: 800; font-size: .75rem; font-family: 'Saira', sans-serif; flex-shrink: 0; }
.tyre-badge { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .75rem; background: var(--k-red); color: #fff; }

/* ===== Outlet picker (wizard step 4) — RHP layout, Kinto skin ===== */
.outlet-picker-container { display: flex; gap: 0; border: 1px solid var(--k-gray-200); border-radius: 12px; overflow: hidden; height: 380px; background: var(--surface); }
.outlet-picker-map { flex: 1; min-width: 0; position: relative; background: #e8ebef; }
.outlet-picker-map #outletPickerMap { width: 100%; height: 100%; }
.outlet-picker-list { width: 340px; overflow-y: auto; border-left: 1px solid var(--k-gray-200); background: var(--surface); }
.outlet-picker-item { position: relative; padding: 12px 16px; border-bottom: 1px solid var(--k-gray-100); border-left: 3px solid transparent;
    cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.outlet-picker-item:hover { background: rgba(227, 6, 19, .04); }
.outlet-picker-item.selected { background: rgba(227, 6, 19, .12); border-left: 4px solid var(--k-red); box-shadow: inset 0 0 0 1px rgba(227, 6, 19, .35); padding-right: 96px; }
.outlet-picker-item.selected::after { content: "\2713 Selected"; position: absolute; top: 10px; right: 12px; background: var(--k-red); color: #fff;
    font-size: .7rem; font-weight: 700; letter-spacing: .3px; padding: 3px 8px; border-radius: 999px; line-height: 1; }
.outlet-picker-item .outlet-item-name { font-weight: 700; font-size: .88rem; color: var(--k-text); }
.outlet-picker-item .outlet-item-addr { font-size: .78rem; color: var(--k-text-secondary); margin-top: 2px; }
.outlet-picker-item .outlet-item-dist { font-size: .72rem; color: var(--k-red); font-weight: 700; margin-top: 2px; }
.outlet-selected-banner { display: flex; align-items: center; padding: 8px 14px; background: rgba(227, 6, 19, .06); border: 1px solid rgba(227, 6, 19, .25); border-radius: 8px; }
.add-outlet-map { height: 260px; border-radius: 10px; border: 1px solid var(--k-gray-100); overflow: hidden; }
.add-outlet-map.is-invalid { border: 2px solid var(--k-red); }
@media (max-width: 768px) {
    .outlet-picker-container { flex-direction: column; height: auto; }
    .outlet-picker-map { height: 240px; flex: none; }
    .outlet-picker-map #outletPickerMap { height: 240px; }
    .outlet-picker-list { width: 100%; max-height: 250px; border-left: none; border-top: 1px solid var(--k-gray-200); }
}
/* Leaflet */
.leaflet-container { font-family: 'Inter', sans-serif; }
.k-pin { width: 34px; height: 34px; position: relative; }
.k-pin i { position: absolute; left: 50%; top: 0; transform: translateX(-50%); color: var(--k-red); font-size: 2rem; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.k-pin.k-pin-user i { color: #0284c7; }
/* Outlet pin: white Kinto wordmark on a black badge with a red border and a red pointer.
   Same colours in both themes — it sits on the map tiles, not on the page surface.
   The logo is a background image, not an <img>: Leaflet forces `width: auto` on every
   img in the marker pane with a more specific selector, which blew the logo up to 460px. */
.k-pin-logo { position: relative; width: 64px; height: 35px; }
.k-pin-logo .k-pin-badge {
    box-sizing: border-box; width: 64px; height: 26px;
    background: #0d0e11 url('../images/kinto-logo.png') no-repeat center / 50px auto;
    border: 2px solid var(--k-red); border-radius: 7px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
}
.k-pin-logo::after {
    content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--k-red);
}
.map-popup { font-family: 'Inter', sans-serif; line-height: 1.5; }

/* ===== Find Outlets page ===== */
.outlet-page-header { padding: 1.5rem 0 .5rem; }
.outlet-page-header h2 { font-size: 1.6rem; color: var(--k-text); font-style: italic; text-transform: uppercase; }
.search-bar-k { display: flex; gap: .6rem; align-items: stretch; flex-wrap: wrap; }
.search-bar-k .sb-input { flex: 1 1 320px; min-width: 220px; }
.search-bar-k .btn { white-space: nowrap; }
.outlet-map-container { position: relative; border-radius: var(--k-radius); overflow: hidden; box-shadow: var(--k-shadow-md); border: 1px solid var(--k-gray-200); }
.map-full, #outletMap { height: 420px; width: 100%; z-index: 1; }
@media (max-width: 575.98px) { .map-full, #outletMap { height: 300px; } }
.map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--k-gray-50); z-index: 2; }
.outlet-card { background: var(--surface); border: 1px solid var(--k-gray-200); border-radius: var(--k-radius); padding: 1.1rem; height: 100%;
    transition: .2s; cursor: pointer; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.outlet-card:hover { border-color: var(--k-red); box-shadow: var(--k-shadow-md); transform: translateY(-3px); }
.outlet-card .oc-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .66rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .4px; color: var(--k-red); background: rgba(227, 6, 19, .09); padding: 3px 10px; border-radius: 999px; width: fit-content; }
.outlet-card .oc-name { font-weight: 800; font-size: 1rem; color: var(--k-text); margin: .6rem 0 .1rem; line-height: 1.3; }
.outlet-card .oc-code { font-size: .74rem; color: var(--k-text-secondary); }
.outlet-card .oc-details { flex: 1; margin-bottom: .5rem; }
.outlet-card .oc-detail { display: flex; align-items: flex-start; gap: 8px; font-size: .82rem; color: var(--k-text-secondary); margin-top: .35rem; line-height: 1.4; }
.outlet-card .oc-detail i { color: var(--k-red); margin-top: 2px; flex-shrink: 0; }
.outlet-card .oc-dist { color: var(--k-red); font-weight: 700; }
.outlet-card .oc-actions { display: flex; gap: .5rem; margin-top: auto; padding-top: .9rem; flex-wrap: wrap; }
.outlet-card .oc-actions .btn { font-size: .78rem; padding: .35rem .75rem; flex: 1; text-align: center; }
#backToTop { position: fixed; right: 24px; bottom: 24px; width: 48px; height: 48px; border: none; border-radius: 50%; background: var(--k-red); color: #fff;
    font-size: 1.25rem; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease, background .2s ease; z-index: 1040; cursor: pointer; }
#backToTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#backToTop:hover { background: var(--k-red-dark); }
@media (max-width: 576px) { #backToTop { right: 16px; bottom: 16px; width: 42px; height: 42px; } }

/* ===== Badges ===== */
.badge-k { padding: .4em 1em; border-radius: 50px; font-weight: 700; font-size: .72rem; display: inline-flex; align-items: center; gap: 5px; letter-spacing: .3px; white-space: nowrap; flex-shrink: 0; }
.badge-k::before { content: ''; width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.badge-active { background: rgba(22, 163, 74, .12); color: #15803d; }
.badge-active::before { background: #16a34a; }
.badge-pending { background: rgba(234, 88, 12, .12); color: #c2410c; }
.badge-pending::before { background: #ea580c; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.badge-expired { background: rgba(139, 146, 155, .14); color: #666d76; }
.badge-expired::before { background: #8b929b; }
.badge-rejected { background: rgba(227, 6, 19, .12); color: #b3040f; }
.badge-rejected::before { background: var(--k-red); }
.badge-claimed { background: rgba(2, 132, 199, .12); color: #075985; }
.badge-claimed::before { background: #0284c7; }
.badge-k.badge-plain::before { display: none; }

/* ===== Warranty detail (Status page) ===== */
.warranty-card, .warranty-detail-card { background: var(--surface); border: 1px solid rgba(0, 0, 0, .05); border-radius: var(--k-radius);
    box-shadow: var(--k-shadow-sm); overflow: hidden; transition: var(--k-trans); animation: card-enter .5s ease-out; }
.warranty-summary { background: linear-gradient(135deg, var(--k-gray-50) 0%, var(--surface) 100%); border-bottom: 1px solid var(--k-gray-200); padding: 1.25rem; }
.veh-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--k-red); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-tile { display: flex; align-items: center; gap: .6rem; }
.info-tile .it-ico { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .85rem; }
.info-tile .it-lbl { font-size: .7rem; color: var(--k-text-secondary); }
.info-tile .it-val { font-weight: 700; font-size: 1rem; color: var(--k-text); }
.tyre-mini { border: 1.5px solid var(--k-gray-200); border-radius: 12px; padding: .9rem; height: 100%; background: var(--surface); }
.tyre-mini.claimable { border-color: var(--k-red); }
.ref-strip { display: flex; flex-wrap: wrap; gap: 1.25rem; padding-bottom: .9rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--k-gray-200); }
.ref-strip .rs-lbl { font-size: .72rem; color: var(--k-text-secondary); }
.ref-strip .rs-val { font-weight: 700; font-size: .9rem; color: var(--k-text); }
.ref-strip .rs-sep { width: 1px; background: var(--k-gray-200); }

/* ===== Tables ===== */
.table-k { border-collapse: separate; border-spacing: 0; border-radius: var(--k-radius-sm); overflow: hidden; font-size: .88rem; }
.table-k thead th { background: var(--k-gray-100); font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--k-text-secondary);
    font-weight: 700; padding: .75rem; border-bottom: 2px solid var(--k-gray-200); }
.table-k tbody tr { transition: var(--k-trans-fast); }
.table-k tbody tr:hover { background-color: rgba(227, 6, 19, .03); }
.table-k tbody td { padding: .75rem; vertical-align: middle; border-bottom: 1px solid var(--k-gray-100); }

/* ===== Alerts ===== */
.alert { border-radius: var(--k-radius-sm); border: none; font-size: .9rem; }
.alert-success { background: rgba(22, 163, 74, .1); color: #15803d; border-left: 4px solid #16a34a; }
.alert-danger { background: rgba(227, 6, 19, .1); color: #b3040f; border-left: 4px solid var(--k-red); }
.alert-warning { background: rgba(234, 88, 12, .1); color: #c2410c; border-left: 4px solid #ea580c; }
.alert-info { background: rgba(2, 132, 199, .1); color: #075985; border-left: 4px solid #0284c7; }

/* ===== Footer ===== */
.footer-k { background: var(--k-black); color: rgba(255, 255, 255, .6); margin-top: auto; position: relative; }
.footer-k .footer-bar { height: 3px; background: linear-gradient(90deg, var(--k-red), #000, var(--k-red)); }
.footer-k .footer-content { padding: 2.5rem 0 1rem; }
.footer-wordmark { font-family: 'Saira', sans-serif; font-weight: 900; font-style: italic; font-size: 1.6rem; color: #fff; letter-spacing: 1px; text-transform: uppercase; }
.footer-wordmark span { color: var(--k-red); }
.footer-logo { height: 46px; width: auto; display: block; }
.footer-company { color: #fff; font-weight: 700; font-size: .92rem; letter-spacing: .3px; }
.footer-regno { color: rgba(255, 255, 255, .45); font-size: .8rem; }
.footer-k h6 { color: #fff; font-weight: 800; margin-bottom: 1rem; text-transform: uppercase; font-size: .76rem; letter-spacing: 1px; font-family: 'Saira', sans-serif; }
.footer-k a { color: rgba(255, 255, 255, .55); font-size: .88rem; display: inline-block; transition: var(--k-trans-fast); text-decoration: none; }
.footer-k a:hover { color: var(--k-red); transform: translateX(3px); }
.footer-k .footer-bottom { border-top: 1px solid rgba(255, 255, 255, .07); padding: 1rem 0; font-size: .8rem; color: rgba(255, 255, 255, .35); }

/* ===== Success screen ===== */
.success-hero { max-width: 560px; margin: 0 auto; text-align: center; background: var(--surface); border-radius: var(--k-radius-lg); box-shadow: var(--k-shadow-lg); overflow: hidden; }
.success-top { background: linear-gradient(135deg, var(--k-black), var(--k-steel)); padding: 2.5rem 2rem 2rem; color: #fff; position: relative; overflow: hidden; }
.success-top::after { content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(227, 6, 19, .14) 22px 26px);
    -webkit-mask: linear-gradient(115deg, #000, transparent 60%); mask: linear-gradient(115deg, #000, transparent 60%); }
.success-top > * { position: relative; z-index: 1; }
.success-top h3 { color: #fff; }
.success-check { width: 84px; height: 84px; border-radius: 50%; background: rgba(22, 163, 74, .15); border: 2px solid #16a34a; color: #22c55e;
    display: flex; align-items: center; justify-content: center; font-size: 2.6rem; margin: 0 auto 1rem; }
.success-ref { background: var(--k-gray-50); border: 1px solid var(--k-gray-200); border-radius: 12px; padding: 1rem; }

/* ===== Status pill (page kicker) ===== */
.page-kicker { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .85rem; border-radius: 50rem;
    background: rgba(227, 6, 19, .12); color: var(--k-red); font-size: .78rem; font-weight: 700; letter-spacing: .5px; }
.page-title { font-weight: 800; font-style: italic; text-transform: uppercase; }

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .navbar-k .navbar-collapse { background: var(--surface); border-radius: var(--k-radius); box-shadow: var(--k-shadow-md); padding: 1rem; margin-top: .5rem; }
}
@media (max-width: 767px) {
    .container { padding-left: 16px; padding-right: 16px; overflow-x: hidden; }
    .row { margin-left: 0; margin-right: 0; }
    .row > * { padding-left: 8px; padding-right: 8px; }
    .navbar-k .navbar-mobile-user { display: none; }
    .btn-lg { padding: .75rem 1.5rem; font-size: 1rem; min-height: 48px; }
    .card-k .card-body { padding: 1rem; }
    .footer-k .footer-content { padding: 1.5rem 0 .5rem; }
    .footer-k h6 { margin-bottom: .5rem; font-size: .75rem; }
    .footer-k a, .footer-k .small, .footer-k p { font-size: .8rem; }
    .footer-bottom { font-size: .7rem !important; }
    .mt-5 { margin-top: 2rem !important; }
    .section-title { font-size: 1rem; margin-bottom: 1rem; padding-bottom: .6rem; }
    .check-list li { font-size: .82rem; }
    .search-bar-k .btn { flex: 1 1 45%; }
}

/* ===== Skeleton ===== */
.skeleton { background: linear-gradient(90deg, var(--k-gray-200) 25%, var(--k-gray-100) 50%, var(--k-gray-200) 75%); background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite; border-radius: var(--k-radius-sm); }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== Tom Select — Kinto theme ===== */
.ts-wrapper { font-family: inherit; overflow: visible !important; }
.ts-wrapper.single .ts-control, .ts-wrapper.multi .ts-control {
    border-radius: var(--k-radius-sm); border: 1.5px solid var(--k-gray-300); min-height: calc(1.5em + .5rem + 2px);
    padding: .3rem .6rem; font-size: .875rem; background-color: var(--surface); color: var(--k-text); box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ts-wrapper.single.focus .ts-control, .ts-wrapper.multi.focus .ts-control { border-color: var(--k-red); box-shadow: 0 0 0 .15rem var(--k-red-glow); }
.ts-wrapper.single .ts-control::after { border-color: var(--k-red) transparent transparent transparent; }
.ts-dropdown { z-index: 9999 !important; border-radius: var(--k-radius-sm); border: 1px solid var(--k-gray-300); box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    font-size: .875rem; margin-top: 4px; overflow: hidden; background: var(--surface); color: var(--k-text); }
.ts-dropdown .option { padding: .5rem .75rem; line-height: 1.3; border-bottom: 1px solid var(--k-gray-100); }
.ts-dropdown .option:last-child { border-bottom: none; }
.ts-dropdown .active { background-color: rgba(227, 6, 19, .12); color: var(--k-red-dark); }
.ts-dropdown .option.selected, .ts-dropdown .option.selected.active { background-color: var(--k-red); color: #fff; }
.ts-dropdown .no-results { padding: .75rem; color: var(--k-gray-600); font-style: italic; text-align: center; }
.ts-dropdown-content { padding: 0; }
.ts-wrapper.disabled .ts-control { background-color: var(--k-gray-100); opacity: .7; }
.ts-wrapper.invalid .ts-control, select.is-invalid + .ts-wrapper .ts-control, .ts-wrapper.is-invalid .ts-control { border-color: #dc3545 !important; }

/* ===== Print ===== */
@media print {
    .navbar-k, .footer-k, .btn, .mobile-summary-bar, #backToTop { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .card-k, .warranty-card, .form-section { box-shadow: none !important; border: 1px solid #ddd !important; background: #fff !important; color: #000 !important; }
}

/* ============================================================
   DARK THEME — follows kinto-tyres.my (near-black bg, white logo, red accents)
   Opt-in via <html data-theme="dark"> (navbar toggle, saved in localStorage).
   Every rule below is scoped to html[data-theme="dark"]; without it the light
   theme above applies — light is the default.
   ============================================================ */
html[data-theme="dark"] {
    --k-red: #E91D27; --k-red-light: #ff3b47; --k-red-dark: #b3121b; --k-red-glow: rgba(233, 29, 39, .35);
    --k-black: #000; --k-charcoal: #0c0d10; --k-steel: #171a1f;
    --surface: #15171c; --surface-2: #1b1e24; --border: #2a2e36; --border-2: #363b45;
    --k-gray-50: #1a1d23; --k-gray-100: #20242b; --k-gray-200: #2a2e36; --k-gray-300: #363b45;
    --k-gray-400: #6b7480; --k-gray-500: #98a1ac; --k-gray-600: #c2cad3;
    --k-text: #eef1f5; --k-text-secondary: #9aa4af; --k-white: #15171c;
    --k-shadow-xs: 0 1px 2px rgba(0, 0, 0, .5);
    --k-shadow-sm: 0 2px 6px rgba(0, 0, 0, .5);
    --k-shadow: 0 6px 16px rgba(0, 0, 0, .55);
    --k-shadow-md: 0 12px 28px rgba(0, 0, 0, .6);
    --k-shadow-lg: 0 24px 50px rgba(0, 0, 0, .65);
    --k-shadow-red: 0 6px 20px rgba(233, 29, 39, .4);
    --k-success: #22c55e; --k-success-text: #4ade80;
    --k-warning: #fb923c; --k-warning-text: #fb923c;
    --k-info: #38bdf8; --k-info-text: #7dd3fc;
    --k-danger-text: #ff6b74;
    color-scheme: dark;
}
/* Theme toggle + logo: the light theme shows the dark-wordmark logo, dark shows the white one */
html[data-theme="dark"] .brand-logo-light { display: none; }
html[data-theme="dark"] .brand-logo-dark { display: inline-block; }
html[data-theme="dark"] .theme-toggle { color: #fbbf24; }
html[data-theme="dark"] body {
    color: var(--k-text);
    background:
        radial-gradient(1100px 340px at 82% -160px, rgba(233, 29, 39, .16), transparent 70%),
        linear-gradient(180deg, #101217 0%, #0b0c0f 55%, #0a0b0d 100%);
    background-attachment: fixed;
}
/* Navbar */
html[data-theme="dark"] .navbar-k { background: rgba(11, 12, 15, .92); border-bottom: 1px solid var(--border); }
html[data-theme="dark"] .navbar-k .nav-link { color: var(--k-text) !important; }
html[data-theme="dark"] .navbar-k .nav-link:hover, html[data-theme="dark"] .navbar-k .nav-link.active { color: #fff !important; background: rgba(233, 29, 39, .18); }
html[data-theme="dark"] .navbar-toggler { filter: invert(1) grayscale(1) brightness(1.4); }
@media (max-width: 991px) { html[data-theme="dark"] .navbar-k .navbar-collapse { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .75rem 1rem; margin-top: .5rem; } }
/* Surfaces */
html[data-theme="dark"] .card-k, html[data-theme="dark"] .form-section, html[data-theme="dark"] .warranty-card, html[data-theme="dark"] .warranty-detail-card, html[data-theme="dark"] .login-card, html[data-theme="dark"] .success-hero, html[data-theme="dark"] .hiw-step, html[data-theme="dark"] .tyre-entry, html[data-theme="dark"] .outlet-card, html[data-theme="dark"] .outlet-picker-container, html[data-theme="dark"] .outlet-picker-list, html[data-theme="dark"] .wizard-stepper, html[data-theme="dark"] .mobile-summary-bar, html[data-theme="dark"] .extract-overlay-card, html[data-theme="dark"] .tyre-mini
    { background: var(--surface); border-color: var(--border); }
html[data-theme="dark"] .card-k, html[data-theme="dark"] .form-section, html[data-theme="dark"] .warranty-card, html[data-theme="dark"] .warranty-detail-card, html[data-theme="dark"] .login-card, html[data-theme="dark"] .success-hero { border: 1px solid var(--border); }
html[data-theme="dark"] .form-section-body { background: transparent; }
html[data-theme="dark"] .tyre-entry, html[data-theme="dark"] .outlet-item, html[data-theme="dark"] .outlet-card, html[data-theme="dark"] .resource-item, html[data-theme="dark"] .plan-cov, html[data-theme="dark"] .success-ref, html[data-theme="dark"] .invoice-extract-status { background: var(--surface-2); border-color: var(--border); }
html[data-theme="dark"] .outlet-card:hover, html[data-theme="dark"] .resource-item:hover, html[data-theme="dark"] .hiw-step:hover { border-color: var(--k-red); background: #20242b; }
html[data-theme="dark"] .warranty-summary { background: var(--surface-2); border-bottom: 1px solid var(--border); }
html[data-theme="dark"] .invoice-hero, html[data-theme="dark"] .invoice-upload-hero { background: linear-gradient(135deg, var(--surface) 0%, #1e1519 100%); border: 1px solid var(--border); }
html[data-theme="dark"] .invoice-dropzone { background: var(--surface-2); border-color: var(--border-2); }
html[data-theme="dark"] .invoice-dropzone:hover, html[data-theme="dark"] .invoice-dropzone.has-file, html[data-theme="dark"] .invoice-dropzone.dragover { background: #20242b; border-color: var(--k-red); }
html[data-theme="dark"] .info-chip { background: var(--surface-2); border: 1px solid var(--border); }
html[data-theme="dark"] .instructions-box { background: linear-gradient(135deg, var(--surface-2) 0%, rgba(233, 29, 39, .07) 100%); border: 1px solid var(--border); }
html[data-theme="dark"] .tyre-mini { border-color: var(--border); }
html[data-theme="dark"] .tyre-mini.claimable { border-color: var(--k-red); }
html[data-theme="dark"] .hero-k, html[data-theme="dark"] .success-top, html[data-theme="dark"] .login-header { border: 1px solid rgba(255, 255, 255, .06); }
html[data-theme="dark"] .outlet-picker-item { border-bottom-color: var(--border); }
html[data-theme="dark"] .outlet-picker-item:hover { background: rgba(233, 29, 39, .08); }
html[data-theme="dark"] .outlet-picker-item.selected { background: rgba(233, 29, 39, .16); }
html[data-theme="dark"] .outlet-picker-list { border-left-color: var(--border); }
@media (max-width: 768px) { html[data-theme="dark"] .outlet-picker-list { border-top-color: var(--border); } }
html[data-theme="dark"] .outlet-selected-banner { background: rgba(233, 29, 39, .1); border-color: rgba(233, 29, 39, .35); }
html[data-theme="dark"] .outlet-map-container { border-color: var(--border); }
html[data-theme="dark"] .map-loading { background: var(--surface-2); color: var(--k-text-secondary); }
html[data-theme="dark"] .summary-row { border-bottom-color: var(--border); }
html[data-theme="dark"] .summary-row.summary-active { background: rgba(233, 29, 39, .08); }
html[data-theme="dark"] .mob-tab-row { border-bottom-color: var(--border); }
html[data-theme="dark"] .ref-strip { border-bottom-color: var(--border); }
html[data-theme="dark"] .ref-strip .rs-sep { background: var(--border); }
html[data-theme="dark"] .plan-foot { border-top-color: var(--border); }
/* Text */
html[data-theme="dark"] .text-secondary, html[data-theme="dark"] .text-muted, html[data-theme="dark"] .small-note, html[data-theme="dark"] .summary-sub, html[data-theme="dark"] .oi-addr, html[data-theme="dark"] .it-lbl, html[data-theme="dark"] .form-text { color: var(--k-text-secondary) !important; }
html[data-theme="dark"] .info-tile .it-val, html[data-theme="dark"] .card-k, html[data-theme="dark"] .form-section, html[data-theme="dark"] .modal-content, html[data-theme="dark"] .table { color: var(--k-text); }
html[data-theme="dark"] .text-dark { color: var(--k-text) !important; }
html[data-theme="dark"] .text-success { color: #4ade80 !important; }
html[data-theme="dark"] .text-danger { color: #ff6b74 !important; }
html[data-theme="dark"] .text-warning { color: #fbbf24 !important; }
html[data-theme="dark"] .text-info { color: #7dd3fc !important; }
html[data-theme="dark"] .text-primary { color: #7dd3fc !important; }
html[data-theme="dark"] code { color: #ff8a92; }
html[data-theme="dark"] hr { border-color: var(--border); opacity: .6; }
/* Bootstrap utility surfaces */
html[data-theme="dark"] .bg-light { background: var(--surface-2) !important; color: var(--k-text); }
html[data-theme="dark"] .bg-white { background: var(--surface-2) !important; }
html[data-theme="dark"] .card { background: var(--surface); border-color: var(--border); color: var(--k-text); }
html[data-theme="dark"] .border, html[data-theme="dark"] .border-top, html[data-theme="dark"] .border-bottom, html[data-theme="dark"] .border-start, html[data-theme="dark"] .border-end { border-color: var(--border) !important; }
/* Forms */
html[data-theme="dark"] .form-control, html[data-theme="dark"] .form-select { background-color: var(--surface-2); border-color: var(--border-2); color: var(--k-text); }
html[data-theme="dark"] .form-control::placeholder { color: #6b7480; }
/* Bootstrap's :focus rule resets to dark text on white (#212529 / #fff) and outranks the base
   rule above — keep typed text light on the dark field while focused. */
html[data-theme="dark"] .form-control:focus, html[data-theme="dark"] .form-select:focus { background-color: var(--surface-2); color: var(--k-text); }
/* Browser autofill paints its own background + dark text; repaint it with the theme colours. */
html[data-theme="dark"] .form-control:-webkit-autofill, html[data-theme="dark"] .form-control:-webkit-autofill:hover, html[data-theme="dark"] .form-control:-webkit-autofill:focus,
html[data-theme="dark"] .form-select:-webkit-autofill {
    -webkit-text-fill-color: var(--k-text); caret-color: var(--k-text);
    -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset; transition: background-color 9999s ease-out 0s;
}
html[data-theme="dark"] .form-control:autofill { color: var(--k-text); }
html[data-theme="dark"] .form-control:hover, html[data-theme="dark"] .form-select:hover { border-color: #454b56; }
html[data-theme="dark"] .form-control[readonly] { background-color: var(--k-gray-100); color: var(--k-text-secondary); border-color: var(--border); }
html[data-theme="dark"] .form-control:disabled, html[data-theme="dark"] .form-select:disabled { background-color: var(--k-gray-100); color: var(--k-gray-500); }
html[data-theme="dark"] .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239aa4af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 16px 12px; }
html[data-theme="dark"] .form-control[type="file"]::file-selector-button { background: var(--k-gray-100); color: var(--k-text); border-color: var(--border-2); }
html[data-theme="dark"] .form-control[type="file"]:hover::file-selector-button { background: var(--k-gray-200); }
html[data-theme="dark"] .input-group-text { background: var(--surface-2); border-color: var(--border-2); color: var(--k-text-secondary); }
html[data-theme="dark"] .input-group-text.bg-white { background: var(--surface-2) !important; color: var(--k-text-secondary); }
html[data-theme="dark"] .form-check-input { background-color: var(--surface-2); border-color: var(--border-2); }
html[data-theme="dark"] .form-check-input:checked { background-color: var(--k-red); border-color: var(--k-red); }
html[data-theme="dark"] .is-invalid { border-color: #ff4d57 !important; box-shadow: 0 0 0 3px rgba(233, 29, 39, .22) !important; }
html[data-theme="dark"] .invalid-feedback, html[data-theme="dark"] .field-validation-error, html[data-theme="dark"] .validation-summary-errors { color: #ff6b74; }
html[data-theme="dark"] .ai-filled { background-color: rgba(56, 189, 248, .08) !important; }
/* Tables */
html[data-theme="dark"] .table { --bs-table-bg: transparent; --bs-table-color: var(--k-text); --bs-table-striped-color: var(--k-text); --bs-table-hover-color: var(--k-text);
    --bs-table-hover-bg: rgba(233, 29, 39, .06); color: var(--k-text); border-color: var(--border); }
html[data-theme="dark"] .table thead th, html[data-theme="dark"] .table-light, html[data-theme="dark"] .table > :not(caption) > * > * { color: var(--k-text-secondary) !important; background: transparent; border-color: var(--border); }
html[data-theme="dark"] .table > :not(caption) > * > * { color: var(--k-text) !important; }
html[data-theme="dark"] .table thead th { background: var(--k-gray-100) !important; }
html[data-theme="dark"] .table-k thead th { background: var(--k-gray-100); border-bottom-color: var(--border); }
html[data-theme="dark"] .table-k tbody td { border-bottom-color: var(--border); }
html[data-theme="dark"] .table-k tbody tr:hover { background-color: rgba(233, 29, 39, .06); }
/* Tabs (claim list) */
html[data-theme="dark"] .nav-tabs { border-bottom-color: var(--border); }
html[data-theme="dark"] .nav-tabs .nav-link { color: var(--k-text-secondary); border-color: transparent; }
html[data-theme="dark"] .nav-tabs .nav-link:hover { border-color: var(--border) var(--border) var(--border); color: var(--k-text); }
html[data-theme="dark"] .nav-tabs .nav-link.active { background: var(--surface); color: var(--k-red); border-color: var(--border) var(--border) var(--surface); font-weight: 700; }
/* Modals */
html[data-theme="dark"] .modal-content { background: var(--surface); color: var(--k-text); border: 1px solid var(--border); }
html[data-theme="dark"] .modal-header { border-bottom-color: var(--border); }
html[data-theme="dark"] .modal-footer { background: var(--surface-2) !important; border-top: 1px solid var(--border) !important; }
html[data-theme="dark"] .modal .btn-close:not(.btn-close-white), html[data-theme="dark"] .alert .btn-close { filter: brightness(0) invert(1); opacity: .85; }
/* Buttons on dark */
html[data-theme="dark"] .btn-k-dark { background: linear-gradient(135deg, #23262d 0%, #30343d 100%); border: 1px solid var(--border-2); }
html[data-theme="dark"] .btn-k-ghost-dark { border-color: var(--border-2); color: var(--k-text); }
html[data-theme="dark"] .btn-k-ghost-dark:hover { border-color: #fff; color: #fff; }
html[data-theme="dark"] .btn-outline-secondary { color: var(--k-text-secondary); border-color: var(--border-2); }
html[data-theme="dark"] .btn-outline-secondary:hover { background: var(--k-gray-200); color: var(--k-text); border-color: var(--border-2); }
html[data-theme="dark"] .btn-outline-danger { color: #ff6b74; border-color: #ff6b74; }
html[data-theme="dark"] .btn-outline-danger:hover { background: var(--k-red); color: #fff; border-color: var(--k-red); }
html[data-theme="dark"] .btn-link { color: var(--k-text-secondary); }
/* Badges — lighten text for dark bg */
html[data-theme="dark"] .badge-active { background: rgba(34, 197, 94, .16); color: #4ade80; }
html[data-theme="dark"] .badge-active::before { background: #22c55e; }
html[data-theme="dark"] .badge-pending { background: rgba(251, 146, 60, .16); color: #fb923c; }
html[data-theme="dark"] .badge-expired { background: rgba(152, 161, 172, .16); color: #c2cad3; }
html[data-theme="dark"] .badge-rejected { background: rgba(233, 29, 39, .18); color: #ff6b74; }
html[data-theme="dark"] .badge-claimed { background: rgba(56, 189, 248, .16); color: #7dd3fc; }
html[data-theme="dark"] .resource-icon-gray { background: var(--k-gray-300); }
/* Alerts on dark */
html[data-theme="dark"] .alert-success { background: rgba(34, 197, 94, .14); color: #4ade80; }
html[data-theme="dark"] .alert-danger { background: rgba(233, 29, 39, .16); color: #ff6b74; }
html[data-theme="dark"] .alert-warning { background: rgba(251, 146, 60, .14); color: #fb923c; }
html[data-theme="dark"] .alert-info { background: rgba(56, 189, 248, .14); color: #7dd3fc; }
/* Wizard completed circle visibility on dark */
html[data-theme="dark"] .wizard-step.completed .wizard-step-circle { background: var(--k-red-dark); border-color: var(--k-red-dark); }
html[data-theme="dark"] .wizard-step.completed .wizard-step-label { color: var(--k-text); }
html[data-theme="dark"] .wizard-step-circle { background: var(--k-gray-200); color: var(--k-gray-500); }
html[data-theme="dark"] .wizard-step-line { background: var(--k-gray-200); }
html[data-theme="dark"] .summary-icon { background: var(--k-gray-100); color: var(--k-gray-500); }
html[data-theme="dark"] .mob-tab-btn { background: var(--k-gray-100); color: var(--k-text-secondary); }
html[data-theme="dark"] .mobile-summary-step-dots .dot { background: var(--k-gray-300); }
/* Section underline / footer */
html[data-theme="dark"] .section-title::after { background: linear-gradient(90deg, var(--k-red), transparent); }
html[data-theme="dark"] .footer-k { background: #08090b; border-top: 1px solid var(--border); }
/* Tom Select on dark */
html[data-theme="dark"] .ts-wrapper.single .ts-control, html[data-theme="dark"] .ts-wrapper.multi .ts-control { background-color: var(--surface-2); border-color: var(--border-2); color: var(--k-text); }
html[data-theme="dark"] .ts-wrapper.single .ts-control input, html[data-theme="dark"] .ts-wrapper.multi .ts-control input, html[data-theme="dark"] .ts-control .item { color: var(--k-text); }
html[data-theme="dark"] .ts-wrapper.single .ts-control::after { border-color: var(--k-text-secondary) transparent transparent transparent; }
html[data-theme="dark"] .ts-wrapper.single.focus .ts-control { border-color: var(--k-red); }
html[data-theme="dark"] .ts-dropdown { background: var(--surface); border-color: var(--border-2); color: var(--k-text); box-shadow: 0 12px 30px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .ts-dropdown .option { border-bottom-color: var(--border); }
html[data-theme="dark"] .ts-dropdown .active { background-color: rgba(233, 29, 39, .2); color: #fff; }
html[data-theme="dark"] .ts-dropdown .option.selected, html[data-theme="dark"] .ts-dropdown .option.selected.active { background-color: var(--k-red); color: #fff; }
html[data-theme="dark"] .ts-dropdown .no-results { color: var(--k-text-secondary); }
html[data-theme="dark"] .ts-wrapper.disabled .ts-control { background-color: var(--k-gray-100); opacity: .6; }
/* Flatpickr on dark */
html[data-theme="dark"] .flatpickr-calendar { background: var(--surface); color: var(--k-text); border: 1px solid var(--border); box-shadow: 0 12px 30px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .flatpickr-calendar.arrowTop:before, html[data-theme="dark"] .flatpickr-calendar.arrowTop:after { border-bottom-color: var(--border); }
html[data-theme="dark"] .flatpickr-calendar.arrowBottom:before, html[data-theme="dark"] .flatpickr-calendar.arrowBottom:after { border-top-color: var(--border); }
html[data-theme="dark"] .flatpickr-months .flatpickr-month, html[data-theme="dark"] .flatpickr-current-month, html[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months, html[data-theme="dark"] .flatpickr-weekday, html[data-theme="dark"] .flatpickr-current-month input.cur-year
    { color: var(--k-text); fill: var(--k-text); background: transparent; }
html[data-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months { background: var(--surface); }
html[data-theme="dark"] .flatpickr-months .flatpickr-prev-month svg, html[data-theme="dark"] .flatpickr-months .flatpickr-next-month svg { fill: var(--k-text); }
html[data-theme="dark"] .flatpickr-months .flatpickr-prev-month:hover svg, html[data-theme="dark"] .flatpickr-months .flatpickr-next-month:hover svg { fill: var(--k-red); }
html[data-theme="dark"] .flatpickr-day { color: var(--k-text); }
html[data-theme="dark"] .flatpickr-day:hover, html[data-theme="dark"] .flatpickr-day.prevMonthDay:hover, html[data-theme="dark"] .flatpickr-day.nextMonthDay:hover { background: var(--surface-2); border-color: var(--surface-2); }
html[data-theme="dark"] .flatpickr-day.today { border-color: var(--k-red); }
html[data-theme="dark"] .flatpickr-day.selected, html[data-theme="dark"] .flatpickr-day.selected:hover, html[data-theme="dark"] .flatpickr-day.startRange, html[data-theme="dark"] .flatpickr-day.endRange { background: var(--k-red); border-color: var(--k-red); color: #fff; }
html[data-theme="dark"] .flatpickr-day.flatpickr-disabled, html[data-theme="dark"] .flatpickr-day.prevMonthDay, html[data-theme="dark"] .flatpickr-day.nextMonthDay { color: var(--k-gray-400); }
html[data-theme="dark"] .flatpickr-weekdays { background: transparent; }
html[data-theme="dark"] span.flatpickr-weekday { background: transparent; }
html[data-theme="dark"] .numInputWrapper span.arrowUp:after { border-bottom-color: var(--k-text); }
html[data-theme="dark"] .numInputWrapper span.arrowDown:after { border-top-color: var(--k-text); }
/* Leaflet on dark */
html[data-theme="dark"] .leaflet-popup-content-wrapper, html[data-theme="dark"] .leaflet-popup-tip { background: var(--surface-2); color: var(--k-text); }
html[data-theme="dark"] .leaflet-popup-content-wrapper { border: 1px solid var(--border); }
html[data-theme="dark"] .leaflet-container a.leaflet-popup-close-button { color: var(--k-text-secondary); }
html[data-theme="dark"] .leaflet-bar a, html[data-theme="dark"] .leaflet-bar a:hover { background: var(--surface-2); color: var(--k-text); border-bottom-color: var(--border); }
html[data-theme="dark"] .leaflet-control-attribution { background: rgba(11, 12, 15, .8) !important; color: #9aa4af !important; }
html[data-theme="dark"] .leaflet-control-attribution a { color: #c2cad3 !important; }
/* Session-timeout / error pages inherit card-k; spinner colour */
html[data-theme="dark"] .spinner-border.text-success { color: #4ade80 !important; }
/* Print stays light */
@media print {
    body { background: #fff !important; color: #000 !important; }
    .card-k, .warranty-card, .form-section, .table { background: #fff !important; color: #000 !important; }
}
