:root{
  --bg:#f4f7fb;
  --panel:#ffffff;
  --card:#ffffff;
  --card2:#ffffff;
  --text:#1a1f2b;
  --muted:#5f6b85;
  --line:rgba(0,0,0,.14);
  --blue:#0b3d91;
  --blue2:#1f6feb;
  --danger:#d94141;
  --good:#2ea043;
  --shadow:0 10px 25px rgba(0,0,0,.10);
  --radius:16px;
  --radius2:12px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

*{box-sizing:border-box}
html,body{
  margin:0;
  font-family:var(--font);
  background: var(--bg);
  color:var(--text);
}
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(1100px 900px at 20% 0%, rgba(31,111,235,.20), transparent 60%),
              radial-gradient(1200px 900px at 70% 10%, rgba(11,61,145,.22), transparent 55%),
              var(--bg);
  color:var(--text);
}

code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:.95em;
}

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

.brand{display:flex; align-items:center; gap:12px;}
.logo{
  width:42px; height:42px;
  border-radius:12px;
  background: linear-gradient(135deg, var(--blue2), var(--blue));
  display:flex; align-items:center; justify-content:center;
  font-weight:800; letter-spacing:.5px;
  box-shadow: var(--shadow);
}
.brand-title{font-weight:800; font-size:16px;}
.brand-sub{color:var(--muted); font-size:12px; margin-top:2px;}
.topbar-actions{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}

.layout{
  display:grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 72px);
}

.sidebar{
  border-right:1px solid var(--line);
  padding:14px;
  background: #ffffff;
}

.navbtn{
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  background: rgba(255,255,255,.95);
  color:var(--text);
  padding:12px 12px;
  border-radius:12px;
  margin-bottom:10px;
  cursor:pointer;
  font-weight:650;
  transition: .15s transform, .15s background, .15s border;
}
.navbtn:hover{transform: translateY(-1px); background: rgba(255,255,255,.04);}
.navbtn.active{
  border-color: rgba(31,111,235,.55);
  background: rgba(31,111,235,.12);
}

.content{padding:16px 16px 22px;}
.view{max-width:1200px; margin:0 auto;}
.hidden{display:none !important;}

.grid{display:grid; gap:14px;}
.grid.two{grid-template-columns: 1fr 1fr;}
.grid.three{grid-template-columns: 1fr 140px 140px;}
@media (max-width: 980px){
  .layout{grid-template-columns: 1fr;}
  .sidebar{display:flex; gap:10px; overflow:auto; position:sticky; top:72px; z-index:9; padding:10px;}
  .navbtn{min-width: 160px; margin:0;}
  .grid.two{grid-template-columns: 1fr;}
  .grid.three{grid-template-columns: 1fr 1fr 1fr;}
}
@media (max-width: 520px){
  .grid.three{grid-template-columns: 1fr 1fr;}
}

.card{
  background: #ffffff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
}

.card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.card-header h2{margin:0; font-size:16px;}
.card-header p{margin:6px 0 0; color:var(--muted); font-size:12.5px; line-height:1.35;}

.form label{display:block; font-size:12px; color:var(--muted); margin-top:10px;}
.form input, .form select{
  width:100%;
  margin-top:6px;
  padding:10px 10px;
  border-radius: 12px;
  border:1.5px solid rgba(0,0,0,.22);
  background: #ffffff;
  color:var(--text);
  outline:none;
  font-weight:600;
}
.form input:focus, .form select:focus{
  border-color: rgba(31,111,235,.75);
  box-shadow: 0 0 0 2px rgba(31,111,235,.15);
}
.combo{display:flex; gap:8px;}
.combo input{flex:1.1;}
.combo select{flex:.9;}

.search{width:260px; max-width:100%;}

.row{display:flex; align-items:center;}
.row.gap{gap:10px;}
.row.wrap{flex-wrap:wrap;}
.row.end{justify-content:flex-end;}

.btn{
  border:1px solid var(--line);
  background: #ffffff;
  color:var(--text);
  padding:10px 12px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:800;
  transition:.15s transform, .15s background, .15s border;
  user-select:none;
}
.btn:hover{transform: translateY(-1px); background: rgba(255,255,255,.05);}
.btn:active{transform: translateY(0px);}
.btn.primary{
  border-color: rgba(31,111,235,.70);
  background: rgba(31,111,235,.12);
}
.btn.danger{
  border-color: rgba(217,65,65,.60);
  background: rgba(217,65,65,.10);
}
.btn.ghost{background: transparent;}
.filelike{display:inline-flex; align-items:center; gap:8px;}
.filelike input{display:none;}

.tablewrap{overflow:auto; border-radius: 14px; border:1px solid var(--line);}
.table{
  width:100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid var(--line);
  vertical-align: top;
}
.table thead th{
  position: sticky;
  top: 0;
  background: #eef3fb;
  z-index: 2;
  text-align:left;
  font-size:12px;
  color: var(--muted);
  letter-spacing: .25px;
}
.table tbody tr:hover{background: rgba(255,255,255,.03);}
.table .right{text-align:right;}
.table .muted{color: var(--muted);}

.mt{margin-top:14px;}

.footerbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
  flex-wrap: wrap;
}

.muted{color:var(--muted)}
.hint{
  margin-top:10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}
.footer{margin-top:16px; color:var(--muted); font-size:12px;}

.bullets{margin:0; padding-left:18px; color:var(--text);}
.bullets li{margin:8px 0; color:var(--text);}
.callout{
  margin-top:12px;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(31,111,235,.35);
  background: rgba(31,111,235,.08);
}
.callout.warn{
  border-color: rgba(217,65,65,.35);
  background: rgba(217,65,65,.08);
}

.dlg{
  border:1px solid var(--line);
  border-radius: 16px;
  background: rgba(12,20,38,.98);
  color: var(--text);
  box-shadow: var(--shadow);
  width:min(560px, 94vw);
}
.dlg::backdrop{background: rgba(0,0,0,.55);}
.dlg-body{padding:14px;}
.dlg-body h3{margin:0 0 6px;}
.dlg-body p{margin:0 0 10px; color:var(--muted);}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  font-size:12px;
  color: var(--muted);
}
