/* ── Grey Waypoint ─ Architectural Blueprint Theme ── */

:root {
    /* ── Backgrounds (light grey) ── */
    --bg:         #e6e8ec;   /* Canvas — light warm grey */
    --bg-surface: #eef1f4;   /* Surface — card level (lighter) */
    --bg-panel:   #f4f6f8;   /* Panel — raised sections (near-white) */
    --bg-card:    #f1f3f6;   /* Cards on surface */
    --bg-hover:   #dfe3e8;   /* Hover — slightly darker */
    --bg-modal:   rgba(90, 96, 106, 0.55);

    /* ── Text (dark on light) ── */
    --text:           #1f242b;   /* Primary — near-black */
    --text-secondary: #3f4756;   /* Secondary — dark grey */
    --text-muted:     #616a78;   /* Muted — medium grey */

    /* ── Borders ── */
    --border:        #c3c9d2;   /* Steel */
    --border-focus:  #98a1af;   /* Focus ring */
    --border-subtle: rgba(25, 30, 38, 0.10);

    /* ── Monochromatic accents (no vibrant color) ── */
    --accent:       #556373;
    --accent-hover: #3f4a59;
    --accent-light: #d5dae1;

    /* ── Semantic (desaturated, readable on light) ── */
    --success: #4a7a4a;
    --warning: #8a7030;
    --danger:  #8a4040;
    --info:    #3a5a8a;

    /* ── Shadows ── */
    --shadow:    0 1px 4px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.14);

    /* ── Radius (soft, quiet) ── */
    --radius:    6px;
    --radius-sm: 4px;

    /* ── Typography ── */
    --font-editorial: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
    --font-tactical:  'IBM Plex Sans', 'Helvetica Neue', sans-serif;
    --font:    var(--font-editorial);
    --font-ui: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}
h1 { font-size: 1.65rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

a { color: var(--text-secondary); text-decoration: none; }
a:hover { color: var(--text); }

/* ── Buttons ── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 150ms ease-out;
    background: transparent;
    color: var(--text-secondary);
}
.btn:active { transform: none; }

.btn-primary {
    background: var(--bg-panel);
    color: var(--text);
    border-color: var(--text-muted);
}
.btn-primary:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-secondary:hover {
    color: var(--text);
    border-color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.03);
}

.btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-hover); }

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger);
}
.btn-danger:hover { background: rgba(138, 50, 50, 0.08); }

.btn-sm { padding: 4px 10px; font-size: 0.7rem; }
.btn-lg { padding: 12px 24px; font-size: 0.8rem; }

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 150ms ease-out;
}
.btn-icon:hover { background: var(--bg-hover); }

/* ── Forms ── */

.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 0;
    font-family: var(--font-tactical);
    font-size: 0.85rem;
    color: var(--text);
    background: var(--bg-surface);
    transition: border-color 150ms ease-out;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: none;
}

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

.form-row {
    display: flex;
    gap: 12px;
}
.form-row > .form-group { flex: 1; }

/* ── Cards ── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card-hover:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
    cursor: pointer;
}

/* ── Modal ── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.modal-body { padding: 20px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
}

/* ── Badges ── */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 0;
    border: 1px solid var(--border);
    font-family: var(--font-tactical);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    background: transparent;
}

.badge-idea { border-color: var(--border); color: var(--text-muted); }
.badge-confirmed { border-color: #6a8a6a; color: #3a6a3a; }
.badge-booked { border-color: #6a7a9a; color: #3a5a8a; }
.badge-cancelled { border-color: #aa8a8a; color: #8a5050; text-decoration: line-through; }

.badge-unverified {
    border-color: #c0aa70;
    color: #7a6520;
    background: rgba(160, 130, 50, 0.08);
    padding: 1px 8px;
    font-size: 0.6rem;
}

.itinerary-frame .badge {
    border: none;
    border-radius: 6px;
    padding: 2px 8px;
    background: var(--accent-light);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.62rem;
    text-transform: none;
    letter-spacing: 0.03em;
}

.itinerary-frame .badge-idea {
    background: rgba(110, 116, 124, 0.18);
    color: #4f5762;
}

.itinerary-frame .badge-confirmed {
    background: rgba(80, 120, 80, 0.18);
    color: #345a34;
}

.itinerary-frame .badge-booked {
    background: rgba(85, 99, 115, 0.22);
    color: #31435e;
}

.itinerary-frame .badge-cancelled {
    background: rgba(128, 86, 86, 0.18);
    color: #6a3d3d;
    text-decoration: line-through;
}

.itinerary-frame .badge-unverified {
    border: 1px solid rgba(130, 100, 40, 0.35);
    background: rgba(160, 130, 50, 0.14);
    color: #6d5b1d;
}

/* ── Type Icons ── */

.type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.type-flight { background: rgba(60, 80, 130, 0.12); }
.type-lodging { background: rgba(130, 80, 50, 0.12); }
.type-activity { background: rgba(50, 110, 60, 0.12); }
.type-transport { background: rgba(90, 60, 130, 0.12); }
.type-restaurant { background: rgba(130, 50, 50, 0.12); }
.type-task { background: rgba(100, 100, 100, 0.10); }
.type-note { background: rgba(120, 110, 50, 0.12); }

/* ── Layout ── */

.page-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px;
}

.page-container-wide {
    max-width: 1200px;
}

/* ── Login Page ── */

.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-logo {
    font-family: var(--font-editorial);
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.login-error {
    background: rgba(138, 50, 50, 0.07);
    color: #8a3030;
    padding: 8px 12px;
    border-radius: 0;
    font-size: 0.85rem;
    margin-bottom: 12px;
    border: 1px solid rgba(138, 50, 50, 0.2);
}

.login-success {
    background: rgba(50, 100, 50, 0.07);
    color: #3a6a3a;
    padding: 8px 12px;
    border-radius: 0;
    font-size: 0.85rem;
    margin-bottom: 12px;
    border: 1px solid rgba(50, 100, 50, 0.2);
}

.login-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Top Bar ── */

.topbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-brand {
    font-family: var(--font-ui);
    font-size: 1.0rem;
    font-weight: 600;
    color: var(--text);
    margin-right: 24px;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.topbar-trip-name {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-right: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: none;
    letter-spacing: 0.02em;
}

.topbar-nav {
    display: flex;
    gap: 0;
    margin-left: auto;
}

.topbar-nav .nav-tab {
    padding: 8px 14px;
    border-radius: 0;
    font-family: var(--font-ui);
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    cursor: pointer;
    transition: all 150ms ease-out;
    text-transform: none;
    letter-spacing: 0.02em;
}
.topbar-nav .nav-tab:hover { color: var(--text-secondary); }
.topbar-nav .nav-tab.active {
    background: transparent;
    color: var(--text);
    border-bottom-color: var(--text);
}

/* ── FAB (old single button - replaced by FAB Menu below) ── */

/* ── Trip Cards Grid ── */

.trip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.trip-card-new {
    border: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 150ms ease-out, color 150ms ease-out;
}
.trip-card-new:hover {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}
.trip-card-new span { font-size: 2rem; margin-bottom: 4px; }

.trip-card-dates { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.trip-card-stats { display: flex; gap: 16px; margin-top: 12px; font-size: 0.85rem; color: var(--text-secondary); }

/* ── Entity List ── */

.entity-list { display: flex; flex-direction: column; gap: 8px; }

.entity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.entity-row:hover {
    border-color: var(--border-focus);
    box-shadow: var(--shadow);
}

.entity-row-info { flex: 1; min-width: 0; }
.entity-row-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entity-row-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.entity-row-time { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; }

/* ── Itinerary Board / Map Edge ── */

.itinerary-board {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.itinerary-board::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(30, 35, 45, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(30, 35, 45, 0.08) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.2;
    pointer-events: none;
}

.itinerary-board::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0) 0 70%, rgba(30, 35, 45, 0.08) 100%);
    pointer-events: none;
}

.itinerary-frame {
    position: relative;
    background: rgba(246, 248, 250, 0.92);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px 12px;
    z-index: 1;
}

.itinerary-frame::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(30, 35, 45, 0.10);
    border-radius: 6px;
    pointer-events: none;
    z-index: 0;
}

.itinerary-frame::after {
    content: '';
    position: absolute;
    inset: 8px;
    background-image:
        repeating-linear-gradient(to right, rgba(30, 35, 45, 0.20) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(to right, rgba(30, 35, 45, 0.20) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(to bottom, rgba(30, 35, 45, 0.20) 0 1px, transparent 1px 22px),
        repeating-linear-gradient(to bottom, rgba(30, 35, 45, 0.20) 0 1px, transparent 1px 22px);
    background-size: 100% 10px, 100% 10px, 10px 100%, 10px 100%;
    background-position: top left, bottom left, top left, top right;
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.itinerary-frame > * {
    position: relative;
    z-index: 1;
}

/* ── Day Sections (Itinerary Blueprint Grid) ── */

.day-section {
    margin: 16px 0;
    padding: 14px 16px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(20, 25, 32, 0.04);
}
.day-section:first-child { margin-top: 8px; }

.day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    margin-bottom: 10px;
}

.day-header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.day-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-date {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0.02em;
}

.day-weekday {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0.02em;
}

.day-annotation {
    font-family: var(--font-ui);
    font-size: 1.0rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
    background: var(--bg-card);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.day-add-btn {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.02em;
    padding: 6px 12px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: color 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out;
}
.day-add-btn:hover {
    color: var(--text);
    border-color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.03);
}
.day-add-btn:active {
    background: rgba(0, 0, 0, 0.04);
}

/* ── Narrative Itinerary Entries ── */

.itin-entries {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    padding-left: 20px;
}

.itin-entries::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border);
    opacity: 0.7;
}

.itin-empty-day {
    padding: 12px 4px 6px 4px;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    text-transform: none;
    letter-spacing: 0.02em;
}

.itin-entry {
    display: grid;
    grid-template-columns: 78px 28px 1fr auto;
    gap: 0;
    align-items: start;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: var(--bg-card);
    cursor: pointer;
    transition: background 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out;
    position: relative;
}

.itin-entry::before {
    content: '';
    position: absolute;
    left: -13px;
    top: 18px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--bg-panel);
}

.itin-entry:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.itin-entry-time {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    padding: 2px 8px 0 0;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.itin-entry-icon {
    font-size: 0.9rem;
    text-align: center;
    padding-top: 2px;
    opacity: 0.85;
}
.itin-entry:hover .itin-entry-icon {
    opacity: 1;
}

.itin-entry-content {
    min-width: 0;
    padding-right: 8px;
}

.itin-entry-label {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text);
    letter-spacing: -0.01em;
}

.itin-entry-sublabel {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
    letter-spacing: 0.01em;
}

.itin-entry-location {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 3px;
    letter-spacing: 0.01em;
}
.itin-entry-location::before {
    content: 'Loc ';
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.6;
}

.itin-entry-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    justify-self: end;
    padding-top: 2px;
}

.itin-entry-cost {
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

/* ── Staying-at context (muted tactical) ── */
.itin-staying {
    opacity: 0.6;
    padding: 6px 10px;
}

.itin-staying::before {
    background: var(--border-focus);
}

.itin-staying .itin-entry-label {
    font-family: var(--font-ui);
    font-weight: 500;
    font-style: normal;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0.01em;
}

.itin-staying:hover {
    opacity: 0.8;
}

/* ── Arrive / Check-in — full brightness ── */
.itin-arrive .itin-entry-label,
.itin-checkin .itin-entry-label {
    color: var(--text);
}
.itin-arrive .itin-entry-icon,
.itin-checkin .itin-entry-icon {
    opacity: 0.9;
}

/* ── Depart / Check-out — dimmed ── */
.itin-depart .itin-entry-label,
.itin-checkout .itin-entry-label {
    color: var(--text-secondary);
}
.itin-depart .itin-entry-icon,
.itin-checkout .itin-entry-icon {
    opacity: 0.5;
}

/* ── Collapsible Section ── */

.section-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.section-toggle:hover { color: var(--text); }

/* ── Budget ── */

.budget-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.budget-tab {
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.budget-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.budget-tab:hover:not(.active) { color: var(--text); }

.settle-table { width: 100%; border-collapse: collapse; }
.settle-table th, .settle-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.settle-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.settle-positive { color: var(--success); font-weight: 600; }
.settle-negative { color: var(--danger); font-weight: 600; }

.settlement-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    font-weight: 500;
}

/* ── Research Board ── */

.board-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.board-column {
    background: var(--bg-hover);
    border-radius: var(--radius);
    padding: 12px;
    min-height: 200px;
}

.board-column-header {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.board-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: box-shadow 0.15s;
}
.board-card:hover { box-shadow: var(--shadow); }

.board-card-title { font-weight: 500; font-size: 0.9rem; }
.board-card-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ── Wallet Color Dot ── */

.wallet-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ── Splits Row ── */

.split-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.split-row .wallet-name {
    flex: 1;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.split-row .form-input {
    width: 120px;
    flex: none;
}

/* ── Empty State ── */

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.empty-state-line {
    width: 48px;
    height: 1px;
    background: var(--border);
    margin: 0 auto 16px auto;
}

.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }

.empty-state-title {
    font-family: var(--font-editorial);
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state-text {
    font-family: var(--font-tactical);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* ── Loading ── */

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--text-secondary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-line {
    width: 100%;
    height: 1px;
    background: var(--border);
    position: relative;
    overflow: hidden;
    margin: 32px 0;
}
.loading-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 40%;
    background: var(--text-secondary);
    animation: loading-expand 1.5s ease-in-out infinite;
}
@keyframes loading-expand {
    0%   { left: -40%; }
    100% { left: 100%; }
}

/* ── Itinerary Page Header ── */

.itin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px 16px 4px;
    border-bottom: 1px dashed var(--border-subtle);
    margin-bottom: 12px;
}

.itin-page-title {
    font-family: var(--font-ui);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

.itin-page-dates {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0.03em;
}

/* ── Utility ── */

.hidden { display: none !important; }

/* ── FAB Menu ── */

.fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
}

.fab-main {
    width: 48px;
    height: 48px;
    border-radius: 0;
    background: var(--bg-panel);
    color: var(--text);
    border: 1px solid var(--border);
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 150ms ease-out, background 150ms ease-out;
}
.fab-main:hover { background: var(--bg-hover); box-shadow: var(--shadow-lg); }
.fab-main.open { transform: rotate(45deg); background: var(--bg-surface); }

.fab-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
}
.fab-container.open .fab-sub {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.fab-container.open .fab-sub:nth-child(2) { transition-delay: 0.03s; }
.fab-container.open .fab-sub:nth-child(1) { transition-delay: 0.06s; }

.fab-sub-btn {
    width: 40px;
    height: 40px;
    border-radius: 0;
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: background 150ms ease-out;
    background: var(--bg-panel);
    color: var(--text);
}
.fab-sub-btn:active { transform: none; }
.fab-sub-btn.manual { background: var(--bg-panel); color: var(--text); }
.fab-sub-btn.ai { background: var(--bg-panel); color: var(--text); }
.fab-sub-btn:hover { background: var(--bg-hover); }

.fab-sub-label {
    background: var(--bg-panel);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 0;
    border: 1px solid var(--border);
    font-family: var(--font-tactical);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: var(--shadow);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── FAB Backdrop ── */

.fab-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.1);
    z-index: 49;
}

/* ── Ingest Modal ── */

.ingest-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.ingest-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.ingest-tab:first-child { border-right: 1.5px solid var(--border); }
.ingest-tab.active {
    background: var(--accent-light);
    color: var(--accent);
}
.ingest-tab:hover:not(.active) { background: var(--bg-hover); }

.ingest-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg-surface);
    resize: vertical;
}
.ingest-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: none;
}

.ingest-textarea::placeholder { color: var(--text-muted); }

/* ── Ingest Results ── */

.ingest-results-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--success);
}

.ingest-result {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.ingest-result-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.ingest-result-info { flex: 1; min-width: 0; }

.ingest-result-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.ingest-result-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ingest-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.ingest-error {
    background: rgba(138, 50, 50, 0.07);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* ── Topbar Icons (Notifications + Settings) ── */

.topbar-icons {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
}

.topbar-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.15rem;
    color: var(--text-secondary);
    transition: background 0.15s;
}
.topbar-icon-btn:hover { background: var(--bg-hover); }

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: white;
    border-radius: 9px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

/* ── Dropdown (shared by notifications + settings) ── */

.topbar-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 340px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.9rem;
}

.dropdown-body {
    max-height: 360px;
    overflow-y: auto;
}

.dropdown-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dropdown-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

/* ── Notification Items ── */

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--border);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-hover); }

.notif-item-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.notif-item-info { flex: 1; min-width: 0; }
.notif-item-title { font-weight: 500; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }

/* ── Settings Dropdown ── */

.settings-dropdown {
    width: 320px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }

.settings-label {
    font-size: 0.88rem;
    font-weight: 500;
}
.settings-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 12px;
    transition: background 0.2s;
}
.toggle-slider:before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-surface);
    left: 3px;
    bottom: 3px;
    transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Settings Select */
.settings-select {
    padding: 6px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: var(--font-ui);
    color: var(--text);
    background: var(--bg-surface);
    max-width: 160px;
}
.settings-select:focus {
    outline: none;
    border-color: var(--border-focus);
}

.settings-info {
    padding: 12px 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-hover);
    border-top: 1px solid var(--border);
}

/* ── Attachment Section ── */

.attachment-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.attachment-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.attachment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.attachment-row:last-child { border-bottom: none; }

.attachment-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.attachment-name {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.attachment-name:hover { color: var(--accent-hover); text-decoration: underline; }

.attachment-size {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.attachment-delete {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}
.attachment-delete:hover { background: rgba(138, 50, 50, 0.07); color: #8a3030; }

.attachment-upload-area {
    margin-top: 8px;
}

.attachment-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.attachment-upload-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-hover);
}

.attachment-uploading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.attachment-empty {
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Attachment Viewer Modal ── */

.viewer-modal {
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.viewer-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.1rem;
    min-width: 0;
}

.viewer-body {
    flex: 1;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.viewer-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-secondary);
    background: var(--bg-card);
    z-index: 2;
}

.viewer-iframe {
    width: 100%;
    flex: 1;
    min-height: 500px;
    border: none;
    background: var(--bg-surface);
}

.viewer-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--bg-panel);
    flex: 1;
    min-height: 300px;
}

.viewer-unsupported {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    flex: 1;
}

.viewer-error {
    background: rgba(138, 50, 50, 0.07);
    color: var(--danger);
    padding: 12px 16px;
    margin: 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* ── Dropdown Backdrop (click-away) ── */

.dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 150;
}

/* ── Calendar View ── */

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cal-nav-label {
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text);
    min-width: 130px;
    text-align: center;
}

/* Progress bar */
.cal-progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    position: relative;
    margin-bottom: 12px;
}

.cal-progress-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: left 0.3s, width 0.3s;
}

/* Grid wrapper */
.cal-grid-wrapper {
    overflow: auto;
    max-height: calc(100vh - 170px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.cal-grid {
    display: flex;
    min-width: 0;
}

/* Time axis (left column) */
.cal-time-axis {
    flex: 0 0 56px;
    position: sticky;
    left: 0;
    z-index: 10;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
}

.cal-time-axis-header {
    height: 48px;
    border-bottom: 1px solid var(--border);
}

.cal-time-axis-allday {
    min-height: 32px;
    border-bottom: 1px solid var(--border);
}

.cal-time-axis-track {
    position: relative;
}

.cal-hour-label {
    position: absolute;
    right: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
    transform: translateY(-50%);
    white-space: nowrap;
    pointer-events: none;
}

/* Day columns */
.cal-day-column {
    flex: 1;
    min-width: 120px;
    border-right: 1px solid var(--border);
}
.cal-day-column:last-child {
    border-right: none;
}

/* Day header */
.cal-day-header {
    height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 5;
}

.cal-day-weekday {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.cal-day-num {
    font-family: var(--font);
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.2;
}

.cal-today {
    background: var(--accent-light) !important;
}

.cal-today-num {
    color: var(--accent);
    font-weight: 700;
}

/* All-day row */
.cal-allday-row {
    min-height: 32px;
    padding: 3px 4px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    cursor: pointer;
    background: var(--bg-card);
}

.cal-allday-row:hover {
    background: var(--bg-hover);
}

.cal-allday-empty {
    min-height: 24px;
}

.cal-allday-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    transition: opacity 0.15s;
}

.cal-allday-chip:hover {
    opacity: 0.8;
}

.cal-chip-icon {
    font-size: 0.72rem;
    flex-shrink: 0;
}

.cal-chip-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Day time track */
.cal-day-track {
    position: relative;
    cursor: pointer;
}

.cal-day-track:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Hour gridlines */
.cal-hour-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px solid var(--border);
    pointer-events: none;
}

.cal-half-hour-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    pointer-events: none;
}

/* Time blocks */
.cal-block {
    position: absolute;
    border-radius: 4px;
    padding: 3px 5px;
    overflow: hidden;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.cal-block:hover {
    opacity: 0.85;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 3;
}

.cal-block-inner {
    overflow: hidden;
}

.cal-block-title {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.cal-block-time {
    font-size: 0.65rem;
    color: var(--text-secondary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Multi-day continuation indicators */
.cal-block-continues-down {
    border-bottom: 2px dashed rgba(0,0,0,0.2);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.cal-block-continues-up {
    border-top: 2px dashed rgba(0,0,0,0.2);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Now line */
.cal-now-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 2px solid var(--danger);
    z-index: 4;
    pointer-events: none;
}

.cal-now-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    position: absolute;
    top: -5px;
    left: -4px;
}

/* ── Admin Panel ── */

.admin-section {
    margin-bottom: 20px;
}

.admin-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.admin-user-row:last-child { border-bottom: none; }

.admin-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.admin-user-name {
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.admin-user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-user-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.admin-user-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.admin-empty {
    padding: 16px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* ── Settings Page ── */

.settings-page-section {
    margin-bottom: 20px;
}

.settings-page-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.settings-page-row:last-child { border-bottom: none; }

.settings-page-label {
    flex: 0 0 120px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.settings-page-value {
    font-size: 0.95rem;
    color: var(--text);
}

.settings-page-message {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.settings-page-error {
    background: rgba(138, 50, 50, 0.07);
    color: var(--danger);
}

.settings-page-success {
    background: rgba(50, 100, 50, 0.07);
    color: #3a6a3a;
}

/* ── Responsive ── */

@media (max-width: 640px) {
    .topbar-brand { display: none; }
    .topbar-nav .nav-tab { padding: 8px 10px; font-size: 0.65rem; }

    .form-row { flex-direction: column; gap: 0; }

    .modal { max-width: 100%; border-radius: 0; align-self: flex-end; max-height: 95vh; }
    .viewer-modal { max-width: 100%; }
    .viewer-iframe { min-height: 400px; }

    .board-columns { grid-template-columns: 1fr; }

    .trip-grid { grid-template-columns: 1fr; }

    h1 { font-size: 1.4rem; }

    /* Itinerary responsive */
    .itin-page-header {
        flex-direction: column;
        gap: 4px;
    }

    .itin-entry {
        grid-template-columns: 48px 28px 1fr;
    }

    .itin-entry-meta {
        grid-column: 3 / -1;
        justify-self: start;
        margin-top: 4px;
    }

    .itin-entry-time { font-size: 0.65rem; }

    .day-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .day-header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .day-annotation { font-size: 0.95rem; }

    /* Calendar responsive */
    .cal-time-axis { flex: 0 0 44px; }
    .cal-day-column { min-width: 100px; }
    .cal-nav-label { font-size: 0.82rem; min-width: 100px; }
    .cal-block-title { font-size: 0.65rem; }
    .cal-block-time { font-size: 0.6rem; }

    /* Admin responsive */
    .admin-user-row { flex-direction: column; align-items: flex-start; }
    .admin-user-actions { width: 100%; }
}
