:root{
  --c-primary:#0096D6;
  --c-primary-dark:#1A5BDB;
  --c-accent:#DCF659;
  --c-bg:#8EC6FF;
  --c-text:#0f172a;
  --radius:16px;
  --shadow:0 10px 24px rgba(0,0,0,.10);
  --container-max:1180px;
}
html, body{ background: var(--c-bg) !important; }
*{box-sizing:border-box}
body{ margin:0; color:var(--c-text); font-family:Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif; }
a{color:var(--c-primary); text-decoration:none}
a:hover{color:var(--c-primary-dark)}
.container{ max-width: var(--container-max); margin:0 auto; padding:20px }
.topbar{ border-bottom:1px solid #e8eef7; background:transparent; width:100% }
.topbar-inner{ max-width: var(--container-max); margin:0 auto; display:flex; align-items:center; gap:16px; padding:12px 20px }
.brand{ display:flex; align-items:flex-start; gap:8px }
.brand img{ height:34px; width:auto; border-radius:8px; display:block }
.subbrand{ display:flex; flex-direction:column; line-height:1.15; }
.subbrand .subtitle{ font-size:12px; color:#111; opacity:.75; max-width:300px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nav{ margin-left:auto; display:flex; gap:10px; flex-wrap:nowrap }
.nav a, .nav .trigger{ display:inline-flex; align-items:center; gap:6px; padding:8px 12px; border-radius:14px; border:1px solid #e5e7eb; background: linear-gradient(180deg, #ffffff 0%, #F7FBFF 100%); box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease, border-color .12s ease; white-space:nowrap; }
.nav a:hover, .nav .trigger:hover{ transform: translateY(-1px); box-shadow: 0 14px 28px rgba(0,0,0,.12); background: linear-gradient(180deg, #1A5BDB 0%, #0096D6 100%); color:#fff; border-color: transparent; }
.nav a.active{ background: linear-gradient(180deg, #0096D6 0%, #1A5BDB 100%); color:#fff; border-color: transparent; }
.dropdown{ position:relative }
.dropdown-menu{ position:absolute; top:100%; left:0; margin-top:8px; min-width:200px; z-index:50; background:#fff; border:1px solid #e5e7eb; border-radius:14px; box-shadow: var(--shadow); padding:8px; display:none; }
.dropdown:hover .dropdown-menu{ display:block }
.dropdown-menu a{ display:flex; align-items:center; padding:8px 10px; border-radius:10px; color:#0f172a; background:#fff; box-shadow:none; border:1px solid transparent; }
.dropdown-menu a:hover{ background:#F7FBFF; border-color:#dbeafe; color:#1e3a8a; transform:none; box-shadow:none }
.card{ background:#fff; border:1px solid #e8eef7; border-radius: var(--radius); box-shadow: var(--shadow); padding:16px }
.btn{ display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border:1px solid #e5e7eb; border-radius:12px; box-shadow:var(--shadow); background:#fff; cursor:pointer }
.btn.primary{ background:var(--c-primary); color:#fff }
.btn.primary:hover{ background:var(--c-primary-dark) }
.btn.danger{ background:#e23a3a; color:#fff }
.btn.ghost{ background:transparent; border:none; box-shadow:none }
.btn.big{ padding:16px 18px; font-size:16px; font-weight:700; border-radius:16px }
.pdf-btn{ background:linear-gradient(180deg,#ffffff 0%,#eef6ff 100%); border-color:#dbeafe }
.pdf-btn:hover{ background:linear-gradient(180deg,#e5f0ff 0%,#d6ebff 100%) }
.grid{ display:grid; gap:16px }
.grid.cols-3{ grid-template-columns:repeat(3,1fr) }
.kpi{ font-size:28px; font-weight:800 }
.kpi-sub{ font-size:12px; color:#666 }
.table{ width:100%; border-collapse:separate; border-spacing:0 8px }
.table thead th{ font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:#666; text-align:left; padding:6px 10px }
.table tbody tr{ background:#fff; border:1px solid #eee }
.table tbody tr:hover{ outline:2px solid var(--c-primary); background:#f7fbff }
.table td{ padding:10px }
.input, select, textarea{ width:100%; padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; outline:none }
.input:focus, select:focus, textarea:focus{ border-color:var(--c-primary) }
.badge{ display:inline-flex; align-items:center; gap:8px; border-radius:999px; padding:6px 10px; font-size:12px }
.badge.ok{ background:#e8f7ef; color:#147d3b }
.badge.warn{ background:#fff4e5; color:#b45309 }
.badge.err{ background:#fde8e8; color:#b91c1c }
.notice{ background:#f3f7ff; border-left:4px solid #1A5BDB; padding:12px; border-radius:10px }
/* cachebust_marker_v5 */
/* --- Dropdown stability & footer alignment patch --- */

/* Ensure dropdown stays open on hover/focus/click */
.dropdown{ position:relative }
.dropdown-menu{
  position:absolute; top:calc(100% + 6px); left:0; right:auto;
  margin-top:0; /* remove gap that caused hover drop */
  min-width:200px; z-index:50;
  background:#fff; border:1px solid #e5e7eb; border-radius:14px; box-shadow: 0 10px 24px rgba(0,0,0,.10);
  padding:8px; display:none;
}
.dropdown.open .dropdown-menu,
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu{ display:block }

/* Trigger should be focusable (handled in HTML via <button>) */
.nav .trigger{
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 12px; border-radius:14px;
  border:1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #F7FBFF 100%);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
  cursor:pointer;
}

/* Footer: constrain width and right-align links hard */
.footer{ width:100% }
.footer > .footer-inner{ max-width:1180px; margin:0 auto; padding:30px 20px }
.footer > .footer-inner > .links{ display:flex; gap:16px; justify-content:flex-end !important; flex-wrap:wrap }

/* Force subtitle under the logo (stack vertically) */
.topbar .brand{ 
  display:flex !important; 
  flex-direction:column !important; 
  align-items:flex-start !important; 
  gap:4px !important; 
}
.topbar .brand img{ display:block; height:34px; width:auto; margin:0 0 4px 0; }
.topbar .subbrand{ display:block !important; }
.topbar .subbrand .subtitle{ display:block; font-size:12px; color:#111; opacity:.75; }

/* Keep nav aligned to the right on a single line */
.topbar .nav{ margin-left:auto; flex-wrap:nowrap; }

/* ===== Helpers for centered cards and 2-col grids (patch v8) ===== */
.center-card{
  display:flex; align-items:center; justify-content:center;
  min-height:140px; text-align:center; flex-direction:column; gap:8px;
}
.company-grid{
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px;
}
@media (max-width: 760px){
  .company-grid{ grid-template-columns:1fr; }
}
.icon-title{ display:flex; align-items:center; gap:8px; margin:0 0 10px 0; }

/* === Topmenu trigger normalization (v9) === */
.nav .trigger{
  appearance:none; -webkit-appearance:none; border:1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #F7FBFF 100%);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
  color: inherit;
  display:inline-flex; align-items:center; gap:6px;
  padding:10px 14px; /* same as .nav a */
  border-radius:14px;
  cursor:pointer; outline:none;
  font: inherit; line-height:1.2; white-space:nowrap;
}
.nav .trigger:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,.12);
  background: linear-gradient(180deg, #1A5BDB 0%, #0096D6 100%);
  color:#fff; border-color: transparent;
}
/* Keep open state visible if needed */
.dropdown.open .trigger{
  background: linear-gradient(180deg, #0096D6 0%, #1A5BDB 100%);
  color:#fff; border-color: transparent;
}
