/* ═══════════════════════════════════════════════════════════════════════════
   account.css  ·  My Account & Bookings page
   Requires: shared.css loaded first
   ═══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "DM Sans", sans-serif; background: #f0efed; color: #1c1c1c; min-height: 100vh; }
.app-inner { max-width: 80%; margin: 0 auto; }

/* ── Layout ── */
.app { display: flex; min-height: calc(100vh - 72px); }
.sidebar { width: 220px; flex-shrink: 0; background: #fff; border-right: 0.5px solid #e8e8e4; padding: 1.5rem 0; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: 14px; color: #333; cursor: pointer; border-left: 3px solid transparent; transition: all 0.15s; }
.nav-item:hover { background: #f8f8f6; color: #1c1c1c; }
.nav-item.active { background: #eef4ff; color: #1a3e8c; border-left-color: #1a3e8c; font-weight: 500; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-badge { margin-left: auto; background: #DA251D; color: #fff; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 10px; }
.main { flex: 1; padding: 2rem; overflow-y: auto; }

/* ── Auth screens ── */
.auth-wrap { max-width: 420px; margin: 3rem auto; }
.auth-card { background: #fff; border-radius: 14px; border: 0.5px solid rgba(0,0,0,0.08); box-shadow: 0 2px 16px rgba(0,0,0,0.06); padding: 2rem; }
.auth-title { font-size: 22px; font-weight: 600; margin-bottom: 0.35rem; }
.auth-sub { font-size: 13px; color: #444; margin-bottom: 1.5rem; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 1.5rem; border-bottom: 0.5px solid #e8e8e4; }
.auth-tab { flex: 1; padding: 10px; text-align: center; font-size: 14px; font-weight: 500; color: #444; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -0.5px; }
.auth-tab.active { color: #1a3e8c; border-bottom-color: #1a3e8c; }

/* ── Forms ── */
.fgroup { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.flabel { font-size: 11px; color: #444; font-weight: 500; }
.finput { padding: 10px 12px; border-radius: 8px; border: 0.5px solid #ddd; background: #fff; font-family: "DM Sans",sans-serif; font-size: 14px; width: 100%; transition: border-color 0.15s; }
  select.finput { appearance:none; -webkit-appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; padding-right:28px; cursor:pointer; }
.finput:focus { outline: none; border-color: #1a3e8c; box-shadow: 0 0 0 3px rgba(26,62,140,0.10); }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { padding: 11px 20px; border-radius: 10px; border: none; font-family: "DM Sans",sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; transition: opacity 0.2s, transform 0.1s; }
.btn-primary { background: linear-gradient(135deg,#1a3e8c,#0f6e56); color: #fff; width: 100%; padding: 13px; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: #f0efed; color: #333; border: 0.5px solid #ddd; }
.btn-danger { background: #FCEBEB; color: #c0241c; border: 0.5px solid #f5c4c4; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.auth-switch { text-align: center; font-size: 13px; color: #444; margin-top: 1rem; }
.auth-switch a { color: #1a3e8c; text-decoration: none; cursor: pointer; }
.error-msg { background: #FCEBEB; border: 0.5px solid #f5c4c4; color: #c0241c; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; display: none; }
.success-msg { background: #EAF3DE; border: 0.5px solid #b8d8a0; color: #3B6D11; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; display: none; }

/* ── Cards & sections ── */
.section-title { font-size: 18px; font-weight: 600; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 10px; }
.card { background: #fff; border-radius: 12px; border: 0.5px solid rgba(0,0,0,0.07); box-shadow: 0 1px 8px rgba(0,0,0,0.05); padding: 1.5rem; margin-bottom: 1rem; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }

/* ── Stat boxes ── */
.stat-box { background: #fff; border-radius: 12px; border: 0.5px solid rgba(0,0,0,0.07); padding: 1.25rem; text-align: center; }
.stat-val { font-size: 28px; font-weight: 600; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: #444; }
.val-blue { color: #1a3e8c; } .val-green { color: #0f6e56; } .val-red { color: #c0241c; } .val-amber { color: #854F0B; }

/* ── Status badges ── */
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; letter-spacing: 0.4px; }
.badge-pending      { background: #FEF3DC; color: #8a5500; }
.badge-confirmed    { background: #EAF3DE; color: #3B6D11; }
.badge-collected    { background: #e6f1fb; color: #1a3e8c; }
.badge-in_transit   { background: #EAF3DE; color: #0f6e56; }
.badge-customs      { background: #FAEEDA; color: #633806; }
.badge-out_for_delivery { background: #e6f1fb; color: #185FA5; }
.badge-delivered    { background: #EAF3DE; color: #27500A; }
.badge-cancelled    { background: #FCEBEB; color: #c0241c; }

/* ── Booking list ── */
.booking-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fff; border-radius: 10px; border: 0.5px solid #e8e8e4; margin-bottom: 8px; cursor: pointer; transition: box-shadow 0.15s; }
.booking-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.booking-ref { font-size: 15px; font-weight: 500; color: #1c1c1c; }
.booking-meta { font-size: 12px; color: #444; margin-top: 3px; }
.booking-right { text-align: right; }
.booking-price { font-size: 14px; font-weight: 500; color: #1a3e8c; }

/* ── Tracking timeline ── */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 1px; background: #e8e8e4; }
.tl-event { position: relative; margin-bottom: 20px; }
.tl-dot { position: absolute; left: -26px; width: 16px; height: 16px; border-radius: 50%; background: #1a3e8c; border: 2px solid #fff; box-shadow: 0 0 0 1px #1a3e8c; top: 3px; }
.tl-dot.done { background: #0f6e56; box-shadow: 0 0 0 1px #0f6e56; }
.tl-dot.pending { background: #ddd; box-shadow: 0 0 0 1px #ddd; }
.tl-title { font-size: 14px; font-weight: 500; }
.tl-time { font-size: 12px; color: #333; margin-top: 2px; }
.tl-desc { font-size: 13px; color: #333; margin-top: 4px; }

/* ── Notification item ── */
.notif-item { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; margin-bottom: 6px; border: 0.5px solid #e8e8e4; background: #fff; }
.notif-item.unread { background: #eef4ff; border-color: #b8d4f8; }
.notif-icon { font-size: 18px; flex-shrink: 0; }
.notif-title { font-size: 14px; font-weight: 500; }
.notif-body { font-size: 13px; color: #333; margin-top: 2px; }
.notif-time { font-size: 11px; color: #333; margin-top: 4px; }

/* ── Address / parcel cards ── */
.addr-card { background: #fff; border-radius: 10px; border: 0.5px solid #e8e8e4; padding: 14px 16px; position: relative; }
  .addr-card.sender-card { border-left: 3px solid #c0241c; }
  .addr-card.receiver-card { border-left: 3px solid #0f6e56; }
  .addr-type-badge { display:inline-block; font-size:10px; font-weight:700; letter-spacing:0.6px; text-transform:uppercase; padding:2px 7px; border-radius:20px; margin-left:6px; }
  .addr-type-badge.sender { background:#fdecea; color:#c0241c; }
  .addr-type-badge.receiver { background:#e0f4ec; color:#0f6e56; }
  .addr-receiver-group { margin-top:0.75rem; }
  .addr-receiver-group-title { font-size:11px; font-weight:700; letter-spacing:0.6px; text-transform:uppercase; color:#0f6e56; margin-bottom:8px; padding-bottom:6px; border-bottom:0.5px solid #c8e6d4; display:flex; align-items:center; justify-content:space-between; }
.addr-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: #444; margin-bottom: 6px; }
.addr-name { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.addr-detail { font-size: 13px; color: #333; line-height: 1.5; }
.addr-actions { display: flex; gap: 6px; margin-top: 10px; }

/* ── Support ── */
.query-item { background: #fff; border-radius: 10px; border: 0.5px solid #e8e8e4; padding: 14px 16px; margin-bottom: 8px; }
.query-subject { font-size: 14px; font-weight: 500; }
.query-body { font-size: 13px; color: #333; margin-top: 6px; line-height: 1.5; }
.query-reply { background: #EAF3DE; border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 13px; color: #27500A; border-left: 3px solid #3B6D11; }
.query-meta { font-size: 12px; color: #333; margin-top: 6px; }

/* ── Referral ── */
.ref-box { background: linear-gradient(135deg,#eef4ff,#edfaf3); border: 0.5px solid #b8d4f8; border-radius: 12px; padding: 1.5rem; text-align: center; margin-bottom: 1rem; }
.ref-code { font-size: 28px; font-weight: 600; letter-spacing: 4px; color: #1a3e8c; margin: 0.75rem 0; }
.ref-url { font-size: 12px; color: #444; word-break: break-all; }

/* ── Empty state ── */
.empty { text-align: center; padding: 3rem 1rem; color: #333; }
.empty-icon { font-size: 36px; margin-bottom: 10px; }
.empty-text { font-size: 14px; }

/* ── Calendar strip ── */
.calendar-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 1rem; }
.cal-item { flex-shrink: 0; background: #fff; border-radius: 10px; border: 0.5px solid #e8e8e4; padding: 12px 16px; text-align: center; min-width: 110px; }
.cal-item.next { border-color: #1a3e8c; background: #eef4ff; }
.cal-item.my-flight { border-color: #0f6e56; background: #edfaf3; }
.cal-date { font-size: 18px; font-weight: 600; color: #1a3e8c; }
.cal-label { font-size: 11px; color: #444; margin-top: 3px; }
.cal-route { font-size: 12px; font-weight: 500; margin-top: 4px; }

/* ── Misc ── */
.divider { height: 0.5px; background: #e8e8e4; margin: 1rem 0; }
.text-sm { font-size: 13px; color: #333; }
.text-muted { font-size: 12px; color: #333; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mb-1 { margin-bottom: 8px; }
.hidden { display: none !important; }
.btn-row { display: flex; gap: 8px; }
.tag { display: inline-block; font-size: 11px; background: #f0efed; color: #333; padding: 3px 9px; border-radius: 20px; }
select.finput { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
textarea.finput { min-height: 80px; resize: vertical; line-height: 1.5; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 640px) {
  .sidebar { display: none; }
  .frow, .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
