
:root{
  --bg:#f6f8fc;
  --text:#0f172a;
  --muted:#667085;
  --ring:#e6eaf1;
  --card:#ffffff;
  --primary:#2563eb;
  --primary-2:#1d4ed8;
  --success:#16a34a;
  --warning:#f59e0b;
  --danger:#ef4444;
  --rad:16px;
  --shadow:0 8px 28px rgba(16,24,40,.08);
  --shadow-hover:0 18px 50px rgba(16,24,40,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Inter, Roboto, Arial;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.wrap{max-width:1120px; margin:28px auto; padding:0 16px}

h1,h2,h3{margin:0 0 8px}
p{margin:0 0 12px; color:var(--muted)}

.grid{display:grid; gap:16px}
@media(min-width:720px){ .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media(min-width:1100px){ .grid{ grid-template-columns: repeat(3, minmax(0,1fr)); } }

.card{
  background:var(--card);
  border:1px solid var(--ring);
  border-radius:var(--rad);
  box-shadow:var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition: transform .08s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover{
  transform: translateY(-2px);
  box-shadow:var(--shadow-hover);
  border-color:#d9e0ea;
}
.card__head{
  display:flex; align-items:center; gap:10px;
  padding:14px 16px;
  border-bottom:1px solid var(--ring);
}
.card__title{font-weight:700; letter-spacing:.2px}
.card__body{padding:14px 16px}
.badge{
  font-size:11px; padding:4px 8px; border-radius:999px; 
  border:1px solid var(--ring); color:var(--muted); background:#fff;
  margin-left:auto;
}

.icon{opacity:.8}

.row{display:flex; gap:12px; flex-wrap:wrap}
.row-2 > *{flex:1 1 240px}

.group{display:flex; flex-direction:column; gap:6px; min-width:0}
label{font-size:12px; color:var(--muted); font-weight:600; letter-spacing:.2px}
input[type="text"], input[type="number"], input[type="date"], select{
  appearance:none;
  width:100%;
  background:#fff;
  border:1px solid var(--ring);
  border-radius:12px;
  padding:12px 14px;
  color:var(--text);
  outline:none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
input:focus, select:focus{
  border-color: color-mix(in srgb, var(--primary) 50%, #ffffff 50%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, #ffffff 85%);
}

.actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:8px}
.btn-primary, .btn-ghost, .btn-danger{
  border:1px solid var(--primary);
  background:#fff;
  color:var(--primary);
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  font-weight:600;
  transition: transform .06s ease, filter .15s ease, background .2s ease, color .2s ease;
}
.btn-primary{ background:linear-gradient(180deg, #fff, #f7f9ff); }
.btn-primary:hover{ filter:brightness(1.02) }
.btn-primary:active{ transform:translateY(1px) }
.btn-ghost{ border-color:var(--ring); color:#101828; }
.btn-danger{ border-color:var(--danger); color:var(--danger) }

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

.foot-note{font-size:12px; color:var(--muted); margin-top:8px}
.warn{color:var(--danger); font-weight:600}
.ok{color:var(--success); font-weight:600}

/* tables */
table{width:100%; border-collapse:separate; border-spacing:0 10px; margin-top:10px}
thead th{font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; text-align:left; padding:8px 10px}
tbody tr{
  background:#fff; border:1px solid var(--ring);
  box-shadow: 0 1px 0 rgba(16,24,40,.02);
}
tbody td{padding:10px 12px; font-size:14px}
tbody tr td:first-child{border-top-left-radius:12px; border-bottom-left-radius:12px}
tbody tr td:last-child{border-top-right-radius:12px; border-bottom-right-radius:12px}

/* helper badges */
.tag{display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; border:1px solid var(--ring); background:#fff; font-size:12px}

/* page header section commonly used in index */
.page-head{display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin:6px 0 18px}
.page-title{font-size:22px; font-weight:800; letter-spacing:.2px}
.page-sub{color:var(--muted); font-size:14px}

/* compact links inside cards */
.card a.btn-primary, .card a.btn-ghost{ text-decoration:none; display:inline-flex; align-items:center }