/* ==========================================
   GC TECH CUSTOMER PORTAL — complementa gc-home.css
   ========================================== */
[hidden] { display: none !important; }

.portal-body { background: #f4f6f8; min-height: calc(100vh / var(--fit-zoom, 1)); }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn-block { width: 100%; padding: 14px; font-size: 16px; }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.link-btn { background: none; border: none; font-family: inherit; font-size: 14px; color: var(--ink-soft); cursor: pointer; padding: 6px 4px; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }
.link-btn.subtle { font-size: 13px; color: #9ca3af; }
.link-btn.danger { color: #dc2626; margin-right: auto; }
.danger-btn { background: #dc2626; }
.danger-btn:hover { background: #b91c1c; }

/* ---------- LOGIN ---------- */
.auth-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh / var(--fit-zoom, 1)); }
.auth-brand {
  color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    linear-gradient(160deg, rgba(2,6,23,.92) 0%, rgba(15,23,42,.85) 60%, rgba(20,83,45,.75) 100%), #0f172a;
}
.auth-logo { height: 46px; border-radius: 6px; }
.auth-brand-copy h1 { font-size: clamp(34px, calc(3.6vw / var(--fit-zoom, 1)), 50px); font-weight: 400; line-height: 1.1; margin-bottom: 14px; }
.auth-brand-copy > p { font-size: 18px; font-weight: 300; color: #cbd5e1; margin-bottom: 40px; }
.auth-features { list-style: none; display: flex; flex-direction: column; gap: 22px; max-width: 440px; }
.auth-features li { display: flex; gap: 16px; align-items: flex-start; }
.auth-features svg { width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.08); color: #86efac; flex-shrink: 0; }
.auth-features strong { display: block; font-weight: 500; font-size: 16px; }
.auth-features span { font-size: 14px; color: #94a3b8; }
.auth-back { font-size: 14px; color: #94a3b8; }
.auth-back:hover { color: #fff; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card h2 { font-size: 32px; font-weight: 400; margin-bottom: 6px; }
.auth-sub { color: var(--ink-soft); margin-bottom: 28px; }
.auth-tabs { display: flex; background: #e2e8f0; border-radius: 10px; padding: 4px; margin-bottom: 28px; gap: 2px; }
.auth-tab { flex: 1; border: none; background: none; font-family: inherit; font-size: 14px; padding: 9px 6px; border-radius: 7px; cursor: pointer; color: var(--ink-soft); white-space: nowrap; }
.auth-tab.active { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth-card form { display: flex; flex-direction: column; gap: 20px; }
.auth-card .of-field label, .portal-main .of-field label, .home-modal-card .of-field label { background: #f4f6f8; }
.portal-main .panel .of-field label, .home-modal-card .of-field label { background: #fff; }
.form-note { font-size: 14px; color: var(--ink-soft); margin-bottom: -4px; }
.auth-help { margin-top: 26px; font-size: 14px; color: var(--ink-soft); text-align: center; }
.auth-help a { color: var(--brand); font-weight: 500; }

/* ---------- HEADER DO PORTAL ---------- */
.portal-header { background: #fff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 30; }
.portal-header-inner { max-width: 1280px; margin: 0 auto; padding: 12px 28px; display: flex; justify-content: space-between; align-items: center; }
.portal-header .brand img { height: 40px; }
.portal-header-actions { display: flex; align-items: center; gap: 16px; }
.account-chip { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }

/* ---------- LAYOUT ---------- */
.portal-layout { max-width: 1280px; margin: 0 auto; padding: 32px 28px 80px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: start; }
.portal-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 96px; }
.nav-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: none; background: none; border-radius: 10px; font-family: inherit; font-size: 15px; color: var(--ink-soft); cursor: pointer; text-align: left; }
.nav-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-btn:hover { background: #e8eef3; color: var(--ink); }
.nav-btn.active { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.nav-btn.active svg { color: var(--brand); }
.nav-count { margin-left: auto; font-size: 12px; font-weight: 600; background: #e2e8f0; color: var(--ink); border-radius: 10px; padding: 1px 8px; }
.nav-count:empty { display: none; }
.nav-count.alert { background: #dc2626; color: #fff; }
.nav-divider { height: 1px; background: #e2e8f0; margin: 10px 0; }

.portal-main { min-width: 0; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: portalFade .25s ease; }
@keyframes portalFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: 32px; font-weight: 400; }
.page-sub { color: var(--ink-soft); margin-top: 4px; }

/* ---------- OVERVIEW ---------- */
.alert-bar { display: flex; align-items: center; gap: 14px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 12px; padding: 14px 18px; margin-bottom: 14px; }
.alert-bar svg { width: 22px; height: 22px; color: #ea580c; flex-shrink: 0; }
.alert-bar div { flex: 1; font-size: 15px; }
.alert-bar strong { font-weight: 600; }

.next-trip { background: #0f172a; color: #fff; border-radius: 18px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); overflow: hidden; margin-bottom: 20px; }
.next-trip-info { padding: 30px 32px; display: flex; flex-direction: column; gap: 6px; }
.next-trip .eyebrow { color: #86efac; margin-bottom: 4px; }
.next-trip-countdown { font-size: 34px; font-weight: 400; line-height: 1.15; }
.next-trip-vehicle { font-size: 17px; color: #cbd5e1; margin-bottom: 18px; }
.trip-legs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 18px; border-top: 1px solid #334155; font-size: 15px; }
.trip-legs small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; font-weight: 600; margin-bottom: 3px; }
.next-trip-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.next-trip-actions .btn-ghost { padding: 10px 18px; font-size: 14px; }
.next-trip-visual { background: radial-gradient(circle at 60% 50%, #334155 0%, #0f172a 70%); display: flex; align-items: center; justify-content: center; padding: 48px 24px 24px; position: relative; }
.next-trip-visual img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; display: block; }
.next-trip-ref { position: absolute; top: 18px; right: 20px; font-size: 13px; color: #94a3b8; }
.empty-trip { background: #fff; border-radius: 18px; padding: 40px; text-align: center; margin-bottom: 20px; }
.empty-trip h3 { font-size: 24px; font-weight: 400; margin-bottom: 6px; }
.empty-trip p { color: var(--ink-soft); margin-bottom: 18px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: 14px; padding: 18px 20px; }
.stat small { font-size: 13px; color: var(--ink-soft); }
.stat strong { display: block; font-size: 30px; font-weight: 500; margin-top: 2px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quick-card { background: #fff; border: 1px solid transparent; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 4px; text-align: left; font-family: inherit; font-size: 15px; cursor: pointer; transition: border-color .15s; color: var(--ink); }
.quick-card:hover { border-color: #86efac; }
.quick-card svg { width: 26px; height: 26px; color: var(--brand); margin-bottom: 8px; }
.quick-card strong { font-weight: 500; font-size: 16px; }
.quick-card span { font-size: 14px; color: var(--ink-soft); }

/* ---------- CARDS DE RESERVA ---------- */
.bk-card { background: #fff; border-radius: 16px; margin-bottom: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.bk-card.attention { box-shadow: 0 0 0 1.5px #fb923c; }
.bk-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid #eef2f6; gap: 12px; }
.bk-ref { font-size: 14px; color: var(--ink-soft); }
.bk-ref strong { color: var(--ink); font-weight: 600; letter-spacing: .5px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 20px; white-space: nowrap; }
.status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill.ok { background: #dcfce7; color: #166534; }
.status-pill.wait { background: #fef3c7; color: #92400e; }
.status-pill.action { background: #ffedd5; color: #c2410c; }
.status-pill.done { background: #f1f5f9; color: #475569; }
.bk-body { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; padding: 20px 22px; align-items: center; }
.bk-img { background: var(--cream); border-radius: 12px; overflow: hidden; }
.bk-img img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
.bk-img.past img { filter: grayscale(100%); opacity: .7; }
.bk-vehicle { font-size: 20px; font-weight: 500; margin-bottom: 12px; }
.bk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; font-size: 14px; }
.bk-grid small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; font-weight: 600; margin-bottom: 2px; }
.bk-note { grid-column: 1 / -1; background: #fff7ed; color: #9a3412; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
/* Situação do bond em Past hires */
.bk-note.past-bond.ok { background: #ecfdf5; color: #047857; }
.bk-note.past-bond .link-btn { padding: 0; font-size: 14px; color: inherit; text-decoration: underline; }

/* Bond em hold (My bookings) */
.bond-card { box-shadow: 0 0 0 1.5px #fdba74; }
.bond-body { display: grid; grid-template-columns: 160px 1fr 1.4fr; gap: 18px; padding: 18px 22px; font-size: 14px; line-height: 1.5; }
.bond-body small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #9ca3af; margin-bottom: 3px; }
.bond-amount strong { font-size: 26px; font-weight: 600; color: #9a3412; }
.bond-why { color: #334155; }
.bond-requested { margin-right: auto; font-size: 13px; color: #15803d; font-weight: 500; }
.bond-hint { margin-right: auto; font-size: 13px; color: #64748b; }
@media (max-width: 760px) { .bond-body { grid-template-columns: 1fr; } }
.bond-req-card { max-width: 520px; }
.bond-req-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bond-req-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-family: inherit; text-align: center; }
.bond-req-opt:hover { border-color: var(--brand); }
.bond-req-opt.wa:hover { border-color: #25d366; }
.bond-req-opt span { font-size: 22px; line-height: 1; color: #25d366; }
.bond-req-opt strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.bond-req-opt small { font-size: 12px; color: var(--ink-soft); word-break: break-word; }
@media (max-width: 560px) { .bond-req-options { grid-template-columns: 1fr; } }

/* Preferência de veículo alternativo (dentro do aviso "Finding a vehicle") */
.alt-pref { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #fed7aa; }
.alt-pref > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.alt-pref strong { color: #14532d; }
.alt-pref span { color: #9a3412; }
.alt-pref .btn-brand { flex-shrink: 0; }
.alt-pref-list { display: flex; flex-wrap: wrap; gap: 6px; }
.alt-pref-choice { background: #fff; border: 1px solid #fed7aa; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 500; }
.alt-pref-note { font-style: italic; font-size: 13px; }
.alt-card { max-width: 480px; }
.alt-card select, .alt-card textarea { padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; font-family: inherit; font-size: 15px; outline: none; background: #fff; color: var(--ink); resize: vertical; }
.alt-card select:focus, .alt-card textarea:focus { border-color: var(--brand); }
.alt-card select:disabled { background: #f1f5f9; color: #94a3b8; }
.alt-card label.alt-only { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); cursor: pointer; }
.alt-only input { width: 18px; height: 18px; accent-color: var(--brand); }
.alt-optional { color: #94a3b8; }
.alt-error { min-height: 18px; font-size: 13px; font-weight: 500; color: #dc2626; }
.bk-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid #eef2f6; background: #f9fafb; flex-wrap: wrap; }
.bk-actions .link-btn.danger { margin-right: auto; }
.bk-actions .btn-ghost { padding: 9px 16px; font-size: 14px; }
.bk-actions .btn-brand { padding: 9px 18px; font-size: 14px; }
.empty-state { background: #fff; border-radius: 16px; padding: 50px 30px; text-align: center; color: var(--ink-soft); }
.empty-state h3 { color: var(--ink); font-size: 22px; font-weight: 400; margin-bottom: 6px; }
.empty-state .btn-brand { margin-top: 16px; }

/* ---------- PAYMENT PLANS ---------- */
.plan-body { padding: 20px 22px; }
.plan-reason { font-size: 18px; font-weight: 500; margin-bottom: 18px; }
.plan-figures { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 16px; font-size: 14px; margin-bottom: 18px; }
.plan-figures small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; font-weight: 600; margin-bottom: 3px; }
.plan-balance strong { font-size: 28px; font-weight: 600; }
.plan-progress { height: 10px; background: #edf1f5; border-radius: 6px; overflow: hidden; }
.plan-progress div { height: 100%; background: var(--brand); border-radius: 6px; }
.plan-progress-label { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.plan-note { margin-top: 16px; background: #f4f6f8; padding: 12px 14px; border-radius: 8px; font-size: 14px; color: var(--ink-soft); }
.plan-note.warn { background: #fff7ed; color: #9a3412; }
.plan-note.ok { background: #f0fdf4; color: #166534; }
.plan-schedule { margin-top: 16px; border: 1px solid #edf1f5; border-radius: 10px; }
.plan-schedule summary { padding: 12px 14px; cursor: pointer; font-size: 14px; font-weight: 500; }
.plan-sched-row { display: grid; grid-template-columns: 40px 1fr 100px 120px; gap: 10px; align-items: center; padding: 9px 14px; border-top: 1px solid #f4f6f8; font-size: 14px; }
.plan-sched-row span:first-child { color: #9ca3af; }
.plan-sched-row .status-pill { justify-self: start; font-size: 12px; padding: 3px 10px; }
.plan-card-line { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--ink-soft); }
.plan-card-line .link-btn { color: var(--brand); font-weight: 500; }
.plan-card-form { display: flex; gap: 12px; align-items: stretch; margin-top: 14px; flex-wrap: wrap; }
.plan-card-form .of-field { flex: 2; min-height: 48px; }
.plan-card-form .of-field.small { flex: 1; }
.plan-card-form .of-field label { background: #fff; }
.plan-card-form .of-field input { padding: 10px 12px; font-size: 15px; }

/* ---------- PROFILE ---------- */
.panel { background: #fff; border-radius: 16px; padding: 26px 26px 28px; margin-bottom: 16px; }
.panel h3 { font-size: 18px; font-weight: 500; margin-bottom: 22px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
.of-field.disabled { background: #f4f6f8; }
.of-field.disabled input { cursor: not-allowed; color: var(--ink-soft); }
.switch-row { display: flex; align-items: center; gap: 12px; font-size: 15px; padding: 8px 0; cursor: pointer; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--brand); }

/* ---------- MODAIS / TOAST ---------- */
.home-modal-card { gap: 16px; }
.home-modal-card.wide { max-width: 540px; }
.modal-from { font-size: 13px; }
.proposal-body { background: var(--cream); border-radius: 10px; padding: 18px; font-size: 15px; line-height: 1.6; }
.proposal-body ul { margin: 8px 0 0 18px; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 10px; font-size: 15px; opacity: 0; pointer-events: none; transition: .25s; z-index: 20000; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { background: #9a3412; }

/* Barra de navegação do protótipo (discreta) */
.demo-bar { position: fixed; bottom: 16px; left: 16px; display: flex; gap: 4px; background: rgba(15,23,42,.85); padding: 5px; border-radius: 8px; z-index: 900; }
.demo-bar a { color: #cbd5e1; font-size: 11px; padding: 4px 10px; border-radius: 5px; font-family: inherit; }
.demo-bar a:hover { background: rgba(255,255,255,.1); color: #fff; }
.demo-bar a.rcm { color: #86efac; }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 960px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-brand { padding: 32px 24px; gap: 30px; }
  .auth-features { display: none; }
  .portal-layout { grid-template-columns: 1fr; gap: 20px; }
  .portal-nav { position: static; flex-direction: row; overflow-x: auto; }
  .nav-btn { width: auto; white-space: nowrap; }
  .nav-divider { display: none; }
  .next-trip { grid-template-columns: 1fr; }
  .next-trip-visual { order: -1; }
}
@media (max-width: 640px) {
  .stat-row, .quick-grid, .form-grid-2, .bk-grid, .plan-figures { grid-template-columns: 1fr; }
  .plan-sched-row { grid-template-columns: 30px 1fr 80px; }
  .plan-sched-row .status-pill { grid-column: 2 / -1; }
  .bk-body { grid-template-columns: 1fr; }
  .account-chip span:not(.avatar) { display: none; }
}
