/* ============================================================
   Confluence Air — PIREP page reskin  (cfe-pirep.css)
   ------------------------------------------------------------
   SCOPE: every rule is anchored under `.row:has(#PirepTab)` or
   `#PirepTab*`, which exist ONLY on the PIREP show page. This
   file loads site-wide (one <link> in confluence_v3/app.blade.php)
   but styles nothing outside the PIREP page.

   REVERT: remove the cfe-pirep.css <link> line from app.blade.php
   (or delete this file). No other files are touched.

   Light mode only. Money red/green (.text-danger/.text-success)
   is intentionally left alone — that's accounting, not chrome.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800&family=Source+Sans+3:wght@400;600;700&family=Roboto+Mono:wght@400;500&display=swap');

/* ---- brand tokens, set on the page wrapper ---- */
.row:has(#PirepTab){
  --cfe-navy:#012773;
  --cfe-navy-600:#0a3a8f;
  --cfe-navy-050:#eef1f9;
  --cfe-gold:#f5dc0f;
  --cfe-gold-deep:#c9b400;
  --cfe-ink:#141922;
  --cfe-slate:#5b6576;
  --cfe-line:rgba(1,39,115,.12);
  --cfe-good:#1f7a52;
  --cfe-good-bg:#e6f3ec;
  font-family:"Source Sans 3",system-ui,sans-serif;
  color:var(--cfe-ink);
}

/* ---- typography ---- */
.row:has(#PirepTab) h1,
.row:has(#PirepTab) h2,
.row:has(#PirepTab) h3,
.row:has(#PirepTab) h4,
.row:has(#PirepTab) h5,
.row:has(#PirepTab) h6{
  font-family:"Archivo",sans-serif;
  letter-spacing:-.01em;
}

/* ---- cards ---- */
.row:has(#PirepTab) .card{
  border:1px solid var(--cfe-line);
  border-radius:16px;
  box-shadow:0 1px 2px rgba(1,39,115,.06), 0 8px 24px rgba(1,39,115,.06);
  overflow:hidden;
  background:#fff;
}
.row:has(#PirepTab) .card-header{
  background:var(--cfe-navy);
  color:#fff;
  border-bottom:0;
  font-weight:700;
}
.row:has(#PirepTab) .card-header h1,
.row:has(#PirepTab) .card-header h2,
.row:has(#PirepTab) .card-header h3,
.row:has(#PirepTab) .card-header h4,
.row:has(#PirepTab) .card-header h5,
.row:has(#PirepTab) .card-header a{
  color:#fff;
}
.row:has(#PirepTab) .card-header i{ color:var(--cfe-gold); }
.row:has(#PirepTab) .card-footer{
  background:var(--cfe-navy-050);
  border-top:1px solid var(--cfe-line);
  color:var(--cfe-slate);
  font-family:"Roboto Mono",monospace;
  font-size:12.5px;
}

/* ---- tab nav (sits on the navy card header) ---- */
.row:has(#PirepTab) #PirepTab{ gap:4px; }
.row:has(#PirepTab) #PirepTab .nav-link{
  font-family:"Archivo",sans-serif;
  font-weight:700;
  color:rgba(255,255,255,.72) !important;
  border:0 !important;
  border-radius:10px !important;
  padding:6px 12px !important;
  transition:background .15s, color .15s;
}
.row:has(#PirepTab) #PirepTab .nav-link:hover{
  background:rgba(255,255,255,.10) !important;
  color:#fff !important;
}
.row:has(#PirepTab) #PirepTab .nav-link.active{
  background:rgba(255,255,255,.16) !important;
  color:#fff !important;
}

/* ---- tables (finance / log / fields / comments) ---- */
.row:has(#PirepTab) .table{ font-size:13.5px; margin-bottom:0; }
.row:has(#PirepTab) .table th{
  font-family:"Archivo",sans-serif;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--cfe-slate);
  border-bottom:1px solid var(--cfe-line);
}
.row:has(#PirepTab) .table td{ color:var(--cfe-ink); vertical-align:middle; }
.row:has(#PirepTab) .table a{ color:var(--cfe-navy); text-decoration:none; }
.row:has(#PirepTab) .table a:hover{ text-decoration:underline; }
.row:has(#PirepTab) .table-striped > tbody > tr:nth-of-type(odd) > *{
  background-color:rgba(1,39,115,.03);
}

/* numeric feel for log timestamps / data cells */
.row:has(#PirepTab) #PirepTabContent .table td{
  font-family:"Roboto Mono",monospace;
  font-size:12.5px;
}

/* ---- status badges (Accepted / Arrived etc.) ---- */
.row:has(#PirepTab) .badge.bg-success,
.row:has(#PirepTab) .badge.badge-success{
  background:var(--cfe-good-bg) !important;
  color:var(--cfe-good) !important;
  font-weight:700;
}

/* ---- buttons: retire stray blues, use navy/gold ---- */
.row:has(#PirepTab) .btn-outline-info{
  color:var(--cfe-navy);
  border-color:var(--cfe-navy);
}
.row:has(#PirepTab) .btn-outline-info:hover{
  background:var(--cfe-navy);
  border-color:var(--cfe-navy);
  color:#fff;
}
.row:has(#PirepTab) .btn-outline-success{
  color:var(--cfe-good);
  border-color:var(--cfe-good);
}
.row:has(#PirepTab) .btn-outline-success:hover{
  background:var(--cfe-good);
  border-color:var(--cfe-good);
  color:#fff;
}
.row:has(#PirepTab) .btn-warning{
  background:var(--cfe-gold);
  border-color:var(--cfe-gold-deep);
  color:var(--cfe-navy);
  font-weight:700;
}

/* ---- map / chart tab panes: round the corners, don't touch internals ---- */
.row:has(#PirepTab) #map,
.row:has(#PirepTab) #chart{ border-radius:0 0 16px 16px; overflow:hidden; }

/* ============================================================
   PIREP HERO  (replaces show_card) — classes unique to this page
   ============================================================ */
.cfe-hero{position:relative;overflow:hidden;background:#fff;border:1px solid rgba(1,39,115,.12);border-radius:16px;box-shadow:0 1px 2px rgba(1,39,115,.06),0 8px 24px rgba(1,39,115,.06);font-family:"Source Sans 3",system-ui,sans-serif;color:#141922}
.cfe-hero::before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:linear-gradient(90deg,#012773 0 70%,#f5dc0f 70% 100%)}
.cfe-hero-body{padding:18px 20px}
.cfe-hero-top{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;align-items:flex-start}
.cfe-hero-id{display:flex;gap:14px;align-items:flex-start;min-width:0}
.cfe-hero-badge{width:52px;height:52px;border-radius:14px;flex:0 0 auto;background:#012773;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:"Archivo",sans-serif;font-weight:800;font-size:12px;line-height:1.05}
.cfe-hero-badge small{font-size:9px;opacity:.7;font-weight:600}
.cfe-hero-num{font-family:"Archivo",sans-serif;font-weight:800;font-size:24px;line-height:1.05}
.cfe-hero-num a{color:inherit;text-decoration:none}
.cfe-hero-route{font-size:14px;color:#5b6576;font-weight:600;margin-top:1px}
.cfe-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;align-items:center}
.cfe-chip{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;background:#eef1f9;border:1px solid rgba(1,39,115,.07);border-radius:999px;padding:5px 11px;color:#141922}
.cfe-chip a{color:#141922;text-decoration:none}
.cfe-chip a:hover{text-decoration:underline}
.cfe-chip i{color:#012773}
.cfe-hero-right{display:flex;flex-direction:column;gap:10px;align-items:flex-end}
.cfe-status{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.cfe-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end}
.cfe-actions form{display:inline;margin:0}
.cfe-btn{font-family:"Source Sans 3",sans-serif;font-size:12.5px;font-weight:700;border:1px solid rgba(1,39,115,.12);background:#fff;color:#012773;padding:6px 12px;border-radius:9px;cursor:pointer;display:inline-flex;gap:6px;align-items:center;text-decoration:none;line-height:1.2}
.cfe-btn:hover{background:#eef1f9;border-color:#012773}
.cfe-btn.solid{background:#012773;color:#fff;border-color:#012773}
.cfe-btn.solid:hover{background:#0a3a8f}
.cfe-btn.warn{background:#f5dc0f;color:#012773;border-color:#c9b400}
.cfe-mono{font-family:"Roboto Mono",monospace;font-variant-numeric:tabular-nums}
.cfe-ribbon{margin:18px 0 2px}
.cfe-ribbon-ends{display:flex;justify-content:space-between;font-size:12px;color:#5b6576;margin-bottom:6px}
.cfe-ribbon-ends .icao{font-family:"Archivo",sans-serif;font-weight:800;font-size:15px;color:#141922}
.cfe-ribbon-ends .t{display:block;font-weight:600}
.cfe-track{position:relative;height:12px;border-radius:999px;background:#eef1f9;overflow:hidden}
.cfe-track > span{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,#c9b400,#f5dc0f);border-radius:999px}
.cfe-track > span.inprog{background-image:linear-gradient(45deg,rgba(255,255,255,.28) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.28) 50%,rgba(255,255,255,.28) 75%,transparent 75%,transparent);background-size:1rem 1rem}
.cfe-ribbon-meta{display:flex;justify-content:space-between;font-size:12px;color:#5b6576;margin-top:6px}
.cfe-ribbon-meta b{color:#141922}
.cfe-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:16px}
.cfe-kpi{border:1px solid rgba(1,39,115,.12);border-radius:12px;padding:11px 12px}
.cfe-kpi .lab{font-size:10.5px;text-transform:uppercase;letter-spacing:.04em;color:#5b6576;font-weight:700;display:flex;align-items:center;gap:6px}
.cfe-kpi .lab i{color:#012773}
.cfe-kpi .val{font-family:"Archivo",sans-serif;font-weight:800;font-size:19px;margin-top:7px;line-height:1}
.cfe-kpi .val small{font-size:12px;color:#5b6576;font-weight:600}
.cfe-kpi .sub{font-size:11.5px;color:#5b6576;margin-top:4px;min-height:1em}
@media (max-width:1200px){.cfe-kpis{grid-template-columns:repeat(3,1fr)}}
@media (max-width:575px){.cfe-kpis{grid-template-columns:repeat(2,1fr)}.cfe-hero-right{align-items:flex-start}.cfe-status,.cfe-actions{justify-content:flex-start}}

/* ============================================================
   PIREP right column polish — details + finance cards
   ============================================================ */
/* Load Info / Finance sub-tabs → same pills as the main tabs */
.row:has(#PirepTab) #FinanceTab .nav-link{font-family:"Archivo",sans-serif;font-weight:700;color:rgba(255,255,255,.72) !important;border:0 !important;border-radius:10px !important;padding:5px 11px !important;transition:background .15s,color .15s}
.row:has(#PirepTab) #FinanceTab .nav-link:hover{background:rgba(255,255,255,.10) !important;color:#fff !important}
.row:has(#PirepTab) #FinanceTab .nav-link.active{background:rgba(255,255,255,.16) !important;color:#fff !important}

/* SimBrief + info badges in the details footer → brand */
.row:has(#PirepTab) .card-footer .badge.bg-secondary{background:#012773 !important;color:#fff !important}
.row:has(#PirepTab) .card-footer .badge.bg-primary{background:#f5dc0f !important;color:#012773 !important}
.row:has(#PirepTab) .badge.bg-info{background:#eef1f9 !important;color:#012773 !important}

/* detail/finance tables: a touch more air; money figures in mono */
.row:has(#PirepTab) .card-body .table td,
.row:has(#PirepTab) .card-body .table th{padding-top:.5rem;padding-bottom:.5rem}
.row:has(#PirepTab) #FinanceTabContent .table td:not(.text-start){font-family:"Roboto Mono",monospace;font-variant-numeric:tabular-nums}

/* subtle brand divider used in the details card */
.row:has(#PirepTab) hr{border-color:rgba(1,39,115,.12);opacity:1}

/* ============================================================
   PIREP LISTING PAGE  (/dpireps, route DBasic.pireps)
   Scoped by the body[data-route] hook added to app.blade.php.
   Pure CSS — the module view is not theme-overridable.
   ============================================================ */
body[data-route="DBasic.pireps"] .card{
  border:1px solid rgba(1,39,115,.12);
  border-radius:16px;
  box-shadow:0 1px 2px rgba(1,39,115,.06), 0 8px 24px rgba(1,39,115,.06);
  overflow:hidden;
}
body[data-route="DBasic.pireps"] .card-header{
  background:#012773;
  color:#fff;
  border-bottom:0;
  font-weight:700;
}
body[data-route="DBasic.pireps"] .card-header i{ color:#f5dc0f; }
body[data-route="DBasic.pireps"] .card-footer{
  background:#eef1f9;
  border-top:1px solid rgba(1,39,115,.12);
  color:#5b6576;
}

/* table */
body[data-route="DBasic.pireps"] .table{ font-size:13.5px; }
body[data-route="DBasic.pireps"] .table thead th{
  font-family:"Archivo",sans-serif;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#5b6576;
  border-bottom:1px solid rgba(1,39,115,.12);
  vertical-align:middle;
}
/* @sortablelink anchors in the header — keep legible + navy */
body[data-route="DBasic.pireps"] .table thead th a{
  color:#012773 !important;
  text-decoration:none;
}
body[data-route="DBasic.pireps"] .table thead th a:hover{ text-decoration:underline; }
body[data-route="DBasic.pireps"] .table tbody td{
  vertical-align:middle;
  font-family:"Roboto Mono",monospace;
  font-variant-numeric:tabular-nums;
  font-size:12.5px;
}
/* let the linked cells (flight #, orig, dest, pilot) read as text, not mono */
body[data-route="DBasic.pireps"] .table tbody td a{
  font-family:"Source Sans 3",sans-serif;
  color:#012773;
  text-decoration:none;
  font-weight:600;
}
body[data-route="DBasic.pireps"] .table tbody td a:hover{ text-decoration:underline; }
body[data-route="DBasic.pireps"] .table-striped > tbody > tr:nth-of-type(odd) > *{
  background-color:rgba(1,39,115,.03);
}
body[data-route="DBasic.pireps"] .table tbody tr:hover > *{
  background-color:rgba(245,220,15,.10);
}
/* pagination links → brand */
body[data-route="DBasic.pireps"] .pagination .page-link{ color:#012773; }
body[data-route="DBasic.pireps"] .pagination .active .page-link{
  background:#012773; border-color:#012773; color:#fff;
}
