/* Painel do servidor — tema escuro com o laranja "Brasa" do MenuConnect. */

:root {
  --color-background: #121212;
  --color-surface: #1c1c1e;
  --color-surface-raised: #26262a;
  --color-border: #34343a;
  --color-text: #f2f2f2;
  --color-text-muted: #a1a1aa;
  --color-accent: #f0642d;
  --color-accent-strong: #ff7a45;
  --color-success: #3fb97a;
  --color-danger: #ef4444;
  --color-warning: #f5b33d;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--color-accent-strong); }
h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
h2 { font-size: 1rem; margin: 0; }
code { font-size: 0.85em; }

.text-muted { color: var(--color-text-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Estrutura */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar {
  display: flex; flex-direction: column; gap: 1.5rem;
  padding: 1.25rem 1rem; background: var(--color-surface); border-right: 1px solid var(--color-border);
}
.sidebar__footer { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.content { padding: 1.5rem 2rem; min-width: 0; }
.page-header { margin-bottom: 1rem; }

.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; }
.brand__mark {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 8px; background: var(--color-accent); color: #fff; font-weight: 800;
}

.nav { display: flex; flex-direction: column; gap: 0.25rem; }
.nav__link { padding: 0.5rem 0.75rem; border-radius: 8px; color: var(--color-text-muted); text-decoration: none; }
.nav__link:hover { background: var(--color-surface-raised); color: var(--color-text); }
.nav__link.is-active { background: var(--color-surface-raised); color: var(--color-text); box-shadow: inset 3px 0 var(--color-accent); }

/* Cartões e números */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.stat { display: flex; flex-direction: column; gap: 0.4rem; }
.stat__label { color: var(--color-text-muted); font-weight: 500; font-size: 0.9rem; }
.stat__value { font-size: 2rem; font-weight: 700; margin: 0; }
.stat p { margin: 0; }

.meter { height: 8px; border-radius: 99px; background: var(--color-surface-raised); overflow: hidden; }
.meter__fill { display: block; height: 100%; width: 0; background: var(--color-accent); transition: width 0.4s ease; }
.meter__fill.is-high { background: var(--color-danger); }

/* Avisos */
.notice { padding: 0.75rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; border: 1px solid; }
.notice--error { background: #3a1517; border-color: #7f1d1d; color: #fecaca; }
.notice--success { background: #12301f; border-color: #1f6b42; color: #bbf7d0; }

/* Formulários */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field__label { font-weight: 500; }
.field__input {
  padding: 0.6rem 0.75rem; border-radius: 8px; border: 1px solid var(--color-border);
  background: var(--color-background); color: var(--color-text); font: inherit;
}
.field__input:focus { outline: 2px solid var(--color-accent); outline-offset: 1px; }
.field__input--code { font-size: 1.5rem; letter-spacing: 0.4em; text-align: center; }

/* Botões */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border-radius: 8px; border: 1px solid var(--color-border);
  background: var(--color-surface-raised); color: var(--color-text); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.button:hover { border-color: var(--color-text-muted); }
.button--primary { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.button--primary:hover { background: var(--color-accent-strong); }
.button--danger { color: #fca5a5; }
.button--ghost { background: transparent; }
.button--small { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.button-row form { margin: 0; }

/* Tabelas */
.table-scroll { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.65rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.table th { color: var(--color-text-muted); font-weight: 500; font-size: 0.85rem; }
.table tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; padding: 0.1rem 0.55rem; border-radius: 99px; font-size: 0.8rem; font-weight: 600; background: var(--color-surface-raised); }
.badge--running { background: #12301f; color: #86efac; }
.badge--exited, .badge--dead { background: #3a1517; color: #fca5a5; }
.badge--restarting, .badge--paused { background: #3b2d10; color: #fcd34d; }

.logs {
  white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem; max-height: 70vh; overflow: auto;
}

/* Login */
.entry { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.entry__card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 1.25rem; padding: 2rem; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 1rem; border-right: 0; border-bottom: 1px solid var(--color-border); }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar__footer { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .content { padding: 1rem; }
}
