/* =========================================================================
   Cabs For Tours — Enterprise Design System
   v2.0  •  modernised stylesheet
   ------------------------------------------------------------------------
   Built around CSS custom properties so the entire visual language can be
   re-themed (light/dark/brand) without rewriting components.

   Sections:
     1.  Design tokens
     2.  Base reset & typography
     3.  Layout primitives
     4.  Card / surface
     5.  Buttons & links
     6.  Forms & inputs
     7.  Wizards & step UI
     8.  Tables
     9.  Itinerary components
     10. Admin shell
     11. Feedback / chips
     12. Utilities
     13. Responsive
     14. Print
   ========================================================================= */

/* ---------------------------------------------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------------------------------------------*/
:root {
    /* Brand */
    --brand-50:  #fff8dc;
    --brand-100: #ffefae;
    --brand-200: #ffe275;
    --brand-300: #ffd43b;
    --brand-400: #ffc107;
    --brand-500: #f5a400;
    --brand-600: #f28c00;
    --brand-700: #d96f00;
    --brand-800: #9a4700;
    --brand-900: #111111;

    /* Slate / ink */
    --ink:        #111111;
    --ink-soft:   #242424;
    --ink-mute:   #4b4b4b;
    --muted:      #707070;
    --muted-2:    #a3a3a3;
    --line:       #e8dfc8;
    --line-soft:  #f3ead4;
    --soft:       #fff8ea;
    --soft-2:     #fff1c7;
    --paper:      #ffffff;

    /* Semantic accents */
    --green:        #0f766e;
    --green-dark:   #0a5750;
    --green-soft:   #e6f7f4;
    --gold:         #f28c00;
    --gold-soft:    #fff3cf;
    --red:          #dc2626;
    --red-soft:     #fee4e2;
    --amber:        #f28c00;
    --amber-soft:   #fff3cf;
    --info:         #111111;
    --info-soft:    #fff1c7;

    /* Typography */
    --font-sans: "Inter", "InterVariable", ui-sans-serif, system-ui,
                 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo,
                 Consolas, "Liberation Mono", monospace;

    --fs-12: 12px;
    --fs-13: 13px;
    --fs-14: 14px;
    --fs-15: 15px;
    --fs-16: 16px;
    --fs-18: 18px;
    --fs-20: 20px;
    --fs-22: 22px;
    --fs-26: 26px;
    --fs-32: 32px;
    --fs-40: 40px;
    --fs-48: 48px;

    --lh-tight:  1.18;
    --lh-snug:   1.32;
    --lh-normal: 1.5;
    --lh-loose:  1.65;

    /* Spacing */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;
    --space-7:  32px;
    --space-8:  40px;
    --space-9:  48px;
    --space-10: 64px;
    --space-11: 80px;
    --space-12: 96px;

    /* Radius */
    --r-1:   4px;
    --r-2:   6px;
    --r-3:   8px;
    --r-4:   10px;
    --r-5:   14px;
    --r-6:   20px;
    --r-full: 999px;

    /* Elevation */
    --shadow-xs:  0 1px 2px rgba(17, 17, 17, 0.06);
    --shadow-sm:  0 2px 8px rgba(17, 17, 17, 0.08), 0 1px 2px rgba(242, 140, 0, 0.08);
    --shadow-md:  0 12px 30px -14px rgba(17, 17, 17, 0.22), 0 6px 14px rgba(242, 140, 0, 0.10);
    --shadow-lg:  0 24px 48px -18px rgba(17, 17, 17, 0.26), 0 10px 20px rgba(242, 140, 0, 0.12);
    --shadow-xl:  0 32px 80px -24px rgba(17, 17, 17, 0.30), 0 12px 24px rgba(242, 140, 0, 0.14);
    --shadow:     var(--shadow-md);

    /* Motion */
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --t-fast:   140ms;
    --t-base:   220ms;
    --t-slow:   360ms;

    --header-h: 64px;
    --container-w: 1180px;
}

/* ---------------------------------------------------------------------------
   2. BASE
   ---------------------------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background:
        linear-gradient(180deg, #fff8ea 0%, #fffdf6 46%, #fff8ea 100%);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--fs-15);
    line-height: var(--lh-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01", "cv11";
}

img, svg, video { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-3);
    color: var(--ink);
    font-weight: 700;
    line-height: var(--lh-snug);
    letter-spacing: 0;
}

h1 { font-size: clamp(var(--fs-32), 4.2vw, var(--fs-40)); line-height: var(--lh-tight); letter-spacing: 0; }
h2 { font-size: var(--fs-26); }
h3 { font-size: var(--fs-20); }
h4 { font-size: var(--fs-18); }
h5 { font-size: var(--fs-16); }

p { margin: 0 0 var(--space-3); color: var(--ink-mute); }

a {
    color: var(--brand-600);
    text-decoration: none;
    transition: color var(--t-fast) var(--ease-out);
}
a:hover { color: var(--brand-700); }

small { font-size: var(--fs-13); color: var(--muted); }

hr {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: var(--space-6) 0;
}

::selection { background: var(--brand-200); color: var(--ink); }

/* ---------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   ---------------------------------------------------------------------------*/
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-5);
    height: var(--header-h);
    padding: 0 clamp(var(--space-4), 4vw, var(--space-8));
    background: rgba(17, 17, 17, 0.96);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 3px solid var(--brand-400);
}

.site-header .brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-18);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.site-header .brand::before {
    content: "";
    width: 26px; height: 26px;
    background: linear-gradient(135deg, var(--brand-300), var(--brand-600));
    border-radius: var(--r-3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), var(--shadow-sm);
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.site-header nav a,
.site-header nav button {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--r-3);
    font-size: var(--fs-14);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
    cursor: pointer;
}
.site-header nav a:hover,
.site-header nav button:hover { background: rgba(255, 193, 7, 0.16); color: #ffffff; }
.site-header nav a.active { background: var(--brand-400); color: #111111; }
.site-header nav .nav-form { margin: 0; }

.site-footer {
    margin-top: var(--space-11);
    padding: var(--space-7) clamp(var(--space-4), 4vw, var(--space-8));
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-3);
    color: var(--muted);
    font-size: var(--fs-13);
    border-top: 1px solid var(--line-soft);
    background: var(--paper);
}
.site-footer span:first-child { font-weight: 600; color: var(--ink); }

.section {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: var(--space-9) clamp(var(--space-4), 4vw, var(--space-8));
}
.section.muted { background: var(--paper); border-block: 1px solid var(--line-soft); }
.section + .section { padding-top: var(--space-9); }

.page-shell {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: var(--space-8) clamp(var(--space-4), 4vw, var(--space-8));
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(var(--space-9), 9vw, var(--space-11)) clamp(var(--space-4), 4vw, var(--space-8));
    background:
        radial-gradient(60% 90% at 12% -10%, var(--brand-100), transparent 70%),
        radial-gradient(70% 90% at 100% 0%, #e9efff, transparent 65%),
        linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
}
.hero .hero-inner {
    max-width: var(--container-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-9);
    align-items: start;
}
.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 4px 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-full);
    color: var(--ink-mute);
    font-size: var(--fs-12);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: var(--shadow-xs);
}
.hero h1 { margin-top: var(--space-5); margin-bottom: var(--space-4); color: var(--ink); }
.hero p.lead {
    font-size: var(--fs-18);
    color: var(--ink-mute);
    margin-bottom: var(--space-6);
    max-width: 56ch;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.xtra-hero {
    background:
        radial-gradient(70% 90% at 100% 0%, #1e2b4d, transparent 65%),
        linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f1f5f9;
}
.xtra-hero h1, .xtra-hero p.lead { color: #f1f5f9; }
.xtra-hero .eyebrow { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); color: #cbd5e1; }

/* ---------------------------------------------------------------------------
   4. CARD / SURFACE
   ---------------------------------------------------------------------------*/
.planner-card,
.result-card,
.offer-card,
.summary-card,
.utility-panel,
.pro-builder-card,
.pro-day-plan,
.pro-result-hero {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    padding: clamp(var(--space-5), 2vw, var(--space-7));
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t-base) var(--ease-out),
                border-color var(--t-base) var(--ease-out);
}
.planner-card:hover,
.utility-panel:hover { box-shadow: var(--shadow-md); }

.planner-card {
    border-top: 4px solid var(--brand-400);
}

.result-card {
    border-color: #efd99d;
    background:
        linear-gradient(180deg, #ffffff 0%, #fffdfa 100%);
}

.planner-card > h2,
.planner-card > h3,
.result-card > h2,
.result-card > h3,
.pro-builder-card > h2 { margin-top: 0; }

.planner-card + .planner-card,
.result-card + .planner-card,
.planner-card + .utility-panel,
.utility-panel + .utility-panel { margin-top: var(--space-5); }

.offer-card {
    background:
        radial-gradient(80% 120% at 110% -10%, var(--brand-50), transparent 60%),
        var(--paper);
    border-color: var(--brand-200);
}
.offer-card h2 { color: var(--brand-800); }
.offer-card .pill { background: var(--brand-50); color: var(--brand-700); }

.summary-card {
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.summary-card {
    background: linear-gradient(180deg, #111111 0%, #242424 100%);
    color: #ffffff;
    border-color: #111111;
}
.summary-card .label {
    font-size: var(--fs-12);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.64);
    font-weight: 600;
}
.summary-card .value {
    font-size: var(--fs-32);
    font-weight: 800;
    color: var(--brand-400);
    line-height: 1;
    letter-spacing: -0.02em;
}
.summary-card .delta { font-size: var(--fs-13); color: rgba(255, 255, 255, 0.72); }
.summary-card.success .value { color: var(--green); }
.summary-card.alert   .value { color: var(--red); }
.summary-card.warn    .value { color: var(--amber); }

.utility-panel { padding: 0; overflow: hidden; }
.utility-panel > summary {
    padding: var(--space-5) var(--space-6);
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--ink);
    user-select: none;
}
.utility-panel > summary::-webkit-details-marker { display: none; }
.utility-panel > summary::after {
    content: "+";
    font-size: 22px;
    color: var(--muted);
    line-height: 1;
    transition: transform var(--t-base) var(--ease-out);
}
.utility-panel[open] > summary::after { content: "−"; }
.utility-panel > *:not(summary) { padding: 0 var(--space-6) var(--space-6); }

/* ---------------------------------------------------------------------------
   5. BUTTONS & LINKS
   ---------------------------------------------------------------------------*/
.button,
button.button,
a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 10px 18px;
    border-radius: var(--r-3);
    font-family: inherit;
    font-size: var(--fs-14);
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    transition: background var(--t-fast) var(--ease-out),
                box-shadow var(--t-fast) var(--ease-out),
                transform var(--t-fast) var(--ease-out),
                color var(--t-fast) var(--ease-out),
                border-color var(--t-fast) var(--ease-out);
    background: var(--brand-400);
    color: #111111;
    box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, var(--shadow-xs);
}
.button:hover  { background: var(--brand-600); color: #111111; box-shadow: var(--shadow-sm); }
.button:active { transform: translateY(1px); }
.button:focus-visible { outline: 3px solid var(--brand-200); outline-offset: 1px; }
.button[disabled], .button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.button.secondary,
.button.outline {
    background: var(--paper);
    color: var(--ink);
    border-color: #111111;
    box-shadow: var(--shadow-xs);
}
.button.secondary:hover { background: #111111; color: #ffffff; border-color: #111111; }

.button.ghost {
    background: transparent;
    color: var(--ink);
    border-color: transparent;
    box-shadow: none;
}
.button.ghost:hover { background: var(--soft-2); color: var(--ink); }

.button.danger { background: var(--red); }
.button.danger:hover { background: #b91c1c; }

.button.success { background: var(--green); }
.button.success:hover { background: var(--green-dark); }

.button.small { padding: 6px 12px; font-size: var(--fs-13); }
.button.large { padding: 14px 24px; font-size: var(--fs-16); }
.button.block { display: flex; width: 100%; }

.estimate-button {
    padding: 14px 28px;
    font-size: var(--fs-16);
    background: linear-gradient(180deg, var(--brand-500) 0%, var(--brand-700) 100%);
    color: #ffffff;
    border: 0;
    border-radius: var(--r-3);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: box-shadow var(--t-fast) var(--ease-out);
}
.estimate-button:hover { box-shadow: var(--shadow-lg); }

.link-button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--brand-600);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.link-button:hover { color: var(--brand-800); }

/* ---------------------------------------------------------------------------
   6. FORMS & INPUTS
   ---------------------------------------------------------------------------*/
label {
    display: block;
    font-size: var(--fs-13);
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: var(--space-1);
}

label > input,
label > select,
label > textarea { margin-top: 6px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="url"],
input[type="search"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e1c778;
    border-radius: var(--r-3);
    font: inherit;
    font-size: var(--fs-14);
    color: var(--ink);
    line-height: var(--lh-snug);
    transition: border-color var(--t-fast) var(--ease-out),
                box-shadow var(--t-fast) var(--ease-out),
                background var(--t-fast) var(--ease-out);
    appearance: none;
    -webkit-appearance: none;
}
textarea { min-height: 96px; resize: vertical; }

input::placeholder, textarea::placeholder { color: var(--muted-2); }

input:hover, select:hover, textarea:hover { border-color: var(--brand-600); }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 4px var(--brand-100);
}

input[type="checkbox"], input[type="radio"] {
    accent-color: var(--brand-600);
    width: 16px; height: 16px;
    margin: 0;
    vertical-align: middle;
}

select {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 32px;
}

fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 var(--space-5) 0;
}
legend {
    padding: 0;
    margin-bottom: var(--space-3);
    font-size: var(--fs-14);
    font-weight: 600;
    color: var(--ink-soft);
}

.field-error {
    display: block;
    margin-top: 6px;
    color: var(--red);
    font-size: var(--fs-13);
}

.error-box {
    padding: var(--space-3) var(--space-4);
    background: var(--red-soft);
    color: #7f1d1d;
    border: 1px solid #fecaca;
    border-radius: var(--r-3);
    font-size: var(--fs-14);
    margin-bottom: var(--space-4);
}

.success-box {
    padding: var(--space-3) var(--space-4);
    background: var(--green-soft);
    color: #064e3b;
    border: 1px solid #99f6e4;
    border-radius: var(--r-3);
    font-size: var(--fs-14);
    margin-bottom: var(--space-4);
}

.flash {
    max-width: var(--container-w);
    margin: var(--space-4) auto 0;
    padding: var(--space-3) var(--space-5);
    background: var(--green-soft);
    color: #064e3b;
    border: 1px solid #99f6e4;
    border-radius: var(--r-3);
    font-size: var(--fs-14);
    font-weight: 500;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
}
.compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3);
}
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.textarea-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}
.textarea-grid label.full { grid-column: 1 / -1; }

.place-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-3);
}
.place-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-4);
    cursor: pointer;
    transition: border-color var(--t-fast) var(--ease-out),
                background var(--t-fast) var(--ease-out),
                box-shadow var(--t-fast) var(--ease-out);
}
.place-card:hover { border-color: var(--brand-300); background: var(--brand-50); }
.place-card input[type="checkbox"] { margin-top: 3px; }
.place-card:has(input:checked) {
    border-color: var(--brand-500);
    background: var(--brand-50);
    box-shadow: 0 0 0 3px var(--brand-100);
}
.place-card span { display: block; font-size: var(--fs-14); }
.place-card strong { font-size: var(--fs-14); color: var(--ink); display: block; }
.place-card small { font-size: var(--fs-12); color: var(--muted); }

.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    background: var(--soft-2);
    padding: 4px;
    border-radius: var(--r-3);
    gap: 2px;
}
.segmented label {
    margin: 0;
    cursor: pointer;
    border-radius: var(--r-2);
    padding: 8px 14px;
    font-weight: 500;
    color: var(--ink-mute);
    transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
    font-size: var(--fs-13);
    position: relative;
}
.segmented label:hover { color: var(--ink); }
.segmented input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0; height: 0;
}
.segmented label:has(input:checked) {
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow-xs);
}

.quick-route-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3);
}
.quick-route-grid .place-card {
    flex-direction: column;
    align-items: stretch;
}

.advanced-options {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: var(--soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-4);
}
.advanced-options > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: var(--space-3);
    list-style: none;
}
.advanced-options > summary::-webkit-details-marker { display: none; }
.advanced-options > summary::before {
    content: "▸ ";
    color: var(--muted);
    margin-right: 4px;
}
.advanced-options[open] > summary::before { content: "▾ "; color: var(--brand-600); }

.destination-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 12px;
    background: #111111;
    color: var(--brand-300);
    border: 1px solid #111111;
    border-radius: var(--r-full);
    font-size: var(--fs-13);
    font-weight: 600;
    margin: 4px 6px 0 0;
}
.destination-chip button {
    border: 0;
    background: transparent;
    color: var(--brand-300);
    font: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.destination-chip button:hover { color: var(--red); }

/* ---------------------------------------------------------------------------
   7. WIZARDS
   ---------------------------------------------------------------------------*/
.simple-planner,
.agent-wizard {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    position: relative;
}
.wizard-progress::before {
    content: "";
    position: absolute;
    left: 20px; right: 20px; top: 16px;
    height: 2px;
    background: #f2d47c;
    z-index: 0;
}
.wizard-dot {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    font-size: var(--fs-12);
    font-weight: 600;
    color: var(--muted);
}
.wizard-dot::before {
    content: attr(data-step);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--paper);
    border: 2px solid #e0bf55;
    color: var(--muted);
    font-weight: 700;
    font-size: var(--fs-13);
    transition: all var(--t-base) var(--ease-out);
}
.wizard-dot.active,
.wizard-dot[aria-current="step"] { color: #111111; }
.wizard-dot.active::before,
.wizard-dot[aria-current="step"]::before {
    background: var(--brand-400);
    border-color: #111111;
    color: #111111;
    box-shadow: 0 0 0 4px var(--brand-100);
}
.wizard-dot.done { color: var(--green); }
.wizard-dot.done::before {
    background: var(--green);
    border-color: var(--green);
    color: #ffffff;
    content: "✓";
    font-size: 14px;
}

.wizard-panel {
    display: none;
    animation: fadeUp .35s var(--ease-out);
}
.wizard-panel.active,
.wizard-panel[data-active="true"] { display: block; }

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

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--line-soft);
}
.wizard-actions .spacer { flex: 1; }

.pro-progress {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}
.pro-progress .pro-progress-step {
    flex: 1;
    height: 6px;
    background: var(--line);
    border-radius: var(--r-full);
}
.pro-progress .pro-progress-step.active,
.pro-progress .pro-progress-step.done {
    background: var(--brand-500);
}

/* ---------------------------------------------------------------------------
   8. TABLES
   ---------------------------------------------------------------------------*/
.table-wrap {
    overflow-x: auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-4);
    box-shadow: var(--shadow-sm);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-14);
}
thead th {
    text-align: left;
    background: var(--soft);
    color: var(--ink-soft);
    font-weight: 600;
    font-size: var(--fs-12);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink-soft);
    vertical-align: top;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--soft); }
tbody td .pill { white-space: nowrap; }
table.compact tbody td,
table.compact thead th { padding: 8px 12px; }

/* ---------------------------------------------------------------------------
   9. ITINERARY COMPONENTS
   ---------------------------------------------------------------------------*/
.day-list,
.pro-day-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.day-list li,
.pro-day-list > li {
    padding: var(--space-4) var(--space-5);
    background: var(--soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-3);
    font-size: var(--fs-14);
    color: var(--ink-soft);
}
.day-list li strong,
.pro-day-list strong { color: var(--ink); font-weight: 700; display: inline; }

.day-plan {
    padding: var(--space-5) var(--space-6);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-4);
    margin-bottom: var(--space-4);
    transition: border-color var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}
.day-plan:hover { border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.day-plan .day-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--brand-50);
    color: var(--brand-700);
    border-radius: var(--r-full);
    font-size: var(--fs-12);
    font-weight: 700;
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.day-plan h3 { font-size: var(--fs-18); margin-bottom: var(--space-2); }
.day-plan p { font-size: var(--fs-14); color: var(--ink-mute); margin-bottom: var(--space-3); }
.day-plan .day-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    font-size: var(--fs-13);
    color: var(--muted);
}
.day-plan .day-meta > div {
    background: var(--soft);
    border: 1px solid var(--line-soft);
    padding: 4px 10px;
    border-radius: var(--r-full);
}
.day-plan .day-meta b { color: var(--ink-soft); font-weight: 600; margin-right: 4px; }
.day-plan .day-meta em { font-style: normal; color: var(--muted); }

.route-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-15);
}
.route-line .place {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    font-weight: 600;
    color: var(--ink);
}
.route-line .arrow { color: var(--muted-2); font-weight: 600; }

.price-box {
    background:
        radial-gradient(80% 120% at 110% -20%, var(--brand-50), transparent 70%),
        var(--paper);
    border: 1px solid var(--brand-200);
    border-radius: var(--r-5);
    padding: var(--space-6);
    margin-bottom: var(--space-5);
}
.price-box .price-label {
    font-size: var(--fs-12);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 4px;
}
.price-box .price-value {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.price-box .price-helper { font-size: var(--fs-13); color: var(--muted); }

.breakup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.breakup-grid > div {
    padding: var(--space-3) var(--space-4);
    background: var(--soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-3);
}
.breakup-grid .lbl {
    display: block;
    font-size: var(--fs-12);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 2px;
}
.breakup-grid .val { font-size: var(--fs-16); font-weight: 700; color: var(--ink); }

.result-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: var(--space-6);
    align-items: start;
}

.pro-itinerary-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}
.pro-result-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}
.pro-result-hero h1 { margin: 0; font-size: var(--fs-26); }
.pro-result-hero p { margin: 4px 0 0; color: var(--muted); }
.quick-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.builder-sidecar {
    background: #111111;
    border: 1px solid #111111;
    border-radius: var(--r-3);
    padding: var(--space-5);
    position: sticky;
    top: calc(var(--header-h) + var(--space-4));
    box-shadow: var(--shadow-sm);
}
.builder-sidecar h3 {
    font-size: var(--fs-14);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-300);
    margin-bottom: var(--space-3);
    font-weight: 600;
}
.sidecar-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: var(--fs-14);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
}
.sidecar-row:last-child { border-bottom: 0; }
.sidecar-row .lbl { color: rgba(255, 255, 255, 0.62); }
.sidecar-row .val { color: #ffffff; font-weight: 700; }

.share-text {
    width: 100%;
    min-height: 220px;
    font-family: var(--font-mono);
    font-size: var(--fs-13);
    background: var(--soft);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    padding: var(--space-4);
    line-height: var(--lh-loose);
}

/* ---------------------------------------------------------------------------
   10. ADMIN SHELL
   ---------------------------------------------------------------------------*/
.admin-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--line-soft);
}
.admin-heading h1 { font-size: var(--fs-26); margin-bottom: 4px; }
.admin-heading p { color: var(--muted); margin: 0; font-size: var(--fs-14); }
.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.day-content-editor {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.day-content-workbench {
    padding: var(--space-6);
}

.day-content-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: var(--space-5);
}

.day-content-head h2 {
    margin: 0;
    font-size: var(--fs-22);
}

.day-content-fields {
    display: grid;
    grid-template-columns:
        minmax(260px, 2fr)
        minmax(150px, .8fr)
        minmax(210px, 1.2fr)
        minmax(190px, 1fr)
        minmax(190px, 1fr);
    gap: var(--space-4);
    align-items: end;
}

.day-content-fields label {
    min-width: 0;
    margin: 0;
}

.day-content-fields input,
.day-content-fields select {
    min-height: 44px;
}

.day-content-route,
.day-content-note-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.day-content-main {
    margin-top: var(--space-5);
}

.day-content-versions {
    display: grid;
    grid-template-columns: .9fr 1.1fr 1.1fr;
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.day-content-versions textarea[name="balanced_text"],
.day-content-versions textarea[name="detailed_text"] {
    min-height: 260px;
    font-size: var(--fs-15);
    line-height: var(--lh-loose);
}

.day-content-versions textarea[name="standard_text"] {
    min-height: 180px;
}

.day-content-notes {
    margin-top: var(--space-5);
    padding: var(--space-4);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-3);
    background: var(--soft);
}

.day-content-notes summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--ink);
}

.day-content-actions {
    position: sticky;
    bottom: var(--space-4);
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-3);
    background: rgba(255, 253, 246, .94);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    box-shadow: var(--shadow-md);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-7);
}
.summary-grid .summary-card { grid-column: span 3; }

.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}
.dashboard-columns > .planner-card { display: flex; flex-direction: column; gap: var(--space-3); }
.dashboard-columns h2 { font-size: var(--fs-18); margin-bottom: 0; }

.agent-command-hero,
.agent-builder-page {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}
.agent-command-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--space-5);
    align-items: stretch;
}
.agent-command-hero .planner-card { display: flex; flex-direction: column; justify-content: space-between; }

/* ---------------------------------------------------------------------------
   11. FEEDBACK / CHIPS
   ---------------------------------------------------------------------------*/
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--soft-2);
    color: var(--ink-mute);
    border-radius: var(--r-full);
    font-size: var(--fs-12);
    font-weight: 600;
    line-height: 1.6;
    border: 1px solid transparent;
}
.pill.green   { background: var(--green-soft); color: #065f46; }
.pill.brand   { background: var(--brand-50);  color: var(--brand-700); }
.pill.amber   { background: var(--amber-soft); color: #92400e; }
.pill.red     { background: var(--red-soft);   color: #991b1b; }
.pill.outline { background: transparent; border-color: var(--line); color: var(--ink-mute); }
.pill.info    { background: #e0f2fe; color: #075985; }

.status-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--muted-2);
    margin-right: 6px;
    vertical-align: middle;
}
.status-dot.active { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.18); }
.status-dot.pending { background: var(--amber); }
.status-dot.error   { background: var(--red); }

.generated-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
}
.generated-overlay[hidden] { display: none !important; }
.generated-overlay .panel {
    background: var(--paper);
    border-radius: var(--r-5);
    padding: var(--space-7);
    text-align: center;
    box-shadow: var(--shadow-xl);
    max-width: 380px;
}
.generated-overlay .spinner {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 3px solid var(--line);
    border-top-color: var(--brand-600);
    animation: spin 0.9s linear infinite;
    margin: 0 auto var(--space-4);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------------
   12. UTILITIES
   ---------------------------------------------------------------------------*/
.microcopy {
    color: var(--muted);
    font-size: var(--fs-13);
    margin: var(--space-2) 0;
}
.copy-heading {
    font-size: var(--fs-12);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: var(--space-2);
}
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.muted { color: var(--muted); }
.center { text-align: center; }
.right  { text-align: right; }
.stack-2 > * + * { margin-top: var(--space-2); }
.stack-3 > * + * { margin-top: var(--space-3); }
.stack-4 > * + * { margin-top: var(--space-4); }
.stack-5 > * + * { margin-top: var(--space-5); }
.row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.no-mb { margin-bottom: 0 !important; }
.no-mt { margin-top: 0 !important; }
.print-only { display: none !important; }
.no-print { }
.section.narrow, .narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---------- Data tables (admin / supplier / partner index views) ---------- */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--fs-14);
    color: var(--ink);
}
.data-table thead th {
    text-align: left;
    font-size: var(--fs-12);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 700;
    padding: var(--space-3) var(--space-4);
    background: var(--soft);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.data-table tbody td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}
.data-table tbody tr:hover { background: var(--soft); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table th:first-child, .data-table td:first-child { padding-left: var(--space-5); }
.data-table th:last-child,  .data-table td:last-child  { padding-right: var(--space-5); }
.data-table .empty-row td {
    text-align: center;
    color: var(--muted);
    padding: var(--space-6);
    font-style: italic;
}

.pagination-wrap {
    margin-top: var(--space-5);
    padding: 0 var(--space-2);
    display: flex;
    justify-content: center;
}
.pagination-wrap nav { font-size: var(--fs-13); }
.pagination-wrap nav > div { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pagination-wrap a, .pagination-wrap span {
    padding: 6px 10px;
    border-radius: var(--r-2);
    border: 1px solid var(--line);
    color: var(--ink-mute);
    text-decoration: none;
    background: #fff;
}
.pagination-wrap a:hover { border-color: var(--brand-400, var(--brand-600)); color: var(--brand-700); }
.pagination-wrap [aria-current="page"] span,
.pagination-wrap span.bg-white { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

/* ---------- Filter bar (above tables) ---------- */
.filter-bar {
    background: var(--soft);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-3);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: end;
}
.filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: var(--fs-12);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    min-width: 160px;
    flex: 1 1 160px;
}
.filter-bar input, .filter-bar select {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-2);
    background: #fff;
    font-size: var(--fs-14);
    color: var(--ink);
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
}
.filter-bar .filter-actions {
    display: flex;
    gap: var(--space-2);
    align-self: end;
}

/* ---------- Compact list (recent items in dashboards) ---------- */
.compact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.compact-list li {
    padding: var(--space-3) 0;
    border-bottom: 1px dashed var(--line-soft);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.compact-list li:last-child { border-bottom: 0; }
.compact-list strong { font-weight: 600; color: var(--ink); font-size: var(--fs-14); }
.compact-list span { color: var(--muted); font-size: var(--fs-13); }

/* ---------- Feature grid (marketing landings) ---------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
}
.feature-card {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-3);
    padding: var(--space-5);
    box-shadow: var(--shadow-xs, 0 1px 2px rgba(15,23,42,0.04));
    transition: transform 0.18s var(--ease-out, ease), box-shadow 0.18s var(--ease-out, ease);
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md, 0 4px 12px rgba(15,23,42,0.08)); }
.feature-card h3 { font-size: var(--fs-18); margin: 0 0 var(--space-2); }
.feature-card p { color: var(--muted); font-size: var(--fs-14); margin: 0; }

/* ---------- Form grid two-col modifier ---------- */
.form-grid.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 768px) { .form-grid.two-col { grid-template-columns: 1fr; } }

/* ---------- Button sizing helpers ---------- */
.button.small { padding: 7px 12px; font-size: var(--fs-13); }

/* ---------------------------------------------------------------------------
   13. RESPONSIVE
   ---------------------------------------------------------------------------*/
@media (max-width: 1024px) {
    .summary-grid .summary-card { grid-column: span 4; }
    .result-layout { grid-template-columns: 1fr; }
    .builder-sidecar { position: static; }
    .hero .hero-inner { grid-template-columns: 1fr; }
    .agent-command-hero { grid-template-columns: 1fr; }
    .day-content-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .site-header { flex-wrap: wrap; height: auto; padding: 12px var(--space-4); }
    .site-header nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .form-grid { grid-template-columns: 1fr; }
    .summary-grid .summary-card { grid-column: span 6; }
    .dashboard-columns { grid-template-columns: 1fr; }
    .two-column-grid, .textarea-grid { grid-template-columns: 1fr; }
    .place-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .wizard-progress { gap: var(--space-1); }
    .wizard-dot { font-size: 11px; }
    .wizard-dot::before { width: 28px; height: 28px; font-size: var(--fs-12); }
    .admin-heading { flex-direction: column; align-items: flex-start; }
    .admin-actions { width: 100%; flex-wrap: wrap; }
    .day-content-head { flex-direction: column; }
    .day-content-fields,
    .day-content-route,
    .day-content-versions,
    .day-content-note-grid { grid-template-columns: 1fr; }
    .day-content-actions { bottom: var(--space-2); }
}

@media (max-width: 480px) {
    .summary-grid .summary-card { grid-column: span 12; }
    .button { padding: 10px 14px; font-size: var(--fs-13); }
    .section, .page-shell { padding: var(--space-6) var(--space-4); }
    .hero { padding: var(--space-7) var(--space-4); }
}

/* ---------------------------------------------------------------------------
   14. PRINT
   ---------------------------------------------------------------------------*/
@media print {
    body { background: #ffffff; color: #000; font-size: 12pt; }
    .site-header, .site-footer, .admin-actions, .quick-action-row,
    .wizard-progress, .wizard-actions, .builder-sidecar, .generated-overlay,
    .no-print { display: none !important; }
    .print-only { display: block !important; }
    .planner-card, .result-card, .day-plan, .utility-panel {
        box-shadow: none;
        border: 1px solid #d1d5db;
        page-break-inside: avoid;
    }
    a { color: #000; text-decoration: none; }
    .section, .page-shell { padding: 0; max-width: none; }
}
