/* Ziran — clean, professional, responsive */
:root{
  --bg:#f4f5f7;
  --card:#fff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --red:#b10d0d;
  --red2:#d11b1b;
  --shadow: 0 12px 30px rgba(17,24,39,.08);
  --radius: 18px;
  --radius2: 12px;
  --max: 1080px;
  --focus: 0 0 0 3px rgba(177,13,13,.22);
  font-synthesis-weight: none;
}
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}
.hidden{ display:none !important; }

.topbar{
  position:sticky; top:0; z-index:50;
  background:#fff;
  border-bottom:1px solid var(--border);
  padding:14px 18px;
  display:flex; align-items:center; justify-content:space-between;
}
.brand{ display:flex; flex-direction:column; gap:2px; }
.brand__name{ color: var(--red); font-weight:800; letter-spacing:.06em; font-size:14px; }
.brand__sub{ color: var(--muted); font-size:12px; }

.container{ max-width: var(--max); margin: 0 auto; padding: 28px 16px 40px; }

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card--center{
  max-width: 560px;
  margin: 64px auto 0;
  padding: 24px;
}
.card__header h1{ margin: 6px 0 8px; font-size: 22px; }
.muted{ color: var(--muted); font-size: 13px; line-height:1.4; }

.form{ display:flex; flex-direction:column; gap:10px; margin-top: 10px; }
.label{ font-size: 12px; color: var(--muted); margin-top: 10px; }
.input{
  padding: 12px 14px;
  border-radius: 12px;
  border:1px solid var(--border);
  outline:none;
  font-size: 14px;
  background:#fff;
}
.input:focus{ box-shadow: var(--focus); border-color: rgba(177,13,13,.55); }

.btn{
  border: none;
  padding: 12px 14px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 700;
  font-size: 14px;
  transition: transform .05s ease, background .15s ease, opacity .15s ease;
}
.btn:active{ transform: scale(.99); }
.btn--primary{ background: var(--red); color:#fff; }
.btn--primary:hover{ background: var(--red2); }
.btn--ghost{ background: transparent; border:1px solid var(--border); color: var(--text); }
.btn--ghost:hover{ background:#f8fafc; }

.pill{
  background:#f1f5f9;
  border:1px solid var(--border);
  border-radius:999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text);
}

.msg{
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: #f8fafc;
}
.msg--error{ border-color: rgba(220,38,38,.35); background: rgba(220,38,38,.06); color: #991b1b; }
.msg--ok{ border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.08); color: #065f46; }

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

.tabs{
  display:flex; gap:10px; flex-wrap:wrap;
  margin: 6px 0 18px;
}
.tab{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor:pointer;
  font-weight:700;
  font-size: 13px;
}
.tab.active{ background: var(--red); color:#fff; border-color: rgba(177,13,13,.4); }

.section{
  background:#fff;
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.section h2{ margin: 0 0 8px; }
.row{ display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.row > *{ flex: 1; }
.row .grow2{ flex:2; }
.row .grow3{ flex:3; }
.row .fit{ flex: 0 0 auto; }

.tableWrap{ width:100%; overflow:auto; border: 1px solid var(--border); border-radius: 14px; }
table{ width:100%; border-collapse: collapse; min-width: 840px; }
th,td{ border-bottom:1px solid var(--border); padding: 10px 10px; font-size: 13px; text-align:left; white-space:nowrap; }
th{ color: var(--muted); font-weight: 800; font-size: 12px; }
tr:hover td{ background: #f8fafc; }
.badge{ padding: 4px 10px; border-radius:999px; font-size: 12px; font-weight:800; display:inline-block; }
.badge--pend{ background: rgba(234,179,8,.14); color: #92400e; border:1px solid rgba(234,179,8,.25); }
.badge--ok{ background: rgba(16,185,129,.12); color: #065f46; border:1px solid rgba(16,185,129,.25); }
.badge--no{ background: rgba(220,38,38,.10); color: #991b1b; border:1px solid rgba(220,38,38,.25); }

.toast{
  position: fixed;
  right: 14px;
  bottom: 14px;
  max-width: 420px;
  background: #111827;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}

@media (max-width: 640px){
  table{ min-width: 720px; }
  .card--center{ margin-top: 28px; }
}
