/* ============================================================
   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); }
/* ტელეფონი ფონურად იტვირთება (getContactInfo callable) — placeholder */
.bcp-phone-loading {
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.7;
    padding: 10px 0 2px;
    animation: bcpPhonePulse 1.2s ease-in-out infinite;
}
@keyframes bcpPhonePulse { 0%,100% { opacity: 0.45; } 50% { opacity: 0.85; } }
.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 emailed note */
.bcp-code-emailed {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    color: var(--accent);
    background: rgba(0,114,255,0.06);
    border: 1px solid rgba(0,114,255,0.18);
    border-radius: 12px;
    padding: 14px 16px;
}
/* ── კოდის პანელის head: ტექსტი + ⋮ მენიუ ── */
.bcp-code-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.bcp-code-emailed-text { flex: 1; }
.bcp-code-menu-wrap { position: relative; flex-shrink: 0; }
.bcp-code-menu-btn {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 8px;
}
.bcp-code-menu-btn:hover { background: rgba(0,114,255,0.08); color: var(--accent); }
.bcp-code-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    z-index: var(--z-dropdown, 1000);
    min-width: 180px;
}
.bcp-code-menu.show { display: block; }
.bcp-code-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 11px 14px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
}
.bcp-code-menu button:hover { background: var(--input-bg); color: var(--accent); }

/* ── blur-დაფარული კოდი — clickable (ხელის დაჭერა → biometric reveal) ── */
.bcp-code-reveal {
    position: relative;
    margin-top: 12px;
    padding: 16px;
    text-align: center;
    background: #f0f7ff;
    border: 2px dashed var(--accent);
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.bcp-code-reveal:hover { background: #e6f1ff; }
.bcp-code-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.bcp-code-digits {
    font-size: 34px;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: 10px;
    padding-left: 10px; /* letter-spacing-ის ბოლო gap-ის კომპენსაცია */
}
.bcp-code-blurred {
    filter: blur(9px);
    user-select: none;
    -webkit-user-select: none;
}
.bcp-code-tap-hint {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}
/* "გადახდის დეტალები →" ღილაკი (ბარათზე click-ის ნაცვლად) */
.tc-btn-details {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 11px 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}
.tc-btn-details:hover { border-color: var(--accent); }

/* 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;
}

/* ── SOS / გადაუდებელი ღილაკი (აქტიური მიტანისას) ── */
.bcp-sos-btn {
    width: 100%;
    margin-top: 14px;
    padding: 13px 18px;
    border: 1.5px solid rgba(214,48,49,0.35);
    border-radius: 14px;
    background: rgba(214,48,49,0.08);
    color: #d63031;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--transition-fast), transform 0.15s ease, box-shadow var(--transition-fast);
}
.bcp-sos-btn:hover {
    background: rgba(214,48,49,0.14);
    box-shadow: 0 4px 16px rgba(214,48,49,0.18);
    transform: translateY(-1px);
}
.bcp-sos-btn:active { transform: scale(0.98); }
body.dark-mode .bcp-sos-btn { color: #ff6b6b; border-color: rgba(255,107,107,0.4); }

/* SOS modal content */
.sos-intro { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; margin-bottom: 14px; }
.sos-quick { margin-bottom: 16px; }
.sos-call {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 12px;
    background: rgba(214,48,49,0.1); border: 1.5px solid rgba(214,48,49,0.3);
    color: #d63031; font-weight: 800; font-size: 15px; text-decoration: none;
    transition: background var(--transition-fast);
}
.sos-call:hover { background: rgba(214,48,49,0.18); }
.sos-submit {
    background: linear-gradient(135deg, #d63031, #e17055) !important;
    box-shadow: 0 4px 16px rgba(214,48,49,0.3) !important;
}
body.dark-mode .sos-call { color: #ff6b6b; border-color: rgba(255,107,107,0.4); }

/* 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;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
}

.history-route {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    width: 100%;
    min-width: 0;
}
.history-city {
    white-space: normal;
    overflow-wrap: anywhere;
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}
.history-city:last-child { text-align: right; }
.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: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    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);
}

/* ============================================================
   RATED BADGE — შეფასების შემდეგ ღილაკის ნაცვლად
   ============================================================ */
.rated-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1.5px solid rgba(39,174,96,0.35);
    border-radius: 10px;
    background: rgba(39,174,96,0.07);
    color: #1e8449;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}
.rated-badge-stars {
    color: #f5a623;
    letter-spacing: 1px;
    font-size: 13px;
}
.rated-badge-num {
    opacity: 0.75;
    font-weight: 600;
}

/* ============================================================
   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;
}

/* Container — გამჭვირვალე (თეთრი pill "ფანჯარა" მოხსნილია).
   ღილაკი/ფორმის ელემენტებს თავ-თავიანთი ჩარჩო აქვთ. */
.subscribe-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 74px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;   /* lets dropdown escape */
}

/* ── 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;
    /* keyframe-ის ნაცვლად transition — keyframe both-fill-ით პირველ
       ჩამოშლაზე opacity:0-ზე იჭედებოდა. transition ყოველთვის სმუზია.
       უფრო გრძელი ხანგრძლივობა + scale ნაზ "ამოზრდას" აძლევს. */
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.sp-form-state.sp-form-shown {
    opacity: 1;
    transform: translateY(0) scale(1);
}
/* trigger ღილაკიც იმავე easing-ით ქრება/ჩნდება */
.sp-btn-state {
    transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-field {
    flex: 1;
    min-width: 110px;
    position: relative;
}

/* ── Subscribe panel: ფანჯრის გარეშე — input ველებს საკუთარი
   pill-ჩარჩო აქვთ (თეთრი card, border), ცალკეულ ელემენტებად ცურავენ. */
.subscribe-panel .search-field-inner {
    height: 56px;
    padding: 0 20px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.subscribe-panel .search-field-inner:focus-within {
    border-color: rgba(0,114,255,0.4);
    box-shadow: 0 4px 16px rgba(0,114,255,0.12);
}
.subscribe-panel .sp-field {
    min-width: 0;
}
.sp-field .options-list {
    min-width: 220px;
    z-index: var(--z-popover);   /* must clear trip cards and any stacking contexts */
    position: absolute;          /* explicit — in case parent resets it */
}
/* ✈️ divider — search-swap-btn-ის სტილში (წრიული, შუაში) */
.sp-divider {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: var(--white);
    color: var(--text-muted);
    align-self: center;
    margin: 0 -1px;
    z-index: 2;
    box-shadow: 0 0 0 3px var(--white);
}
/* submit — .btn-search-ის იდენტური */
.sp-submit-btn {
    flex-shrink: 0;
    padding: 13px 24px;
    border: none;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 16px var(--accent-glow);
    transition: transform var(--transition), box-shadow var(--transition),
                filter var(--transition-fast);
}
.sp-submit-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 24px 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; }
    /* min-height ფიქსირებული ფორმის ზომაზე — გახსნისას აღარ იზრდება,
       სექციები ქვემოთ აღარ იწევს. padding:0 (ფანჯარა გამჭვირვალე). */
    .subscribe-panel       { padding: 0; min-height: 74px; }
    .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  { gap: 6px; }
    .sp-field       { min-width: 0; }
}

/* 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: var(--z-popover) !important;   /* interceptor — ყველაფრის თავზე */
}

/* 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: var(--z-popover);
}

/* 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 — desktop layout
   (button↔form გადართვა click-ით ხდება toggleSubscribeInline()-ში;
    ძველი hover-crossfade მოხსნილია — JS-ის display-toggle-თან
    კონფლიქტში ღილაკი hover-ზე ქრებოდა.)
═══════════════════════════════════════════════════════════ */
@media (min-width: 651px) {
    .subscribe-panel-wrap { display: block; }
    .subscribe-panel {
        position: relative;
        width: 720px;
        margin: 0 auto;
        min-height: 74px;   /* ფიქსირებული — გახსნისას აღარ იზრდება */
        padding: 0;
    }
}

/* ═══════════════════════════════════════════════════════════
   CABINET CARD v2 — "Status Header" დიზაინი
   ფერადი სტატუს-ზოლი ზემოთ + დიდი მარშრუტი + box-chip-ები.
   ძველ tc-mine padding/border-left-ს ვაუქმებთ (header თვითონ ფერავს).
═══════════════════════════════════════════════════════════ */
.tc-mine.tc-mine-v2 {
    padding: 0 !important;
    border-left: none !important;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card-bg);
}

/* ── სტატუს-ზოლი (header) ── */
.tcm-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    /* ბრენდის ლურჯი header — ყველა სტატუსზე ერთიანი, თეთრი ტექსტი */
    color: #fff;
}
.tcm-hdr-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.tcm-hdr-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    font-size: 11px;
    line-height: 1;
}
.tcm-hdr-boost {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.25);
    color: #fff;
}
.tcm-hdr-del {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.tcm-hdr-del:hover {
    transform: scale(1.1);
    background: #fff;
    box-shadow: 0 3px 10px rgba(226,59,59,0.45);
}

/* ── header ფერი — ყველა სტატუსი ბრენდის ლურჯ gradient-ში ──
   სტატუსი icon-ით/ტექსტით განსხვავდება, არა ფერით. ერთიანი, სუფთა იერი.
   უარყოფილი — ერთადერთი გამონაკლისი (წითელი, რომ პრობლემა გამოიყოს). */
.tcm-hdr-active,
.tcm-hdr-pending,
.tcm-hdr-booked,
.tcm-hdr-progress,
.tcm-hdr-done     { background: linear-gradient(135deg, #4facfe, #0072ff); }
.tcm-hdr-rejected { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* ── body ── */
.tcm-body { padding: 16px; }

/* ── დიდი მარშრუტი ── */
.tcm-route {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.tcm-city {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    flex-shrink: 0;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tcm-route-line {
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--border) 0 6px, transparent 6px 12px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tcm-plane {
    font-size: 16px;
    background: var(--card-bg);
    padding: 0 8px;
}

/* ── box chip-ები ── */
.tcm-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.tcm-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 9px 6px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
}
.tcm-chip-ico { font-size: 15px; line-height: 1; }
.tcm-chip-val {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
/* price chip — ბრენდის ლურჯი აქცენტი (header-ს ეხამება) */
.tcm-chip-price {
    background: rgba(0,114,255,0.08);
    border-color: rgba(0,114,255,0.25);
}
.tcm-chip-price .tcm-chip-val { color: var(--accent); }

/* v2-ში body-ს შიგნით buttons/timeline-ს margin-top ისედაც აქვს */
.tc-mine-v2 .tcm-chips { margin-bottom: 4px; }
.tc-mine-v2 .timeline,
.tc-mine-v2 .traveler-controls,
.tc-mine-v2 .tc-sender-info,
.tc-mine-v2 .tcm-party,
.tc-mine-v2 .rejection-reason { margin-top: 12px; }

/* ── header tag (📦 ამანათი) + paid badge ── */
.tcm-hdr-tag {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    color: #fff;
    white-space: nowrap;
}
.tcm-hdr-paid {
    margin-left: auto;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.25);
    color: #fff;
    white-space: nowrap;
}

/* ── counterparty (მგზავრი/გამგზავნი) + რეიტინგი ── */
.tcm-party {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.tcm-party-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tcm-party-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted, #888);
}
.tcm-party-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tcm-party-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0,114,255,0.08);
    border: 1px solid rgba(0,114,255,0.22);
}
.tcm-rating-star { color: #f5a623; font-size: 13px; line-height: 1; }
.tcm-rating-num  { font-size: 13px; font-weight: 800; color: var(--accent); }
.tcm-rating-cnt  { font-size: 11px; font-weight: 600; color: var(--text-muted, #888); }
.tcm-rating-new  { font-size: 11px; font-weight: 700; color: var(--text-muted, #888); }
.tcm-rating-skel {
    display: inline-block;
    width: 42px; height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.15) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: tcm-shimmer 1.2s linear infinite;
}
@keyframes tcm-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── handover code chip (gამგზავნისთვის) ── */
.tcm-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(0,114,255,0.06);
    border: 1px dashed rgba(0,114,255,0.4);
}
.tcm-code-lbl { font-size: 12px; font-weight: 700; color: var(--text); }
.tcm-code-val {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* ── earnings (completed trip) ── */
.tcm-earned {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(5,150,105,0.10));
    border: 1px solid rgba(16,185,129,0.3);
}
.tcm-earned-ico { font-size: 16px; }
.tcm-earned-lbl { font-size: 12.5px; font-weight: 700; color: var(--text); }
.tcm-earned-val {
    margin-left: auto;
    font-size: 16px;
    font-weight: 900;
    color: #10b981;
}

@media (max-width: 480px) {
    .tcm-city { font-size: 15px; }
    .tcm-chip-val { font-size: 11.5px; }
    .tcm-chip { padding: 8px 4px; }
}

/* ═══════════════════════════════════════════════════════════
   CABINET CARD v3 — "Glass Hybrid"
   glass body + ცოცხალი timeline + spotlight party + dashed code.
   v3 მხოლოდ ფერს/glow-ს ცვლის; სტრუქტურა v2-დან მემკვიდრეობს.
═══════════════════════════════════════════════════════════ */
.tc-mine-v3 {
    position: relative;
    border: 1px solid rgba(255,255,255,0.7);
    background: linear-gradient(160deg, rgba(255,255,255,0.92), rgba(245,248,255,0.86));
    box-shadow: 0 16px 50px rgba(0,80,200,0.13);
}
body.dark-mode .tc-mine-v3 {
    border-color: rgba(255,255,255,0.06);
    background: linear-gradient(160deg, rgba(34,42,62,0.95), rgba(22,27,39,0.92));
    box-shadow: 0 16px 50px rgba(0,20,80,0.4);
}
/* gradient orb — header-ის ქვემოთ, body-ში */
.tc-mine-v3 .tcm-body { position: relative; }
.tc-mine-v3 .tcm-body::before {
    content: '';
    position: absolute;
    top: -30px; right: -40px;
    width: 150px; height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,172,254,0.20), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.tc-mine-v3 .tcm-body > * { position: relative; z-index: 1; }
.tc-mine-v3 .tcm-plane { background: transparent; }

/* ── v3 timeline (dot-line, პროგრესით) ── */
.tlv3 {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 9px;
    margin: 6px 0 16px;
}
.tlv3::before {
    content: '';
    position: absolute;
    left: 18px; right: 18px; top: 8px;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
}
.tlv3-prog {
    position: absolute;
    left: 18px; top: 8px;
    height: 2px;
    width: calc((100% - 36px) * var(--tlv3-prog-f, 0));
    background: linear-gradient(90deg, #4facfe, #0072ff);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.tlv3-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 1;
}
.tlv3-dot {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border);
    transition: all 0.25s ease;
}
.tlv3-dot.done {
    background: linear-gradient(135deg, #4facfe, #0072ff);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0,114,255,0.4);
}
.tlv3-dot.cur {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0,114,255,0.15);
    animation: tlv3pulse 1.8s infinite;
}
@keyframes tlv3pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0,114,255,0.3); }
    70%  { box-shadow: 0 0 0 6px rgba(0,114,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,114,255,0); }
}
.tlv3-sl {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── v3 spotlight party (avatar + verified + rating) ── */
.tcv3-party {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 15px;
}
/* chat ღილაკი name-ის გვერდით (მარცხნივ), შეფასება მარჯვნივ.
   ყველა ელემენტი .tcv3-party flex row-ის პირდაპირი child-ია →
   align-items:center ღილაკს box-ის ვერტიკალურ ცენტრში სვამს. */
/* მთლიანი ფანჯარა — სუფთა flex row: avatar | name | [იჭიმება] | ღილაკი | stars.
   name-ის შემდეგ flex:1 spacer ღილაკსა და stars-ს მარჯვნივ წეvs. */
.tcv3-party-chat {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* name — იჭიმება და ღილაკ+stars-ს მარჯვენა კიდეში წეvs */
.tcv3-party-chat .tcv3-pn {
    flex: 1 1 0;
    min-width: 0;
}
/* chat ღილაკი — flex row-ში, მარჯვნივ; ცოტა ზემოთ აწეული (translateY) */
.tcv3-party-chat-btn.tc-btn-secondary {
    margin: 0 !important;
    width: auto;
    flex: 0 0 auto;
    transform: translateY(-3px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    line-height: 1;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
    /* საიტის ბრენდის გრადიენტი — ღია ცის-ლურჯიდან accent-მდე */
    background: linear-gradient(135deg, var(--primary, #4facfe), var(--accent, #0072ff));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 10px var(--accent-glow, rgba(0, 114, 255, 0.25));
}
.tcv3-party-chat-btn.tc-btn-secondary:hover {
    filter: brightness(1.05);
    color: #fff;
}
/* emoji ოპტიკურად ცენტრში — line-box-ის baseline-ის კომპენსაცია */
.tcv3-chat-ico {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    font-size: 14px;
}
.tcv3-av {
    position: relative;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0072ff, #4facfe);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
    text-transform: uppercase;
}
.tcv3-vb {
    position: absolute;
    bottom: -2px; right: -2px;
    width: 16px; height: 16px;
    background: #10b981;
    border: 2px solid var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #fff;
}
.tcv3-pn { flex: 1; min-width: 0; }
.tcv3-pn .n {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tcv3-pn .sub {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}
.tcv3-stars {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: 42px;
}
.tcv3-stars .big {
    font-size: 18px;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}
.tcv3-stars .st {
    font-size: 11px;
    color: #f5a623;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* ── v3 dashed code (from boarding-pass concept) ── */
.tcv3-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 13px 16px;
    border: 1.5px dashed rgba(0,114,255,0.4);
    border-radius: 14px;
    background: rgba(0,114,255,0.05);
}
.tcv3-code-lbl { font-size: 11.5px; font-weight: 700; color: var(--text); }
.tcv3-code-val {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}