
:root{
  --bg:#F5F7FA;
  --card:#FFFFFF;
  --text:#1A1A1A;
  --muted:#6B7280;
  --primary:#1E4E8C;
  --primary-100:#EAF2FB;
  --border:#E5E7EB;
  --success:#2E7D32;
  --warning:#ED6C02;
  --danger:#D32F2F;
  --shadow:0 2px 10px rgba(16,24,40,.08);
  --radius:10px;
  --sidebar:260px;
  --topbar:72px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:var(--bg);
}
a{color:inherit; text-decoration:none}
.container{
  display:flex;
  min-height:100vh;
}
.topbar{
  position:sticky;
  top:0;
  height:var(--topbar);
  background:var(--card);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 20px;
  border-bottom:1px solid var(--border);
  z-index:10;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:700;
}
.logo{
  width:34px;height:34px;border-radius:10px;
  background:var(--primary);
  display:inline-flex;align-items:center;justify-content:center;
  color:#fff;font-weight:800;
}
.top-actions{
  display:flex;align-items:center;gap:12px;
}
.pill{
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  color:var(--muted);
  font-size:13px;
}
.iconbtn{
  width:38px;height:38px;border-radius:10px;
  border:1px solid var(--border);
  background:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  cursor:pointer;
  position:relative;
}

/* small notification count badge on icon buttons */
.iconbtn .notif-badge{
  position:absolute;
  top:-6px;
  right:-6px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--danger);
  color:#fff;
  font-size:11px;
  font-weight:800;
  border-radius:999px;
  border:2px solid #fff;
  box-shadow:0 2px 6px rgba(0,0,0,.12);
}

.iconbtn .notif-badge.hidden{display:none}

/* language dropdown (shown from topbar pill) */
.lang-dropdown{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:10px;
  box-shadow:var(--shadow);
  min-width:120px;
  overflow:hidden;
  z-index:120;
}
.lang-dropdown .lang-option{
  padding:8px 12px; cursor:pointer; font-weight:700; color:var(--muted);
}
.lang-dropdown .lang-option:hover{background:#F3F4F6; color:var(--text)}
.lang-dropdown .lang-option.active{background:var(--primary-100); color:var(--primary)}
.avatar{
  display:flex;align-items:center;gap:10px;
  border:1px solid var(--border);
  background:#fff;
  padding:6px 10px;
  border-radius:999px;
}
.avatar .pic{
  width:28px;height:28px;border-radius:999px;
  background:linear-gradient(135deg, var(--primary), #4f8ad6);
}
.sidebar{
  width:var(--sidebar);
  background:var(--card);
  border-right:1px solid var(--border);
  padding:14px 12px;
  position:sticky;
  top:0;
  height:100vh;
}
.nav-section{
  margin-top:10px;
  padding:8px 10px;
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.nav a{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;
  margin:4px 6px;
  border-radius:10px;
  color:#111827;
}
.nav a:hover{background:#F3F4F6}
.nav a.active{
  background:var(--primary-100);
  color:var(--primary);
  border-left:4px solid var(--primary);
  border-radius:10px;
  padding-left:8px;
}
.badge{
  margin-left:auto;
  font-size:12px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--muted);
}
.badge.success{border-color:rgba(46,125,50,.25); color:var(--success); background:rgba(46,125,50,.08)}
.badge.warning{border-color:rgba(237,108,2,.25); color:var(--warning); background:rgba(237,108,2,.08)}
.badge.danger{border-color:rgba(211,47,47,.25); color:var(--danger); background:rgba(211,47,47,.08)}
.main{
  flex:1;
  display:flex;
  flex-direction:column;
}
.content{
  padding:24px;
  max-width:1200px;
}
.page-title{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
}
.h1{font-size:28px;font-weight:800;margin:0}
.sub{color:var(--muted); margin-top:6px}

/* Dashboard hero (subtle, card-like and responsive)
   Kept subtle so it doesn't clash with other cards */
.hero{
  background:var(--card);
  padding:14px;
  border-radius:var(--radius);
  margin-bottom:14px;
  border:1px solid var(--border);
}
.hero-card{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.hero-left{max-width:68%;}
.hero-right{display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.hero .kv{grid-template-columns:180px 1fr}
.status-pill{display:inline-block;padding:6px 10px;border-radius:999px;font-weight:700;border:1px solid rgba(30,78,140,.08);background:var(--primary-100);color:var(--primary);font-size:13px}

/* Improve main CTA styles but keep consistency */
.btn.primary.large{padding:10px 16px;font-size:14px;border-radius:10px}
.btn.secondary{background:#fff;border:1px solid var(--border);color:var(--primary);padding:10px 14px;border-radius:10px}

@media (max-width:860px){
  .hero-card{flex-direction:column}
  .hero-right{align-items:stretch}
  .btn.primary.large,.btn.secondary{width:100%}
  .hero-left{max-width:100%}
}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.grid{
  display:grid;
  gap:16px;
}
.grid.cards{grid-template-columns:repeat(4, minmax(0,1fr)); margin-top:16px}
@media (max-width:1100px){ .grid.cards{grid-template-columns:repeat(2, minmax(0,1fr));}}
@media (max-width:720px){
  .container{flex-direction:column}
  .sidebar{width:100%; height:auto; position:relative}
  .main{width:100%}
  .grid.cards{grid-template-columns:1fr}
}
.stat{
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.stat .label{color:var(--muted); font-size:13px}
.stat .value{font-size:28px; font-weight:800}
.row{
  display:flex; gap:12px; flex-wrap:wrap;
}
.btn{
  border:1px solid var(--border);
  background:#fff;
  border-radius:10px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
}
.btn.primary{
  background:var(--primary);
  color:#fff;
  border-color:rgba(30,78,140,.2);
}
.btn.ghost{
  background:transparent;
}
.btn:hover{filter:brightness(.98)}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
}
.table th,.table td{
  padding:12px 12px;
  border-bottom:1px solid var(--border);
  font-size:14px;
}
.table th{color:var(--muted); font-weight:700; background:#FAFAFB; text-align:left}
.table tr:hover td{background:#FBFCFE}
.card-header{
  padding:16px 16px 0 16px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.card-title{font-weight:800}
.card-body{padding:16px}
.kv{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap:10px;
  font-size:14px;
}
.kv .k{color:var(--muted)}
.hr{height:1px;background:var(--border); margin:14px 0}
.timeline{margin:0; padding:0 0 0 16px}
.timeline li{
  margin:10px 0;
  position:relative;
  list-style:none;
  padding-left:12px;
}
.timeline li:before{
  content:"";
  position:absolute;
  left:-16px; top:6px;
  width:10px;height:10px;border-radius:999px;
  background:var(--primary);
}
.timeline li .t{font-weight:700}
.timeline li .d{color:var(--muted); font-size:13px}
.form{
  display:grid;
  gap:14px;
}
.field label{display:block; font-weight:700; font-size:13px; margin-bottom:6px}
.field input,.field select,.field textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  font-family:var(--font);
  font-size:14px;
}
.field textarea{min-height:96px; resize:vertical}
.stepper{
  display:flex; gap:10px; flex-wrap:wrap;
  margin:14px 0 4px 0;
}
.step{
  display:flex; align-items:center; gap:10px;
  padding:8px 10px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:999px;
  font-size:13px;
  color:var(--muted);
}
.step .dot{
  width:20px;height:20px;border-radius:999px;
  background:#E5E7EB;
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:800;
  font-size:12px;
}
.step.active{border-color:rgba(30,78,140,.25); background:var(--primary-100); color:var(--primary)}
.step.active .dot{background:var(--primary); color:#fff}
.modal{
  position:fixed; inset:0;
  background:rgba(17,24,39,.5);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:100;
}
.modal.open{display:flex}
.modal .panel{
  width:min(720px, 100%);
  background:#fff;
  border-radius:14px;
  border:1px solid var(--border);
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  overflow:hidden;
}
.modal .panel .head{
  padding:14px 16px;
  display:flex; align-items:center; justify-content:space-between;
  background:#FAFAFB;
  border-bottom:1px solid var(--border);
  font-weight:800;
}
.modal .panel .body{padding:16px}
.small{font-size:13px;color:var(--muted)}
.footer-note{
  margin-top:14px;
  color:var(--muted);
  font-size:12px;
}
