@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #0c0f14;
  --bg-elev: #12171f;
  --bg-soft: #181e28;
  --line: rgba(255, 255, 255, 0.07);
  --text: #e8edf5;
  --muted: #8b97a8;
  --accent: #e8a045;
  --accent-2: #f0c27b;
  --ok: #3ecf8e;
  --warn: #e6b84d;
  --bad: #ef6b6b;
  --sidebar: 260px;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font-display: 'Outfit', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(232, 160, 69, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(80, 120, 180, 0.1), transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(12, 15, 20, 0.92), rgba(12, 15, 20, 0.75)),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><g fill="none" stroke="%23e8a045" stroke-opacity="0.08" stroke-width="1"><path d="M0 80h160M80 0v160"/><circle cx="80" cy="80" r="36"/></g></svg>');
}

.auth-card {
  width: min(420px, 100%);
  background: rgba(18, 23, 31, 0.92);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 28px;
}
.brand strong {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.02em;
}
.brand span { color: var(--muted); font-size: 0.92rem; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.form-control {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus {
  border-color: rgba(232, 160, 69, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 160, 69, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c97a2c);
  color: #1a1208;
  width: 100%;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-soft {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-danger {
  background: rgba(239, 107, 107, 0.15);
  color: #ffb4b4;
  border: 1px solid rgba(239, 107, 107, 0.3);
}
.btn-sm { padding: 7px 10px; font-size: 0.85rem; border-radius: 8px; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(10, 12, 16, 0.95);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.sidebar .logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  padding: 8px 12px 22px;
}
.sidebar .logo em {
  font-style: normal;
  color: var(--accent);
}
.nav-section {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 12px 8px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #c3ccd8;
  margin-bottom: 2px;
}
.nav a:hover, .nav a.active {
  background: rgba(232, 160, 69, 0.12);
  color: var(--text);
}
.nav a.active { border: 1px solid rgba(232, 160, 69, 0.25); }

.main { padding: 24px 28px 40px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.topbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 650;
}
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px 8px 8px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #8a5318);
  color: #1a1208; font-weight: 700;
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent), var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.stat .label { color: var(--muted); font-size: 0.85rem; }
.stat .value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-top: 8px;
  font-weight: 700;
}
.stat .hint { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.panel-body { padding: 18px; }

.table-wrap { overflow: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
table.data th, table.data td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  white-space: nowrap;
}
table.data th {
  color: var(--muted);
  font-weight: 550;
  background: rgba(0,0,0,0.18);
}
table.data tr:hover td { background: rgba(255,255,255,0.02); }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.ok { background: rgba(62,207,142,.15); color: #7dffc0; }
.badge.warn { background: rgba(230,184,77,.15); color: #ffd978; }
.badge.bad { background: rgba(239,107,107,.15); color: #ffb0b0; }
.badge.mute { background: rgba(139,151,168,.15); color: #b7c2d0; }

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}
.alert.ok { background: rgba(62,207,142,.1); color: #b6f5d5; }
.alert.bad { background: rgba(239,107,107,.12); color: #ffc4c4; }
.alert.warn { background: rgba(230,184,77,.12); color: #ffe2a0; }

.row { display: grid; gap: 14px; }
.row.cols-2 { grid-template-columns: 1fr 1fr; }
.row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (max-width: 1100px) {
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
}
@media (max-width: 720px) {
  .row.cols-2, .row.cols-3 { grid-template-columns: 1fr; }
  .main { padding: 16px; }
  .grid-stats { grid-template-columns: 1fr; }
}
