/* Dezio dashboard */
:root {
  --bg: #0e1016;
  --surface: #171a23;
  --surface-2: #1f2330;
  --surface-3: #262b3a;
  --line: #2a2f3e;
  --text: #e8eaf0;
  --muted: #9aa1b2;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --good: #23a55a;
  --bad: #ed4245;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: #8ea1ff; }
.hidden { display: none !important; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; height: 58px; padding: 0 20px;
       background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.brand small { color: var(--muted); font-weight: 500; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.who img { width: 30px; height: 30px; border-radius: 50%; }

/* layout */
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 58px); }
.side { border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; }
.side h4 { margin: 18px 10px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.side button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px;
               background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.side button:hover:not(:disabled) { background: var(--surface-2); }
.side button.active { background: var(--surface-3); }
.side button:disabled { color: var(--muted); cursor: default; opacity: .65; }
.side .icon { width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--surface-3); display: grid; place-items: center;
              font-size: 12px; font-weight: 700; overflow: hidden; }
.side .icon img { width: 100%; height: 100%; }
.side .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { padding: 28px clamp(16px, 4vw, 48px) 80px; max-width: 980px; }
.main h1 { font-size: 26px; margin: 0 0 4px; }
.main .sub { color: var(--muted); margin: 0 0 24px; }

/* sections */
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.section h2 { font-size: 17px; margin: 0 0 4px; }
.section > p.hint { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: #c9cede; }
.field small { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > .field { flex: 1 1 220px; }
input[type=text], input[type=number], select, textarea {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 12px; user-select: none; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.toggle small { display: block; color: var(--muted); }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choices label { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.choices input { accent-color: var(--accent); }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 220px; overflow-y: auto;
         padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.roles label { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.roles label:hover { background: var(--surface-2); }
.roles .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.logtable { width: 100%; border-collapse: collapse; }
.logtable td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.logtable td:first-child { width: 45%; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.subcard { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--bg); }
.subcard h3 { margin: 0 0 10px; font-size: 15px; }
.afk-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.muted { color: var(--muted); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line);
       background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: #ffb4b5; }
.btn:disabled { opacity: .6; cursor: progress; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.status { font-size: 14px; color: var(--muted); }
.status.ok { color: var(--good); }
.status.err { color: #ff8e90; }

/* sign-in gate */
.gate { display: grid; place-items: center; min-height: calc(100vh - 58px); padding: 20px; }
.gate-card { max-width: 440px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 36px 28px; }
.gate-avatar { width: 84px; height: 84px; border-radius: 50%; }
.gate-card h1 { margin: 14px 0 8px; }
.gate-card p { color: var(--muted); }
.error { color: #ff8e90 !important; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--line);
         padding: 10px 18px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); max-width: calc(100% - 32px); }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 6px; overflow-x: auto; padding: 10px; }
  .side h4 { display: none; }
  .side button { width: auto; flex: none; }
  .cols { grid-template-columns: 1fr; }
}

/* Place suggestions under the weather box */
.suggest-wrap { position: relative; }
.suggest-wrap > input { width: 100%; box-sizing: border-box; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; display: grid;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-height: 260px; overflow-y: auto; }
.suggest.hidden { display: none; }
.suggest-item { text-align: left; padding: 9px 12px; background: none; border: 0; color: var(--text);
  font: inherit; cursor: pointer; }
.suggest-item:hover, .suggest-item:focus { background: var(--surface-3); }
