:root {
  --bg: #eef3f8;
  --bg-2: #d7e4f2;
  --paper: rgba(255, 255, 255, 0.86);
  --ink: #122033;
  --muted: #5b6b80;
  --line: rgba(18, 32, 51, 0.08);
  --accent: #0f6e6b;
  --accent-2: #c46a2b;
  --good: #1b7f56;
  --warn: #b45309;
  --bad: #c2413b;
  --side: #0e1a28;
  --side-2: #173049;
  --shadow: 0 20px 50px rgba(16, 36, 61, 0.08);
  --radius: 22px;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--ink); }
body {
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9f3ee 0, transparent 55%),
    radial-gradient(900px 480px at 100% 0%, #ffe8d2 0, transparent 46%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
a { color: inherit; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(440px, 100%);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 32px;
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.logo-mark {
  width: 48px; height: 48px; border-radius: 16px;
  background: linear-gradient(135deg, #0f6e6b, #173049);
  display: grid; place-items: center; color: #fff; font-weight: 800; margin-bottom: 16px;
}
.eyebrow { letter-spacing: .16em; font-size: 11px; color: var(--accent); font-weight: 700; }
h1, h2, h3 { font-weight: 750; margin: 8px 0 10px; letter-spacing: -.03em; }
.sub { color: var(--muted); margin: 0 0 22px; line-height: 1.7; }

label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
}
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 10px 16px;
  background: var(--ink); color: #fff; cursor: pointer;
  text-decoration: none; font-family: inherit; font-size: 14px; font-weight: 650;
}
button.primary, .btn.primary { background: linear-gradient(135deg, #0f6e6b, #1a8f8a); }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.full { width: 100%; margin-top: 20px; padding: 13px; }

.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side {
  margin: 14px 0 14px 14px;
  border-radius: 28px;
  padding: 26px 18px;
  background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%);
  color: #eef6ff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 28px);
}
.brand { font-size: 22px; font-weight: 800; }
.side .meta { color: #9fb4c9; font-size: 12px; line-height: 1.6; margin: 8px 0 26px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 14px; color: #c5d5e6;
  text-decoration: none; margin-top: 4px;
}
.nav a.active, .nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .7; }
.side .who { margin-top: auto; padding-top: 24px; color: #9fb4c9; font-size: 12px; }
.main { padding: 28px 32px 56px; }

.hero {
  display: flex; justify-content: space-between; gap: 18px; align-items: stretch;
  margin-bottom: 22px;
}
.invite-card {
  min-width: min(420px, 100%);
  background: linear-gradient(135deg, #123347, #0f6e6b);
  color: #fff; border-radius: 24px; padding: 18px 20px; box-shadow: var(--shadow);
}
.invite-card .k { opacity: .75; font-size: 12px; }
.invite { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; margin-top: 8px; word-break: break-all; }
.copy { margin-top: 12px; background: rgba(255,255,255,.14); color: #fff; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  background: var(--paper); border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.kpi .k { color: var(--muted); font-size: 13px; }
.kpi .v { font-size: 28px; margin-top: 8px; letter-spacing: -.04em; }
.kpi .hint { color: var(--muted); font-size: 12px; margin-top: 8px; }
.kpi.tone-a { background: linear-gradient(180deg, #fff, #eefaf7); }
.kpi.tone-b { background: linear-gradient(180deg, #fff, #fff4ea); }
.kpi.tone-c { background: linear-gradient(180deg, #fff, #eef3fb); }

.panel {
  background: var(--paper); border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px; padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.grid-2 { display: grid; grid-template-columns: 1.3fr .9fr; gap: 16px; margin-top: 16px; }
.grid-3 { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 16px; margin-top: 16px; }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding: 8px 0 0; }
.bar {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%;
}
.bar i {
  width: 100%; max-width: 28px; border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, #1aa39c, #0f6e6b);
  min-height: 4px; display: block;
}
.bar span { font-size: 10px; color: var(--muted); margin-top: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 12px; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag.ok { background: #e7f7ef; color: var(--good); }
.tag.wait { background: #fff4e5; color: var(--warn); }
.tag.off { background: #fdecea; color: var(--bad); }

.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 16px;
}
.filters .field { min-width: 140px; flex: 1; }
.filters input, .filters select { min-width: 0; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.mini { background: #f7fafc; border-radius: 16px; padding: 12px 14px; }
.mini b { display: block; font-size: 18px; margin-top: 4px; }

.banner, .okmsg, .empty {
  padding: 12px 14px; border-radius: 14px; margin-bottom: 16px;
}
.banner { background: #fff4e5; color: #7c2d12; }
.okmsg { background: #e7f7ef; color: var(--good); }
.empty { background: #f7fafc; color: var(--muted); text-align: center; padding: 28px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.form-grid .span { grid-column: 1 / -1; }
.tiny { color: var(--muted); font-size: 12px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions input { width: 140px; padding: 7px 10px; }
.rank { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rank:last-child { border-bottom: 0; }

@media (max-width: 1100px) {
  .kpis, .mini-kpis, .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .side { margin: 10px 10px 0; min-height: auto; }
  .hero { flex-direction: column; }
}
