/* FILE: /public_html/public/assets/css/theme.css
   Theme: CENTERED layout + clean UI (InstantLCD)
   - Body white
   - Consistent centered content width via --page-max
   - Header spans full width, content stays centered
*/

:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #0b1220;
  --muted: #5b677a;
  --line: rgba(14, 25, 45, .12);

  --accent: #0ea5e9;
  --accent2: #22c55e;
  --danger: #ef4444;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(9, 18, 36, .08);

  /* Header (solid classic) */
  --hdr-bg: #0b1220;
  --hdr-bg-2: #0f1b2d;
  --hdr-text: #e8eefc;
  --hdr-muted: #b9c6e6;
  --hdr-border: rgba(255,255,255,.10);
  --hdr-accent: #2f6fed;
  --hdr-accent-2: #1f5fe0;

  /* Centered width token (used by .container + optional .wrap) */
  --page-max: 1420px;
}

/* Base */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #fff; /* white pages */
}

a{color:inherit; text-decoration:none}
img{max-width:100%; height:auto; display:block}

/* Centered container (IMPORTANT) */
.container{
  max-width: var(--page-max); /* centered theme width */
  margin:0 auto;
  padding:0 16px;
}

/* Optional wider container if you need it on some pages:
   <div class="container container--wide"> ... */
.container.container--wide{max-width: 1160px;}

/* Utilities */
.small{font-size:13px; color:var(--muted)}
.p{margin:0; color:var(--muted); line-height:1.6}
.h1{font-size: 34px; line-height:1.05; margin:0 0 8px}
.sr-only{
  position:absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Cards / Layout */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
}
.card-h{padding:14px 14px 0}
.card-b{padding:14px}

/* Grids (keep as utilities) */
.grid{display:grid; gap:12px}
.grid.cols-4{grid-template-columns: repeat(4, minmax(0,1fr))}
.grid.cols-3{grid-template-columns: repeat(3, minmax(0,1fr))}
@media (max-width: 980px){ .grid.cols-4{grid-template-columns: repeat(2, minmax(0,1fr))} }
@media (max-width: 640px){ .grid.cols-4,.grid.cols-3{grid-template-columns: 1fr} }

.kpi{display:flex; gap:10px; flex-wrap:wrap}
.kpi .pill{
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 10px;
  color:var(--muted);
  background:rgba(255,255,255,.6)
}

/* Buttons / Inputs */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:700;
  cursor:pointer;
  user-select:none;
}
.btn:hover{filter: brightness(.99)}
.btn:focus-visible{outline:none; box-shadow: 0 0 0 4px rgba(14,165,233,.14)}
.btn.primary{
  background: var(--accent);
  border-color: rgba(14,165,233,.45);
  color:#fff;
}
.btn.primary:hover{filter: brightness(.98)}
.btn.ghost{background: transparent}

.input{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.92);
  outline:none;
  color: var(--ink);
}
.input:focus{
  border-color: rgba(14,165,233,.7);
  box-shadow: 0 0 0 4px rgba(14,165,233,.14);
}
.input::placeholder{color: rgba(11,18,32,.55)}

/* ===== Header (full width bar, centered content) ===== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--hdr-bg);
  color: var(--hdr-text);
  border-bottom: 1px solid var(--hdr-border);
}

/* Row */
.topbar__row, .topbar .row{
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 0;
}

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:800;
  letter-spacing:.2px;
  color: var(--hdr-text);
  white-space: nowrap;
}
.brand img{
  height:28px; width:auto;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  padding: 6px;
}
.brand__text{font-weight:800}

/* Header search */
.hsearch{
  flex: 1 1 520px;
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 260px;
}
.hsearch__input.input{
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  color: var(--ink);
}
.hsearch__input.input:focus{
  border-color: rgba(47,111,237,.65);
  box-shadow: 0 0 0 4px rgba(47,111,237,.20);
}
.hsearch__btn.btn.primary{
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--hdr-accent);
  border-color: rgba(255,255,255,.10);
}
.hsearch__btn.btn.primary:hover{background: var(--hdr-accent-2)}
.hsearch__btn.btn.primary:focus-visible{
  box-shadow: 0 0 0 4px rgba(47,111,237,.28);
}

/* Desktop nav */
.nav{
  display:flex;
  align-items:center;
  gap:6px;
}
.nav__link, .nav a{
  color: var(--hdr-muted);
  padding: 9px 10px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}
.nav__link:hover, .nav a:hover{
  color: var(--hdr-text);
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
}
.nav__link.active{
  color: #fff;
  background: rgba(47,111,237,.18);
  border-color: rgba(47,111,237,.45);
}

/* Mobile actions button */
.hactions{display:flex; align-items:center}
.btn.mbtn{
  height:40px;
  padding:0 12px;
  border-radius:12px;
  background: rgba(255,255,255,.06);
  color: var(--hdr-text);
  border-color: rgba(255,255,255,.10);
}
.btn.mbtn:hover{background: rgba(255,255,255,.10)}
.btn.mbtn:focus-visible{outline:none; box-shadow: 0 0 0 4px rgba(255,255,255,.16)}

/* Mobile nav dropdown */
.mnav{
  display:none;
  padding: 10px 0 14px;
  border-top: 1px solid var(--hdr-border);
}
.mnav.is-open{display:block}
.mnav__link{
  display:block;
  color: var(--hdr-muted);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
}
.mnav__link:hover{
  color:#fff;
  background: rgba(255,255,255,.06);
}

/* Responsive */
@media (max-width: 980px){
  .nav{display:none}
  .hsearch{flex: 1 1 auto}
}
@media (max-width: 640px){
  .topbar__row, .topbar .row{gap:10px}
  .brand__text{display:none}
  .hsearch{min-width:0}
  .hsearch__btn.btn.primary{padding:0 12px}
}

/* Hero (kept utility for pages that use it) */
.hero{padding:28px 0 14px}
.hero-card{
  background: #fff;
  border:1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.hero-inner{
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap:16px;
  padding:18px;
}
@media (max-width: 860px){ .hero-inner{grid-template-columns:1fr} }

.badges{display:flex; flex-wrap:wrap; gap:8px; margin-top:12px}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  padding:8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  font-size:13px;
  color:var(--muted);
}
.badge i{width:8px; height:8px; border-radius:50%; background: var(--accent)}
.badge.ok i{background: var(--accent2)}

/* Footer */
.footer{padding:28px 0; color:var(--muted)}
