
:root{
  --bg:#f4f7fa;
  --card:#ffffff;
  --text:#152128;
  --muted:#6a7980;
  --line:#d9e6ea;
  --brand:#0a756f;
  --brand2:#11998f;
  --brand-dark:#075b57;
  --purple:#6a55ea;
  --orange:#f6a546;
  --blue:#4f8ef7;
  --pink:#ea5a9d;
  --green:#19b886;
  --soft:#eaf8f6;
  --soft2:#f7fbfb;
  --shadow:0 10px 28px rgba(14,46,49,.08);
  --shadow-sm:0 3px 12px rgba(14,46,49,.06);
  --radius:18px;
  --sidebar-w:252px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
  font-size:16px;
}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
.app-shell{display:block}

.sidebar{
  position:fixed;
  left:0; top:0; bottom:0;
  width:var(--sidebar-w);
  background:linear-gradient(180deg,var(--brand-dark),var(--brand2));
  color:#fff;
  padding:18px 14px 16px;
  display:flex;
  flex-direction:column;
  box-shadow:6px 0 24px rgba(6,65,62,.18);
  z-index:40;
}
.sidebar-brand{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.sidebar-logo{
  width:42px;height:42px;border-radius:13px;display:grid;place-items:center;
  background:#fff;color:var(--brand);font-weight:950;font-size:16px;letter-spacing:.04em;flex:0 0 auto;
}
.sidebar-brand-text{display:flex;flex-direction:column}
.sidebar-brand-text small{font-size:10px;letter-spacing:.15em;font-weight:900;opacity:.82}
.sidebar-brand-text strong{font-size:22px;margin-top:2px;line-height:1.05}
.sidebar-nav{display:flex;flex-direction:column;gap:5px}
.sidebar-link{
  display:flex;align-items:center;gap:11px;
  padding:12px 13px;border-radius:12px;
  color:rgba(255,255,255,.88);font-weight:800
}
.sidebar-link:hover{background:rgba(255,255,255,.1);color:#fff}
.sidebar-link.active{
  background:#fff;color:var(--brand-dark);
  box-shadow:0 8px 18px rgba(0,0,0,.09)
}
.sidebar-icon{width:18px;text-align:center;font-size:16px}
.sidebar-footer{margin-top:auto}
.sidebar-user{
  padding:11px 12px;border-radius:12px;background:rgba(255,255,255,.12);font-weight:800
}
.sidebar-logout{
  display:block;margin-top:9px;padding:11px 12px;border-radius:12px;
  background:rgba(255,255,255,.17);font-weight:900;text-align:center
}
.sidebar-logout:hover{background:rgba(255,255,255,.24)}

.main-area{
  margin-left:var(--sidebar-w);
  min-height:100vh;
}
.mobile-topbar{display:none}
.page-title-bar{
  background:#fff;
  border-bottom:1px solid var(--line);
}
.page-title-inner{
  width:min(1580px,calc(100% - 36px));
  margin:0 auto;
  padding:18px 0 17px;
}
.back-home{
  display:inline-block;margin-bottom:5px;color:var(--brand);
  font-size:13px;font-weight:850;
}
.page-title-inner h1{
  margin:0;font-size:30px;line-height:1.1;letter-spacing:-.02em;
}
.container{
  width:min(1580px,calc(100% - 36px));
  max-width:none;
  margin:22px auto 110px;
  padding:0;
}
.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.card{
  background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:20px;box-shadow:var(--shadow-sm)
}
.card h2,.card h3{margin-top:0}
.metric .label{font-size:13px;font-weight:800;color:var(--muted)}
.metric .value{font-size:32px;font-weight:950;letter-spacing:-.03em;margin-top:6px}
.metric .sub{font-size:12px;color:var(--muted);margin-top:5px}
.metric.color-green{background:linear-gradient(180deg,#fff,#f5fffb)}
.metric.color-blue{background:linear-gradient(180deg,#fff,#f7fbff)}
.metric.color-purple{background:linear-gradient(180deg,#fff,#faf8ff)}
.metric.color-orange{background:linear-gradient(180deg,#fff,#fffaf4)}
.section{margin-top:22px}
.tablewrap{
  overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-sm)
}
table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;min-width:720px}
th,td{padding:12px 14px;border-bottom:1px solid var(--line);text-align:left}
th{background:#eaf6f4;color:#19383b;font-size:12px;font-weight:950;text-transform:uppercase;letter-spacing:.05em}
tr:last-child td{border-bottom:0}
.btn{
  display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:12px;
  padding:12px 16px;background:linear-gradient(135deg,var(--brand),#0e8881);color:#fff;
  font-weight:900;cursor:pointer;box-shadow:0 5px 16px rgba(11,112,107,.2)
}
.btn.secondary{background:#edf3f4;color:var(--text);box-shadow:none}
.formgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
label{display:block;font-size:13px;font-weight:850;margin-bottom:6px}
input,select,textarea{
  width:100%;border:1px solid #cbd9dc;border-radius:11px;padding:11px 12px;background:#fff;color:var(--text);outline:none
}
input:focus,select:focus,textarea:focus{border-color:#66b7b0;box-shadow:0 0 0 3px rgba(17,153,143,.10)}
.flash{padding:13px 15px;border-radius:12px;background:#e9f8f5;border:1px solid #ccebe5;margin-bottom:16px}
.alert{padding:13px 15px;border:1px solid #efd8a6;background:#fff8e8;border-radius:12px}
.empty{color:var(--muted);padding:18px 0}

.kpi-chip-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:8px}
.kpi-chip{
  display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:999px;
  background:#f5fafb;border:1px solid var(--line);font-size:13px;font-weight:800;color:#355058
}
.kpi-dot{width:10px;height:10px;border-radius:50%}
.dot-green{background:var(--green)} .dot-blue{background:var(--blue)} .dot-orange{background:var(--orange)} .dot-purple{background:var(--purple)}

.chart-grid{display:grid;grid-template-columns:1.35fr .95fr;gap:16px}
.chart-card{padding:18px 18px 16px}
.chart-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:8px}
.chart-header h2{margin:0;font-size:21px}
.chart-header p{margin:4px 0 0;color:var(--muted);font-size:13px}
.legend{display:flex;flex-wrap:wrap;gap:8px}
.legend span{
  display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;
  background:#f6fafb;border:1px solid var(--line);font-size:12px;font-weight:800;color:#42606a
}
.legend i{width:10px;height:10px;border-radius:50%;display:inline-block}
.domain-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.domain-pill{
  display:flex;justify-content:space-between;align-items:center;
  padding:12px;border-radius:14px;background:#fbfdfd;border:1px solid var(--line)
}
.domain-pill strong{display:block;font-size:14px}
.domain-pill small{color:var(--muted)}
.domain-pill .num{font-weight:950}
.notice-banner{
  padding:16px 18px;border-radius:15px;background:linear-gradient(135deg,#fff6df,#fff0d0);
  border:1px solid #f0d7a2
}
.notice-banner strong{display:block;margin-bottom:3px}
.quick-actions{display:flex;flex-wrap:wrap;gap:10px}
.quick-card{
  flex:1 1 180px;display:flex;justify-content:space-between;align-items:center;
  padding:16px;border-radius:16px;border:1px solid var(--line);background:#fbfdfd
}
.quick-card strong{display:block}
.quick-card small{color:var(--muted)}
.quick-icon{
  width:42px;height:42px;border-radius:12px;display:grid;place-items:center;
  background:linear-gradient(135deg,#0a756f,#11998f);color:#fff;font-weight:950
}

.bottomnav{
  display:none;position:fixed;left:0;right:0;bottom:0;z-index:50;grid-template-columns:repeat(6,1fr);
  background:rgba(255,255,255,.98);border-top:1px solid var(--line);box-shadow:0 -8px 24px rgba(21,49,52,.09)
}
.bottomnav a{
  padding:9px 4px 10px;text-align:center;color:var(--muted);font-size:11px;font-weight:800;
  display:flex;flex-direction:column;align-items:center;gap:3px
}
.bottomnav a.active{color:var(--brand);background:#ecf9f7}
.mobile-icon{font-size:18px}

@media(max-width:1100px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .chart-grid{grid-template-columns:1fr}
}
@media(max-width:860px){
  .sidebar{display:none}
  .main-area{margin-left:0}
  .mobile-topbar{
    display:flex;justify-content:space-between;align-items:center;gap:12px;
    padding:14px 12px;background:linear-gradient(120deg,var(--brand-dark),var(--brand2));color:#fff
  }
  .mobile-brand{display:flex;align-items:center;gap:10px}
  .mobile-brand-text{font-weight:900}
  .mobile-logout{padding:8px 11px;border-radius:10px;background:rgba(255,255,255,.15);font-weight:850}
  .page-title-inner,.container{width:calc(100% - 24px)}
  .page-title-inner{padding:14px 0}
  .page-title-inner h1{font-size:25px}
  .bottomnav{display:grid}
  .formgrid{grid-template-columns:1fr}
}
@media(max-width:560px){
  .grid{grid-template-columns:1fr 1fr;gap:10px}
  .card{padding:14px;border-radius:15px}
  .metric .value{font-size:23px}
  .metric .label{font-size:12px}
  .metric .sub{font-size:11px}
  .domain-list{grid-template-columns:1fr}
  .chart-header{flex-direction:column}
}
