:root{
  --bg:#f6f7fb;
  --panel:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;

  --brand:#22c55e;
  --brand2:#0ea5e9;

  --shadow: 0 10px 25px rgba(17,24,39,.08);
  --radius: 14px;

  --max: 1180px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(34,197,94,.12), transparent 60%),
              radial-gradient(1100px 600px at 90% -10%, rgba(14,165,233,.12), transparent 60%),
              var(--bg);
  line-height: 1.6;
}

a{ color: inherit; }
a:hover{ opacity:.92; }

.wrap{
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.skip{
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip:focus{
  position:fixed; left:16px; top:16px;
  width:auto; height:auto;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  z-index: 999;
  box-shadow: var(--shadow);
}

/* Topbar */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 12px 0;
}

.brand{
  display:flex; align-items:center; gap:12px;
}
.brand__mark{
  width:38px; height:38px;
  display:grid; place-items:center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:#fff;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(14,165,233,.18);
}
.brand__name{ font-weight: 800; letter-spacing:.2px; }
.brand__sub{ font-size: 12px; color: var(--muted); }

.topbar__actions{
  display:flex; align-items:center; gap:10px;
}
.search{
  display:flex; align-items:center; gap:10px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
}
.search__icon{ color: var(--muted); }
.search__input{
  border:none; outline:none; background: transparent;
  width: 320px;
  font-size: 14px;
}
.btn{
  border: 1px solid rgba(17,24,39,.12);
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 12px;
  cursor:pointer;
  box-shadow: 0 10px 18px rgba(14,165,233,.12);
}
.btn--soft{
  background: var(--panel);
  color: var(--text);
  box-shadow: none;
}
.btn:hover{ filter: brightness(0.98); }

/* Layout */
.layout{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  padding: 18px 0 30px;
}

.sidebar{
  position: sticky;
  top: 72px;
  align-self: start;
}

.snav{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin-bottom: 12px;
}
.snav__item{
  text-decoration:none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--muted);
}
.snav__item:hover{
  background: rgba(14,165,233,.06);
  color: var(--text);
  border-color: rgba(14,165,233,.15);
}
.snav__item--active{
  background: rgba(34,197,94,.08);
  color: var(--text);
  border-color: rgba(34,197,94,.20);
}

.panel{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 12px;
}
.panel__title{
  font-weight: 800;
  font-size: 13px;
  color: #111827;
  margin-bottom: 10px;
}

.field{ display:block; margin-bottom: 10px; }
.field__label{
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field__control{
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}
.hint{
  font-size: 12px;
  color: var(--muted);
  padding-top: 6px;
}
.mini{
  margin:0;
  padding-left: 18px;
  color: var(--muted);
}
.dot{
  display:inline-block;
  width:10px; height:10px;
  border-radius: 999px;
  margin-right: 6px;
}
.dot--g{ background: var(--brand); }
.dot--b{ background: var(--brand2); }
.dot--p{ background: #a855f7; }

/* Main */
.main{ min-width: 0; }

.grid{
  display:grid;
  gap: 14px;
}
.kpis{ grid-template-columns: repeat(4, 1fr); }
.two{ grid-template-columns: 1.1fr .9fr; }
.three{ grid-template-columns: repeat(3, 1fr); }

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  min-width: 0;
}
.card__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.card__title{
  margin:0;
  font-size: 15px;
  font-weight: 900;
}
.pill{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
}
.pill--ok{ border-color: rgba(34,197,94,.25); background: rgba(34,197,94,.08); color:#14532d; }
.pill--warn{ border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.10); color:#7c2d12; }

.kpi__label{ font-size: 12px; color: var(--muted); font-weight: 700; }
.kpi__value{ font-size: 28px; font-weight: 900; letter-spacing: -0.4px; margin-top: 2px; }
.kpi__meta{ font-size: 12px; color: var(--muted); margin-top: 4px; }
.up{ color:#166534; font-weight: 800; }
.down{ color:#991b1b; font-weight: 800; }

.muted{ color: var(--muted); }
.small{ font-size: 12px; }

/* Chart placeholder */
.chart{
  height: 170px;
  display:flex;
  align-items:flex-end;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px dashed rgba(17,24,39,.12);
  background: linear-gradient(180deg, rgba(14,165,233,.07), rgba(34,197,94,.06));
  margin-bottom: 10px;
}
.chart__bar{
  width: 100%;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, var(--brand2), var(--brand));
}

/* Checklist */
.check{ margin:0; padding-left: 0; list-style:none; display:grid; gap: 8px; }
.tick{
  display:inline-grid; place-items:center;
  width:18px; height:18px;
  border-radius: 6px;
  background: rgba(34,197,94,.10);
  color:#166534;
  font-weight: 900;
  margin-right: 8px;
}
.actions{ display:flex; gap:10px; margin-top: 12px; flex-wrap: wrap; }

/* Table */
.table-wrap{ overflow:auto; border-radius: 12px; border: 1px solid var(--border); }
.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #fff;
}
.table th, .table td{
  text-align:left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table th{
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .3px;
  text-transform: uppercase;
  background: #fbfbfd;
}
.tag{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
}
.tag--ok{ background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.25); color:#14532d; }
.tag--info{ background: rgba(14,165,233,.10); border-color: rgba(14,165,233,.25); color:#0c4a6e; }
.tag--warn{ background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.28); color:#7c2d12; }

.links{
  margin:0;
  padding-left: 18px;
  color: var(--muted);
}
.links a{
  color: #0c4a6e;
  text-decoration: none;
}
.links a:hover{
  text-decoration: underline;
}

/* Footer */
.footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 16px 2px 0;
  margin-top: 14px;
}

/* Responsive */
@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ position: static; }
  .kpis{ grid-template-columns: repeat(2, 1fr); }
  .two{ grid-template-columns: 1fr; }
  .three{ grid-template-columns: 1fr; }
  .search__input{ width: 180px; }
}
@media (max-width: 520px){
  .kpis{ grid-template-columns: 1fr; }
  .topbar__actions{ gap: 8px; }
  .search{ display:none; }
}
