/* ==========================================================================
   Trippo Travel Planner - Components & UI Elements
   Cards, Drawers, Modals, Navigation, Sheets, Forms, Buttons, Badges
   ========================================================================== */

/* --- SIDEBAR DRAWER & BACKDROP --- */
#sidebar-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    height: 100dvh;
    background: var(--card-bg);
    color: var(--text);
    z-index: 4000;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.15);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
    overflow-y: auto;
}

#sidebar-drawer.open {
    left: 0;
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 3500;
    display: none;
}

.sidebar-backdrop.open {
    display: block;
}

.sidebar-section-title {
    font-size: 11px;
    color: var(--text-muted, #71837f);
    margin: 16px 0 10px 0;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.8px;
}

.sidebar-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-subtle);
    transition: transform 0.1s ease;
}

.sidebar-item:active {
    transform: scale(0.98);
}

/* --- FLIGHT HUB & EXPLORE EVERYWHERE CARD --- */
.flight-hub-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.flight-hub-header {
    margin-bottom: 10px;
}

.flight-hub-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.flight-hub-subtitle {
    font-size: 10px;
    color: var(--text-light, #71837f);
    font-weight: 600;
}

.flight-hub-origin-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.flight-hub-input-wrap {
    display: flex;
    align-items: center;
    background: var(--primary-light);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 4px 8px;
    flex: 1;
}

.flight-hub-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-light, #71837f);
    margin-right: 6px;
}

.flight-hub-input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text);
    width: 100%;
    letter-spacing: 1px;
}

.flight-hub-save-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.flight-hub-save-btn:active {
    transform: scale(0.96);
}

.flight-hub-save-btn.saved {
    background: #2b7c62;
}

.flight-hub-chips {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.flight-hub-chip {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.flight-hub-chip:active,
.flight-hub-chip.active {
    background: var(--primary);
    color: white;
}

.flight-hub-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.flight-hub-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s ease;
}

.flight-hub-link:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateX(2px);
}

.flight-hub-link-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.flight-hub-link-info {
    flex: 1;
    min-width: 0;
}

.flight-hub-link-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.flight-hub-link-desc {
    font-size: 9px;
    color: var(--text-light, #71837f);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flight-hub-link-arrow {
    font-size: 11px;
    color: var(--primary);
    font-weight: 800;
}

/* Flight Hub Cheap Deals Feed */
.flight-hub-deals-wrapper {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-subtle);
}

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

.flight-hub-deals-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.flight-hub-deals-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.flight-deal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-subtle);
    border-radius: 9px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.flight-deal-item:hover {
    border-color: var(--primary);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.flight-deal-dest {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.flight-deal-city {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
}

.flight-deal-airline {
    font-size: 9px;
    color: var(--text-light, #71837f);
}

.flight-deal-price-badge {
    background: rgba(18, 75, 67, 0.08);
    color: var(--primary, #124b43);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 3px;
}

body.dark-mode .flight-deal-price-badge {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

/* Compact Hotel Partner Chips in Accommodations */
.hotel-partner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
    gap: 8px;
    flex-wrap: wrap;
}

.hotel-partner-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light, #71837f);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hotel-partner-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.hotel-partner-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s ease;
}

.hotel-partner-chip:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.hotel-partner-chip.featured {
    background: rgba(255, 107, 53, 0.08);
    border-color: rgba(255, 107, 53, 0.3);
    color: #e65100;
    font-weight: 700;
}

body.dark-mode .hotel-partner-chip.featured {
    background: rgba(255, 107, 53, 0.15);
    color: #ff8a65;
    border-color: rgba(255, 107, 53, 0.4);
}

/* Flight Hub Segmented Tabs */
.flight-hub-tab-row {
    display: flex;
    background: var(--primary-light);
    border-radius: 9px;
    padding: 3px;
    margin-top: 10px;
    margin-bottom: 8px;
    gap: 3px;
}

.flight-hub-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 5px 6px;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light, #71837f);
    cursor: pointer;
    transition: all 0.15s ease;
}

.flight-hub-tab-btn.active {
    background: var(--card-bg, #ffffff);
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

body.dark-mode .flight-hub-tab-btn.active {
    background: var(--card-bg);
    color: #41b8a6;
}

/* Trip Countdown & Status Badges */
.trip-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    margin-top: 4px;
    letter-spacing: 0.2px;
}

.trip-countdown-badge.upcoming {
    background: rgba(18, 75, 67, 0.08);
    color: var(--primary, #124b43);
    border: 1px solid rgba(18, 75, 67, 0.15);
}

.trip-countdown-badge.today {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
    animation: pulseBadge 2s infinite ease-in-out;
}

.trip-countdown-badge.in-progress {
    background: rgba(243, 156, 18, 0.12);
    color: #d35400;
    border: 1px solid rgba(243, 156, 18, 0.25);
}

.trip-countdown-badge.completed {
    background: rgba(113, 131, 127, 0.1);
    color: #71837f;
}

.trip-countdown-badge.tbd {
    background: rgba(100, 116, 139, 0.08);
    color: var(--text-muted, #64748b);
    border: 1px dashed rgba(100, 116, 139, 0.3);
}

body.dark-mode .trip-countdown-badge.upcoming {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.3);
}

body.dark-mode .trip-countdown-badge.in-progress {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

body.dark-mode .trip-countdown-badge.tbd {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.25);
}

/* Interactive Planner Date Chip */
.planner-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light, #eef7f5);
    color: var(--primary, #124b43);
    border: 1px solid var(--border-subtle, #dce8e5);
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.planner-date-chip:hover {
    background: var(--primary, #124b43);
    color: #ffffff;
    border-color: var(--primary, #124b43);
}

.planner-date-chip.tbd {
    background: rgba(100, 116, 139, 0.08);
    color: var(--text-muted, #64748b);
    border: 1px dashed rgba(100, 116, 139, 0.3);
}

.planner-date-chip.tbd:hover {
    background: var(--primary-light, #eef7f5);
    color: var(--primary, #124b43);
    border-color: var(--primary, #124b43);
}

body.dark-mode .planner-date-chip {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.25);
}

body.dark-mode .planner-date-chip:hover {
    background: #2ecc71;
    color: #0b1a17;
}

body.dark-mode .planner-date-chip.tbd {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.25);
}

body.dark-mode .planner-date-chip.tbd:hover {
    background: rgba(46, 204, 113, 0.18);
    color: #2ecc71;
    border-color: #2ecc71;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

/* Destination Live Weather Chip */
.stop-weather-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(18, 75, 67, 0.05);
    color: var(--text);
    border: 1px solid var(--border-subtle);
    margin-top: 3px;
    cursor: default;
    transition: all 0.15s ease;
}

.stop-weather-chip:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

body.dark-mode .stop-weather-chip {
    background: rgba(255, 255, 255, 0.05);
}


.google-signin-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.google-signin-btn:hover {
    background: #f8fafd;
    border-color: #c2c7d0;
    box-shadow: 0 2px 6px rgba(60, 64, 67, 0.15);
    transform: translateY(-1px);
}

.google-signin-btn:active {
    transform: scale(0.99);
}

[data-theme="dark"] .google-signin-btn {
    background: #1e2927;
    color: #e2e8f0;
    border-color: #334743;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .google-signin-btn:hover {
    background: #253331;
    border-color: #445e58;
}

/* --- BOTTOM APP NAVIGATION BAR --- */
.bottom-nav {
    position: fixed;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 460px;
    height: 68px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border-radius: 34px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    z-index: 3000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode .bottom-nav {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-item {
    text-align: center;
    color: var(--text-light, #8fa39f);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 54px;
    border-radius: 18px;
    padding: 2px 3px;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
    color: var(--primary);
    background: rgba(18, 75, 67, 0.05);
}

body.dark-mode .nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-item:active {
    transform: scale(0.92);
}

.nav-item.active {
    color: var(--primary);
    background: linear-gradient(180deg, rgba(18, 75, 67, 0.09) 0%, rgba(18, 75, 67, 0.03) 100%);
    border: 1px solid rgba(18, 75, 67, 0.12);
    box-shadow: 0 2px 8px rgba(18, 75, 67, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.dark-mode .nav-item.active {
    background: linear-gradient(180deg, rgba(65, 184, 166, 0.2) 0%, rgba(65, 184, 166, 0.08) 100%);
    border: 1px solid rgba(65, 184, 166, 0.25);
    color: #41b8a6;
    box-shadow: 0 2px 12px rgba(65, 184, 166, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-icon {
    font-size: 19px;
    margin-bottom: 2px;
    display: block;
    line-height: 1;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.22s ease;
}

.nav-item.active .nav-icon {
    transform: translateY(-2px) scale(1.16);
    filter: drop-shadow(0 2px 6px rgba(18, 75, 67, 0.25));
}

body.dark-mode .nav-item.active .nav-icon {
    filter: drop-shadow(0 2px 6px rgba(65, 184, 166, 0.4));
}

.nav-item span:not(.nav-icon) {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.1px;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.nav-item.active span:not(.nav-icon) {
    font-weight: 800;
    letter-spacing: 0.2px;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 12px;
    height: 3px;
    border-radius: 3px;
    background: var(--primary);
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.active::after {
    opacity: 1;
    transform: scaleX(1);
}

body.dark-mode .nav-item.active::after {
    background: #41b8a6;
    box-shadow: 0 0 6px rgba(65, 184, 166, 0.7);
}

/* --- BUTTONS & ACTIONS --- */
.create-btn {
    background: var(--gradient-primary);
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: 18px;
    width: 100%;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(15, 81, 50, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 81, 50, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: brightness(1.1);
}

.create-btn:active {
    transform: translateY(-1px) scale(0.97);
}

body.dark-mode .create-btn {
    background: linear-gradient(135deg, #20c997 0%, #10b981 100%);
    color: #022c22;
    box-shadow: 0 8px 20px rgba(32, 201, 151, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.dark-mode .create-btn:hover {
    box-shadow: 0 10px 24px rgba(32, 201, 151, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.save-btn {
    background: var(--gradient-primary);
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: 18px;
    width: 100%;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    margin-top: 12px;
    box-shadow: 0 8px 20px rgba(15, 81, 50, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 81, 50, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: brightness(1.1);
}

.save-btn:active {
    transform: translateY(-1px) scale(0.97);
}

body.dark-mode .save-btn {
    background: linear-gradient(135deg, #20c997 0%, #10b981 100%);
    color: #022c22;
    box-shadow: 0 8px 20px rgba(32, 201, 151, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.dark-mode .save-btn:hover {
    box-shadow: 0 10px 24px rgba(32, 201, 151, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.optimize-btn {
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(18, 75, 67, 0.08) 100%);
    color: var(--primary);
    border: 1px solid var(--border-subtle);
    padding: 11px 16px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.optimize-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(18, 75, 67, 0.12);
}

.optimize-btn:active {
    transform: scale(0.98);
}

body.dark-mode .optimize-btn {
    background: linear-gradient(135deg, rgba(65, 184, 166, 0.12) 0%, rgba(65, 184, 166, 0.06) 100%);
    border-color: rgba(65, 184, 166, 0.25);
    color: #41b8a6;
}

body.dark-mode .optimize-btn:hover {
    border-color: #41b8a6;
    box-shadow: 0 4px 16px rgba(65, 184, 166, 0.18);
}

.back-btn {
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s ease;
}

.back-btn:hover {
    transform: translateX(-3px);
}

.fab {
    position: fixed;
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(255, 71, 87, 0.42), 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    z-index: 2000;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab:hover {
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 12px 28px rgba(255, 71, 87, 0.52);
}

.fab:active {
    transform: scale(0.94);
}

.partner-btn {
    width: 100%;
    padding: 13px 16px;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    background: var(--card-bg);
    color: var(--text);
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.partner-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.partner-btn:active {
    transform: scale(0.98);
}

.partner-btn span {
    font-weight: 500;
    font-size: 12px;
    color: #8c9f9b;
}

.partner-btn.partner-trip-flight { color: #1e3a8a; }
.partner-btn.partner-trip-train { color: #0284c7; }
.partner-btn.partner-google-flight { color: #2563eb; }

body.dark-mode .partner-btn {
    border-color: var(--border-subtle);
    background: var(--card-bg);
}
body.dark-mode .partner-btn.partner-trip-flight { color: #93c5fd !important; }
body.dark-mode .partner-btn.partner-trip-train { color: #38bdf8 !important; }
body.dark-mode .partner-btn.partner-google-flight { color: #60a5fa !important; }
body.dark-mode .partner-btn span { color: #94a3b8 !important; }

/* Reusable Modern Sleek Buttons */
.dashed-add-btn {
    width: 100%;
    padding: 13px 16px;
    border-radius: 16px;
    border: 1.5px dashed var(--border-subtle);
    background: rgba(18, 75, 67, 0.03);
    color: var(--primary);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashed-add-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 75, 67, 0.08);
}

.dashed-add-btn:active {
    transform: scale(0.98);
}

body.dark-mode .dashed-add-btn {
    border-color: rgba(65, 184, 166, 0.3);
    background: rgba(65, 184, 166, 0.04);
    color: #41b8a6;
}

body.dark-mode .dashed-add-btn:hover {
    border-color: #41b8a6;
    background: rgba(65, 184, 166, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: scale(0.98);
}

body.dark-mode .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

body.dark-mode .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.header-icon-btn {
    background: var(--primary-light);
    color: var(--primary);
    border: 1.5px solid var(--border-subtle);
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-icon-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 75, 67, 0.1);
}

.header-icon-btn:active {
    transform: scale(0.94);
}

body.dark-mode .header-icon-btn {
    background: rgba(65, 184, 166, 0.12);
    border-color: rgba(65, 184, 166, 0.25);
    color: #41b8a6;
}

body.dark-mode .header-icon-btn:hover {
    border-color: #41b8a6;
    box-shadow: 0 4px 14px rgba(65, 184, 166, 0.25);
}

.micro-action-btn {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.micro-action-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(18, 75, 67, 0.12);
}

.micro-action-btn:active {
    transform: scale(0.95);
}

body.dark-mode .micro-action-btn {
    background: rgba(65, 184, 166, 0.12);
    border-color: rgba(65, 184, 166, 0.25);
    color: #41b8a6;
}

.type-pill {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}


/* --- MAPS, SHEETS & FAB CONTROLS --- */
.map-container {
    height: 42vh;
    height: 42dvh;
    min-height: 240px;
    width: 100%;
    background: #e5ece8;
    z-index: 1;
    flex-shrink: 0;
    position: relative;
    transition: height 0.3s cubic-bezier(0.2, 0, 0, 1);
    touch-action: pan-x pan-y !important;
    -webkit-user-select: none;
    user-select: none;
}

.leaflet-container {
    background: #e5ece8 !important;
    touch-action: pan-x pan-y !important;
    outline: none;
}

/* Mobile WebKit & Android hardware acceleration: prevent tile drops & flickering */
.leaflet-tile {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    image-rendering: auto;
}

.leaflet-tile-container {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

/* Fullscreen / Expanded Map Mode */
.view.map-expanded .map-container,
.map-view-fullscreen .map-container,
#places-city-view.map-expanded .map-container,
#wishlist-detail-view.map-expanded .map-container {
    height: calc(100% - 138px) !important;
    min-height: calc(100% - 138px) !important;
    flex-grow: 1 !important;
}

.view.map-expanded .sheet,
.map-view-fullscreen .sheet,
#places-city-view.map-expanded .sheet,
#wishlist-detail-view.map-expanded .sheet {
    flex-grow: 0 !important;
    height: 138px !important;
    min-height: 138px !important;
    max-height: 138px !important;
    overflow: hidden !important;
    padding: 10px 20px 84px 20px !important;
    margin-top: 0 !important;
    cursor: pointer;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.16);
    background: var(--card-bg);
}

.view.map-expanded .sheet > *:not(.sheet-handle):not(.sheet-collapsed-bar),
#places-city-view.map-expanded .sheet > *:not(.sheet-handle):not(.sheet-collapsed-bar),
#wishlist-detail-view.map-expanded .sheet > *:not(.sheet-handle):not(.sheet-collapsed-bar) {
    display: none !important;
}

.sheet-handle {
    width: 44px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 4px;
    margin: 0 auto 10px auto;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.sheet-handle:hover,
.sheet-handle:active {
    background: var(--primary);
    transform: scaleX(1.15);
}

.sheet-collapsed-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    padding: 2px 4px;
    user-select: none;
}

.view.map-expanded .sheet .sheet-collapsed-bar,
#places-city-view.map-expanded .sheet .sheet-collapsed-bar,
#wishlist-detail-view.map-expanded .sheet .sheet-collapsed-bar {
    display: flex !important;
}

.map-controls-row {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: calc(14px + env(safe-area-inset-right, 0px));
    z-index: 1000;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: calc(100% - 28px);
    pointer-events: none;
}

.map-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.1px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-btn:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    border-color: rgba(18, 75, 67, 0.25);
    color: var(--primary);
}

.map-btn:active {
    transform: scale(0.95);
}

.map-btn.active-mode {
    background: linear-gradient(135deg, #124b43 0%, #1c685d 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(18, 75, 67, 0.35);
}

body.dark-mode .map-btn {
    background: rgba(22, 35, 32, 0.84);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

body.dark-mode .map-btn:hover {
    border-color: rgba(65, 184, 166, 0.4);
    color: #41b8a6;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

body.dark-mode .map-btn.active-mode {
    background: linear-gradient(135deg, #2b9182 0%, #41b8a6 100%);
    color: #0b1311;
    box-shadow: 0 4px 18px rgba(65, 184, 166, 0.4);
}

.sheet {
    flex-grow: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--card-bg);
    border-top-left-radius: 26px;
    border-top-right-radius: 26px;
    /* Bottom padding clears the floating nav (82px) + FAB (150px) so the last card is never covered */
    padding: 16px 20px calc(170px + env(safe-area-inset-bottom, 0px)) 20px;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 10;
    margin-top: -18px;
    transition: height 0.3s cubic-bezier(0.2, 0, 0, 1), padding 0.3s ease;
}

#wishlist-expand-fab {
    position: fixed;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(18, 75, 67, 0.3);
    z-index: 2500;
    cursor: pointer;
    display: none;
    transition: transform 0.15s ease;
}


/* --- CARDS & LIST ITEMS --- */
.trip-card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.trip-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.trip-card-content {
    flex-grow: 1;
    cursor: pointer;
}

.trip-card-content h3 {
    margin: 0 0 5px 0;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trip-card-content p {
    margin: 0;
    color: #71837f;
    font-size: 13px;
}

.example-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-subtle);
}

.stop-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    margin-bottom: 0px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    gap: 10px;
}

.stop-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    border-color: rgba(18, 75, 67, 0.2);
}

body.dark-mode .stop-card {
    background: var(--card-bg);
    border-color: var(--border-subtle);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.stop-card.is-locked {
    border-left: 4px solid #f59e0b;
}

[data-theme="dark"] .stop-card.is-locked {
    border-left: 4px solid #fbbf24;
}

.stop-node-badge {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    background: var(--bg);
    color: var(--text-light, #71837f);
    border: 1.5px solid var(--border-subtle);
    user-select: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}

.stop-node-badge:hover {
    transform: scale(1.12);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(18, 75, 67, 0.15);
}

.stop-node-badge:active {
    transform: scale(0.92);
}

.stop-node-badge.is-base {
    background: #112d27;
    color: #ffffff;
    border-color: #112d27;
    font-size: 14px;
}

body.dark-mode .stop-node-badge.is-base {
    background: #41b8a6;
    color: #0b1311;
    border-color: #41b8a6;
}

body.dark-mode .stop-node-badge:hover {
    border-color: #41b8a6;
    color: #41b8a6;
    box-shadow: 0 2px 8px rgba(65, 184, 166, 0.25);
}

.stop-inline-lock-btn {
    background: transparent;
    border: none;
    padding: 2px 4px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
    transition: opacity 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
    border-radius: 4px;
}

.stop-inline-lock-btn:hover {
    opacity: 1;
    transform: scale(1.18);
}

.stop-inline-lock-btn.locked {
    opacity: 1;
}

.stop-flag {
    font-size: 16px;
    display: inline-block;
    line-height: 1;
    margin-right: 2px;
}

/* Route Distance Divider & Capsule */
.route-distance-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
    padding: 6px 0;
}

.route-distance-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 1px;
    background: var(--border-subtle, #e2e8f0);
    z-index: 1;
}

body.dark-mode .route-distance-divider::before {
    background: rgba(255, 255, 255, 0.1);
}

.route-distance-badge {
    position: relative;
    z-index: 2;
    background: var(--card-bg, #ffffff);
    color: var(--text-light, #71837f);
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.route-distance-badge:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(18, 75, 67, 0.12);
}

.route-distance-badge:active {
    transform: scale(0.96);
}

body.dark-mode .route-distance-badge {
    background: #182824;
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

body.dark-mode .route-distance-badge:hover {
    color: #41b8a6;
    border-color: #41b8a6;
    box-shadow: 0 4px 16px rgba(65, 184, 166, 0.2);
}

.route-distance-icon {
    font-size: 11px;
    line-height: 1;
    opacity: 0.85;
}

/* Sleek Nights Stepper */
.sleek-nights-stepper {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    user-select: none;
}

.sleek-stepper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2px;
}

.sleek-stepper-btn {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.sleek-stepper-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: scale(1.15);
}

.sleek-stepper-btn:active {
    transform: scale(0.9);
}

body.dark-mode .sleek-stepper-btn {
    color: var(--text);
}

body.dark-mode .sleek-stepper-btn:hover {
    background: rgba(65, 184, 166, 0.18);
    color: #41b8a6;
}

.sleek-stepper-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    min-width: 18px;
    text-align: center;
    line-height: 1;
}

.sleek-stepper-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-light, #71837f);
    margin-top: 2px;
    text-transform: lowercase;
    letter-spacing: 0.2px;
}

/* Nights planned badge in planner header */
.planner-nights-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

.planner-nights-badge .nights-number {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.2px;
}

.planner-nights-badge .nights-sub {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-light, #71837f);
    margin-top: 1px;
}

body.dark-mode .planner-nights-badge .nights-number {
    color: #41b8a6;
}

/* --- TOGGLE SWITCH (FOR SETTINGS) --- */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider.round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-subtle, #cbd5e1);
    transition: .3s;
    border-radius: 24px;
}

.slider.round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

input:checked + .slider.round {
    background-color: var(--primary);
}

input:checked + .slider.round:before {
    transform: translateX(20px);
}

body.dark-mode .slider.round {
    background-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode input:checked + .slider.round {
    background-color: #41b8a6;
}

.stop-lock-btn {
    background: var(--primary-light);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    opacity: 0.75;
}

.stop-lock-btn:hover {
    opacity: 1;
    transform: scale(1.08);
}

.stop-lock-btn.locked {
    background: #fef3c7;
    border-color: #fcd34d;
    opacity: 1;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .stop-lock-btn.locked {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.45);
}

.lock-all-toggle-btn {
    background: var(--primary-light);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lock-all-toggle-btn:hover {
    background: var(--bg-hover, #e4f0ed);
    transform: translateY(-1px);
}

.drag-handle {
    color: var(--text-light, #71837f);
    font-size: 15px;
    padding: 0;
    cursor: grab;
    user-select: none;
    opacity: 0.35;
    transition: opacity 0.15s ease;
    line-height: 1;
    display: flex;
    align-items: center;
}

.drag-handle:hover {
    opacity: 0.85;
}

.drag-handle:active {
    cursor: grabbing;
}

/* --- Route tab: thumb-friendly stop reordering --- */
.stop-row {
    /* Long-press drags the card: stop iOS from selecting text or popping the callout menu */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Big, easy-to-hit handle that grabs instantly. touch-action: none so the browser
   doesn't start scrolling the sheet when the drag begins on the handle. */
.stop-card .drag-handle {
    align-self: stretch;
    justify-content: center;
    min-width: 32px;
    margin: -14px -4px -14px -10px;
    padding: 0 4px 0 6px;
    font-size: 20px;
    opacity: 0.5;
    touch-action: none;
    cursor: grab;
}

/* Card picked up (long-press registered) */
.stop-row-chosen .stop-card {
    border-color: var(--primary);
    box-shadow: 0 10px 28px rgba(18, 75, 67, 0.18);
}

/* Placeholder left in the list where the card will drop */
.stop-row-ghost .stop-card {
    opacity: 0.35;
    border: 2px dashed var(--primary);
    box-shadow: none;
}
.stop-row-ghost .route-distance-divider {
    visibility: hidden;
}

/* The copy that follows your thumb */
.stop-row-dragging {
    opacity: 0.96 !important;
}
.stop-row-dragging .stop-card {
    transform: scale(1.03) rotate(-0.6deg);
    border-color: var(--primary);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}
.stop-row-dragging .route-distance-divider {
    display: none;
}

/* While dragging: no accidental text selection, no hover jitter */
body.is-reordering-stops,
body.is-reordering-stops * {
    -webkit-user-select: none !important;
    user-select: none !important;
    cursor: grabbing !important;
}
body.is-reordering-stops .stop-card {
    transition: none;
}

.nights-control {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    border-radius: 12px;
    padding: 4px 8px;
    border: 1px solid var(--border-subtle);
}

.nights-btn {
    border: none;
    background: var(--card-bg);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    font-weight: 800;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nights-btn:hover {
    background: var(--primary-light);
    transform: scale(1.08);
}

.nights-btn:active {
    transform: scale(0.92);
}

body.dark-mode .nights-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #41b8a6;
}

body.dark-mode .nights-btn:hover {
    background: rgba(65, 184, 166, 0.2);
}

.day-tab {
    padding: 8px 16px;
    border-radius: 14px;
    background: var(--card-bg);
    color: var(--text-light);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.day-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.day-tab:active {
    transform: scale(0.96);
}

.day-tab.active {
    background: linear-gradient(135deg, #124b43 0%, #1c685d 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(18, 75, 67, 0.25);
}

body.dark-mode .day-tab {
    background: var(--card-bg);
    color: var(--text-light);
}

body.dark-mode .day-tab.active {
    background: linear-gradient(135deg, #2b9182 0%, #41b8a6 100%);
    color: #0b1311;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(65, 184, 166, 0.35);
}

.place-item-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
}

.place-category-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
}

.transit-ticket,
.confirmed-card {
    background: var(--primary-light);
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 14px;
    border: 1.5px solid var(--border-subtle);
    cursor: pointer;
}

.ticket-header,
.confirmed-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 13px;
}

.ticket-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ticket-station,
.confirmed-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}

.ticket-time,
.confirmed-sub {
    font-size: 13px;
    color: #71837f;
}

.ticket-notes,
.confirmed-notes {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text);
    background: var(--card-bg);
    padding: 8px 12px;
    border-radius: 10px;
}

/* --- FORMS & AUTOCOMPLETE --- */
.form-group {
    margin-bottom: 15px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 11px;
    color: #71837f;
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    font-size: 15px;
    background: var(--card-bg);
    color: var(--text);
    outline: none;
}

select.form-control option {
    background-color: var(--card-bg);
    color: var(--text);
}

textarea.form-control {
    resize: none;
    height: 90px;
}

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

.form-row .form-group {
    flex: 1;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    z-index: 5500;
    max-height: 220px;
    overflow-y: auto;
    display: none;
    margin-top: 6px;
    border: 1px solid var(--border-subtle);
}

/* --- SEARCH RESULTS & AUTOCOMPLETE DROPDOWNS --- */
#city-search-results,
#place-search-results,
#wishlist-search-results,
#hotel-address-results {
    max-height: 250px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    margin-top: 10px;
    background: var(--card-bg);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.autocomplete-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s ease;
}

.autocomplete-item:hover,
.autocomplete-item:active {
    background: var(--bg-hover, rgba(0, 0, 0, 0.04));
}

.search-result {
    padding: 13px 15px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    background: var(--card-bg);
    font-size: 14px;
    transition: background 0.15s ease;
}

.search-result:last-child,
.autocomplete-item:last-child {
    border-bottom: none;
}

.search-result:hover,
.search-result:active {
    background: var(--bg-hover, rgba(0, 0, 0, 0.05));
}

body.dark-mode .search-result:hover,
body.dark-mode .search-result:active,
body.dark-mode .autocomplete-item:hover,
body.dark-mode .autocomplete-item:active {
    background: var(--bg-hover, rgba(255, 255, 255, 0.08));
}

/* --- GOOGLE MAPS AUTOCOMPLETE & ERROR SUPPRESSION --- */
input.gm-err-autocomplete,
.form-control.gm-err-autocomplete {
    background-image: none !important;
    padding-right: 14px !important;
}

.gm-err-container,
.gm-err-content {
    display: none !important;
}

.pac-container {
    z-index: 10000 !important;
    border-radius: 10px;
    margin-top: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    font-family: inherit;
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.1));
}

/* Trippo's own Places (New) dropdown — Google's legacy widget CSS isn't loaded anymore */
.pac-container.trippo-pac {
    position: absolute;
    background: var(--card-bg, #fff);
    overflow: hidden;
    max-height: 60vh;
    overflow-y: auto;
}
.trippo-pac .pac-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 14px;
    cursor: pointer;
    border-top: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06));
    font-size: 13px;
    line-height: 1.3;
    color: var(--text-muted, #6b7c79);
}
.trippo-pac .pac-item:first-child {
    border-top: none;
}
.trippo-pac .pac-item:hover,
.trippo-pac .pac-item-selected {
    background: var(--bg-hover, rgba(18, 75, 67, 0.06));
}
.trippo-pac .pac-item-query {
    font-size: 14px;
    font-weight: 700;
    color: var(--text, #1f2d2b);
}
.trippo-pac .pac-item-secondary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-mode .pac-container {
    background-color: var(--card-bg, #1a2321);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

body.dark-mode .pac-item {
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    color: var(--text-muted, #9ba3af);
}

body.dark-mode .pac-item:hover,
body.dark-mode .pac-item-selected {
    background-color: var(--bg-hover, rgba(255, 255, 255, 0.06));
}

body.dark-mode .pac-item-query {
    color: var(--text, #f0f4f3);
}

body.dark-mode .pac-matched {
    color: var(--primary, #124b43);
}

/* --- MODALS & DIALOGS --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 5000;
    justify-content: center;
    align-items: flex-end;
}

.modal-content {
    background: var(--card-bg);
    color: var(--text);
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    padding: 24px 20px calc(36px + env(safe-area-inset-bottom, 0px)) 20px;
    box-sizing: border-box;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: relative;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-light);
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
}

.modal-content > .close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text);
    transform: rotate(90deg) scale(1.08);
}

.close-modal:active {
    transform: scale(0.92);
}

body.dark-mode .close-modal {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
}

body.dark-mode .close-modal:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* Leaflet DivIcons & Custom Markers */
.transit-div-icon div {
    transition: transform 0.15s ease;
}

/* Route map travel badges: vehicle in a disc, pointer on the rim showing the direction of travel */
.route-leg-icon { background: none; border: 0; }
.route-leg-badge { --leg: var(--leg-base); position: relative; width: 40px; height: 40px; cursor: pointer; transition: transform 0.15s ease, opacity 0.15s ease; }
.route-leg-disc { position: absolute; inset: 7px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; border: 2px solid var(--leg); color: var(--leg); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28); transition: box-shadow 0.15s ease; }
.route-leg-disc .ico { width: 15px; height: 15px; margin: 0; stroke-width: 2.2; transition: none; }
.route-leg-plane .route-leg-disc .ico { fill: currentColor; stroke-width: 1.4; }
.route-leg-heading { position: absolute; inset: 0; pointer-events: none; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff) drop-shadow(0 1px 1.5px rgba(15, 23, 42, 0.35)); }
.route-leg-heading::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 7px solid var(--leg); }
.route-leg-dot .route-leg-disc { inset: 11px; border-width: 1.5px; }
.route-leg-dot .route-leg-disc .ico { width: 12px; height: 12px; fill: currentColor; stroke-width: 1.5; }
.route-leg-icon.is-selected .route-leg-heading::before { top: -6px; border-left-width: 6px; border-right-width: 6px; border-bottom-width: 8px; }
.route-leg-icon.is-tiny:not(.is-selected) { visibility: hidden; pointer-events: none; }
.route-leg-icon.is-selected .route-leg-badge { --leg: var(--leg-hi); transform: scale(1.15); }
.route-leg-icon.is-selected .route-leg-disc { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 3px 12px rgba(15, 23, 42, 0.35); }
.route-leg-icon.is-dim .route-leg-badge { opacity: 0.55; }
@media (hover: hover) { .route-leg-badge:hover { transform: scale(1.1); } }

.wishlist-bubble-card {
    min-width: 220px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- CONNECTED JOURNEY TIMELINE --- */
.timeline-node-pin {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.timeline-node-pin.start-pin {
    background: var(--accent);
    font-size: 13px;
}

/* Daily: hotel base and arrival airport/station */
.timeline-node-pin .ico { width: 14px; height: 14px; margin: 0; }
.timeline-node-pin.hub-pin { background: #334155; }
.place-item-card.is-base-card { border-left: 4px solid var(--accent); }
.place-item-card.is-hub-card { border-left: 4px solid #334155; }
.place-category-badge.is-base { background: var(--accent); color: #fff; }
.place-category-badge.is-hub { background: #334155; color: #fff; }
.drag-handle.is-locked-handle { cursor: default; color: #b7c7c3; display: flex; align-items: center; }
.drag-handle.is-locked-handle .ico { width: 14px; height: 14px; }
body.dark-mode .timeline-node-pin.hub-pin,
body.dark-mode .place-category-badge.is-hub { background: #64748b; }
body.dark-mode .place-item-card.is-hub-card { border-left-color: #64748b; }

/* Daily map pins */
.day-pin { width: 26px; height: 26px; margin: 2px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 12px; border: 2px solid #fff; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3); box-sizing: border-box; }
.day-pin .ico { width: 15px; height: 15px; margin: 0; stroke-width: 2.2; }
.day-pin.day-pin-hotel { width: 30px; height: 30px; margin: 0; border-radius: 9px; background: var(--accent); }
.day-pin.day-pin-hub { width: 30px; height: 30px; margin: 0; background: #334155; }

.transit-connector-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 2px 0;
    margin: -4px 0 -4px 0;
    z-index: 1;
}

.transit-connector-row.mini-connector {
    padding: 1px 0;
}

.timeline-dash-line {
    width: 0;
    height: 12px;
    border-left: 2px dashed rgba(27, 75, 68, 0.35);
    margin: 1px auto;
}

body.dark-mode .timeline-dash-line {
    border-left-color: rgba(255, 255, 255, 0.28);
}

.timeline-dash-line.short {
    height: 10px;
}

.transit-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    color: var(--text);
    padding: 3px 8px 3px 4px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.transit-pill:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: rgba(18, 75, 67, 0.25);
}

.transit-mode-switcher {
    display: inline-flex;
    align-items: center;
    background: var(--primary-light);
    border-radius: 14px;
    padding: 2px;
    gap: 1px;
}

.mode-icon-btn {
    background: none;
    border: none;
    border-radius: 10px;
    padding: 3px 6px;
    font-size: 11px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s ease;
    opacity: 0.55;
    -webkit-tap-highlight-color: transparent;
}

.mode-icon-btn:hover {
    opacity: 0.9;
    transform: scale(1.08);
}

.mode-icon-btn.active {
    background: var(--primary);
    color: #ffffff;
    opacity: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transform: scale(1.04);
}

.transit-estimate-link {
    cursor: pointer;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.transit-estimate-link:hover,
.transit-estimate-link:active {
    color: var(--accent);
    background: rgba(255, 71, 87, 0.08);
}

body.dark-mode .transit-pill {
    background: var(--card-bg);
    color: var(--text);
    border-color: var(--border-subtle);
}

body.dark-mode .transit-mode-switcher {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .mode-icon-btn.active {
    background: var(--primary);
    color: #ffffff;
}

body.dark-mode .transit-estimate-link {
    color: var(--primary);
}

body.dark-mode .transit-estimate-link:hover {
    color: var(--accent);
}

/* --- SEARCH INPUT WRAPPER & 1-TAP CLEAR BUTTON --- */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-input-wrapper .form-control {
    width: 100%;
    padding-right: 36px;
    box-sizing: border-box;
    background-image: none !important;
}

.search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-muted, #728481);
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
    z-index: 6;
    -webkit-tap-highlight-color: transparent;
}

body.dark-mode .search-clear-btn {
    background: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.8);
}

.search-clear-btn:hover,
.search-clear-btn:active {
    background: rgba(0, 0, 0, 0.22);
    color: var(--primary);
    transform: translateY(-50%) scale(1.08);
}

body.dark-mode .search-clear-btn:hover,
body.dark-mode .search-clear-btn:active {
    background: rgba(255, 255, 255, 0.32);
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

/* --- MAP SEGMENT POPUP & MODE CHIPS --- */
.leaflet-interactive {
    cursor: pointer;
}

.map-segment-popup {
    font-family: inherit;
    color: var(--text);
    min-width: 205px;
    padding: 2px 0;
}

.map-segment-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8fa09c;
    font-weight: 700;
    margin-bottom: 3px;
}

.map-segment-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.map-segment-chips {
    display: flex;
    gap: 4px;
    background: var(--primary-light);
    padding: 3px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.segment-mode-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    font-size: 11px;
    padding: 5px 3px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.segment-mode-btn:hover {
    transform: scale(1.04);
}

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

.segment-mode-btn.mode-walk.active {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}

.segment-mode-btn.mode-drive.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}

.segment-mode-btn.mode-transit.active {
    background: #8b5cf6;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(139, 92, 246, 0.3);
}

.map-segment-estimate {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    padding: 6px 10px;
    border-radius: 8px;
}

.map-segment-gmaps-btn {
    width: 100%;
    padding: 7px 10px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.map-segment-gmaps-btn:hover {
    opacity: 0.92;
    transform: scale(1.01);
}

.map-segment-gmaps-btn:active {
    transform: scale(0.98);
}

body.dark-mode .leaflet-popup-content-wrapper,
body.dark-mode .leaflet-popup-tip {
    background: var(--card-bg) !important;
    color: var(--text) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
    border: 1px solid var(--border-subtle);
}

body.dark-mode .map-segment-popup {
    color: var(--text);
}

body.dark-mode .map-segment-chips,
body.dark-mode .map-segment-estimate {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .map-segment-gmaps-btn {
    background: #41b8a6;
    color: #0b1311;
}

/* ==========================================================================
   LIVE GPS BLUE DOT (MAPS)
   ========================================================================== */
.gps-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.gps-user-pulse {
    position: relative;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gps-user-pulse::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(26, 115, 232, 0.4);
    animation: gps-pulse 2s infinite ease-out;
}

.gps-user-dot {
    width: 16px;
    height: 16px;
    background: #1a73e8;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
}

@keyframes gps-pulse {
    0% { transform: scale(0.6); opacity: 1; }
    70% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ==========================================================================
   SMART PACKING CHECKLIST MODAL
   ========================================================================== */
.packing-progress-container {
    background: var(--primary-light);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.packing-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
}

[data-theme="dark"] .packing-progress-track {
    background: rgba(255, 255, 255, 0.12);
}

.packing-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 6px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.packing-pills-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
    scrollbar-width: none;
}

.packing-pill {
    padding: 6px 12px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.packing-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.packing-item-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    margin-bottom: 8px;
    transition: all 0.15s ease;
}

.packing-item-card.is-checked {
    opacity: 0.65;
    background: var(--primary-light);
}

.packing-item-card.is-checked .packing-item-text {
    text-decoration: line-through;
    color: var(--text-light);
}

.packing-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 6px;
}

.packing-item-text {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.packing-category-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--border-subtle);
    padding: 2px 7px;
    border-radius: 8px;
}

.packing-delete-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    font-size: 13px;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.packing-delete-btn:hover {
    opacity: 1;
}

/* ==========================================================================
   PRINTABLE & PDF POCKET ITINERARY
   ========================================================================== */
#printable-itinerary-container {
    display: none;
}

@media print {
    /* Hide everything in the app except the printable itinerary */
    body > *:not(#printable-itinerary-container) {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #111827 !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
        font-size: 11pt !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #printable-itinerary-container {
        display: block !important;
        position: static !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 16px !important;
        box-sizing: border-box !important;
    }

    .print-card {
        border: 1px solid #d1d5db !important;
        border-radius: 8px !important;
        padding: 12px 14px !important;
        margin-bottom: 12px !important;
        page-break-inside: avoid !important;
        background: #ffffff !important;
    }

    .print-header {
        border-bottom: 2px solid #124b43 !important;
        padding-bottom: 12px !important;
        margin-bottom: 16px !important;
    }
}

/* ==========================================================================
   PARTNER ACTION CARDS & AFFILIATE TOOL PILLS
   ========================================================================== */
.travel-partner-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    margin-top: 14px;
    margin-bottom: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.travel-partner-action-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(18, 75, 67, 0.08);
}

.travel-partner-action-card:active {
    transform: scale(0.98);
}

.travel-partner-action-card .action-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.travel-partner-action-card .action-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.travel-partner-action-card .action-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.travel-partner-action-card .action-subtitle {
    font-size: 11px;
    color: var(--text-light, #71837f);
    margin-top: 2px;
    line-height: 1.2;
}

.travel-partner-action-card .action-arrow {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.8;
}

/* --- TRIP SHARING & REALTIME COLLABORATION --- */
.share-modes-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

@media (max-width: 440px) {
    .share-modes-container {
        grid-template-columns: 1fr;
    }
}

.share-mode-card {
    border: 2px solid var(--border-subtle);
    border-radius: 14px;
    padding: 12px 14px;
    background: var(--card-bg, #ffffff);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 84px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.share-mode-card:hover {
    border-color: rgba(18, 75, 67, 0.3);
    transform: translateY(-1px);
}

.share-mode-card.selected {
    border-color: var(--primary);
    background: rgba(18, 75, 67, 0.05);
    box-shadow: 0 4px 14px rgba(18, 75, 67, 0.12);
}

body.dark-mode .share-mode-card.selected {
    background: rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.share-mode-icon {
    font-size: 20px;
    line-height: 1;
}

.share-mode-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.share-mode-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.share-mode-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 8px;
    border-radius: 6px;
    margin-top: 10px;
    align-self: flex-start;
}

.share-mode-badge.copy {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
}

.share-mode-badge.collab {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.share-description-box {
    background: var(--input-bg, #f8fcfb);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-muted);
    margin-top: 10px;
    transition: all 0.2s ease;
}

.collab-badge {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collab-badge:hover {
    background: rgba(37, 99, 235, 0.18);
    transform: scale(1.02);
}

body.dark-mode .collab-badge {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.35);
}

.collab-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
    animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.import-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.import-badge.copy {
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
}

.import-badge.collab {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* --- IPHONE SHARE BUTTON & UNIFIED SHARING SECTION --- */
.ios-share-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light, rgba(18, 75, 67, 0.08));
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.ios-share-action-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 75, 67, 0.18);
}

.ios-share-action-btn:active {
    transform: scale(0.97);
}

.ios-share-action-btn svg {
    stroke-width: 2.3;
    flex-shrink: 0;
}

body.dark-mode .ios-share-action-btn {
    background: rgba(59, 130, 246, 0.14);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

body.dark-mode .ios-share-action-btn:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Trip Card Share Button */
.trip-card-share-btn {
    background: var(--primary-light, rgba(18, 75, 67, 0.08));
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
    border-radius: 8px;
    padding: 7px 9px;
    cursor: pointer;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.trip-card-share-btn:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-1px);
}

body.dark-mode .trip-card-share-btn {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.25);
}

body.dark-mode .trip-card-share-btn:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Modal Header Badge Icon */
.ios-share-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-light, rgba(18, 75, 67, 0.08));
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.dark-mode .ios-share-badge-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* Unified Export & Calendar Section inside Share Modal */
.share-export-section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-subtle, rgba(0, 0, 0, 0.1));
}

.share-export-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #71837f);
    margin-bottom: 8px;
}

.share-export-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 440px) {
    .share-export-grid {
        grid-template-columns: 1fr;
    }
}

.share-export-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.share-export-tile:hover {
    border-color: var(--primary);
    background: var(--primary-light, rgba(18, 75, 67, 0.04));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.share-export-tile:active {
    transform: scale(0.98);
}

body.dark-mode .share-export-tile {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .share-export-tile:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.share-export-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.share-export-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.share-export-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* --- SERVERLESS EDGE AI TRAVEL ASSISTANT WIDGET & MODAL --- */
/* Hero Illustration Graphic - Transparent Integration */
.home-hero-graphic {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin: 4px 0 16px 0;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 14px 28px rgba(18, 75, 67, 0.12));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.home-hero-graphic:hover {
    transform: translateY(-2px) scale(1.02);
    filter: drop-shadow(0 18px 32px rgba(18, 75, 67, 0.18));
}

body.dark-mode .home-hero-graphic {
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.6));
}
.ai-generator-widget {
    width: 100%;
    margin: 0 0 16px 0;
    padding: 12px 14px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    position: relative;
    transition: all 0.25s ease;
}

body.dark-mode .ai-generator-widget {
    background: var(--card-bg, #1a2724);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ai-generator-widget.offline-mode {
    opacity: 0.85;
    border-color: rgba(245, 158, 11, 0.3);
}

.ai-widget-header {
    margin-bottom: 14px;
}

.ai-widget-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ai-sparkle-icon {
    font-size: 18px;
    animation: sparkle-rotate 3s infinite ease-in-out;
}

@keyframes sparkle-rotate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(10deg); }
}

.ai-widget-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.2px;
}

.ai-edge-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f38020, #faad3f);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(243, 128, 32, 0.3);
}

.ai-widget-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

/* AI Search Bar Form */
.ai-search-form {
    width: 100%;
    margin-bottom: 8px;
}

.ai-search-bar {
    display: flex;
    align-items: center;
    background: var(--card-bg, #ffffff);
    border: 1.5px solid var(--border-subtle, rgba(0, 0, 0, 0.1));
    border-radius: 14px;
    padding: 4px 6px 4px 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.ai-search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(18, 75, 67, 0.12), 0 4px 14px rgba(18, 75, 67, 0.08);
}

body.dark-mode .ai-search-bar {
    background: rgba(15, 23, 21, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .ai-search-bar:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.ai-search-icon {
    font-size: 16px;
    color: var(--primary);
    margin-right: 8px;
    flex-shrink: 0;
}

.ai-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--text);
    font-family: inherit;
    padding: 8px 4px;
    min-width: 0;
}

.ai-search-input::placeholder {
    color: var(--text-muted);
    font-size: 12px;
}

.ai-search-input:disabled {
    cursor: not-allowed;
    color: var(--text-muted);
}

.ai-generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 9px 15px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
}

.ai-generate-btn:hover:not(:disabled) {
    background: var(--primary-dark, #0d352f);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 75, 67, 0.25);
}

.ai-generate-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.ai-generate-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Spinner inside button */
.ai-btn-spinner {
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ai-spin 0.8s linear infinite;
}

@keyframes ai-spin {
    to { transform: rotate(360deg); }
}

/* Offline Notification Banner */
.ai-offline-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #b45309;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

body.dark-mode .ai-offline-banner {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.35);
}

/* Suggested Prompt Chips */
.ai-prompt-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.ai-chips-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-right: 2px;
}

.ai-chip {
    background: rgba(18, 75, 67, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.ai-chip:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

body.dark-mode .ai-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .ai-chip:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #60a5fa;
}

/* AI Loading Fullscreen / Card Overlay */
.ai-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ai-loading-card {
    background: var(--card-bg, #ffffff);
    border-radius: 24px;
    padding: 28px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.ai-pulse-orb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 0 24px rgba(18, 75, 67, 0.4);
    animation: orb-pulse 2s infinite ease-in-out;
}

@keyframes orb-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(18, 75, 67, 0.4); }
    50% { transform: scale(1.08); box-shadow: 0 0 35px rgba(59, 130, 246, 0.6); }
}

.ai-loading-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.ai-loading-query {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 18px;
    font-style: italic;
}

/* Shimmer lines */
.ai-shimmer-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
}

.ai-shimmer-line {
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(0,0,0,0.06) 25%, rgba(0,0,0,0.12) 50%, rgba(0,0,0,0.06) 75%);
    background-size: 200% 100%;
    animation: shimmer-swipe 1.6s infinite;
}

body.dark-mode .ai-shimmer-line {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
}

@keyframes shimmer-swipe {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* AI Modal Preview Components */
.ai-stat-chip {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(18, 75, 67, 0.08);
    color: var(--primary);
}

.ai-stat-chip.edge {
    background: rgba(243, 128, 32, 0.12);
    color: #ea580c;
}

body.dark-mode .ai-stat-chip {
    background: rgba(43, 124, 98, 0.25);
    color: #41b8a6;
}

body.dark-mode .ai-stat-chip.edge {
    background: rgba(243, 128, 32, 0.2);
    color: #fb923c;
}

.ai-day-card {
    background: var(--input-bg, #f8fcfb);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

body.dark-mode .ai-day-card {
    background: rgba(255, 255, 255, 0.03);
}

.ai-day-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ai-day-num {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--primary);
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 6px;
}

.ai-day-theme {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.ai-activities-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-activity-item {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 9px 12px;
}

body.dark-mode .ai-activity-item {
    background: rgba(255, 255, 255, 0.04);
}

.ai-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.ai-activity-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.activity-time-badge {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 6px;
    border-radius: 6px;
}

.ai-activity-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.ai-activity-footer {
    margin-top: 4px;
}

.activity-loc-badge {
    font-size: 10px;
    color: var(--text-light, #8fa39f);
    font-weight: 600;
}

/* ==========================================================================
   AI Travel Copilot & Daily Planner Chatbot
   ========================================================================== */
.ai-copilot-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #effaf7, #e0f2fe);
    border: 1.5px solid var(--primary);
    color: var(--primary);
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(18, 75, 67, 0.08);
    white-space: nowrap;
}

.ai-copilot-btn:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 75, 67, 0.2);
}

body.dark-mode .ai-copilot-btn {
    background: rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
    color: #60a5fa;
}

body.dark-mode .ai-copilot-btn:hover {
    background: #3b82f6;
    color: #ffffff;
}

/* Empty State Daily Planner AI Card */
.ai-empty-day-card {
    background: linear-gradient(135deg, rgba(18, 75, 67, 0.04), rgba(59, 130, 246, 0.04));
    border: 1.5px dashed var(--primary);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    margin: 20px 0 16px 0;
}

body.dark-mode .ai-empty-day-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(59, 130, 246, 0.4);
}

.ai-empty-day-icon {
    font-size: 30px;
    margin-bottom: 8px;
    animation: sparkle-rotate 3s infinite ease-in-out;
}

.ai-empty-day-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.ai-empty-day-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 14px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.ai-empty-day-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 9px 18px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(18, 75, 67, 0.2);
    transition: all 0.2s;
}

.ai-empty-day-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(18, 75, 67, 0.3);
}

/* Chatbot Modal & Message Layout */
.ai-copilot-modal-content {
    max-width: 520px !important;
    height: 86vh !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 20px !important;
}

.ai-copilot-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--card-bg, #ffffff);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.ai-copilot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(18, 75, 67, 0.2);
    flex-shrink: 0;
}

.ai-copilot-day-bar {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    overflow-x: auto;
}

body.dark-mode .ai-copilot-day-bar {
    background: rgba(255, 255, 255, 0.02);
}

.ai-copilot-day-chips {
    display: flex;
    gap: 6px;
}

.ai-copilot-day-chip {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border-subtle);
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.ai-copilot-day-chip.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.ai-copilot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg, #fdfbf7);
}

body.dark-mode .ai-copilot-messages {
    background: #0b1114;
}

.ai-msg-row {
    display: flex;
    gap: 8px;
    width: 100%;
}

.ai-msg-row.user {
    justify-content: flex-end;
}

.ai-msg-row.bot {
    justify-content: flex-start;
}

.ai-bubble-user {
    background: var(--primary);
    color: #ffffff;
    border-radius: 16px 16px 4px 16px;
    padding: 10px 14px;
    max-width: 82%;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 2px 6px rgba(18, 75, 67, 0.15);
}

.ai-bubble-bot {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-subtle);
    border-radius: 16px 16px 16px 4px;
    padding: 12px 14px;
    max-width: 90%;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

body.dark-mode .ai-bubble-bot {
    background: #13201d;
}

.ai-chat-card {
    background: var(--input-bg, #f8fcfb);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 8px;
}

body.dark-mode .ai-chat-card {
    background: rgba(255, 255, 255, 0.03);
}

.ai-chat-card-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}

.ai-chat-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 4px 0 8px 0;
}

.ai-card-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.ai-card-add-btn:hover:not(:disabled) {
    background: var(--primary-dark, #0d352f);
    transform: scale(1.02);
}

.ai-card-add-btn.added {
    background: #10b981;
    cursor: default;
}

.ai-add-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary), #2b7c62);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.15s;
}

.ai-add-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(18, 75, 67, 0.25);
}

.ai-copilot-chips-bar {
    padding: 8px 14px 6px 14px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--card-bg, #ffffff);
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.ai-chat-chip {
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 16px;
    background: rgba(18, 75, 67, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.ai-chat-chip:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

body.dark-mode .ai-chat-chip {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .ai-chat-chip:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #60a5fa;
}

.ai-chat-input-form {
    padding: 10px 14px 14px 14px;
    background: var(--card-bg, #ffffff);
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.ai-chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--input-bg, #f4f8f7);
    border: 1.5px solid var(--border-subtle);
    border-radius: 14px;
    padding: 4px 6px 4px 12px;
}

.ai-chat-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(18, 75, 67, 0.1);
}

body.dark-mode .ai-chat-input-wrapper {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .ai-chat-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.ai-chat-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--text);
    font-family: inherit;
    padding: 6px 0;
}

.ai-chat-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 7px 13px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ai-chat-send-btn:hover {
    background: var(--primary-dark);
}

.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px;
    background: var(--bg, #fdfbf7);
}

body.dark-mode .ai-typing-indicator {
    background: #0b1114;
}

.ai-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: typingBounce 1.2s infinite ease-in-out;
}

.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1.1); opacity: 1; }
}

/* Fullscreen List Mode */
.view.list-expanded .map-container,
#places-city-view.list-expanded .map-container,
#wishlist-detail-view.list-expanded .map-container {
    height: 0 !important;
    min-height: 0 !important;
    flex-grow: 0 !important;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
}

.view.list-expanded .sheet,
#places-city-view.list-expanded .sheet,
#wishlist-detail-view.list-expanded .sheet {
    flex-grow: 1 !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    padding-bottom: 90px !important;
}


/* --- DESKTOP / LARGE SCREEN MODALS ---
   On desktop, bottom-anchored sheets put action buttons on the very bottom edge of the
   window, where the Windows taskbar (auto-hide or overlapping PWA windows) can cover them.
   Center modals with breathing room instead, and cap their height to the visible area. */
@media (min-width: 768px) {
    .modal {
        align-items: center;
        padding: 24px;
        box-sizing: border-box;
    }

    .modal-content {
        max-width: 640px;
        max-height: calc(100vh - 48px);
        max-height: calc(100dvh - 48px);
        border-radius: 24px;
        padding-bottom: 28px;
        box-shadow: var(--shadow-lg);
    }

    .ai-copilot-modal-content {
        height: min(86vh, calc(100dvh - 48px)) !important;
    }
}


/* --- Universal back button (shown on every tab except Trips) --- */
#universal-back-btn {
    display: none;
    position: fixed;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: calc(12px + env(safe-area-inset-left, 0px));
    z-index: 1500;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--primary);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    padding: 0 0 4px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
#universal-back-btn:active { transform: scale(0.92); }
body.dark-mode #universal-back-btn {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.12);
}
body.has-back #universal-back-btn { display: flex; }
/* Make room for it in the page headers and in-view back buttons */
body.has-back .view .header-title { padding-left: 64px; }
body.has-back .map-sub-back { left: calc(62px + env(safe-area-inset-left, 0px)) !important; }
body.has-back #places-trip-detail-list > .back-btn { margin-left: 44px; margin-top: env(safe-area-inset-top, 0px); line-height: 40px; }

/* --- Route tab trip switcher --- */
.planner-trip-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}
#planner-trip-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: inherit;
    font-family: 'Outfit', -apple-system, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    padding: 2px 22px 2px 0;
    max-width: 62vw;
    text-overflow: ellipsis;
    cursor: pointer;
}
#planner-trip-select:focus-visible { outline: 2px solid var(--primary); border-radius: 6px; }
#planner-trip-select option { font-size: 16px; color: #111; }
.planner-trip-caret {
    position: absolute;
    right: 4px;
    pointer-events: none;
    font-size: 14px;
    color: var(--primary);
}
body.has-back .map-controls-row { max-width: calc(100% - 90px); }
body.has-back .leaflet-top.leaflet-left { margin-top: calc(50px + env(safe-area-inset-top, 0px)); }

/* Shown on AI Copilot replies that came from the built-in suggestions, not the live AI */
.ai-template-note {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted, #71837f);
    margin-bottom: 6px;
}

/* Keyboard focus ring for tap targets made focusable by js/keyboard-access.js */
[role="button"]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* "Add your free Gemini key" prompts on template AI results */
.ai-key-cta {
    border: 1px dashed var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: left;
}
button.ai-template-note.ai-key-cta { display: block; padding: 6px 10px; border-radius: 10px; font-size: 11px; }

/* Settings → Map Overlay Buttons can hide these */
body.hide-map-btn-trains .map-btn-trains,
body.hide-map-btn-trails .map-btn-trails,
body.hide-map-btn-alltrails .map-btn-alltrails { display: none !important; }

/* Settings → Reduce Motion */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* Daily tab: the city name doubles as the city picker */
.city-title-wrap { position: relative; min-width: 0; flex: 0 1 auto; }
.city-title-picker {
    display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-width: 0;
    background: none; border: 0; padding: 2px 4px 2px 0; margin: 0; font: inherit; color: var(--text);
    border-radius: 10px; -webkit-tap-highlight-color: transparent;
}
.city-title-picker:disabled { cursor: default; opacity: 1; color: var(--text); }
.city-title-text { font-size: 20px; font-weight: 800; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-title-chevron { display: none; flex: none; width: 20px; height: 20px; color: var(--text-light, #64748b); transition: transform 0.2s ease, color 0.2s ease; }
.city-title-picker.has-choices { cursor: pointer; }
.city-title-picker.has-choices .city-title-chevron { display: block; }
.city-title-picker[aria-expanded="true"] .city-title-chevron { transform: rotate(180deg); color: var(--primary); }
.city-title-picker:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.city-menu {
    position: absolute; top: calc(100% + 8px); left: -6px; z-index: 1200;
    min-width: 240px; max-width: min(320px, calc(100vw - 32px)); max-height: 50vh; overflow-y: auto;
    padding: 6px; background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08);
    opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top left;
    pointer-events: none; visibility: hidden;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}
.city-menu.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 0.16s ease, transform 0.16s ease; }
.city-menu-item {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    background: none; border: 0; border-radius: 11px; padding: 9px 10px; margin: 0;
    font: inherit; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.city-menu-item:hover, .city-menu-item:focus-visible { background: var(--bg); outline: none; }
.city-menu-item.current { background: var(--primary-light); }
.city-menu-num {
    flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
    font-size: 11px; font-weight: 800; color: var(--text-light, #64748b); background: var(--bg); border: 1px solid var(--border-subtle);
}
.city-menu-item.current .city-menu-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.city-menu-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.city-menu-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-menu-when { font-size: 11.5px; color: var(--text-light, #64748b); margin-top: 1px; }
.city-menu-check { flex: none; width: 18px; height: 18px; color: var(--primary); }

.empty-day-note { text-align: center; font-size: 13px; color: var(--text-light, #64748b); padding: 18px 12px 6px; }

/* Line icons (inline sprite in index.html) */
.ico { width: 1.2em; height: 1.2em; flex: none; vertical-align: -0.22em; margin-right: 0.4em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.ico-only { margin-right: 0; }

/* Map buttons: clean icon + label pills */
.map-btn { height: 34px; padding: 0 13px; font-weight: 650; font-size: 12.5px; border: 1px solid rgba(15, 23, 42, 0.08); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.06); }
.map-btn .ico { margin-right: 0; width: 17px; height: 17px; opacity: 0.85; }
.map-btn:hover { transform: none; }
.map-btn.layers-active { color: var(--primary); border-color: currentColor; }

/* Layers menu */
.map-layers-wrap { position: relative; pointer-events: auto; }
.map-layers-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 1100; min-width: 210px; padding: 6px;
    background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08);
    opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top right; visibility: hidden; pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}
.map-layers-menu.open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity 0.16s ease, transform 0.16s ease; }
.layers-item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; margin: 0; border: 0; border-radius: 11px;
    background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.layers-item:hover, .layers-item:focus-visible { background: var(--bg); outline: none; }
.layers-item .ico { margin-right: 0; width: 19px; height: 19px; color: var(--text-light, #64748b); }
.layers-label { flex: 1; white-space: nowrap; }
.layers-state { font-size: 12px; font-weight: 700; color: var(--text-light, #64748b); padding: 3px 9px; border-radius: 999px; background: var(--bg); }
.layers-state.on { background: var(--primary); color: #fff; }
.layers-item .layers-ext { width: 15px; height: 15px; }
body.hide-map-btn-trains.hide-map-btn-trails .map-layers-wrap:not(.has-alltrails):not(.has-explore),
body.hide-map-btn-trains.hide-map-btn-trails.hide-map-btn-alltrails .map-layers-wrap.has-alltrails { display: none; }
.map-btn.map-btn-icon { width: 34px; padding: 0; justify-content: center; }

/* Explore layers: sights, famous places, neighborhoods, metro (js/explore-layers.js) */
.explore-pin-icon { background: none; border: 0; }
.explore-pin { width: 26px; height: 26px; margin: 1px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: var(--pin); border: 2px solid var(--pin); box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25); box-sizing: border-box; }
.explore-pin .ico { width: 14px; height: 14px; margin: 0; stroke-width: 2.2; }
.explore-pin.is-notable { background: var(--pin); color: #fff; }
.famous-pin { display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2.5px solid #fff; background: #c2410c center / cover no-repeat; color: #fff; box-shadow: 0 0 0 2px #c2410c, 0 3px 10px rgba(15, 23, 42, 0.35); box-sizing: border-box; }
.famous-pin .ico { width: 16px; height: 16px; margin: 0; }
.explore-area-icon { background: none; border: 0; }
.explore-area-label { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--area); border: 1.5px solid var(--area); font-size: 11.5px; font-weight: 800; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18); cursor: pointer; }
.explore-low-zoom .explore-area-label { display: none; }
.explore-popup .leaflet-popup-content { margin: 12px 14px; }
.explore-pop { min-width: 190px; font-family: inherit; }
.explore-pop-img { height: 110px; margin: -2px 0 8px; border-radius: 10px; background: #e2e8f0 center / cover no-repeat; }
.explore-pop-kind { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 2px; }
.explore-pop-title { display: block; font-size: 15px; color: var(--text); line-height: 1.25; }
.explore-pop-local { font-size: 13px; color: var(--text-light, #64748b); margin-top: 2px; }
.explore-pop-desc { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--text); }
.explore-pop-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.explore-pop-add { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.explore-pop-add .ico { width: 14px; height: 14px; margin: 0; }
.explore-pop-links { display: flex; gap: 10px; font-size: 12px; font-weight: 700; }
.explore-pop-links a { color: var(--primary); text-decoration: none; }

/* Trip Budget: summary, tabs and estimator */
.budget-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.budget-summary-col { background: var(--primary-light); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.budget-summary-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--primary); opacity: 0.8; }
.budget-summary-value { font-size: 22px; font-weight: 800; color: var(--primary); margin: 2px 0; }
.budget-summary-sub { font-size: 12px; color: var(--text-light, #64748b); }
.budget-tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--border-subtle); border-radius: 12px; margin-bottom: 14px; }
.budget-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--text-light, #64748b); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.budget-tab .ico { margin-right: 0; width: 16px; height: 16px; }
.budget-tab.active { background: var(--card-bg); color: var(--primary); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1); }
.budget-style-row { display: flex; gap: 6px; margin-bottom: 12px; }
.budget-style-chip { flex: 1; height: 32px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--card-bg); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.budget-style-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.budget-stop { background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 4px 12px 6px; margin-bottom: 10px; }
.budget-stop-head { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 6px; border-bottom: 1px solid var(--border-subtle); }
.budget-stop-name { font-size: 15px; font-weight: 800; color: var(--text); }
.budget-country { font-size: 10px; font-weight: 800; color: var(--text-light, #64748b); background: var(--bg); border-radius: 5px; padding: 1px 5px; margin-left: 4px; vertical-align: 2px; }
.budget-stop-sub { font-size: 14px; font-weight: 800; color: var(--primary); }
.budget-line { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.budget-line:last-child { border-bottom: 0; }
.budget-line.off .budget-line-text, .budget-line.off .budget-line-ico { opacity: 0.45; }
.budget-line-check input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; cursor: pointer; }
.budget-line-ico { margin-right: 0; width: 18px; height: 18px; color: var(--text-light, #64748b); }
.budget-line-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.budget-line-label { font-size: 13.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.budget-line-detail { font-size: 11px; color: var(--text-light, #64748b); }
.budget-reset { border: 0; background: none; padding: 0; color: var(--primary); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.budget-line-amount { width: 74px; flex: none; text-align: right; font: inherit; font-size: 16px; font-weight: 800; color: var(--text); background: var(--bg); border: 1px solid var(--border-subtle); border-radius: 9px; padding: 5px 8px; }
.budget-line-amount.custom { border-color: var(--primary); color: var(--primary); }
.budget-line-amount:disabled { opacity: 0.45; }
.budget-to-expenses { width: 100%; display: inline-flex; align-items: center; justify-content: center; height: 42px; margin-top: 4px; border-radius: 12px; border: 1px solid var(--primary); background: var(--primary-light); color: var(--primary); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.budget-note, .budget-empty { font-size: 11.5px; color: var(--text-light, #64748b); text-align: center; margin: 10px 0 0; }

/* Trip Budget: Shared | Personal switch on each expense */
.expense-split-toggle { display: inline-flex; gap: 2px; padding: 2px; margin-top: 4px; background: var(--bg); border: 1px solid var(--border-subtle); border-radius: 999px; }
.expense-split-toggle button { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--text-light, #64748b); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.expense-split-toggle button .ico { margin-right: 0; width: 13px; height: 13px; }
.expense-split-toggle button.on { background: var(--primary); color: #fff; }
.expense-share-note { display: block; font-size: 11px; color: var(--text-light, #64748b); margin-top: 3px; }

/* Budget tracker: people, progress, pace, categories, expense rows, settle up */
.label-hint { font-weight: 500; font-size: 11px; color: var(--text-light, #64748b); text-transform: none; letter-spacing: 0; }
.budget-people { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.budget-person { width: auto; min-width: 0; flex: 1 1 88px; max-width: 150px; height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--card-bg); color: var(--text); font: inherit; font-size: 16px; font-weight: 700; text-align: center; }
.budget-person:focus { outline: none; border-color: var(--primary); }
.budget-progress { margin: -4px 0 14px; }
.budget-bar { height: 8px; border-radius: 999px; background: var(--border-subtle); overflow: hidden; }
.budget-bar span { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.3s; }
.budget-bar.over span { background: var(--accent, #e11d48); }
.budget-bar-text { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; color: var(--text-light, #64748b); margin-top: 4px; }
.budget-pace { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text); margin-top: 8px; }
.budget-pace .ico { margin-right: 0; width: 15px; height: 15px; color: var(--primary); }
.budget-cat-bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; margin-top: 10px; gap: 2px; }
.budget-cat-bar span { display: block; min-width: 3px; }
.budget-cat-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 11px; color: var(--text-light, #64748b); }
.budget-cat-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.budget-spent { font-size: 11px; font-weight: 700; color: var(--primary); }
.budget-spent.over, .budget-stop-spent.over { color: var(--accent, #e11d48); }
.budget-stop-spent { font-size: 12px; font-weight: 700; color: var(--text-light, #64748b); }
.budget-line-extra { padding-left: 26px; }
.budget-h3 { font-size: 15px; margin: 16px 0 8px; }
.budget-link-btn { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--card-bg); color: var(--primary); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; flex: none; }
.budget-link-btn .ico { margin-right: 0; width: 14px; height: 14px; }
.budget-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border-subtle); background: var(--card-bg); color: var(--text-light, #64748b); cursor: pointer; flex: none; }
.budget-icon-btn .ico { width: 15px; height: 15px; }
.budget-icon-btn.danger { color: var(--accent, #e11d48); }
.expense-form .form-row { gap: 8px; }
.expense-form .form-group { margin-bottom: 8px; }
.expense-split-with { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.expense-split-with:empty { display: none; }
.expense-split-label { font-size: 12px; font-weight: 700; color: var(--text-light, #64748b); margin-right: 2px; }
.split-chip { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--card-bg); color: var(--text-light, #64748b); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.split-chip.on { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.expense-row { display: flex; align-items: flex-start; gap: 10px; background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.expense-row.editing { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.expense-cat { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; color: var(--cat); background: color-mix(in srgb, var(--cat) 14%, transparent); }
.expense-cat .ico { width: 17px; height: 17px; }
.expense-body { flex: 1; min-width: 0; }
.expense-main { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.expense-main strong { font-size: 14px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-meta { font-size: 11.5px; color: var(--text-light, #64748b); margin-top: 1px; }
.expense-right { flex: none; display: flex; align-items: center; gap: 8px; }
.expense-right strong { font-size: 15px; color: var(--primary); }
.settle-people { display: grid; gap: 8px; }
.settle-person { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name bal" "sub bal"; align-items: center; background: var(--card-bg); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 10px 14px; }
.settle-name { grid-area: name; font-size: 14px; font-weight: 800; color: var(--text); }
.settle-sub { grid-area: sub; font-size: 11.5px; color: var(--text-light, #64748b); }
.settle-bal { grid-area: bal; font-size: 13px; font-weight: 800; color: var(--text-light, #64748b); }
.settle-bal.pos { color: #16a34a; }
.settle-bal.neg { color: var(--accent, #e11d48); }
.settle-transfer { display: flex; align-items: center; gap: 10px; background: var(--primary-light); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; font-size: 13.5px; color: var(--text); }
.settle-transfer > span { flex: 1; min-width: 0; }
.settle-transfer.muted { background: var(--card-bg); color: var(--text-light, #64748b); }
.settle-amt { font-size: 15px; color: var(--primary); }
/* Inline expense editing */
.expense-row { flex-wrap: wrap; }
.expense-inline { width: 100%; min-width: 0; padding: 2px 4px; margin: -2px -4px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 16px; font-weight: 700; text-overflow: ellipsis; }
.expense-inline:hover { border-color: var(--border-subtle); }
.expense-inline:focus { outline: none; border-color: var(--primary); background: var(--bg); }
.expense-inline-amount { display: inline-flex; align-items: center; font-size: 15px; font-weight: 800; color: var(--primary); }
.expense-inline-amount .expense-inline { width: 78px; margin: -2px 0 -2px 1px; text-align: right; color: var(--primary); font-weight: 800; }
.expense-meta-btn { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; padding: 0; margin-top: 1px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.expense-meta-btn .expense-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-chev { width: 13px; height: 13px; flex: none; color: var(--text-light, #64748b); transition: transform 0.2s; }
.expense-meta-btn[aria-expanded="true"] .expense-chev { transform: rotate(180deg); }
.expense-details { flex-basis: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 10px; margin-top: 2px; border-top: 1px solid var(--border-subtle); }
.expense-edit-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.expense-edit-field span { font-size: 11px; font-weight: 700; color: var(--text-light, #64748b); }
.expense-edit-field .form-control { height: 38px; padding: 0 10px; font-size: 16px; }
.expense-details .expense-split-with { grid-column: 1 / -1; margin: 0; }
/* Travel-leg cost card (estimate → budget plan, paid → expenses) */
.leg-cost-card { background: var(--primary-light); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 10px 12px; margin: 0 0 14px; }
.leg-cost-card input { font-size: 16px; font-weight: 700; }
.leg-cost-hint { display: flex; align-items: flex-start; gap: 6px; margin: 8px 0 0; font-size: 11.5px; line-height: 1.35; color: var(--text-light, #64748b); }
.leg-cost-hint .ico { flex: none; width: 14px; height: 14px; margin: 1px 0 0; color: var(--primary); }
/* Editable rate inside an estimate line ("4 nights × 1 room × [$150]/night") */
.budget-line-detail { line-height: 1.9; }
.budget-rate { display: inline-flex; align-items: center; height: 24px; padding: 0 2px 0 6px; margin: 0 1px; border: 1px solid var(--border-subtle); border-radius: 7px; background: var(--bg); color: var(--text); font-weight: 700; vertical-align: middle; }
.budget-rate input { width: 46px; height: 22px; padding: 0 2px; border: 0; background: none; color: inherit; font: inherit; font-size: 16px; font-weight: 700; transform-origin: left center; }
.budget-rate input:focus { outline: none; }
.budget-rate:focus-within { border-color: var(--primary); }
.budget-rate.custom { border-color: var(--primary); color: var(--primary); }
.budget-rate input:disabled { opacity: 0.5; }

/* Full-page AI screens (planner, plan preview, copilot chat). Closed only by their X / Back,
   never by a tap outside or a swipe, so a half-written prompt or chat isn't lost. */
.modal.ai-fullscreen { align-items: stretch; justify-content: center; padding: 0; }
.modal.ai-fullscreen > .modal-content {
    width: 100%; max-width: 100% !important; height: 100% !important; max-height: none !important;
    border-radius: 0 !important; margin: 0; box-shadow: none;
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
    display: flex; flex-direction: column;
}
.modal.ai-fullscreen > .modal-content > .close-modal { top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; width: 36px; height: 36px; font-size: 18px; }
.modal.ai-fullscreen > .ai-copilot-modal-content { padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px) !important; }
#ai-trip-modal.ai-fullscreen #ai-modal-timeline { max-height: none !important; }
@media (min-width: 768px) {
    .modal.ai-fullscreen { padding: 20px; }
    .modal.ai-fullscreen > .modal-content { max-width: 960px !important; border-radius: 22px !important; box-shadow: var(--shadow-lg); }
}
.ai-planner-page { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.ai-planner-page > * { width: 100%; max-width: 640px; margin-left: auto; margin-right: auto; }
.ai-planner-page > .close-modal { width: 36px; margin: 0; }
.ai-planner-history { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.ai-planner-history:empty { display: none; }
.ai-last-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--primary); background: var(--primary-light); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ai-last-plan-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--primary); }
.ai-last-plan strong { font-size: 15px; }
.ai-last-plan-sub { font-size: 12px; color: var(--text-light, #64748b); }
.ai-recent-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-light, #64748b); margin: 8px 0 0; }
.ai-recent-item { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border-subtle); background: var(--card-bg); color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.ai-recent-item:active { background: var(--primary-light); }
.budget-rate-wrap { white-space: nowrap; }

/* Saved AI plans, comparison, full-window toggle */
#ai-compare-modal { z-index: 5001; }
#ai-trip-modal { z-index: 5002; }
.ai-wide-btn { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.06); background: rgba(0, 0, 0, 0.05); color: var(--text-light); cursor: pointer; padding: 0; }
.ai-wide-btn .ico { width: 17px; height: 17px; }
.modal-content > .ai-wide-btn { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: 60px; z-index: 10; }
.ai-wide-btn-inline { width: 32px; height: 32px; }
@media (min-width: 768px) {
    .ai-wide-btn { display: inline-flex; }
    body.ai-wide .modal.ai-fullscreen { padding: 0; }
    body.ai-wide .modal.ai-fullscreen > .modal-content { max-width: 100% !important; border-radius: 0 !important; }
    body.ai-wide .ai-wide-btn { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
}
.ai-recent-title span { font-weight: 600; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.ai-plan-card { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 14px; border: 1px solid var(--border-subtle); background: var(--card-bg); }
.ai-plan-card.selected { border-color: var(--primary); background: var(--primary-light); }
.ai-plan-check { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border-subtle); background: var(--card-bg); color: #fff; cursor: pointer; padding: 0; }
.ai-plan-card.selected .ai-plan-check { background: var(--primary); border-color: var(--primary); }
.ai-plan-check .ico { width: 15px; height: 15px; }
.ai-plan-open { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 2px 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ai-plan-open strong { font-size: 14px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-plan-open span { font-size: 11.5px; color: var(--text-light, #64748b); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-compare-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border-radius: 12px; border: 0; background: var(--primary); color: #fff; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.ai-compare-btn .ico { margin-right: 0; }
.ai-compare-page { padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); }
.ai-cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: start; }
.ai-cmp-cell { min-width: 0; padding: 10px; border-radius: 12px; border: 1px solid var(--border-subtle); background: var(--card-bg); font-size: 12.5px; line-height: 1.4; }
.ai-cmp-head { display: flex; flex-direction: column; gap: 4px; background: var(--primary-light); border-color: var(--primary); }
.ai-cmp-head strong { font-size: 14.5px; line-height: 1.25; }
.ai-cmp-dest { font-size: 12px; font-weight: 700; color: var(--primary); }
.ai-cmp-stats { font-size: 11.5px; font-weight: 700; color: var(--text-light, #64748b); }
.ai-cmp-summary { font-size: 12px; color: var(--text); }
.ai-cmp-day { grid-column: 1 / -1; margin-top: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-light, #64748b); }
.ai-cmp-theme { display: block; font-weight: 800; margin-bottom: 4px; }
.ai-cmp-cell ul { margin: 0; padding-left: 16px; }
.ai-cmp-cell li { margin: 2px 0; }
.ai-cmp-time { font-size: 10.5px; font-weight: 700; color: var(--primary); margin-right: 4px; }
.ai-cmp-empty { text-align: center; color: var(--text-light, #64748b); }
.ai-cmp-foot { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 6px 0 0; background: none; }
.ai-cmp-foot .save-btn { margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 13px; padding: 10px 6px; }
.ai-cmp-foot .budget-link-btn { justify-content: center; }
@media (min-width: 768px) { .ai-cmp-cell { font-size: 13.5px; } .ai-cmp-grid { gap: 10px 16px; } }

/* Plan my days (js/day-planner.js) */
.day-plan-card { background: var(--primary-light); border: 1px solid var(--border-subtle); border-radius: 16px; padding: 12px 14px; margin: 0 0 18px; }
.day-plan-card-head { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--primary); }
.day-plan-card-head .ico { margin-right: 0; }
.day-plan-card-hint { font-size: 12px; line-height: 1.4; color: var(--text-light, #64748b); margin: 4px 0 8px; }
.day-plan-card textarea { font-size: 16px; min-height: 96px; }
.day-plan-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.day-plan-go { width: auto; margin: 0; padding: 10px 16px; display: inline-flex; align-items: center; gap: 6px; }
.day-plan-go .ico { margin-right: 0; }
.day-notes-heading { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-light, #64748b); margin: 0 0 8px; }
.day-plan-page { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: 0 !important; }
.day-plan-page > * { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }
.day-plan-page > .close-modal { width: 36px; }
.day-plan-title { margin: 0 44px 2px 0 !important; font-size: 20px; font-weight: 800; }
.day-plan-sub { font-size: 12.5px; color: var(--text-light, #64748b); margin: 0 0 12px; }
.day-plan-body { flex: 1; }
.day-plan-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 0; font-size: 14px; font-weight: 700; color: var(--text-light, #64748b); }
.dp-day { border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--card-bg); padding: 4px 12px 10px; margin-bottom: 12px; }
.dp-day.packed { border-color: #f59e0b; }
.dp-day-head { display: flex; flex-direction: column; padding: 10px 0 8px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 6px; }
.dp-day-head strong { font-size: 15px; }
.dp-day-head span { font-size: 12px; color: var(--text-light, #64748b); }
.dp-day.packed .dp-day-head span { color: #b45309; }
.dp-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; }
.dp-time { flex: none; width: 66px; font-size: 12.5px; font-weight: 800; color: var(--primary); padding-top: 1px; }
.dp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dp-main strong { font-size: 14px; line-height: 1.3; }
.dp-meta { font-size: 11.5px; color: var(--text-light, #64748b); }
.dp-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dp-controls select { height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border-subtle); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.dp-meal .dp-main strong, .dp-meal .dp-time { color: #b45309; }
.dp-fixed { opacity: 0.6; }
.dp-travel { display: flex; align-items: center; gap: 4px; margin-left: 76px; font-size: 11px; color: var(--text-light, #64748b); }
.dp-travel .ico { width: 13px; height: 13px; margin-right: 0; }
.dp-empty { font-size: 12.5px; color: var(--text-light, #64748b); margin: 8px 0 4px; }
.dp-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; padding: 10px 12px; border-radius: 12px; background: var(--primary-light); margin-bottom: 8px; }
.dp-note .ico { flex: none; margin: 1px 0 0; width: 16px; height: 16px; color: var(--primary); }
.dp-note.warn { background: rgba(245, 158, 11, 0.12); }
.dp-note.warn .ico { color: #b45309; }
.day-plan-footer { position: sticky; bottom: 0; background: var(--card-bg); border-top: 1px solid var(--border-subtle); padding: 10px 0 calc(12px + env(safe-area-inset-bottom, 0px)); margin-top: 8px; }
.day-plan-footer:empty { display: none; }
.dp-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); margin-bottom: 8px; }
.dp-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.dp-actions { display: flex; gap: 8px; }
.dp-actions .btn-secondary { margin: 0; flex: 0 0 auto; }
.dp-actions .save-btn { margin: 0; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.dp-actions .save-btn .ico { margin-right: 0; }
.dp-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 12px; }
.dp-done > .ico { width: 40px; height: 40px; color: #fff; background: var(--primary); border-radius: 50%; padding: 8px; }
.dp-done strong { font-size: 17px; }
.dp-done span { font-size: 13px; color: var(--text-light, #64748b); max-width: 420px; }
.dp-free { margin: 2px 0 2px 76px; padding: 6px 10px; border-radius: 9px; background: var(--bg); font-size: 11.5px; color: var(--text-light, #64748b); }
/* Plan my days: editable rows (rename with place search, retime, swipe left to remove) */
.dp-time { width: 80px; padding-left: 5px; }
.dp-travel { margin-left: 90px; }
.dp-free { margin-left: 90px; }
.dp-notes { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.dp-controls select { padding: 0 4px 0 8px; }
.dp-controls .dp-remove { margin-left: auto; }
.dp-swipe { position: relative; overflow: hidden; border-radius: 12px; touch-action: pan-y; }
.dp-swipe-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-right: 18px; background: #f87171; color: #fff; font-size: 13px; font-weight: 800; border-radius: 12px; opacity: 0; transition: opacity 0.12s ease, background 0.12s ease; }
.dp-swipe-bg .ico { width: 17px; height: 17px; margin: 0; }
.dp-swipe.is-swiping .dp-swipe-bg, .dp-swipe.is-removing .dp-swipe-bg { opacity: 1; }
.dp-swipe.will-remove .dp-swipe-bg { background: #dc2626; }
.dp-swipe > .dp-row { position: relative; background: var(--card-bg); transition: transform 0.18s ease; }
.dp-swipe.is-swiping > .dp-row { transition: none; }
.dp-time-input { flex: none; width: 80px; height: 30px; padding: 0 4px; margin: 0; border: 1px dashed transparent; border-radius: 8px; background: transparent; color: var(--primary); font: inherit; font-size: 13px; font-weight: 800; -webkit-appearance: none; appearance: none; text-align: left; cursor: pointer; }
.dp-time-input::-webkit-date-and-time-value { text-align: left; }
.dp-time-input::-webkit-calendar-picker-indicator { display: none; }
.dp-time-input:hover, .dp-time-input:focus { border-color: var(--border-subtle); background: var(--bg); outline: none; }
.dp-time-input.is-set { background: var(--primary-light); border: 1px solid transparent; }
.dp-name-wrap { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.dp-name-wrap > .dp-name-input { flex: 1; }
.dp-name-wrap > .dp-ac { flex-basis: 100%; }
.dp-name-input { width: 100%; min-width: 0; height: 30px; padding: 0 6px; margin: 0 0 0 -6px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 16px; font-weight: 700; text-overflow: ellipsis; }
.dp-name-input:hover { border-color: var(--border-subtle); }
.dp-name-input:focus { border-color: var(--primary); background: var(--bg); outline: none; text-overflow: clip; }
.dp-tag { font-size: 10.5px; font-weight: 800; color: var(--primary); background: var(--primary-light); border-radius: 6px; padding: 2px 6px; letter-spacing: 0.02em; }
.dp-auto { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--card-bg); color: var(--text-light, #64748b); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.dp-auto .ico { width: 13px; height: 13px; margin: 0; }
.dp-ac { display: flex; flex-direction: column; margin: 4px 0 2px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--card-bg); box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14); overflow: hidden; }
.dp-ac-item { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-bottom: 1px solid var(--border-subtle); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.dp-ac-item:last-child { border-bottom: 0; }
.dp-ac-item:hover, .dp-ac-item.is-active { background: var(--primary-light); }
.dp-ac-item .ico { flex: none; width: 15px; height: 15px; margin: 2px 0 0; color: var(--primary); }
.dp-ac-item span { display: flex; flex-direction: column; min-width: 0; }
.dp-ac-item strong { font-size: 14px; line-height: 1.3; }
.dp-ac-item small { font-size: 11.5px; color: var(--text-light, #64748b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-ac-plain strong { font-weight: 600; }
.dp-add { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 2px; padding: 0 10px; border: 1px dashed var(--border-subtle); border-radius: 12px; }
.dp-add > .ico { flex: none; width: 16px; height: 16px; margin: 0; color: var(--primary); }
.dp-add-input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.dp-add:focus-within { border-style: solid; border-color: var(--primary); }
.dp-add > .dp-ac { flex-basis: 100%; margin: 0 -10px; border-radius: 0 0 12px 12px; border-width: 1px 0 0; box-shadow: none; }
.dp-unfit { border-style: dashed; }
.dp-unfit .dp-row { align-items: center; }
.dp-undo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: #1d2b29; color: #fff; font-size: 13px; font-weight: 600; }
.dp-undo[hidden] { display: none; }
.dp-undo span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-undo button { flex: none; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.16); color: #6ee7b7; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.dp-actions .save-btn:disabled { opacity: 0.55; }
/* Daily: stop times on cards, place suggestions in the add / edit forms */
.place-time { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 2px; font-size: 12px; font-weight: 800; color: var(--primary); }
.place-time .ico { width: 13px; height: 13px; margin: 0; }
.place-suggest { position: relative; z-index: 5; }
.search-result-typed strong { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.search-result-typed strong .ico { width: 15px; height: 15px; margin: 0; color: var(--primary); }
.edit-poi-when { gap: 8px; }
.edit-poi-when .form-control { padding-left: 10px; padding-right: 6px; }

/* Daily tab tool row + Day trips page (js/day-trips.js) */
.places-tool-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.places-tool-row .optimize-btn { margin-bottom: 0; padding: 11px 10px; white-space: nowrap; }
.dt-card { border: 1px solid var(--border-subtle); border-radius: 16px; background: var(--card-bg); padding: 12px 14px; margin-bottom: 12px; }
.dt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dt-head strong { display: block; font-size: 16px; }
.dt-area { display: block; font-size: 12px; color: var(--text-light, #64748b); }
.dt-badge { flex: none; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--primary-light); color: var(--primary); }
.dt-badge.night { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.dt-travel { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 12.5px; line-height: 1.4; color: var(--text); }
.dt-travel .ico { flex: none; margin: 1px 0 0; width: 16px; height: 16px; color: var(--primary); }
.dt-why { font-size: 13px; line-height: 1.45; margin: 8px 0 0; }
.dt-highlights { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.dt-highlights span { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border-subtle); }
.dt-tip { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--text-light, #64748b); margin: 8px 0 0; }
.dt-tip .ico { flex: none; width: 14px; height: 14px; margin: 1px 0 0; }
.dt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-subtle); }
.dt-actions select { height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border-subtle); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.dt-actions a.budget-link-btn { text-decoration: none; }
.dt-message { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 12px; }
.dt-message > .ico { width: 36px; height: 36px; color: var(--primary); }
.dt-message strong { font-size: 16px; }
.dt-message span { font-size: 13px; color: var(--text-light, #64748b); max-width: 420px; line-height: 1.45; }
.dt-message .save-btn { width: auto; padding: 10px 18px; margin-top: 6px; }

/* --- DESKTOP: keep controls out of the taskbar zone ---
   On Windows with an auto-hiding taskbar the browser fills the whole screen and the taskbar pops up over
   the bottom ~48px whenever the mouse nears the edge, covering the nav bar and the last button in popups.
   With a mouse on a wide window, everything that sits at the bottom moves up by that much. */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    .bottom-nav { bottom: 62px; }
    .fab { bottom: 142px; }
    #wishlist-expand-fab { bottom: 140px; }
    .view { padding-bottom: 170px; }
    .sheet { padding-bottom: 220px; }
    #places-city-view.list-expanded .sheet,
    #wishlist-detail-view.list-expanded .sheet { padding-bottom: 140px !important; }
    #sidebar-drawer { padding-bottom: 72px; }
    .modal { padding-bottom: 72px; }
    .modal-content { max-height: calc(100dvh - 96px); }
    .modal.ai-fullscreen { padding-bottom: 64px; }
    body.ai-wide .modal.ai-fullscreen { padding-bottom: 56px; }
}
.dp-meta.dp-warn { color: #b45309; font-weight: 700; }

/* AI plan preview: route, tips */
.ai-route-card { border: 1px solid var(--border-subtle); background: var(--primary-light); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.ai-route-stop { display: flex; flex-direction: column; }
.ai-route-stop strong { font-size: 14px; }
.ai-route-stop span { font-size: 12px; color: var(--text-light, #64748b); }
.ai-route-leg { display: flex; align-items: center; gap: 6px; margin: 6px 0 6px 6px; padding-left: 10px; border-left: 2px dashed var(--primary); font-size: 12px; color: var(--text); }
.ai-route-leg .ico { width: 14px; height: 14px; margin-right: 0; color: var(--primary); flex: none; }
.ai-activity-tip { font-size: 11.5px; color: var(--primary); margin-top: 3px; }
.ai-tips-card { border: 1px solid var(--border-subtle); border-radius: 14px; padding: 10px 12px; margin-top: 4px; font-size: 12.5px; }
.ai-tips-card ul { margin: 6px 0 0; padding-left: 18px; }
.ai-tips-card li { margin: 3px 0; }

/* Empty trip on the Route tab */
.route-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 22px 16px; border: 1.5px dashed var(--border-subtle); border-radius: 18px; margin: 4px 0 12px; }
.route-empty strong { font-size: 17px; }
.route-empty span { font-size: 13px; color: var(--text-light, #64748b); max-width: 360px; line-height: 1.45; }
.route-empty .save-btn { width: auto; padding: 11px 20px; margin: 6px 0 0; }

/* AI plan: flights card + hotel ideas */
.ai-flight-card { border: 1px solid var(--border-subtle); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; background: var(--card-bg); }
.ai-flight-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.ai-flight-head .ico { color: var(--primary); }
.ai-flight-head span { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--primary); }
.ai-flight-note { font-size: 12px; color: var(--text-light, #64748b); margin: 3px 0 4px; }
.ai-flight-leg { font-size: 12.5px; margin: 3px 0; }
.ai-flight-leg b { display: inline-block; min-width: 42px; color: var(--text-light, #64748b); font-weight: 700; }
.ai-flight-link { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--primary); text-decoration: none; }
.ai-route-hotels { display: flex; align-items: flex-start; gap: 5px; font-size: 11.5px; color: var(--text-light, #64748b); margin: 2px 0 2px; }
.ai-route-hotels .ico { width: 13px; height: 13px; margin: 1px 0 0; flex: none; }
.hotel-ideas { border: 1px dashed var(--border-subtle); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.hotel-ideas-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-light, #64748b); margin-bottom: 6px; }
.hotel-idea { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--border-subtle); }
.hotel-idea:first-of-type { border-top: 0; }
.hotel-idea-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hotel-idea-info strong { font-size: 13px; }
.hotel-idea-info span { font-size: 11.5px; color: var(--text-light, #64748b); }
.hotel-idea-btn { flex: none; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--primary); color: var(--primary); background: var(--card-bg); text-decoration: none; cursor: pointer; }
.hotel-idea-btn.primary { background: var(--primary); color: #fff; }

/* Travel profile */
#travel-profile-modal { z-index: 5005; }
.tp-field { margin-bottom: 14px; }
.tp-label { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light, #64748b); margin-bottom: 6px; }
.tp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-pills .type-pill { margin: 0; padding: 6px 12px; font-size: 12.5px; }
.tp-toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.tp-summary-btn { display: flex; align-items: center; gap: 6px; width: 100%; margin: 10px 0 0; padding: 8px 12px; border: 1px dashed var(--border-subtle); border-radius: 12px; background: transparent; color: var(--text); font-size: 12.5px; text-align: left; cursor: pointer; }
.tp-summary-btn > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-summary-btn .tp-edit { font-weight: 700; color: var(--primary); }

/* AI plan: edit by chat */
.ai-refine { padding-top: 8px; border-top: 1px solid var(--border-subtle); }
.ai-refine-bar { display: flex; gap: 8px; }
.ai-refine-bar .form-control { flex: 1; min-width: 0; margin: 0; font-size: 14px; }
.ai-refine-btn { flex: none; width: 44px; border: 0; border-radius: 12px; background: var(--primary); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ai-refine-btn:disabled { opacity: 0.5; cursor: default; }
.ai-refine-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.ai-refine-chips .ai-chip { flex: none; margin: 0; }
.ai-refine-status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); margin-bottom: 8px; }
.ai-refine-status .ico { color: var(--primary); flex: none; }
.ai-refine-status > span { flex: 1; min-width: 0; }
.ai-refine-undo { flex: none; border: 1.5px solid var(--primary); background: transparent; color: var(--primary); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 10px; cursor: pointer; }

/* Import a booking */
#booking-import-modal { z-index: 5004; }
.import-fill-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: 0 0 14px; padding: 9px 12px; border: 1.5px dashed var(--primary); border-radius: 12px; background: var(--primary-light); color: var(--primary); font-size: 13px; font-weight: 700; cursor: pointer; }
.booking-import-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.booking-import-pick { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1.5px solid var(--border-subtle); border-radius: 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.booking-import-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 10px; border-radius: 12px; background: var(--primary-light); font-size: 12px; }
.booking-import-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.booking-import-file button { border: 0; background: none; cursor: pointer; color: var(--text-light); font-size: 13px; }

/* Trip check-up */
#trip-checkup-modal { z-index: 5003; }
.checkup-entry-btn { display: flex; align-items: center; gap: 10px; width: 100%; margin: 10px 0 4px; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: 14px; background: var(--card-bg); color: var(--text); text-align: left; cursor: pointer; }
.checkup-entry-btn > .ico { color: var(--primary); width: 20px; height: 20px; flex: none; }
.checkup-entry-btn > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.checkup-entry-btn strong { font-size: 14px; }
.checkup-entry-btn small { font-size: 12px; color: var(--text-light, #64748b); }
.checkup-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-light, #64748b); margin: 16px 0 8px; }
.checkup-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-subtle); }
.checkup-item strong { font-size: 14px; }
.checkup-item p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.45; }
.checkup-meta { display: block; font-size: 11.5px; color: var(--text-light, #64748b); }
.checkup-fix { color: var(--primary); font-weight: 600; }
.checkup-fix .ico { width: 14px; height: 14px; }
.checkup-dot { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: #94a3b8; }
.sev-high .checkup-dot { background: #dc2626; }
.sev-medium .checkup-dot { background: #f59e0b; }
.checkup-ok, .checkup-busy, .checkup-intro { font-size: 13px; color: var(--text-light, #64748b); display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; }
.checkup-ok .ico { color: var(--primary); }
.checkup-run-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--text-light, #64748b); margin-bottom: 4px; }
.bookby-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.bookby-item { display: flex; gap: 10px; align-items: flex-start; }
.bookby-item p { margin: 2px 0 0; font-size: 12px; color: var(--text-light, #64748b); }
.bookby-date { flex: none; width: 58px; padding: 6px 4px; border-radius: 10px; background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 800; text-align: center; }
.bookby-date span { display: block; font-size: 10px; text-transform: uppercase; }
.bookby-item.overdue .bookby-date { background: #fee2e2; color: #b91c1c; }
.bgo-group { margin-bottom: 10px; }
.bgo-topic { font-size: 12px; font-weight: 800; margin: 8px 0 4px; }
.bgo-item { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 13px; cursor: pointer; }
.bgo-item input { margin-top: 3px; flex: none; }
.bgo-item small { display: block; font-size: 12px; color: var(--text-light, #64748b); }
.bgo-item input:checked + span { opacity: 0.55; text-decoration: line-through; }
.bgo-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.bgo-links a { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--primary); text-decoration: none; padding: 5px 10px; border: 1.5px solid var(--primary); border-radius: 10px; }

/* Local names, place chips, tickets */
.place-local-name { display: block; font-size: 13px; color: var(--text-light, #64748b); margin: -2px 0 4px; }
.place-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.place-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border: 1.5px solid var(--border-subtle); border-radius: 10px; background: var(--card-bg); color: var(--text); font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; }
.place-chip .ico { width: 14px; height: 14px; margin: 0; color: var(--primary); }
.activity-ticket-link { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--primary); text-decoration: none; padding: 2px 8px; border: 1px solid var(--primary); border-radius: 8px; }
.activity-ticket-link .ico { width: 12px; height: 12px; margin: 0; }

/* Today / day view */
#today-modal { z-index: 5003; }
#driver-card-modal { z-index: 5006; }
.today-head { display: flex; align-items: center; gap: 8px; margin: 0 36px 10px 0; }
.today-title { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: center; }
.today-title strong { font-size: 17px; }
.today-title span { font-size: 12.5px; color: var(--text-light, #64748b); }
.today-nav { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border-subtle); background: var(--card-bg); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.today-nav:disabled { opacity: 0.35; cursor: default; }
.today-note { font-size: 12.5px; line-height: 1.45; padding: 8px 10px; border-radius: 12px; background: var(--primary-light); margin-bottom: 10px; }
.today-due { display: flex; gap: 8px; padding: 8px 10px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: 12.5px; margin-bottom: 10px; }
.today-due strong, .today-due span { display: block; }
.today-list { display: flex; flex-direction: column; }
.today-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-subtle); }
.today-item.done { opacity: 0.5; }
.today-item.now, .today-item.next { background: var(--primary-light); border-radius: 12px; padding: 10px 8px; border-top-color: transparent; }
.today-time { flex: none; width: 64px; font-size: 13px; font-weight: 800; color: var(--primary); }
.today-time span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.today-info { flex: 1; min-width: 0; }
.today-info strong { display: block; font-size: 14.5px; }
.today-info small { display: block; font-size: 12px; color: var(--text-light, #64748b); }
.today-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.today-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; font-size: 12.5px; font-weight: 700; }
.today-rain { margin-top: 12px; }
.today-swap { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border-subtle); }
.today-swap > div { flex: 1; min-width: 0; }
.today-swap p { margin: 2px 0 0; font-size: 12px; color: var(--text-light, #64748b); }
.today-added { font-size: 12px; font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 3px; }
.home-today-card { display: flex; align-items: center; gap: 10px; width: 100%; margin: 12px 0 0; padding: 14px; border: 0; border-radius: 16px; background: var(--primary); color: #fff; text-align: left; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.home-today-card .ico { width: 22px; height: 22px; flex: none; }
.home-today-card > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-today-card strong { font-size: 15px; }
.home-today-card small { font-size: 12.5px; opacity: 0.9; }
.driver-card { text-align: center; }
.driver-hint { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-light, #64748b); margin: 6px 0 14px; }
.driver-local { font-size: clamp(34px, 11vw, 56px); font-weight: 800; line-height: 1.2; word-break: break-word; }
.driver-address { font-size: 20px; margin-top: 12px; line-height: 1.35; }
.driver-english { font-size: 14px; color: var(--text-light, #64748b); margin: 16px 0 8px; }

/* Real recent fares under the AI flight estimate */
.ai-live-fares { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-subtle); font-size: 12.5px; }
.ai-live-fares a { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; color: var(--text); text-decoration: none; }
.ai-live-fares a span:first-child { font-weight: 800; color: var(--primary); min-width: 56px; }
.ai-live-fares small { display: block; color: var(--text-light, #64748b); font-size: 11px; margin-top: 2px; }

/* Fare watch (home screen) */
.fare-watch-card { margin: 12px 0 0; padding: 12px 14px; border-radius: 16px; background: var(--card-bg, #fff); border: 1px solid var(--border, #e3ebe8); }
.fare-watch-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.fare-watch-head .ico { width: 18px; height: 18px; color: var(--primary); }
.fare-watch-head small { flex-basis: 100%; font-size: 11px; color: var(--text-light, #6b7c78); }
.fare-watch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border, #e3ebe8); color: inherit; text-decoration: none; }
.fare-watch-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.fare-watch-row small { font-size: 11px; color: var(--text-light, #6b7c78); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fare-watch-price { display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; white-space: nowrap; }
.fare-watch-price em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--text-light, #6b7c78); }
.fare-watch-price em.fare-down { color: #1a8f4c; }
.fare-watch-price em.fare-up { color: #c0563a; }

/* ---------- Memberships ---------- */
.member-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.member-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.member-row strong { font-size: 13.5px; }
.member-row span { font-size: 12.5px; color: var(--text-light, #6b7c78); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.member-empty { margin: 0 0 10px; font-size: 12.5px; color: var(--text-light, #6b7c78); }
.member-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.member-add .form-control { flex: 1 1 140px; min-width: 0; margin: 0; }
.member-add .save-btn { flex: none; width: auto; margin: 0; padding: 10px 14px; display: inline-flex; align-items: center; gap: 4px; }
.member-chip { display: flex; align-items: center; gap: 8px; width: 100%; margin: 8px 0 0; padding: 8px 10px; border: 1px dashed var(--border-subtle); border-radius: 12px; background: var(--bg); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.member-chip > .ico { color: var(--primary); flex: none; }
.member-chip > .ico:last-child { margin-left: auto; color: var(--text-light, #6b7c78); }
.member-chip span { display: flex; flex-direction: column; min-width: 0; }
.member-chip small { font-size: 11px; color: var(--text-light, #6b7c78); }
.member-chip strong { font-size: 13.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---------- Documents on bookings ---------- */
.booking-extras:empty { display: none; }
.booking-extras { margin: 6px 0 4px; }
.docs-box { margin-top: 10px; }
.docs-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; }
.docs-head .ico { color: var(--primary); }
.docs-head span { margin-left: auto; font-size: 11px; color: var(--text-light, #6b7c78); }
.docs-list { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-chip { display: inline-flex; align-items: stretch; max-width: 100%; border: 1.5px solid var(--border-subtle); border-radius: 10px; background: var(--card-bg); overflow: hidden; }
.doc-open { display: inline-flex; align-items: center; gap: 5px; min-width: 0; padding: 6px 8px; border: 0; background: none; color: var(--text); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.doc-open span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.doc-open small { font-weight: 500; color: var(--text-light, #6b7c78); }
.doc-remove { display: inline-flex; align-items: center; padding: 0 8px; border: 0; border-left: 1px solid var(--border-subtle); background: none; color: var(--text-light, #6b7c78); cursor: pointer; }
.doc-add { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1.5px dashed var(--border-subtle); border-radius: 10px; color: var(--primary); font-size: 12px; font-weight: 700; cursor: pointer; }
.doc-viewer { position: fixed; inset: 0; z-index: 20000; display: flex; flex-direction: column; background: rgba(10, 18, 16, 0.92); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.doc-viewer-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: #fff; }
.doc-viewer-bar strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.doc-viewer-bar a, .doc-viewer-bar button { display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; border: 1px solid rgba(255,255,255,0.3); border-radius: 10px; background: rgba(255,255,255,0.08); color: #fff; font: inherit; font-size: 12.5px; font-weight: 700; text-decoration: none; cursor: pointer; }
.doc-viewer-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 10px 10px; overflow: auto; }
.doc-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }
.doc-viewer-body iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: #fff; }

/* ---------- Today: travel day card ---------- */
.today-travel { padding: 10px 12px; margin-bottom: 10px; border-radius: 14px; border: 1.5px solid var(--primary); background: var(--card-bg); }
.today-travel.done { opacity: 0.6; border-color: var(--border-subtle); }
.today-travel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.today-travel-head .ico { color: var(--primary); }
.today-travel-head span { margin-left: auto; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.today-travel-route { margin: 2px 0 8px; font-size: 12.5px; color: var(--text-light, #6b7c78); }
.today-leave { display: flex; gap: 8px; padding: 8px 10px; margin-bottom: 8px; border-radius: 12px; background: var(--primary-light); }
.today-leave .ico { color: var(--primary); flex: none; margin-top: 2px; }
.today-leave div { display: flex; flex-direction: column; }
.today-leave strong { font-size: 14px; }
.today-leave small { font-size: 11.5px; color: var(--text-light, #6b7c78); }
.today-travel .today-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.today-travel .budget-link-btn { margin-bottom: 8px; }

/* ---------- Thrift & vintage map button (Daily + Wishlist maps): its own line under the top row ---------- */
.map-row-break { flex-basis: 100%; height: 0; }
.map-btn.map-btn-thrift { padding: 7px 12px; font-size: 13px; }
