/* ============================================================================
   juribooks-odoo-skin-v2.css — app-wide Odoo look for EVERY sheet.

   Restyles the shared building blocks (cards, report/register tables, section
   tabs, filter bars, form fields, metric tiles, totals) so all views match the
   journal + dashboard Odoo aesthetic: soft rounded cards with gentle depth,
   clean muted table headers, hairline rows, underline tabs, rounded inputs with
   a focus ring — theme-aware (light + dark). Presentation only.

   Scoped to content views (.view) and drill modals (#drillBox). The rail/topbar
   keep their own theme; the journal grid (.jtbl/.jcell) and the executive
   dashboard (.exec-*) keep their dedicated styles (different classes).
   Loaded LAST so it wins over the inline styles and skin-v2.
   ========================================================================== */
:root{
  --od-r:14px;
  --od-e1:0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.08);
  --od-e2:0 1px 2px rgba(16,24,40,.05), 0 10px 24px -12px rgba(16,24,40,.16);
  --od-top:linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 46%);
}
:root[data-theme="dark"]{
  --od-e1:0 1px 2px rgba(0,0,0,.5);
  --od-e2:0 2px 6px rgba(0,0,0,.45), 0 12px 26px -12px rgba(0,0,0,.6);
  --od-top:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 46%);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --od-e1:0 1px 2px rgba(0,0,0,.5);
    --od-e2:0 2px 6px rgba(0,0,0,.45), 0 12px 26px -12px rgba(0,0,0,.6);
    --od-top:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 46%);
  }
}

/* ---- cards / panels ---- */
.view .card, #drillBox .card{
  border-radius:var(--od-r) !important;
  border:1px solid var(--line) !important;
  box-shadow:var(--od-e2) !important;
  background-color:var(--surface) !important;
  background-image:var(--od-top);
  background-repeat:no-repeat;
}

/* ---- metric / KPI tiles ---- */
.view .mx{ border-radius:12px !important; box-shadow:var(--od-e1) !important; border:1px solid var(--line) !important; }

/* ---- filter / period bar ---- */
.view .period-bar{ border-radius:12px !important; box-shadow:var(--od-e1) !important; border:1px solid var(--line) !important; background:var(--surface) !important; }

/* ---- report / register tables (NOT the journal .jtbl) ---- */
.view .tb-tbl thead th, #drillBox .tb-tbl thead th{
  background:var(--surface-2) !important; color:var(--mute) !important;
  text-transform:uppercase; letter-spacing:.05em;
  font-size:var(--f-2xs) !important; font-weight:600 !important;
  border-bottom:1px solid var(--line) !important;
}
.view .tb-tbl td, #drillBox .tb-tbl td{ border-bottom:1px solid var(--line) !important; }
.view .tb-tbl tbody tr:hover td, #drillBox .tb-tbl tbody tr:hover td{ background:color-mix(in oklch, var(--navy) 4%, transparent) !important; }
.view .tb-tbl tfoot td, .view .tb-tbl tr.tot td{ background:var(--surface-2) !important; border-top:1px solid var(--navy) !important; }
.view .frz thead th{ background:var(--surface-2) !important; }

/* ---- section tab strips → Odoo underline ---- */
.view .rtabs{ background:transparent !important; border:0 !important; border-bottom:1px solid var(--line) !important; border-radius:0 !important; padding:0 !important; gap:4px; }
.view .rtab{ border-radius:8px 8px 0 0 !important; }
.view .rtab.on{ background:transparent !important; box-shadow:none !important; color:var(--navy) !important; border-bottom:2px solid var(--navy) !important; font-weight:600 !important; }

/* ---- left section list (rlist) ---- */
.view .rlist-item{ border-radius:8px !important; }

/* ---- form fields (filter bars, .pf forms, drill modals) ---- */
.view .period-bar input, .view .period-bar select,
.view .pf input, .view .pf select, .view .pf textarea,
#drillBox .pf input, #drillBox .pf select, #drillBox .pf textarea{
  border:1px solid var(--line) !important; border-radius:8px !important;
  background:var(--surface) !important; color:var(--ink) !important;
}
.view .period-bar input:focus, .view .period-bar select:focus,
.view .pf input:focus, .view .pf select:focus, .view .pf textarea:focus,
#drillBox .pf input:focus, #drillBox .pf select:focus{
  outline:none !important; border-color:var(--navy) !important;
  box-shadow:0 0 0 3px color-mix(in oklch, var(--navy) 16%, transparent) !important;
}

/* ---- headings ---- */
.view .eyebrow{ color:var(--navy) !important; }

/* ---- drill / modal container gets the same soft card feel ---- */
#drillBox{ border-radius:16px !important; }
