/* ============================================================
   BOOKING CONFIRMATION PAGE
   ============================================================ */
.bcp-container {
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}
.bcp-success-header {
    text-align: center;
    padding: 30px 0 24px;
}
.bcp-icon { font-size: 56px; margin-bottom: 10px; }
.bcp-success-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.bcp-success-header p {
    font-size: 13px;
    color: var(--text-muted);
}
.bcp-section-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin: 20px 0 8px;
}
.bcp-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 4px;
}
.bcp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.bcp-row:last-child { border-bottom: none; }
.bcp-row span { color: var(--text-muted); }
.bcp-row strong { font-weight: 700; }
.bcp-row-total strong {
    color: var(--accent);
    font-size: 1.05em;
}

/* Traveler info */
.bcp-traveler { display: flex; flex-direction: column; gap: 10px; }
.bcp-traveler-name {
    font-size: 16px;
    font-weight: 700;
}
.bcp-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(0,114,255,0.05);
    border: 1px solid rgba(0,114,255,0.15);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    transition: background var(--transition-fast);
}
.bcp-phone:hover { background: rgba(0,114,255,0.1); }
.bcp-wa-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #25d366;
    background: rgba(37,211,102,0.1);
    padding: 3px 8px;
    border-radius: 6px;
}
.bcp-ticket-status {
    font-size: 13px;
    font-weight: 600;
    color: #27ae60;
    padding: 8px 12px;
    background: rgba(39,174,96,0.06);
    border-radius: 10px;
    border: 1px solid rgba(39,174,96,0.15);
}

/* Handover code */
.bcp-code-card { text-align: center; padding: 24px 18px; }
.bcp-code {
    font-size: 44px;
    font-weight: 900;
    letter-spacing: 12px;
    color: var(--accent);
    font-family: 'Courier New', monospace;
    padding: 10px;
    background: rgba(0,114,255,0.06);
    border-radius: 14px;
    border: 2px dashed rgba(0,114,255,0.2);
    margin-bottom: 12px;
}
.bcp-code-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 650px) {
    .bcp-container { padding: 16px 14px 40px; }
    .bcp-code { font-size: 36px; letter-spacing: 8px; }
}

/* BCP — Status banner & extras */
.bcp-status-banner {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}
.bcp-status-booked { background: rgba(0,114,255,0.08); color: var(--accent); }
.bcp-status-with_traveler { background: rgba(0,184,148,0.08); color: #00b894; }
.bcp-status-in_transit { background: rgba(0,206,201,0.08); color: #00cec9; }
.bcp-status-arrived { background: rgba(253,203,110,0.15); color: #f39c12; }
.bcp-status-completed { background: rgba(39,174,96,0.08); color: #27ae60; }

.bcp-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

/* Booking card — clickable hover */
.booking-card {
    transition: transform 0.15s ease, box-shadow var(--transition-fast) !important;
}
.booking-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
}

/* Forgot password link */
/* .forgot-link — defined in components.css */

/* ============================================================
   ORDER HISTORY
   ============================================================ */
.history-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 24px 0 0;
    padding: 14px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.history-toggle-btn:hover { border-color: var(--accent); background: rgba(0,114,255,0.03); }
.history-arrow { margin-left: auto; font-size: 12px; color: var(--text-muted); }

#orderHistorySection { margin-top: 12px; }

/* ============================================================
   ORDER HISTORY CARDS — redesigned
   ============================================================ */
.history-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition-fast);
}
.history-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(0,114,255,0.15);
}

/* Sender card — subtle violet accent */
.history-card-sender {
    border-left: 3px solid #a29bfe;
}
/* Traveler card — blue accent */
.history-card-traveler {
    border-left: 3px solid var(--accent);
}

/* ── Header ── */
.history-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.history-route {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}
.history-city {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.history-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}
.history-arrow svg {
    width: 28px;
    height: 10px;
    stroke: currentColor;
}

.history-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.history-role-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
.history-role-sender {
    background: rgba(162,155,254,0.12);
    color: #6c5ce7;
}
.history-role-traveler {
    background: rgba(0,114,255,0.08);
    color: var(--accent);
}

/* Completed badge */
.history-done-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(39,174,96,0.1);
    color: #27ae60;
    white-space: nowrap;
}

/* ── Meta: date + ID ── */
.history-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.history-flight-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}
.history-id-chip {
    font-size: 11px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--input-bg);
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* ── Partner ── */
.history-partner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--input-bg);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}
.history-partner-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.history-partner-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Rows ── */
.history-rows { display: flex; flex-direction: column; gap: 0; }
.history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.history-row:last-child { border-bottom: none; }
.history-row span    { color: var(--text-muted); }
.history-row strong  { font-weight: 600; }
.history-fee-muted   { font-weight: 500; color: var(--text-muted); }
.history-row-total {
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1.5px solid var(--border);
    border-bottom: none;
}
.history-row-total span   { font-weight: 700; color: var(--text); }
.history-row-total strong {
    color: var(--accent);
    font-size: 1.1em;
    font-weight: 800;
}

/* ── Actions ── */
.history-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.history-chat-btn {
    flex: 1;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    min-width: 0;
}
.history-chat-btn:hover {
    background: var(--card-bg);
    border-color: var(--accent);
    color: var(--accent);
}
.history-rate-btn {
    padding: 9px 14px;
    border: 1.5px solid rgba(255,193,7,0.4);
    border-radius: 10px;
    background: rgba(255,193,7,0.06);
    color: #d4a000;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}
.history-rate-btn:hover {
    background: rgba(255,193,7,0.12);
    border-color: rgba(255,193,7,0.7);
}

/* ============================================================
   PRICE OFFER NOTIFICATION
   ============================================================ */
.notif-offer {
    background: rgba(253,203,110,0.08) !important;
    border-color: rgba(243,156,18,0.2) !important;
}
.notif-offer-msg {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}
.notif-offer-actions {
    display: flex;
    gap: 8px;
}
.notif-offer-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity var(--transition-fast);
}
.notif-offer-btn:hover { transform: scale(1.03); opacity: 0.9; }
.notif-offer-btn.accept {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}
.notif-offer-btn.decline {
    background: rgba(214,48,49,0.1);
    color: #d63031;
    border: 1px solid rgba(214,48,49,0.2);
}

/* ============================================================
   CABINET — MY LISTINGS LIST LAYOUT
   ============================================================ */

/* My Listings + My Bookings — ვერტიკალური სია */
#myTripsGrid,
#myBookingsGrid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── My Listings card ── */
#myTripsGrid .trip-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px 18px 14px;
    border-radius: 14px;
    border-left: 3px solid var(--accent) !important;
    min-height: unset;
    position: relative;
}

/* ── My Bookings card ── */
#myBookingsGrid .trip-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 14px 18px;
    border-radius: 14px;
    border-left: 3px solid var(--accent) !important;
    min-height: unset;
}

/* Badges row — ზემოთ, ჰორიზონტალურად */
#myTripsGrid .tc-badges,
#myBookingsGrid .tc-badges,
#myTripsGrid .card-badges-row,
#myBookingsGrid .card-badges-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

/* Remove default bottom margin from badges inside cabinet cards */
#myTripsGrid .card-badge,
#myBookingsGrid .card-badge {
    margin-bottom: 0;
}

/* Route — სუფთა, კომპაქტური */
#myTripsGrid .tc-route-compact,
#myBookingsGrid .tc-route-compact {
    padding: 0 0 8px !important;
    margin: 0;
    align-items: center;
    gap: 8px;
}

/* City names — ოდნავ მსხვილი */
#myTripsGrid .tc-city-sm,
#myBookingsGrid .tc-city-sm {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
}

#myTripsGrid .tc-arrow-sm,
#myBookingsGrid .tc-arrow-sm {
    font-size: 13px;
    opacity: 0.7;
}

/* Chips row */
#myTripsGrid .tc-chips,
#myBookingsGrid .tc-chips {
    padding: 0 !important;
    margin: 0 0 4px;
    gap: 5px;
}

/* Chip sizing — ოდნავ კომპაქტური cabinet-ში */
#myTripsGrid .tc-chip,
#myBookingsGrid .tc-chip {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--input-bg);
    border-color: var(--border);
    color: var(--text-muted);
}

#myTripsGrid .tc-price,
#myBookingsGrid .tc-price {
    background: rgba(0,114,255,0.07);
    border-color: rgba(0,114,255,0.15);
    color: var(--accent);
}

/* Timeline — full width, with separator */
#myTripsGrid .timeline-track,
#myBookingsGrid .timeline-track {
    margin: 10px 0 4px;
    padding: 10px 0 0;
    border-top: 1px solid var(--border);
}

/* Delete button — absolute top-right */
#myTripsGrid .tc-delete-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0.35;
    grid-column: unset;
    grid-row: unset;
}
#myTripsGrid .trip-card:hover .tc-delete-btn { opacity: 0.8; }

/* Booking card — remove click hint on list */
#myBookingsGrid .bcp-code-desc {
    display: none;
}

/* Action buttons — full width, consistent spacing */
#myTripsGrid .tc-btn-secondary,
#myBookingsGrid .tc-btn-secondary,
#myTripsGrid .tc-btn-boost,
#myBookingsGrid .tc-btn-boost,
#myTripsGrid .tc-btn-rate,
#myBookingsGrid .tc-btn-rate,
#myTripsGrid .btn-submit,
#myBookingsGrid .btn-submit {
    margin-top: 10px !important;
}

#myTripsGrid .tc-sender-info,
#myBookingsGrid .tc-sender-info {
    margin-top: 10px;
}

#myTripsGrid .rejection-reason,
#myBookingsGrid .rejection-reason {
    margin-top: 8px;
}

#myTripsGrid .traveler-controls,
#myBookingsGrid .traveler-controls,
#myTripsGrid .handover-box,
#myBookingsGrid .handover-box,
#myTripsGrid .handover-confirm-box,
#myBookingsGrid .handover-confirm-box {
    margin-top: 8px;
}

/* კოდის ველი ზემოთ, ღილაკი ქვემოთ */
#myTripsGrid .handover-confirm-box,
#myBookingsGrid .handover-confirm-box {
    flex-direction: column;
    gap: 8px;
}

#myTripsGrid .handover-input,
#myBookingsGrid .handover-input {
    width: 100%;
    box-sizing: border-box;
}

#myTripsGrid .delivery-done,
#myBookingsGrid .delivery-done {
    margin-top: 8px;
}

@media (max-width: 650px) {
    #myTripsGrid .trip-card,
    #myBookingsGrid .trip-card {
        padding: 14px 14px 12px;
    }
}

/* ============================================================
   ACTION TOOLBAR + SUBSCRIBE INLINE
   ============================================================ */
/* ── Subscribe Panel ──────────────────────────────────────
   Long, slim horizontal bar. Contains either:
   • State 1: one "Subscribe to Route" button (default)
   • State 2: From/To dropdowns + subscribe + close (on click)
   ─────────────────────────────────────────────────────── */

/* Outer wrapper — z-index ensures dropdowns float above trip cards */
.subscribe-panel-wrap {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 8px 16px;
    position: relative;
    z-index: 100;
}

/* Slim pill-shaped bar */
.subscribe-panel {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 6px 0 20px;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), border-color var(--transition);
    position: relative;
    overflow: visible;   /* lets dropdown escape the pill shape */
}
.subscribe-panel:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(0,114,255,0.3);
}

/* ── State 1: single button ────────────────────────────── */
.sp-btn-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sp-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 12px var(--accent-glow);
    transition: transform var(--transition), box-shadow var(--transition),
                filter var(--transition-fast);
    white-space: nowrap;
}
.sp-trigger-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px var(--accent-glow);
    filter: brightness(1.08);
}
.sp-trigger-btn:active { transform: scale(0.97); }

/* ── State 2: inline form ──────────────────────────────── */
.sp-form-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: spFormIn 0.22s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
@keyframes spFormIn {
    from { opacity: 0; transform: scaleX(0.94); }
    to   { opacity: 1; transform: scaleX(1); }
}

.sp-field {
    flex: 1;
    min-width: 110px;
    position: relative;
}
.sp-input.select-input {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
}
.sp-field .options-list {
    min-width: 220px;
    z-index: 99999;      /* must clear trip cards and any stacking contexts */
    position: absolute;  /* explicit — in case parent resets it */
}
.sp-divider {
    font-size: 15px;
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.7;
}
.sp-submit-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 3px 10px var(--accent-glow);
    transition: transform var(--transition), box-shadow var(--transition),
                filter var(--transition-fast);
}
.sp-submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px var(--accent-glow);
    filter: brightness(1.08);
}
.sp-submit-btn:active { transform: scale(0.97); }
.sp-close-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--input-bg);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    transition: background var(--transition-fast), color var(--transition-fast),
                transform 0.15s ease;
}
.sp-close-btn:hover {
    background: rgba(214,48,49,0.1);
    color: #d63031;
    transform: scale(1.1);
}

body.dark-mode .subscribe-panel { border-color: var(--border); }

@media (max-width: 650px) {
    .subscribe-panel-wrap  { padding: 0 14px 16px; }
    .subscribe-panel       { padding: 0 4px 0 14px; min-height: 48px; }
    .sp-trigger-btn        { font-size: 13px; padding: 9px 18px; }
    .sp-divider            { display: none; }
    .sp-field              { min-width: 90px; }
    .sp-submit-btn         { padding: 8px 14px; font-size: 12px; }
    .sp-input.select-input { padding: 7px 10px; font-size: 12px; }
}
@media (max-width: 400px) {
    .sp-form-state  { flex-wrap: wrap; padding: 8px 0; }
    .subscribe-panel { border-radius: var(--radius-md); padding: 8px 12px; }
    .sp-field       { min-width: calc(50% - 20px); flex: none; }
}

/* notif helpers */
.notif-status-ok  { color: #27ae60; font-weight: 700; }
.notif-status-err { color: #d63031; font-weight: 700; }

/* ============================================================
   ACTIVE FILTER BAR
   ============================================================ */
.active-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin-top: 10px;
    background: rgba(0,114,255,0.06);
    border: 1px solid rgba(0,114,255,0.15);
    border-radius: 50px;
    flex-wrap: wrap;
}
.active-filter-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.clear-filter-btn {
    background: none;
    border: 1.5px solid rgba(0,114,255,0.25);
    border-radius: 50px;
    padding: 4px 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
}
.clear-filter-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Legal name field */
.legal-name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.legal-name-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.legal-name-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.legal-name-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}
@media (max-width: 650px) {
    .legal-name-row { grid-template-columns: 1fr; }
}

/* ============================================================
   LEGAL INTERCEPTOR MODALS
   ============================================================ */
.legal-interceptor-content {
    max-width: 520px;
    padding: 32px 28px;
    text-align: center;
}
.legal-interceptor-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.legal-interceptor-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text);
    line-height: 1.4;
}
.legal-interceptor-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-muted);
    text-align: left;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-bottom: 24px;
    max-height: 220px;
    overflow-y: auto;
}
.legal-interceptor-actions {
    display: flex;
    gap: 12px;
}
.btn-legal-agree {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-legal-agree:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px var(--accent-glow);
}
.btn-legal-disagree {
    flex: 1;
    padding: 14px;
    border: 1.5px solid rgba(214,48,49,0.3);
    border-radius: 14px;
    background: rgba(214,48,49,0.05);
    color: #d63031;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.btn-legal-disagree:hover {
    background: rgba(214,48,49,0.1);
    border-color: #d63031;
}

@media (max-width: 650px) {
    .legal-interceptor-content { padding: 24px 16px; }
    .legal-interceptor-actions { flex-direction: column-reverse; }
    .legal-interceptor-text { max-height: 160px; }
}

/* ============================================================
   NO-CASH SAFETY BANNER
   ============================================================ */
.nocash-banner {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    margin-bottom: 20px;
    background: linear-gradient(135deg,
        rgba(0,114,255,0.05) 0%,
        rgba(79,172,254,0.03) 100%);
    border: 1.5px solid rgba(0,114,255,0.15);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
}
.nocash-icon {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}
.nocash-content { flex: 1; }
.nocash-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 8px;
    line-height: 1.4;
}
.nocash-text {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
}

@media (max-width: 650px) {
    .nocash-banner { flex-direction: column; gap: 10px; }
    .nocash-icon { font-size: 24px; }
}

/* Legal interceptor modals — ყველაფრის თავზე */
#senderLegalModal,
#travelerLegalModal {
    z-index: 99999 !important;
}

/* Legal modal smooth entrance */
#senderLegalModal.flex-visible,
#travelerLegalModal.flex-visible {
    animation: fadeIn 0.3s ease;
}

/* ============================================================
   NOCASH INFO POPUP
   ============================================================ */
.nocash-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,15,35,0.45);
    z-index: 4000;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.nocash-overlay.open {
    display: block;
    opacity: 1;
}
.nocash-panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--white);
    border-radius: 24px 24px 0 0;
    padding: 28px 24px 36px;
    z-index: 4001;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.34,1.1,0.64,1);
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.18);
    pointer-events: none; /* hidden by default — never block clicks */
}
.nocash-panel.open {
    transform: translateY(0);
    pointer-events: auto;
}
.nocash-close-btn {
    position: absolute;
    top: 16px; right: 16px;
    background: var(--input-bg);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transition: background var(--transition-fast);
}
.nocash-close-btn:hover { background: var(--border); }
.nocash-panel-icon { font-size: 36px; margin-bottom: 12px; }
.nocash-panel-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 14px;
    line-height: 1.4;
}
.nocash-panel-text {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-muted);
}

/* Desktop: centered popup instead of bottom sheet */
@media (min-width: 651px) {
    .nocash-panel {
        bottom: auto; left: 50%; right: auto;
        top: 50%; transform: translate(-50%, -60%) scale(0.97);
        width: 500px; border-radius: 24px;
        max-height: 70vh;
        opacity: 0;
        pointer-events: none; /* invisible on desktop — must not block clicks */
        transition: transform 0.3s cubic-bezier(0.34,1.1,0.64,1), opacity 0.25s ease;
    }
    .nocash-panel.open {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        pointer-events: auto;
    }
}

/* Trigger button style */
.nocash-trigger-btn {
    border-color: rgba(0,114,255,0.2) !important;
    color: var(--accent) !important;
}
.nocash-trigger-btn:hover {
    background: rgba(0,114,255,0.06) !important;
}

/* Offer accepted notification — clickable */
.notif-item[onclick] { cursor: pointer; }
.notif-item[onclick]:hover { opacity: 0.9; transform: scale(1.01); }
.notif-action-hint {
    display: block;
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
    margin-top: 4px;
}

/* ============================================================
   PROFILE BUTTON + MODAL
   ============================================================ */
.cabinet-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
/* ── Avatar/profile button — initials circle ── */
.btn-profile {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-size: 17px;
    font-weight: 800;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition-fast), transform 0.2s ease,
                box-shadow var(--transition-fast);
    letter-spacing: -0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px var(--accent-glow);
    font-family: inherit;
    flex-shrink: 0;
}
.btn-profile:hover {
    border-color: white;
    transform: scale(1.08);
    box-shadow: 0 4px 18px var(--accent-glow);
}
.btn-profile:active { transform: scale(0.95); }

/* Profile Modal */
.profile-modal-content {
    max-width: 420px;
    padding: 28px;
}
.profile-modal-content h2 {
    margin-bottom: 20px;
    font-size: 1.15rem;
}
.profile-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.profile-field:last-of-type { border-bottom: none; }
.profile-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.profile-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* Passport photo */
.profile-passport-area { margin-top: 8px; }
.profile-passport-img-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.profile-passport-img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: transform 0.2s ease;
}
.profile-passport-img:hover { transform: scale(1.02); }
.profile-passport-badge {
    font-size: 12px;
    font-weight: 700;
    color: #27ae60;
}
.profile-no-passport {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}
.profile-note {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(214,48,49,0.05);
    border: 1px solid rgba(214,48,49,0.12);
    border-radius: 10px;
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================================
   TOOLBAR REDESIGN + INLINE SUBSCRIBE
   ============================================================ */
.toolbar-buttons-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

/* ── Subscribe Inline Panel ──────────────────────────────
   Replaces the button row inside #actionToolbar when open.
   JS toggles display between 'none' and 'flex'.
   ─────────────────────────────────────────────────────── */

.sub-panel {
    /* same horizontal bar as .toolbar-buttons-row */
    display: none;           /* JS sets to 'flex' when open */
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
    animation: fadeIn 0.18s ease;
    padding: 4px 0;
}

/* From / To column: label + dropdown */
.sub-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 120px;
    position: relative;
}

.sub-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    pointer-events: none;
    user-select: none;
}

/* The text input — uses .select-input base style from layout.css
   We only need to override size/padding for the compact bar context */
.sub-input.select-input {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    /* Inherit rest (border, bg, color, transition) from .select-input */
}

/* The options-list inside .sub-field inherits all existing .options-list styles.
   We just make sure it's wide enough and z-index clears the bar */
.sub-field .options-list {
    min-width: 220px;
    z-index: 99999;
}

/* Plane arrow between From and To */
.sub-arrow-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 18px;   /* aligns with the input row */
    color: var(--text-muted);
}

/* Subscribe confirm button */
.sub-submit-btn {
    margin-top: 18px;
    padding: 8px 18px;
    flex-shrink: 0;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 12px var(--accent-glow);
}
.sub-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--accent-glow);
}
.sub-submit-btn:active { transform: scale(0.96); }

/* Close X button */
.sub-x-btn {
    margin-top: 18px;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), border-color var(--transition-fast),
                color var(--transition-fast), transform 0.15s ease;
}
.sub-x-btn:hover {
    background: rgba(214,48,49,0.08);
    border-color: #d63031;
    color: #d63031;
    transform: scale(1.1);
}

/* Mobile: wrap to 2 rows */
@media (max-width: 650px) {
    .sub-panel { flex-wrap: wrap; gap: 8px; }
    .sub-arrow-icon { margin-top: 0; display: none; }
    .sub-submit-btn, .sub-x-btn { margin-top: 0; }
    .sub-field { min-width: calc(50% - 8px); }
}

/* Toolbar — global positioning */
/* #actionToolbar sizing now handled by .subscribe-panel-wrap above */

/* Header nocash button */
.header-nocash-btn {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition-fast), background var(--transition-fast), transform 0.15s ease;
    flex-shrink: 0;
}
.header-nocash-btn:hover {
    border-color: var(--accent);
    background: rgba(0,114,255,0.06);
    transform: scale(1.08);
}

/* Page blur — მთლიანი საიტი */
.page-blurred {
    filter: blur(4px);
    pointer-events: none;
    transition: filter 0.3s ease;
}
header { transition: filter 0.3s ease; }
main { transition: filter 0.3s ease; }

/* Overlay — transparent (blur on main/header is enough) */
.nocash-overlay.open {
    background: rgba(0,0,0,0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* ============================================================
   PROFILE PHOTO
   ============================================================ */
.profile-photo-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.profile-photo-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
    border: 2.5px solid var(--border);
    transition: border-color var(--transition-fast), transform 0.2s ease;
}
.profile-photo-wrap:hover {
    border-color: var(--accent);
    transform: scale(1.04);
}

.profile-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: none;
}

.profile-photo-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 26px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -1px;
    border-radius: 50%;
    font-family: inherit;
}

/* Camera overlay on hover */
.profile-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 114, 255, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    border-radius: 50%;
}
.profile-photo-wrap:hover .profile-photo-overlay { opacity: 1; }
.profile-photo-overlay svg {
    width: 22px;
    height: 22px;
    stroke: white;
}
.profile-photo-overlay span {
    font-size: 9px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.profile-photo-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.profile-photo-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.profile-photo-hint {
    font-size: 12px;
    color: var(--text-muted);
}
/* ============================================================
   CABINET — 3-TAB TOGGLE (ჩემი განცხადებები / შეკვეთები / ისტორია)
   ============================================================ */
.cabinet-tab-wrap {
    text-align: center;
    margin: 20px 0 4px;
}

.cabinet-tab-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 4px;
    gap: 0;
}

.cabinet-tab-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(33.333% - 3px);
    height: calc(100% - 8px);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50px;
    transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
    box-shadow: 0 4px 14px var(--accent-glow);
    pointer-events: none;
    will-change: transform;
}

.cabinet-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 11px 0;
    width: 160px;
    border: none;
    background: transparent;
    border-radius: 50px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    letter-spacing: 0.2px;
    box-sizing: border-box;
}

.cabinet-tab-btn.active {
    color: white;
}

@media (max-width: 650px) {
    .cabinet-tab-wrap {
        width: 100%;
    }
    .cabinet-tab-pill {
        width: 100%;
        box-sizing: border-box;
    }
    .cabinet-tab-btn {
        flex: 1;
        width: auto;
        font-size: 11px;
        padding: 10px 4px;
        gap: 3px;
        letter-spacing: 0;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .cabinet-tab-slider {
        width: calc(33.333% - 3px);
    }
}

/* ═══════════════════════════════════════════════════════════
   SUBSCRIBE PANEL — BUTTON ↔ FORM CROSSFADE ON HOVER
═══════════════════════════════════════════════════════════ */
@media (min-width: 651px) {
    /* panel full width, centered */
    .subscribe-panel-wrap { display: block; }
    .subscribe-panel {
        width: 720px;
        margin: 0 auto;
        padding: 0 6px 0 20px;
        overflow: hidden;
        transition: box-shadow 0.3s ease, border-color 0.3s ease;
    }

    /* button: visible by default, fades out on hover */
    .sp-btn-state {
        position: absolute;
        left: 0; right: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
        transition: opacity 0.25s ease;
        pointer-events: auto;
    }
    .subscribe-panel-wrap:hover .sp-btn-state {
        opacity: 0;
        pointer-events: none;
    }

    /* panel: relative container for absolute children */
    .subscribe-panel {
        position: relative;
        min-height: 52px;
    }

    /* form: hidden by default, fades in on hover */
    .sp-form-state {
        opacity: 0;
        transition: opacity 0.25s ease;
        pointer-events: none;
    }
    .subscribe-panel-wrap:hover .sp-form-state {
        opacity: 1;
        pointer-events: auto;
    }
}