:root,
[data-theme="dark"] {
    --bg-app: #0e1412;
    --bg-sidebar: #131c18;
    --bg-card: #18231e;
    --bg-elevated: #1f2e28;
    --bg-glass: rgba(16, 24, 21, 0.88);
    --bg-card-accent: rgba(45, 212, 148, 0.14);
    --bg-copilot: #182922;
    --bg-inbox: #182520;
    --border-subtle: rgba(186, 228, 208, 0.17);
    --border-inner: rgba(186, 228, 208, 0.12);
    --brand-primary: #2dd494;
    --brand-primary-hover: #34d399;
    --brand-primary-fg: #061810;
    --brand-accent: #f59e0b;
    --text-primary: #f4f8f6;
    --text-secondary: #b8c8c0;
    --text-muted: #889e93;
    --badge-booked-bg: rgba(45, 212, 148, 0.16);
    --badge-booked-text: #3ee2a4;
    --badge-must-bg: rgba(245, 158, 11, 0.18);
    --badge-must-text: #fcd34d;
    --badge-optional-bg: rgba(255, 255, 255, 0.08);
    --badge-optional-text: #c4d3cc;
    --btn-visited-bg: #2dd494;
    --btn-visited-text: #061810;
    --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

[data-theme="light"] {
    --bg-app: #f4f7f5;
    --bg-sidebar: #ebf0ed;
    --bg-card: #ffffff;
    --bg-elevated: #f8fbf9;
    --bg-glass: rgba(244, 247, 245, 0.86);
    --bg-card-accent: #dff3ea;
    --bg-copilot: #eef6f2;
    --bg-inbox: #f8fbf9;
    --border-subtle: rgba(15, 34, 26, 0.11);
    --border-inner: rgba(15, 34, 26, 0.08);
    --brand-primary: #10b981;
    --brand-primary-hover: #059669;
    --brand-primary-fg: #ffffff;
    --brand-accent: #d97706;
    --text-primary: #0f1f18;
    --text-secondary: #4a5d54;
    --text-muted: #70857b;
    --badge-booked-bg: #0f2f23;
    --badge-booked-text: #34d399;
    --badge-must-bg: #fef3c7;
    --badge-must-text: #b45309;
    --badge-optional-bg: #e4efe9;
    --badge-optional-text: #1f5c45;
    --btn-visited-bg: #10b981;
    --btn-visited-text: #ffffff;
    --shadow-card: 0 6px 20px rgba(15, 31, 24, 0.06);
}

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

html {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.45;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    padding-bottom: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Top Header */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: auto;
    min-height: calc(60px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 24px 0;
    flex-wrap: nowrap;
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 1100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-divider {
    width: 1px;
    height: 22px;
    background: var(--border-subtle);
    flex-shrink: 0;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.brand-logo-img {
    display: none;
    width: auto;
    height: 24px;
    object-fit: contain;
}

.brand-logo-login {
    height: 30px;
}

.brand-logo-mark {
    height: 22px;
}

@media (min-width: 769px) {
    .brand-logo-mark {
        display: none !important;
    }
}

:root .brand-logo-full.brand-logo-dark,
[data-theme="dark"] .brand-logo-full.brand-logo-dark,
:root .brand-logo-login.brand-logo-dark,
[data-theme="dark"] .brand-logo-login.brand-logo-dark {
    display: block;
}

[data-theme="light"] .brand-logo-full.brand-logo-dark,
[data-theme="light"] .brand-logo-login.brand-logo-dark {
    display: none;
}

[data-theme="light"] .brand-logo-full.brand-logo-light,
[data-theme="light"] .brand-logo-login.brand-logo-light {
    display: block;
}

.header-dropdown {
    position: relative;
    min-width: 0;
}

.trip-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 320px;
    min-width: 0;
    padding: 7px 13px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.trip-switcher-btn:hover {
    border-color: var(--brand-primary);
    background: var(--bg-elevated);
}

.trip-switcher-icon {
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trip-switcher-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-chevron {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 800;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.user-avatar-btn:hover {
    border-color: var(--brand-primary);
    background: var(--bg-elevated);
    color: var(--brand-primary);
}

.user-avatar-initials {
    display: none;
}

.header-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    z-index: 1200;
    min-width: 248px;
    max-width: calc(100vw - 24px);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .header-dropdown-menu {
    box-shadow: 0 14px 36px rgba(15, 32, 25, 0.16);
}

.header-dropdown-menu.is-open {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trip-switcher-menu {
    left: 0;
}

.user-dropdown-menu {
    right: 0;
}

.dropdown-section-label {
    padding: 6px 10px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.dropdown-scroll-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 260px;
    overflow-y: auto;
}

.dropdown-user-header {
    padding: 8px 10px;
}

.dropdown-user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dropdown-user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.dropdown-item:hover {
    background: var(--bg-card-accent);
}

.dropdown-item.is-current {
    background: var(--bg-card-accent);
    color: var(--brand-primary);
    font-weight: 700;
}

.dropdown-item-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dropdown-item-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-item-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.dropdown-current-dot {
    font-size: 0.65rem;
    color: var(--brand-primary);
    flex-shrink: 0;
}

.dropdown-item-accent {
    color: var(--brand-primary);
    font-weight: 600;
}

.dropdown-item-danger {
    color: #f87171;
}

[data-theme="light"] .dropdown-item-danger {
    color: #b91c1c;
}

.dropdown-divider {
    height: 1px;
    margin: 4px 6px;
    background: var(--border-subtle);
}

.dropdown-empty {
    padding: 8px 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.83rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: var(--brand-primary-fg);
}

.btn-primary:hover {
    background-color: var(--brand-primary-hover);
}

.btn-secondary {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--brand-primary);
    background-color: var(--bg-card-accent);
}

.btn-sm-pill {
    height: 34px;
    padding: 0 13px;
    border-radius: 9px;
    font-size: 0.78rem;
}

.btn-theme-toggle {
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.has-route-sidebar {
    min-width: 0;
    max-width: 100%;
}

/* Full-Height Left Sidebar & 3-Column Desktop Layout (> 1180px) */
@media (min-width: 1181px) {
    .has-route-sidebar .route-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        height: 100vh;
        z-index: 1120;
    }

    .has-route-sidebar .top-header {
        margin-left: 280px;
        width: calc(100% - 280px);
        max-width: calc(100% - 280px);
    }

    .has-route-sidebar .top-header .brand-logo {
        display: none;
    }

    .has-route-sidebar .workspace-grid {
        margin-left: 280px;
        grid-template-columns: minmax(0, 1fr) 340px;
        min-height: calc(100vh - 60px);
    }
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    min-height: calc(100vh - 60px);
    min-width: 0;
    max-width: 100%;
}

/* Left Sidebar: Route & Stops (Full Height) */
.route-sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 0;
}

.sidebar-top-bar {
    height: 60px;
    min-height: 60px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-brand-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-brand-icon {
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand-text {
    min-width: 0;
}

.sidebar-heading {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    margin: 0;
}

.sidebar-sub {
    font-size: 0.69rem;
    color: var(--text-muted);
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-add-stop-pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.sidebar-add-stop-pill:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.sidebar-overview-wrap {
    padding: 14px 14px 6px;
    flex-shrink: 0;
}

.sidebar-overview-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.sidebar-overview-btn:hover {
    border-color: var(--brand-primary);
    color: var(--text-primary);
}

.sidebar-overview-btn.is-active {
    background: rgba(45, 212, 148, 0.12);
    border-color: rgba(45, 212, 148, 0.35);
    color: var(--brand-primary);
    font-weight: 700;
}

.sidebar-timeline-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px 16px;
    display: flex;
    flex-direction: column;
}

.timeline-list {
    list-style: none;
    position: relative;
    padding-left: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.timeline-list::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 0;
    left: 7px;
    width: 2px;
    background: linear-gradient(180deg, rgba(45, 212, 148, 0.45) 0%, rgba(45, 212, 148, 0.22) 60%, var(--border-subtle) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 10px;
}

.timeline-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0;
    border-radius: 12px;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
    box-shadow: 0 0 0 3px var(--bg-sidebar);
    margin-top: 12px;
    margin-left: 2px;
    z-index: 2;
    flex-shrink: 0;
}

.timeline-item.is-active .timeline-dot {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px var(--bg-sidebar), 0 0 0 6px rgba(245, 158, 11, 0.22);
}

.timeline-card {
    flex: 1;
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 10px 12px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.timeline-link:hover .timeline-card {
    border-color: rgba(45, 212, 148, 0.38);
}

.timeline-item.is-active .timeline-card {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.06);
}

.timeline-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.timeline-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-nights {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--brand-primary);
    flex-shrink: 0;
}

.timeline-item.is-active .timeline-nights {
    color: var(--brand-accent);
}

.timeline-dates {
    font-size: 0.71rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-meta svg {
    color: var(--brand-primary);
    flex-shrink: 0;
}

.timeline-hotel-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-meta-sep {
    color: var(--text-muted);
}

.timeline-spot-count {
    color: var(--text-primary);
    font-weight: 600;
}

.timeline-connector {
    position: relative;
    height: 18px;
    display: flex;
    align-items: center;
    padding-left: 0;
    margin: -6px 0 4px;
    z-index: 3;
}

.timeline-transport-badge,
.timeline-transport-add {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    line-height: 1;
    transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.timeline-transport-badge {
    background-color: var(--bg-card);
    border: 1.5px solid var(--brand-primary);
    color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.timeline-transport-badge:hover {
    transform: scale(1.15);
    background-color: var(--bg-card-accent);
}

.timeline-transport-add {
    background-color: var(--bg-card);
    border: 1px dashed var(--border-subtle);
    color: var(--text-muted);
    font-weight: 700;
    opacity: 0;
}

.timeline-connector:hover .timeline-transport-add,
.timeline-transport-add:focus-visible {
    opacity: 1;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.timeline-transport-add:hover {
    transform: scale(1.12);
    background-color: var(--bg-card-accent);
}

@media (hover: none) {
    .timeline-transport-add {
        opacity: 0.65;
    }
}

.sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-sidebar);
    flex-shrink: 0;
}

.sidebar-footer-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--brand-primary);
    font-size: 0.79rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sidebar-footer-btn:hover {
    border-color: var(--brand-primary);
    background: var(--bg-card-accent);
}

/* Mobile Stop Horizontal Selector & Expandable Timeline Drawer */
.mobile-route-wrapper {
    display: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.mobile-stops-bar-row {
    display: flex;
    align-items: center;
    background: var(--bg-app);
    border-bottom: 1px solid var(--border-subtle);
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.mobile-stops-bar {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    gap: 6px;
    padding: 10px 12px 10px 14px;
    background: transparent;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-stops-bar::-webkit-scrollbar {
    display: none;
}

.mobile-stop-chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 6px;
    white-space: nowrap;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.mobile-stop-chip.is-active {
    background: var(--brand-primary);
    color: var(--brand-primary-fg);
    border-color: var(--brand-primary);
    font-weight: 700;
}

.mobile-transport-pill,
.mobile-transport-add {
    flex-shrink: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mobile-transport-pill {
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
    background: var(--bg-card);
    border: 1.5px solid var(--brand-primary);
    color: var(--text-primary);
}

.mobile-transport-pill:hover {
    transform: scale(1.1);
    background: var(--bg-card-accent);
}

.mobile-transport-add {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--bg-card);
    border: 1px dashed var(--border-subtle);
    color: var(--text-muted);
}

.mobile-transport-add:hover,
.mobile-transport-add:focus-visible {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--bg-card-accent);
}

.mobile-route-toggle-btn {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0 12px 0 6px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mobile-route-toggle-btn:hover {
    border-color: var(--brand-primary);
    background: var(--bg-card-accent);
    color: var(--brand-primary);
}

.mobile-route-toggle-btn.is-open {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--brand-primary-fg);
}

.mobile-route-toggle-btn svg {
    transition: transform 0.24s ease;
}

.mobile-route-toggle-btn.is-open svg {
    transform: rotate(180deg);
}

.mobile-route-drawer {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    transition: grid-template-rows 0.25s ease, opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.mobile-route-drawer.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    border-top: 1px solid var(--border-inner);
    border-bottom: 1px solid rgba(45, 212, 148, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

[data-theme="light"] .mobile-route-drawer.is-open {
    border-bottom: 1px solid rgba(15, 34, 26, 0.18);
    box-shadow: 0 14px 32px rgba(15, 31, 24, 0.14);
}

.mobile-route-drawer-inner {
    position: relative;
    overflow: hidden;
}

.mobile-route-drawer.is-open .mobile-route-drawer-inner::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28px;
    pointer-events: none;
    z-index: 3;
    background: linear-gradient(to top, rgba(16, 24, 21, 0.94) 0%, rgba(16, 24, 21, 0.45) 55%, rgba(16, 24, 21, 0) 100%);
}

[data-theme="light"] .mobile-route-drawer.is-open .mobile-route-drawer-inner::after {
    background: linear-gradient(to top, rgba(244, 247, 245, 0.94) 0%, rgba(244, 247, 245, 0.45) 55%, rgba(244, 247, 245, 0) 100%);
}

.mobile-route-drawer-content {
    background: var(--bg-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 12px 14px 24px;
    max-height: 62vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer-timeline {
    margin-top: 12px;
}

.mobile-route-drawer .timeline-transport-add {
    opacity: 0.85;
}

.mobile-drawer-add-btn {
    margin-top: 12px;
}

/* Main Location Hub */
.location-hub {
    padding: 22px 24px;
    min-width: 0;
    max-width: 100%;
}

.flash-banner {
    background-color: var(--bg-card-accent);
    color: var(--brand-primary);
    padding: 10px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 0.86rem;
    font-weight: 600;
    border: 1px solid rgba(45, 212, 148, 0.25);
}

/* Structured Hero Card (Dashboard & Stop Detail View) */
.trip-hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    min-width: 0;
    max-width: 100%;
}

.hero-mobile-eyebrow {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.hero-mobile-country {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    color: var(--brand-primary);
    font-size: 0.65rem;
}

.hero-main-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.hero-title-block {
    min-width: 0;
    flex: 1;
}

.stop-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(45, 212, 148, 0.11);
    border: 1px solid rgba(45, 212, 148, 0.28);
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stop-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.15;
}

.hero-country-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(45, 212, 148, 0.08);
    border: 1px solid rgba(45, 212, 148, 0.28);
    color: var(--brand-primary);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-meta-flight {
    color: var(--brand-primary);
    font-weight: 600;
}

.hero-meta-dot {
    color: var(--text-muted);
}

.hero-stat-boxes {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-shrink: 0;
}

.hero-stat-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-inner);
    border-radius: 12px;
    padding: 9px 16px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 116px;
}

.hero-stat-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero-stat-value {
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--brand-primary);
    line-height: 1.15;
    margin-top: 2px;
}

.hero-stat-status {
    font-size: 0.81rem;
    font-weight: 700;
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 3px;
}

/* 4-Column Horizontal KPI Strip (Desktop) */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.kpi-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-inner);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.kpi-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(45, 212, 148, 0.1);
    border: 1px solid rgba(45, 212, 148, 0.22);
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kpi-label {
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.kpi-value-text {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile 3-Column Mini-KPI Strip (< 768px) */
.mobile-kpi-grid {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.mobile-kpi-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-inner);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.mobile-kpi-head {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.mobile-kpi-head svg {
    color: var(--brand-primary);
    flex-shrink: 0;
}

.mobile-kpi-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-kpi-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-kpi-sub-accent {
    color: var(--brand-primary);
    font-weight: 600;
}

.mobile-flight-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.mobile-flight-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.mobile-flight-left svg {
    color: #38bdf8;
    flex-shrink: 0;
}

.mobile-flight-right {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.days-here-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Segmented Progress Bar */
.stop-progress-wrapper {
    margin: 14px 0 22px;
}

.stop-progress-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.stop-progress-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.stop-progress-segment {
    height: 6px;
    border-radius: 999px;
    background-color: var(--border-subtle);
}

.stop-progress-segment.is-filled {
    background-color: var(--brand-primary);
}

/* Filter Tabs */
.filter-tabs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 20px;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

.filter-tabs {
    display: flex;
    gap: 22px;
    min-width: 0;
    max-width: 100%;
}

.filter-tab {
    padding: 8px 2px 11px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
}

.filter-tab.is-active {
    color: var(--text-primary);
    border-bottom-color: var(--brand-primary);
}

/* Section Headers */
.hub-section {
    margin-bottom: 28px;
}

.hub-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.hub-section-header .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.hub-section-title-group {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.hub-section-icon {
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hub-section-title {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 14px;
}

/* 2-Column Activity & Stop Cards Grid in Center Workspace */
.cards-grid,
.stops-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.spot-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    transition: border-color 0.15s ease;
}

.spot-card:hover {
    border-color: rgba(45, 212, 148, 0.32);
}

.spot-card.is-booked {
    border-color: rgba(45, 212, 148, 0.28);
}

.spot-card-media {
    height: 132px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-elevated);
}

.spot-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spot-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.spot-card-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stop-card-date-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.77rem;
    color: var(--text-secondary);
}

.stop-card-date-row svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.card-hairline-divider {
    height: 1px;
    background: var(--border-inner);
    margin: 14px 0;
}

.stop-meta-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 16px;
    flex: 1;
}

.stop-meta-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.79rem;
    line-height: 1.35;
}

.stop-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stop-meta-icon-hotel {
    color: var(--brand-primary);
}

.stop-meta-icon-drive {
    color: var(--text-secondary);
}

.stop-meta-icon-spots {
    color: var(--brand-accent);
}

.stop-meta-primary {
    font-weight: 700;
    color: var(--text-primary);
}

.stop-meta-secondary {
    color: var(--text-secondary);
}

.badge-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.priority-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.priority-booked {
    background-color: var(--badge-booked-bg);
    color: var(--badge-booked-text);
    border: 1px solid rgba(45, 212, 148, 0.25);
}

.priority-must {
    background-color: var(--badge-must-bg);
    color: var(--badge-must-text);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.priority-optional {
    background-color: var(--badge-optional-bg);
    color: var(--badge-optional-text);
    border: 1px solid var(--border-subtle);
}

.rating-stars {
    color: var(--brand-accent);
    font-size: 0.78rem;
    font-weight: 700;
}

.spot-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    flex: 1;
}

.spot-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.stop-open-btn {
    height: 36px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.status-text {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
}

.visited-toggle-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
}

.btn-visited {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.77rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.16s ease, box-shadow 0.25s ease;
}

.btn-visited:hover {
    border-color: var(--brand-primary);
}

.btn-visited:active {
    transform: scale(0.97);
}

.btn-visited:disabled {
    opacity: 0.72;
    cursor: wait;
}

.btn-visited.is-done {
    background-color: var(--btn-visited-bg);
    color: var(--btn-visited-text);
    border-color: transparent;
}

.btn-visited-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-visited-check-path {
    stroke-dasharray: 28;
    stroke-dashoffset: 0;
}

.btn-visited.is-done.is-just-checked {
    animation: visitedStampPop 0.48s cubic-bezier(0.22, 1.4, 0.36, 1) forwards;
}

.btn-visited.is-done.is-just-checked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.36) 48%, transparent 100%);
    transform: translateX(-120%);
    animation: visitedShimmer 0.65s ease-out forwards;
    pointer-events: none;
}

.btn-visited.is-done.is-just-checked .btn-visited-check {
    animation: visitedCheckPop 0.42s cubic-bezier(0.22, 1.4, 0.36, 1) forwards;
}

.btn-visited.is-done.is-just-checked .btn-visited-check-path {
    stroke-dashoffset: 28;
    animation: visitedCheckDraw 0.34s ease-out 0.08s forwards;
}

@keyframes visitedStampPop {
    0% {
        transform: scale(0.92);
        box-shadow: 0 0 0 0 rgba(45, 212, 148, 0.5);
    }
    45% {
        transform: scale(1.04);
        box-shadow: 0 0 0 8px rgba(45, 212, 148, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(45, 212, 148, 0);
    }
}

@keyframes visitedShimmer {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(120%);
    }
}

@keyframes visitedCheckPop {
    0% {
        transform: scale(0.4) rotate(-18deg);
        opacity: 0;
    }
    65% {
        transform: scale(1.2) rotate(4deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes visitedCheckDraw {
    0% {
        stroke-dashoffset: 28;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-visited {
        transition: none;
    }

    .btn-visited:active {
        transform: none;
    }

    .btn-visited.is-done.is-just-checked,
    .btn-visited.is-done.is-just-checked::after,
    .btn-visited.is-done.is-just-checked .btn-visited-check,
    .btn-visited.is-done.is-just-checked .btn-visited-check-path {
        animation: none;
    }

    .btn-visited.is-done.is-just-checked .btn-visited-check-path {
        stroke-dashoffset: 0;
    }
}

/* Right Sidebar: Mitreisende, Map, AI Co-Pilot & Ideen-Inbox */
.context-sidebar {
    padding: 22px 22px 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
}

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

.widget-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.widget-title-icon {
    color: var(--brand-primary);
    flex-shrink: 0;
}

.widget-title-icon-amber {
    color: var(--brand-accent);
}

.widget-count-pill {
    font-size: 0.69rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.map-widget {
    padding: 0;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    z-index: 1;
}

.map-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
}

.map-card-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.map-header-icon {
    color: var(--brand-primary);
    flex-shrink: 0;
}

.map-card-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
}

.map-status-pill {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.69rem;
    font-weight: 600;
}

.map-card-hint {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.map-canvas {
    background: linear-gradient(145deg, #13221d 0%, #0e1814 100%);
    height: 240px;
    position: relative;
    isolation: isolate;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .map-canvas {
    background: linear-gradient(145deg, #d7ede5 0%, #c6e4da 100%);
}

.dashboard-map-widget {
    margin: 0 0 24px;
}

.dashboard-map-canvas {
    height: 360px;
}

.leaflet-map-container {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Dark Leaflet Tile & Control Styling */
[data-theme="dark"] .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) brightness(92%) contrast(88%) saturate(80%);
}

[data-theme="dark"] .leaflet-control-zoom a {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

[data-theme="dark"] .leaflet-control-zoom a:hover {
    background-color: var(--bg-elevated);
    color: var(--brand-primary);
}

[data-theme="dark"] .leaflet-control-attribution {
    background: rgba(14, 20, 18, 0.82);
    color: var(--text-muted);
}

[data-theme="dark"] .leaflet-control-attribution a {
    color: var(--text-secondary);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.aplivo-map-popup {
    font-family: inherit;
    min-width: 155px;
}

.aplivo-map-popup-title {
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--text-primary);
}

.aplivo-map-popup-meta {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.aplivo-map-popup-action {
    margin-top: 6px;
}

.aplivo-map-popup-action a {
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 0.76rem;
    text-decoration: underline;
}

.aplivo-map-pin-wrapper {
    background: transparent;
    border: none;
}

.aplivo-map-pin {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #2dd494;
    color: #071a12;
    border: 2px solid #f3f6f4;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
}

.aplivo-map-pin.is-selected {
    width: 32px;
    height: 32px;
    background: #f59e0b;
    color: #071a12;
    border: 2.5px solid #f3f6f4;
    font-size: 0.8rem;
}

.map-route-summary-pill {
    position: absolute;
    bottom: 14px;
    left: 14px;
    z-index: 500;
    pointer-events: none;
    background: rgba(14, 21, 18, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .map-route-summary-pill {
    background: var(--bg-glass);
}

.map-summary-dot {
    color: var(--brand-primary);
    font-size: 0.65rem;
}

.map-summary-text {
    display: flex;
    flex-direction: column;
}

.map-summary-label {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.map-summary-val {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Co-Pilot Widget */
.copilot-widget {
    background: linear-gradient(160deg, var(--bg-copilot) 0%, var(--bg-card) 100%);
    border-color: rgba(45, 212, 148, 0.22);
}

.copilot-icon-box {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(45, 212, 148, 0.14);
    border: 1px solid rgba(45, 212, 148, 0.28);
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.copilot-text {
    font-size: 0.79rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.copilot-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.copilot-action-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid rgba(45, 212, 148, 0.18);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.copilot-action-row:hover {
    border-color: var(--brand-primary);
    background: var(--bg-card-accent);
}

.copilot-action-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copilot-action-left svg {
    color: var(--brand-primary);
    flex-shrink: 0;
}

.copilot-action-arrow {
    color: var(--brand-primary);
    font-weight: 700;
}

.ai-suggestion-box {
    display: none;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.ai-suggestion-box.is-visible {
    display: block;
}

/* Brain-Dump & Inbox Widget */
.inbox-widget {
    background-color: var(--bg-card);
}

.inbox-list {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inbox-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
    padding: 9px 11px;
    background: var(--bg-elevated);
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.inbox-item > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.inbox-item form {
    flex-shrink: 0;
}

.inbox-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.inbox-empty-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.inbox-empty-box svg {
    color: var(--brand-primary);
    flex-shrink: 0;
}

.inbox-promote-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    background: var(--bg-card-accent);
    color: var(--brand-primary);
    border: 1px solid rgba(45, 212, 148, 0.25);
    cursor: pointer;
    white-space: nowrap;
}

/* Integrated Input + Button Row (Share & Inbox Forms) */
.integrated-form-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 4px 4px 4px 10px;
}

.integrated-form-row input[type="text"],
.integrated-form-row input[type="email"] {
    width: 100%;
    min-width: 0;
    flex: 1;
    padding: 5px 4px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.78rem;
    outline: none;
}

.btn-integrated-submit {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-integrated-plus {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-integrated-plus:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Participant Avatars & Trip Sharing Widget */
.participant-avatars {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.avatar-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px 3px 4px;
    border-radius: 999px;
    background: var(--bg-card-accent);
    border: 1px solid var(--border-subtle);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-primary);
}

.avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: var(--brand-primary-fg);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.share-avatar-square {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(45, 212, 148, 0.14);
    border: 1px solid rgba(45, 212, 148, 0.28);
    color: var(--brand-primary);
    font-size: 0.78rem;
}

.share-avatar-secondary {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.28);
    color: var(--brand-accent);
}

.role-admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.share-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

.share-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.share-user-info > div {
    min-width: 0;
}

.share-user-name {
    font-size: 0.81rem;
    font-weight: 700;
    color: var(--text-primary);
}

.share-user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}

.flash-banner-error {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}

[data-theme="light"] .flash-banner-error {
    background: #fde8e8;
    color: #9b1c1c;
    border-color: #f8b4b4;
}

/* Modal for Adding New Activity */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 8, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop.is-open {
    display: flex;
}

.modal-dialog {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    max-width: 480px;
    width: 100%;
    padding: 22px;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
}

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

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

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.88rem;
}

.form-group textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.88rem;
}

.form-group input:disabled {
    opacity: 0.78;
    cursor: not-allowed;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.form-hint {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.date-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.amenities-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.amenity-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.amenities-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    margin-top: 6px;
}

.amenities-group + .amenities-group {
    margin-top: 14px;
}

.amenities-group-title {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.amenities-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    min-width: 0;
    max-width: 100%;
}

.amenity-chip {
    display: inline-flex;
    cursor: pointer;
    margin-bottom: 0;
}

.amenity-chip-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.amenity-chip-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.amenity-chip-input:checked + .amenity-chip-label {
    background: var(--bg-card-accent);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    font-weight: 700;
}

.amenity-chip-input:focus-visible + .amenity-chip-label {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.transport-route-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--bg-card-accent);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.88rem;
    margin-bottom: 18px;
}

/* Auth / Login Screen */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    max-width: 430px;
    width: 100%;
    padding: 32px 28px;
}

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

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.auth-error {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 16px;
}

[data-theme="light"] .auth-error {
    background: #fde8e8;
    color: #9b1c1c;
    border-color: #f8b4b4;
}

.auth-success {
    background: rgba(45, 212, 148, 0.14);
    color: #6ee7b7;
    border: 1px solid rgba(45, 212, 148, 0.35);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.45;
}

[data-theme="light"] .auth-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.auth-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

[data-theme="light"] .auth-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.auth-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: -4px;
    margin-bottom: 14px;
}

.auth-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-primary);
    transition: color 0.15s ease;
}

.auth-link:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

.auth-submit-btn {
    width: 100%;
    margin-top: 6px;
    padding: 11px 16px;
}

.auth-footer-links {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border-inner);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.auth-footer-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.auth-secondary-btn {
    width: 100%;
    padding: 10px 16px;
}

.auth-card .form-group ul {
    list-style: none;
    margin-top: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fca5a5;
}

[data-theme="light"] .auth-card .form-group ul {
    color: #b91c1c;
}

.auth-demo-hint {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-card-accent);
    color: var(--text-primary);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Standalone Pages (Trips Overview, Profile, Forms) */
.trips-overview-container {
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 36px;
}

.page-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 24px;
}

.overview-hero-card .hero-main-row {
    align-items: center;
}

.overview-hero-subtitle {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.overview-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.overview-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.overview-status-pill.is-active {
    background: var(--bg-card-accent);
    border-color: rgba(45, 212, 148, 0.35);
    color: var(--brand-primary);
    font-weight: 800;
    letter-spacing: 0.04em;
}

[data-theme="light"] .overview-status-pill.is-active {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.35);
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

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

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 12px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 12px;
}

.form-grid-2 > .form-group,
.form-grid-3 > .form-group {
    margin-bottom: 0;
}

.form-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

.trips-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.trips-grid.trips-grid-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trips-grid.trips-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.trip-overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    transition: border-color 0.15s ease;
}

.trip-overview-card:hover {
    border-color: rgba(45, 212, 148, 0.32);
}

.trip-card-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.trip-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.trip-card-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.trip-card-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
}

.trip-card-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.79rem;
    color: var(--text-secondary);
}

.trip-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trip-card-meta-item svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.trip-card-meta-flight {
    color: var(--brand-primary);
    font-weight: 600;
}

.trip-card-meta-flight svg {
    color: currentColor;
}

[data-theme="light"] .trip-card-meta-flight {
    color: #059669;
}

.route-preview-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.route-stop-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-inner);
    color: var(--text-primary);
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    max-width: 100%;
}

.route-stop-num {
    color: var(--brand-primary);
    font-weight: 800;
}

[data-theme="light"] .route-stop-num {
    color: #059669;
}

.route-stop-nights {
    color: var(--text-muted);
    font-weight: 600;
}

.route-stop-more {
    background: var(--bg-card-accent);
    border-color: rgba(45, 212, 148, 0.28);
    color: var(--brand-primary);
    font-weight: 700;
}

[data-theme="light"] .route-stop-more {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.3);
}

.route-stop-empty {
    color: var(--text-muted);
    border-style: dashed;
}

.trip-card-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.trip-card-mini-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.trip-card-mini-kpi {
    background: var(--bg-elevated);
    border: 1px solid var(--border-inner);
    border-radius: 10px;
    padding: 9px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.trip-card-mini-label {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.trip-card-mini-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.trip-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.trip-card-actions .stop-open-btn {
    flex: 1;
}

.trip-card-delete-form {
    display: inline-flex;
    margin: 0;
}

/* Full-Width Landscape Trip Card when Section Has Exactly 1 Trip (> 900px) */
.trips-grid.trips-grid-single .trip-overview-card {
    flex-direction: row;
    align-items: stretch;
    padding: 22px 24px;
    gap: 24px;
}

.trips-grid.trips-grid-single .trip-card-main {
    flex: 1.5;
    min-width: 0;
}

.trips-grid.trips-grid-single .trip-card-side {
    width: 340px;
    flex-shrink: 0;
    margin-top: 0;
    border-top: none;
    border-left: 1px solid var(--border-subtle);
    padding-top: 0;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}

.trips-section {
    margin-bottom: 32px;
}

.trips-section-heading {
    font-size: 1.02rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.empty-section-box {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 14px 18px;
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.empty-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-inner);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trip-overview-card.is-active-trip {
    border: 1.5px solid var(--brand-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 1px rgba(45, 212, 148, 0.16), var(--shadow-card);
}

.priority-active {
    background: var(--brand-primary);
    color: var(--brand-primary-fg);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background: var(--bg-card-accent);
    border-color: var(--brand-primary);
    color: var(--text-primary);
}

.btn-icon-sm {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.btn-icon-xs {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.btn-icon-danger:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.45);
    color: #f87171;
}

/* Floating Co-Pilot Pill */
.floating-ask-ai {
    position: fixed;
    bottom: 24px;
    left: 16px;
    right: auto;
    background: var(--bg-card);
    color: var(--brand-primary);
    border: 1px solid rgba(45, 212, 148, 0.35);
    padding: 9px 15px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    display: none;
    align-items: center;
    gap: 6px;
    z-index: 1150;
    cursor: pointer;
}

/* Wide-to-Standard Desktop Trips Grid (<= 1200px) */
@media (max-width: 1200px) {
    .trips-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trips-grid.trips-grid-single {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Tablet Breakpoint (769px - 1180px) */
@media (max-width: 1180px) {
    .top-header {
        padding: env(safe-area-inset-top) 18px 0;
        gap: 10px;
    }

    .trip-switcher-btn {
        max-width: 240px;
    }

    .trips-overview-container {
        padding: 22px 20px;
    }

    .workspace-grid {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
        max-width: 100%;
    }

    .kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cards-grid,
    .trips-grid:not(.trips-grid-single),
    .stops-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .route-sidebar {
        display: none;
    }

    .mobile-route-wrapper {
        display: block;
    }

    .location-hub {
        padding: 20px;
    }

    .context-sidebar {
        padding: 0 20px 24px;
    }

    .floating-ask-ai {
        display: inline-flex;
        bottom: 24px;
    }
}

/* Collapse Landscape Single Trip Card & Hero Actions (<= 900px) */
@media (max-width: 900px) {
    .overview-hero-card .hero-main-row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .overview-hero-actions {
        justify-content: flex-start;
    }

    .trips-grid.trips-grid-single .trip-overview-card {
        flex-direction: column;
        padding: 20px;
        gap: 14px;
    }

    .trips-grid.trips-grid-single .trip-card-main {
        flex: initial;
        width: 100%;
    }

    .trips-grid.trips-grid-single .trip-card-side {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-subtle);
        padding-left: 0;
        padding-top: 14px;
    }
}

/* Mobile Breakpoint (< 768px) */
@media (max-width: 767px) {
    .header-divider {
        display: none;
    }

    .location-hub {
        padding: 14px;
    }

    .context-sidebar {
        padding: 0 14px 22px;
        gap: 14px;
    }

    .trip-hero-card {
        padding: 16px;
        border-radius: 16px;
    }

    .hero-mobile-eyebrow {
        display: flex;
    }

    .hero-icon-circle,
    .hero-country-pill,
    .hero-desktop-edit,
    .hero-meta-row,
    .hero-stat-boxes,
    .kpi-strip-desktop {
        display: none;
    }

    .stop-title {
        font-size: 1.35rem;
    }

    .mobile-kpi-grid {
        display: grid;
    }

    .mobile-flight-bar {
        display: flex;
    }

    .cards-grid,
    .trips-grid,
    .stops-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .filter-tabs-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding-bottom: 12px;
        min-width: 0;
        max-width: 100%;
    }

    .filter-tabs {
        gap: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        min-width: 0;
        max-width: 100%;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .dashboard-map-canvas {
        height: 240px;
    }

    .page-title {
        font-size: 1.35rem;
        overflow-wrap: anywhere;
    }

    .form-card {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .form-actions-bar {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .form-actions-bar .btn {
        width: 100%;
    }

    .modal-dialog {
        padding: 18px 16px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .auth-shell {
        padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
    }

    .auth-card {
        padding: 24px 18px;
    }
}

/* Smartphone Bottom-Bar Mode, Drop-Ups & Grid Collapse (<= 768px) */
@media (max-width: 768px) {
    body {
        padding-bottom: calc(88px + env(safe-area-inset-bottom));
    }

    .mobile-route-wrapper {
        position: sticky;
        top: 0;
        z-index: 1050;
        padding-top: env(safe-area-inset-top);
        background: var(--bg-app);
    }

    .trips-overview-container {
        padding: calc(16px + env(safe-area-inset-top)) 14px 16px;
    }

    .page-container {
        padding: calc(16px + env(safe-area-inset-top)) 14px 20px;
    }

    .top-header {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: calc(66px + env(safe-area-inset-bottom));
        padding: 10px max(22px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
        gap: 16px;
        border-bottom: none;
        border-top: 1px solid var(--border-subtle);
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.28);
        z-index: 1170;
    }

    [data-theme="light"] .top-header {
        box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
    }

    .header-left {
        flex: 1;
        min-width: 0;
        max-width: 100%;
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .top-header .brand-logo {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        flex-shrink: 0;
    }

    .header-right {
        gap: 8px;
    }

    .header-dropdown.trip-switcher {
        flex: 1;
        min-width: 0;
        max-width: 100%;
    }

    .brand-logo-full {
        display: none !important;
    }

    :root .brand-logo-mark.brand-logo-dark,
    [data-theme="dark"] .brand-logo-mark.brand-logo-dark {
        display: block;
    }

    [data-theme="light"] .brand-logo-mark.brand-logo-dark {
        display: none;
    }

    [data-theme="light"] .brand-logo-mark.brand-logo-light {
        display: block;
    }

    .trip-switcher-btn {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: 42px;
        overflow: hidden;
        justify-content: space-between;
        padding: 0 14px;
        border-radius: 12px;
        font-size: 0.82rem;
    }

    .trip-switcher-btn .dropdown-chevron {
        transform: rotate(180deg);
        transition: transform 0.18s ease;
    }

    .header-dropdown.is-open .trip-switcher-btn .dropdown-chevron,
    .trip-switcher-btn[aria-expanded="true"] .dropdown-chevron {
        transform: rotate(0deg);
    }

    .user-avatar-btn {
        width: 42px;
        height: 42px;
        font-size: 0.82rem;
        border-radius: 999px;
        background: rgba(45, 212, 148, 0.14);
        border-color: var(--brand-primary);
        color: var(--brand-primary);
    }

    .user-avatar-svg {
        display: none;
    }

    .user-avatar-initials {
        display: inline;
    }

    .header-dropdown-menu {
        top: auto;
        bottom: calc(78px + env(safe-area-inset-bottom));
        max-height: min(65vh, 420px);
        overflow-y: auto;
        z-index: 1220;
    }

    .trip-switcher-menu {
        position: fixed;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }

    .user-dropdown-menu {
        position: fixed;
        right: 12px;
        left: auto;
        width: min(260px, calc(100vw - 24px));
    }

    .floating-ask-ai {
        bottom: calc(88px + env(safe-area-inset-bottom));
        z-index: 1150;
    }

    .overview-hero-card .hero-icon-circle {
        display: inline-flex;
    }

    .overview-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .overview-kpi-strip {
        gap: 10px;
    }

    .overview-kpi-strip .kpi-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .overview-kpi-strip .kpi-icon-box {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .trips-grid,
    .trips-grid.trips-grid-pair,
    .trips-grid.trips-grid-single {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
}


/* ==========================================================================
   Admin User Management (Obsidian Dark & Light Mode)
   ========================================================================== */

.admin-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.admin-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-users-table thead th {
    padding: 13px 18px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.admin-users-table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-inner);
    vertical-align: middle;
    font-size: 0.88rem;
}

.admin-users-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-users-table tbody tr:hover {
    background: var(--bg-elevated);
}

.admin-users-table .col-actions {
    text-align: right;
    width: 112px;
}

.admin-user-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.admin-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-card-accent);
    border: 1px solid rgba(45, 212, 148, 0.3);
    color: var(--brand-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

[data-theme="light"] .admin-user-avatar {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.35);
}

.admin-user-name {
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-email {
    color: var(--text-secondary);
    font-size: 0.85rem;
    word-break: break-word;
}

.admin-user-last-login {
    color: var(--text-muted);
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.admin-user-last-login.is-never {
    opacity: 0.75;
    font-style: italic;
}

.admin-user-mobile-login {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
    font-size: 0.78rem;
}

.admin-user-last-login-label {
    color: var(--text-muted);
}

.user-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid var(--border-subtle);
}

.user-status-pill.is-active {
    background: var(--bg-card-accent);
    border-color: rgba(45, 212, 148, 0.35);
    color: var(--brand-primary);
}

[data-theme="light"] .user-status-pill.is-active {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.35);
}

.user-status-pill.is-inactive {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

[data-theme="light"] .user-status-pill.is-inactive {
    background: #fde8e8;
    border-color: #f8b4b4;
    color: #9b1c1c;
}

.admin-role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--badge-optional-bg);
    color: var(--badge-optional-text);
    border: 1px solid var(--border-inner);
    white-space: nowrap;
}

.role-badge-admin {
    background: var(--badge-must-bg);
    color: var(--badge-must-text);
    border-color: rgba(245, 158, 11, 0.3);
}

.role-badge-ai {
    background: var(--bg-card-accent);
    color: var(--brand-primary);
    border-color: rgba(45, 212, 148, 0.3);
}

[data-theme="light"] .role-badge-ai {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.35);
}

.role-badge-traveler {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}

.admin-user-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.admin-delete-form {
    display: inline-flex;
    margin: 0;
}

.admin-users-mobile-list {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.admin-user-mobile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-card);
}

.admin-user-mobile-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.admin-user-mobile-meta {
    min-width: 0;
}

.admin-user-mobile-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* Admin User Form Controls */
.admin-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.role-chips-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.role-chip-item {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    margin-bottom: 0 !important;
    transition: all 0.15s ease;
    user-select: none;
}

.role-chip-item:hover {
    border-color: var(--brand-primary);
    color: var(--text-primary);
}

.role-chip-checkbox {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.role-chip-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-card);
    color: transparent;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.role-chip-checkbox:checked + .role-chip-indicator {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--brand-primary-fg);
}

.role-chip-item:has(.role-chip-checkbox:checked) {
    background: var(--bg-card-accent);
    border-color: var(--brand-primary);
    color: var(--text-primary);
}

.role-chip-label {
    font-size: 0.85rem;
    font-weight: 700;
}

.status-toggle-card {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    cursor: pointer;
    margin-bottom: 0 !important;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.status-toggle-card:hover {
    border-color: var(--brand-primary);
}

.status-toggle-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.status-toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.status-toggle-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.status-toggle-input:checked + .status-toggle-switch {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.status-toggle-input:checked + .status-toggle-switch::after {
    transform: translateX(18px);
    background: var(--brand-primary-fg);
}

.status-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-toggle-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.status-toggle-desc {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .admin-table-card {
        display: none;
    }

    .admin-users-mobile-list {
        display: flex;
    }

    .role-chips-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-grid-2 {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
}


/* =========================================================
   1:n Hotels Section, 3-Col KPI Strip & Hotel Map Pin
   ========================================================= */

.btn-sm {
    height: 34px;
    padding: 0 13px;
    border-radius: 9px;
    font-size: 0.78rem;
}

.kpi-strip.kpi-strip-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hotels-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hotels-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hotels-section-title {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hotels-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.hotel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.hotel-card-media {
    height: 118px;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-elevated);
}

.hotel-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hotel-card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.hotel-card:hover {
    border-color: rgba(45, 212, 148, 0.35);
}

[data-theme="light"] .hotel-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

.hotel-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.hotel-card-heading {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.hotel-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-word;
}

.hotel-card-dates {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.hotel-nights-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--badge-booked-bg);
    color: var(--badge-booked-text);
    border: 1px solid rgba(45, 212, 148, 0.24);
}

.hotel-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.hotel-card-address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.hotel-card-address svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--brand-primary);
}

.hotel-card-notes {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
    padding-top: 8px;
    border-top: 1px solid var(--border-inner);
    white-space: pre-line;
}

.hotel-empty-card {
    background: var(--bg-card);
    border: 1px dashed var(--border-subtle);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.hotel-empty-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hotel-empty-text strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hotel-empty-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.aplivo-map-hotel-pin {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 2px solid var(--brand-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    line-height: 1;
}

[data-theme="light"] .aplivo-map-hotel-pin {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 31, 24, 0.18);
}

@media (max-width: 768px) {
    .kpi-strip.kpi-strip-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .hotels-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hotel-empty-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   Budget & Cost Breakdown System
   ========================================================= */

.sidebar-budget-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s ease;
    text-decoration: none;
}

.sidebar-budget-link:hover {
    border-color: var(--brand-primary);
    color: var(--text-primary);
}

.sidebar-budget-link.is-active {
    background: rgba(45, 212, 148, 0.12);
    border-color: rgba(45, 212, 148, 0.35);
    color: var(--brand-primary);
    font-weight: 700;
}

[data-theme="light"] .sidebar-budget-link.is-active {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

.timeline-connector {
    gap: 6px;
}

.budget-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
}

.budget-hero-card {
    padding: 22px 24px;
}

.budget-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.budget-kpis-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.budget-kpi-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-inner);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.budget-kpi-box.is-over-budget {
    border-color: rgba(239, 68, 68, 0.38);
    background: rgba(239, 68, 68, 0.08);
}

.budget-kpi-label {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.budget-kpi-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.budget-kpi-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.budget-kpi-value.is-remaining {
    color: #2dd494;
}

[data-theme="light"] .budget-kpi-value.is-remaining {
    color: #059669;
}

.budget-kpi-value.is-over-budget,
.budget-progress-meta .is-over-budget,
.dashboard-budget-remaining.is-over-budget {
    color: #f87171;
}

[data-theme="light"] .budget-kpi-value.is-over-budget,
[data-theme="light"] .budget-progress-meta .is-over-budget,
[data-theme="light"] .dashboard-budget-remaining.is-over-budget {
    color: #dc2626;
}

.budget-edit-inline {
    font-size: 0.85rem;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.budget-edit-inline:hover {
    opacity: 1;
    transform: scale(1.1);
}

.budget-progress-wrap {
    margin-top: 16px;
}

.budget-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.budget-progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-inner);
    overflow: hidden;
}

.budget-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2dd494 0%, #34d399 100%);
    transition: width 0.3s ease;
}

.budget-progress-fill.is-over-budget {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

[data-theme="light"] .budget-progress-fill {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

[data-theme="light"] .budget-progress-fill.is-over-budget {
    background: linear-gradient(90deg, #d97706 0%, #dc2626 100%);
}

.budget-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.budget-category-tile {
    background: var(--bg-elevated);
    border: 1px solid var(--border-inner);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.budget-category-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.budget-category-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.budget-stop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.budget-stop-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.budget-stop-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.budget-stop-title {
    margin-top: 8px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

.budget-breakdown-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.budget-breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-inner);
}

.budget-breakdown-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.budget-breakdown-value {
    color: var(--text-primary);
    font-weight: 700;
}

.budget-stop-card-footer {
    margin-top: 16px;
}

.dashboard-budget-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px 20px;
    margin-top: 18px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-card);
}

.dashboard-budget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.dashboard-budget-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-budget-figures {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.94rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.dashboard-budget-figures strong {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 800;
}

.dashboard-budget-sep {
    color: var(--text-muted);
}

.dashboard-budget-remaining {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.cost-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(45, 212, 148, 0.12);
    border: 1px solid rgba(45, 212, 148, 0.3);
    color: var(--brand-primary);
    white-space: nowrap;
}

.cost-pill-xs {
    padding: 1px 6px;
    font-size: 0.64rem;
}

.cost-pill-lg {
    padding: 5px 12px;
    font-size: 0.85rem;
    font-weight: 800;
}

[data-theme="light"] .cost-pill {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #059669;
}

@media (max-width: 1180px) {
    .budget-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .budget-hero-card {
        padding: 16px;
    }

    .budget-kpis-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .budget-stop-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-budget-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   Mobile iOS/Android PWA Hardening & Small Viewport (<= 768px / <= 375px)
   ========================================================= */

@media (max-width: 768px) {
    .form-group {
        min-width: 0;
        max-width: 100%;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select,
    textarea,
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="date"],
    .form-group input[type="time"],
    .form-group input[type="number"],
    .form-group select,
    .form-group textarea,
    .integrated-form-row input[type="text"],
    .integrated-form-row input[type="email"] {
        font-size: 16px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    input[type="date"],
    input[type="time"] {
        display: block;
        min-inline-size: 0;
        min-height: 42px;
        line-height: 1.35;
        -webkit-appearance: none;
        appearance: none;
    }

    .form-card,
    .trip-hero-card,
    .hotel-card,
    .spot-card,
    .widget-card,
    .trip-overview-card,
    .integrated-form-row,
    .invite-form-row,
    .inbox-form-row,
    .amenities-chip-grid,
    .auth-card {
        min-width: 0;
        max-width: 100%;
        overflow-x: clip;
    }

    .amenity-chip-label {
        max-width: 100%;
        white-space: normal;
        word-break: break-word;
    }
}

@media (max-width: 375px) {
    .page-container,
    .trips-overview-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .location-hub,
    .context-sidebar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .form-card,
    .trip-hero-card,
    .widget-card,
    .trip-overview-card,
    .auth-card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hotel-card-body,
    .spot-card-body {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* =========================================================
   Stop Schedule Gap & Overlap Warnings (Sidebar + Mobile)
   ========================================================= */

.timeline-warning-item {
    position: relative;
    padding-left: 22px;
    margin: 2px 0 8px;
    min-width: 0;
    max-width: 100%;
    z-index: 3;
}

.timeline-warning-card {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 7px 9px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.72rem;
    line-height: 1.35;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.timeline-warning-gap {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.34);
    color: #fbbf24;
}

[data-theme="light"] .timeline-warning-gap {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(217, 119, 6, 0.38);
    color: #92400e;
}

.timeline-warning-overlap {
    background: rgba(239, 68, 68, 0.13);
    border-color: rgba(239, 68, 68, 0.36);
    color: #fca5a5;
}

[data-theme="light"] .timeline-warning-overlap {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(220, 38, 38, 0.36);
    color: #991b1b;
}

.timeline-warning-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.timeline-warning-text {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.timeline-warning-dates {
    font-weight: 500;
    opacity: 0.85;
    white-space: nowrap;
}

.timeline-warning-dismiss-form {
    flex-shrink: 0;
    margin: 0;
    display: inline-flex;
}

.timeline-warning-dismiss {
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: currentColor;
    opacity: 0.72;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.timeline-warning-dismiss:hover,
.timeline-warning-dismiss:focus-visible {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .timeline-warning-dismiss:hover,
[data-theme="light"] .timeline-warning-dismiss:focus-visible {
    background: rgba(15, 23, 42, 0.08);
}

.mobile-warning-trigger {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.mobile-warning-trigger.is-gap {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

[data-theme="light"] .mobile-warning-trigger.is-gap {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(217, 119, 6, 0.45);
    color: #b45309;
}

.mobile-warning-trigger.is-overlap {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.45);
    color: #f87171;
}

[data-theme="light"] .mobile-warning-trigger.is-overlap {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(220, 38, 38, 0.45);
    color: #b91c1c;
}

.mobile-warning-trigger:hover {
    transform: scale(1.08);
}

.mobile-route-warning-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f59e0b;
    color: #111827;
    border: 1.5px solid var(--bg-card);
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 13px;
    text-align: center;
    pointer-events: none;
}

/* =========================================================
   Stop Form: Neighbor Context Strip & Live Date-Fit Check
   ========================================================= */

.stop-schedule-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

[data-theme="light"] .stop-schedule-box {
    background: rgba(15, 23, 42, 0.02);
}

.stop-schedule-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.stop-schedule-box-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.stop-schedule-box-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stop-schedule-box-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stop-schedule-box-header .stop-neighbor-live-status {
    margin: 0;
    padding: 6px 11px;
    font-size: 0.74rem;
}

.stop-schedule-box .form-group,
.stop-schedule-box .form-grid-2,
.stop-schedule-box .form-grid-3 {
    margin-bottom: 0;
}

.stop-neighbors-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 0;
    min-width: 0;
    max-width: 100%;
}

.stop-neighbor-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.stop-neighbor-card.is-boundary {
    border-style: dashed;
    opacity: 0.82;
}

.stop-neighbor-dir {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

.stop-neighbor-card.is-boundary .stop-neighbor-dir {
    color: var(--text-muted);
}

.stop-neighbor-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stop-neighbor-dates {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.stop-neighbor-live-status {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.stop-neighbor-live-status.is-seamless {
    display: inline-flex;
    background: rgba(45, 212, 148, 0.12);
    border-color: rgba(45, 212, 148, 0.34);
    color: var(--brand-primary);
}

[data-theme="light"] .stop-neighbor-live-status.is-seamless {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(5, 150, 105, 0.32);
    color: #065f46;
}

.stop-neighbor-live-status.is-gap {
    display: inline-flex;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.36);
    color: #fbbf24;
}

[data-theme="light"] .stop-neighbor-live-status.is-gap {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(217, 119, 6, 0.38);
    color: #92400e;
}

.stop-neighbor-live-status.is-overlap {
    display: inline-flex;
    background: rgba(239, 68, 68, 0.13);
    border-color: rgba(239, 68, 68, 0.38);
    color: #fca5a5;
}

[data-theme="light"] .stop-neighbor-live-status.is-overlap {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(220, 38, 38, 0.36);
    color: #991b1b;
}

@media (max-width: 640px) {
    .stop-schedule-box {
        padding: 14px 12px;
    }

    .stop-schedule-box-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 420px) {
    .stop-neighbors-strip {
        grid-template-columns: minmax(0, 1fr);
    }

    .stop-neighbor-live-status.is-seamless,
    .stop-neighbor-live-status.is-gap,
    .stop-neighbor-live-status.is-overlap {
        display: flex;
        width: 100%;
    }
}

/* =========================================================
   Context-Aware Floating Action Button (FAB) & Speed-Dial
   ========================================================= */

.fab-container {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 1180;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.fab-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: -1;
}

.fab-container.is-open .fab-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: none;
    background: var(--brand-primary);
    color: #052e1e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(45, 212, 148, 0.35);
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.fab-btn:hover {
    transform: translateY(-2px);
    background: #3ee2a4;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(45, 212, 148, 0.5);
}

.fab-btn:active {
    transform: scale(0.96);
}

.fab-btn svg {
    transition: transform 0.2s ease;
}

.fab-container.is-open .fab-btn svg {
    transform: rotate(45deg);
}

.fab-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.fab-container.is-open .fab-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.fab-menu-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.fab-menu-item:hover {
    border-color: var(--brand-primary);
    background: var(--bg-elevated);
    transform: translateX(-2px);
}

.fab-menu-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(45, 212, 148, 0.16);
    color: var(--brand-primary);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
}

.fab-menu-item-feedback:hover {
    border-color: rgba(56, 189, 248, 0.55);
}

.fab-menu-item-feedback .fab-menu-plus {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
}

[data-theme="light"] .fab-menu-item-feedback:hover {
    border-color: rgba(2, 132, 199, 0.45);
}

[data-theme="light"] .fab-menu-item-feedback .fab-menu-plus {
    background: #e0f2fe;
    color: #0369a1;
}

.fab-menu-divider {
    align-self: stretch;
    height: 1px;
    margin: 2px 4px;
    background: var(--border-subtle);
    opacity: 0.9;
}

@media (max-width: 1180px) {
    .fab-container {
        right: 16px;
        bottom: 24px;
    }
}

@media (max-width: 768px) {
    .fab-container {
        bottom: calc(82px + env(safe-area-inset-bottom));
        z-index: 1180;
    }
}

/* =========================================================
   File Attachments: Dropzone, Manage List & Quick-Open Chips
   ========================================================= */

.attachment-section {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

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

.attachment-section-title-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    min-width: 0;
}

.attachment-section-title-group svg {
    color: var(--brand-primary);
    flex-shrink: 0;
}

.attachment-section-title {
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.attachment-create-hint {
    margin-top: 16px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px dashed var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
}

.upload-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 16px;
    border-radius: 14px;
    border: 1.5px dashed var(--border-subtle);
    background: var(--bg-elevated);
    text-align: center;
    cursor: pointer;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.upload-dropzone:hover,
.upload-dropzone:focus-visible,
.upload-dropzone.is-dragover {
    border-color: var(--brand-primary);
    background: var(--bg-card-accent);
    outline: none;
}

.upload-dropzone.is-dragover {
    transform: scale(1.005);
}

.upload-dropzone.is-uploading {
    opacity: 0.72;
    pointer-events: none;
}

.upload-dropzone-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.upload-dropzone-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(45, 212, 148, 0.14);
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

[data-theme="light"] .upload-dropzone-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.upload-dropzone-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.upload-dropzone-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.upload-dropzone-status {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-primary);
    min-height: 1em;
}

.attachment-manage-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    padding: 0;
    min-width: 0;
    max-width: 100%;
}

.attachment-manage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.attachment-manage-item:hover {
    border-color: var(--brand-primary);
}

.attachment-manage-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
    text-decoration: none;
    color: inherit;
}

.attachment-type-badge {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attachment-type-badge.is-pdf {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}

[data-theme="light"] .attachment-type-badge.is-pdf {
    background: #fef3c7;
    color: #b45309;
}

.attachment-type-badge.is-image {
    background: rgba(45, 212, 148, 0.16);
    color: var(--brand-primary);
}

[data-theme="light"] .attachment-type-badge.is-image {
    background: #dff3ea;
    color: #047857;
}

.attachment-manage-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.attachment-manage-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-manage-meta {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.attachment-manage-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.attachment-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.attachment-chips.attachment-chips-compact {
    margin-top: 8px;
    gap: 6px;
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: 100%;
    min-width: 0;
    text-decoration: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.attachment-chip:hover {
    border-color: var(--brand-primary);
    background: var(--bg-card-accent);
    transform: translateY(-1px);
}

.attachment-chip.is-pdf svg {
    color: #fbbf24;
    flex-shrink: 0;
}

[data-theme="light"] .attachment-chip.is-pdf svg {
    color: #b45309;
}

.attachment-chip.is-image svg {
    color: var(--brand-primary);
    flex-shrink: 0;
}

[data-theme="light"] .attachment-chip.is-image svg {
    color: #047857;
}

.attachment-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 210px;
}

.transport-attachment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.transport-attachment-badge:hover {
    border-color: var(--brand-primary);
    background: var(--bg-card-accent);
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .attachment-chip-name {
        max-width: 160px;
    }
}


/* =========================================================
   UI Declutter & Tabbed Layout Redesign
   ========================================================= */

.page-header-clean {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    min-width: 0;
    max-width: 100%;
}

.page-heading-clean {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.2;
}

.empty-trips-state {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px;
}

.trips-overview-container.trips-overview-shell {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 32px 72px;
    min-width: 0;
}

.trips-overview-shell .page-header-clean {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.trips-overview-count {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.trips-grid.trips-grid-spotlight {
    grid-template-columns: minmax(0, 1fr);
}

.trips-grid.trips-grid-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.trip-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
    transition: border-color 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.trip-card:hover {
    border-color: rgba(45, 212, 148, 0.34);
    transform: translateY(-1px);
}

[data-theme="light"] .trip-card:hover {
    border-color: rgba(16, 185, 129, 0.36);
}

.trip-card.is-active-trip {
    border-color: rgba(45, 212, 148, 0.44);
}

[data-theme="light"] .trip-card.is-active-trip {
    border-color: rgba(16, 185, 129, 0.46);
}

.trip-card.is-featured-upcoming {
    border-color: rgba(45, 212, 148, 0.32);
}

[data-theme="light"] .trip-card.is-featured-upcoming {
    border-color: rgba(16, 185, 129, 0.34);
}

.trip-card.is-past-trip {
    opacity: 0.9;
    border-color: var(--border-subtle);
}

.trip-card.is-past-trip:hover {
    opacity: 1;
}

.trip-card-main-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.trip-card-top-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.trip-card-country-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    min-width: 0;
}

.trip-card-meta-sep {
    opacity: 0.6;
}

.trip-card-icon-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.trip-card .trip-card-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.28;
    text-decoration: none;
    word-break: break-word;
    transition: color 0.15s ease;
}

.trip-card .trip-card-title:hover {
    color: var(--brand-primary);
}

.trip-card-date-line {
    font-size: 0.84rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.trip-card-side-col {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    margin-top: auto;
    border-top: 1px solid var(--border-inner);
    min-width: 0;
}

.trip-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    width: fit-content;
}

.trip-status-pill.is-active {
    background: rgba(45, 212, 148, 0.16);
    border: 1px solid rgba(45, 212, 148, 0.36);
    color: var(--brand-primary);
}

.trip-status-pill.is-upcoming {
    background: rgba(45, 212, 148, 0.12);
    border: 1px solid rgba(45, 212, 148, 0.26);
    color: var(--brand-primary);
}

.trip-status-pill.is-past {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

[data-theme="light"] .trip-status-pill.is-active {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.34);
    color: #047857;
}

[data-theme="light"] .trip-status-pill.is-upcoming {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.28);
    color: #059669;
}

[data-theme="light"] .trip-status-pill.is-past {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.12);
    color: #475569;
}

.trip-card-metrics {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 0;
}

.trip-metric-item {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.trip-metric-value {
    color: var(--text-primary);
    font-weight: 700;
}

.trip-metric-label {
    color: var(--text-muted);
}

.trip-card-open-cta {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--brand-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.trip-card-open-cta:hover {
    opacity: 0.88;
}

[data-theme="light"] .trip-card-open-cta {
    color: #059669;
}

@media (min-width: 769px) {
    .trip-card.is-spotlight {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 244px;
        padding: 0;
        gap: 0;
        overflow: hidden;
    }

    .trip-card.is-spotlight .trip-card-main-col {
        padding: 24px 26px;
        gap: 12px;
    }

    .trip-card.is-spotlight .trip-card-title {
        font-size: 1.32rem;
    }

    .trip-card.is-spotlight .trip-card-side-col {
        padding: 22px 24px;
        margin-top: 0;
        border-top: none;
        border-left: 1px solid var(--border-inner);
        background: rgba(255, 255, 255, 0.018);
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: stretch;
        gap: 16px;
    }

    [data-theme="light"] .trip-card.is-spotlight .trip-card-side-col {
        background: rgba(15, 23, 42, 0.02);
    }

    .trip-card.is-spotlight .trip-card-metrics {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .trip-card.is-spotlight .trip-metric-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 10px 12px;
        border-radius: 12px;
        background: var(--bg-elevated);
        border: 1px solid var(--border-inner);
    }

    .trip-card.is-spotlight .trip-metric-value {
        font-size: 1.1rem;
        line-height: 1.15;
    }

    .trip-card.is-spotlight .trip-metric-label {
        font-size: 0.72rem;
        font-weight: 600;
    }

    .trip-card.is-spotlight .trip-card-open-cta {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 0.85rem;
        background: rgba(45, 212, 148, 0.14);
        border: 1px solid rgba(45, 212, 148, 0.34);
        color: var(--brand-primary);
    }

    .trip-card.is-spotlight .trip-card-open-cta:hover {
        background: rgba(45, 212, 148, 0.22);
        opacity: 1;
    }

    [data-theme="light"] .trip-card.is-spotlight .trip-card-open-cta {
        background: rgba(16, 185, 129, 0.12);
        border-color: rgba(16, 185, 129, 0.32);
        color: #047857;
    }

    [data-theme="light"] .trip-card.is-spotlight .trip-card-open-cta:hover {
        background: rgba(16, 185, 129, 0.2);
    }

    .trip-card.is-spotlight.is-past-trip .trip-card-open-cta {
        background: var(--bg-elevated);
        border-color: var(--border-subtle);
        color: var(--text-primary);
    }

    .trip-card.is-spotlight.is-past-trip .trip-card-open-cta:hover {
        border-color: rgba(45, 212, 148, 0.34);
    }

    [data-theme="light"] .trip-card.is-spotlight.is-past-trip .trip-card-open-cta {
        background: #f8fafc;
        border-color: rgba(15, 23, 42, 0.14);
        color: #1e293b;
    }
}

/* Centered Clean Planner Shell */
.planner-clean-stage {
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 1181px) {
    .has-route-sidebar .planner-clean-stage {
        margin-left: 280px;
        width: calc(100% - 280px);
    }
}

.planner-clean-shell {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 32px 64px;
    min-width: 0;
}

/* Compact Context Header (Trip Dashboard & Stop View) */
.compact-context-header {
    padding: 4px 0 20px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-subtle);
    min-width: 0;
    max-width: 100%;
}

.compact-context-eyebrow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    min-width: 0;
}

.compact-context-eyebrow {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

[data-theme="light"] .compact-context-eyebrow {
    color: #059669;
}

.compact-context-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.compact-context-header .stop-title {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
    word-break: break-word;
}

.compact-context-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 0;
}

.budget-inline-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--brand-primary);
    font-size: 0.79rem;
    font-weight: 700;
    line-height: 1.3;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    max-width: 100%;
}

.budget-inline-pill:hover {
    border-color: var(--brand-primary);
    background: var(--bg-card-accent);
}

.budget-inline-pill.is-over-budget {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.45);
}

[data-theme="light"] .budget-inline-pill {
    color: #047857;
}

[data-theme="light"] .budget-inline-pill.is-over-budget {
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.4);
}

/* View Tabs Bar & Panels */
.view-tabs-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    padding: 4px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
    max-width: 100%;
}

.view-tabs-bar::-webkit-scrollbar {
    display: none;
}

.view-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.view-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.view-tab-btn.is-active {
    background: var(--bg-card-accent);
    color: var(--brand-primary);
}

[data-theme="light"] .view-tab-btn.is-active {
    color: #047857;
}

.view-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
}

.view-tab-btn.is-active .view-tab-badge {
    background: rgba(45, 212, 148, 0.22);
    color: var(--brand-primary);
}

[data-theme="light"] .view-tab-btn.is-active .view-tab-badge {
    background: rgba(16, 185, 129, 0.18);
    color: #047857;
}

.view-tab-panel {
    display: none;
    min-width: 0;
    max-width: 100%;
}

.view-tab-panel.is-active {
    display: block;
}

/* Clean Card-Clickable Stop Cards (Route Tab) */
.stops-clean-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
    max-width: 100%;
}

.stop-card-clean {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.stop-card-clean:hover {
    border-color: rgba(45, 212, 148, 0.4);
    transform: translateY(-1px);
}

[data-theme="light"] .stop-card-clean:hover {
    border-color: rgba(16, 185, 129, 0.42);
}

.stop-card-clean-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.stop-card-clean-badges {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.stop-card-clean-actions {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.stop-card-clean-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.28;
    margin: 2px 0 0;
}

.stop-card-clean-link {
    color: inherit;
    text-decoration: none;
}

.stop-card-clean-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 16px;
}

.stop-card-clean:hover .stop-card-clean-link {
    color: var(--brand-primary);
}

[data-theme="light"] .stop-card-clean:hover .stop-card-clean-link {
    color: #059669;
}

.stop-card-clean-dates {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stop-card-clean-hotel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 0;
}

.stop-card-clean-hotel svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.stop-card-clean-summary {
    font-size: 0.79rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: auto;
    padding-top: 6px;
}

.stop-card-clean-attachments {
    position: relative;
    z-index: 2;
}

/* Collapsible Map Toggle Card */
.map-toggle-card {
    margin-top: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    min-width: 0;
    max-width: 100%;
}

.map-toggle-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: background-color 0.15s ease;
}

.map-toggle-summary::-webkit-details-marker {
    display: none;
}

.map-toggle-summary:hover {
    background: var(--bg-elevated);
}

.map-toggle-summary-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.map-toggle-summary-left svg {
    color: var(--brand-primary);
}

.map-toggle-body {
    border-top: 1px solid var(--border-inner);
}

/* Tab Content Stacks & Airy Cards */
.infos-tab-stack,
.map-tab-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    max-width: 100%;
}

.infos-flight-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.empty-inline-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px dashed var(--border-subtle);
    background: var(--bg-card);
}

.inline-action-link {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.inline-action-link:hover {
    text-decoration: underline;
}

[data-theme="light"] .inline-action-link {
    color: #059669;
}

.planner-clean-shell .spot-card-body,
.planner-clean-shell .hotel-card-body {
    padding: 20px;
}

.planner-clean-shell .cards-grid,
.planner-clean-shell .hotels-grid {
    gap: 16px;
}

/* Compact Expandable Hotel Accordion (Stop View Plan Tab) */
.stop-hotels-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    min-width: 0;
    max-width: 100%;
}

.hotel-accordion-card {
    border-radius: 14px;
    min-width: 0;
    max-width: 100%;
}

.hotel-accordion-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    cursor: pointer;
    list-style: none;
    min-width: 0;
    max-width: 100%;
    transition: background-color 0.15s ease;
}

.hotel-accordion-summary::-webkit-details-marker {
    display: none;
}

.hotel-accordion-summary:hover {
    background: var(--bg-elevated);
}

.hotel-accordion-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    min-width: 0;
    max-width: 100%;
    flex: 1;
}

.hotel-accordion-title-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    max-width: 100%;
}

.hotel-accordion-icon {
    flex-shrink: 0;
    color: var(--brand-primary);
}

[data-theme="light"] .hotel-accordion-icon {
    color: #059669;
}

.hotel-accordion-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-word;
    min-width: 0;
}

.hotel-accordion-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 0;
    max-width: 100%;
}

.hotel-attachment-count {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.hotel-accordion-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.18s ease;
}

details[open] .hotel-accordion-chevron {
    transform: rotate(180deg);
}

.hotel-accordion-body {
    padding: 12px 14px 14px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}

.hotel-accordion-body .amenities-pills-row {
    margin-top: 0;
}

.hotel-accordion-empty {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.hotel-accordion-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 4px;
    min-width: 0;
    max-width: 100%;
}

.hotel-empty-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px dashed var(--border-subtle);
    background: var(--bg-card);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    max-width: 100%;
    min-width: 0;
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.hotel-empty-inline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: var(--bg-elevated);
}

[data-theme="light"] .hotel-empty-inline:hover {
    border-color: #059669;
    color: #059669;
}

/* Responsive Adjustments for Clean Layout & 390px iPhone */
@media (max-width: 1180px) {
    .planner-clean-shell {
        padding: 22px 20px 56px;
    }
}

@media (max-width: 768px) {
    .trips-overview-container.trips-overview-shell {
        padding: 16px 14px 88px;
    }

    .trips-grid.trips-grid-two-col {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
}

@media (max-width: 767px) {
    .planner-clean-shell {
        padding: 16px 14px 56px;
    }

    .page-heading-clean {
        font-size: 1.5rem;
    }

    .compact-context-header .stop-title {
        font-size: 1.4rem;
    }

    .stops-clean-grid,
    .trips-grid.trips-grid-spotlight {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .trip-card,
    .stop-card-clean,
    .planner-clean-shell .spot-card-body,
    .planner-clean-shell .hotel-card-body {
        padding: 16px;
    }
}

@media (max-width: 375px) {
    .trips-overview-container.trips-overview-shell,
    .planner-clean-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .trip-card,
    .stop-card-clean {
        padding-left: 14px;
        padding-right: 14px;
    }
}
