/* DNS Shield ISP - painel administrativo
   Desenvolvedor: Euquias Junior <junior@jbinfo.com.br> */

:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --ink: #131a24;
  --muted: #5b6b7f;
  --line: #e3e8ef;
  --brand: #0f3d63;
  --brand-soft: #e8f0f8;
  --ok: #067647;
  --bad: #b42318;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
}

a { color: var(--brand); }

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  flex: 0 0 250px;
  background: #0c2740;
  color: #dbe6f1;
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-center { justify-content: center; text-align: left; margin-bottom: 22px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: #1d6fb8; color: #fff;
  display: grid; place-items: center; font-weight: 700; letter-spacing: .5px;
}
.brand strong { display: block; font-size: 15px; }
.brand small { color: #93aac1; font-size: 12px; }

.sidebar nav { margin-top: 28px; display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a {
  color: #cbdaea; text-decoration: none; padding: 10px 12px;
  border-radius: 8px; font-size: 14px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.07); }
.sidebar nav a.active { background: #1d6fb8; color: #fff; font-weight: 600; }

.sidebar-foot { margin-top: auto; font-size: 12px; color: #8ea6bd; }
.sidebar-foot p { color: #dbe6f1; margin: 0 0 6px; font-weight: 600; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 16px 26px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
}
.topbar h1 { font-size: 20px; margin: 0; }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

.content { padding: 24px 26px; flex: 1; }
.footer { padding: 16px 26px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

.flashes { padding: 16px 26px 0; display: grid; gap: 8px; }
.flash { border-radius: 8px; padding: 12px 14px; font-size: 14px; border: 1px solid; }
.flash-success { background: #ecfdf3; border-color: #a6f4c5; color: var(--ok); }
.flash-error { background: #fef3f2; border-color: #fecdca; color: var(--bad); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.card h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.metric { font-size: 28px; font-weight: 700; margin: 0 0 6px; }
.card small { color: var(--muted); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-top: 18px;
}
.panel.narrow { max-width: 620px; }
.panel h2 { margin: 0 0 14px; font-size: 17px; }
.panel h3 { font-size: 15px; margin: 18px 0 8px; }
.panel-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.panel-head .actions { display: flex; gap: 8px; align-items: center; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.grid-2 .panel { margin-top: 0; }

label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
input[type="text"], input[type="password"], input[type="email"], input[type="url"],
input[type="date"], input[type="file"] {
  width: 100%; margin-top: 5px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: #fff;
}
label.inline input { width: auto; margin-top: 0; }
input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }

.btn {
  display: inline-block; padding: 10px 16px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  font-family: inherit;
}
.btn:hover { background: #f7f9fc; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: #0b2f4d; }
.btn-danger { background: #fff; border-color: #fecdca; color: var(--bad); }
.btn-danger:hover { background: #fef3f2; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-block { width: 100%; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters input[type="text"], .filters input[type="date"] { width: auto; min-width: 180px; margin-top: 0; }

.table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table tbody tr:hover { background: #fafbfe; }
.table td.right { text-align: right; }
.table .wrap { max-width: 420px; word-break: break-word; }

.tag {
  display: inline-block; background: var(--brand-soft); color: var(--brand);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}

.hint { color: var(--muted); font-size: 13px; }
.empty { color: var(--muted); padding: 18px 0; }
.pager { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 13px; }

.changelog {
  background: #0c2740; color: #dbe6f1; padding: 14px; border-radius: 8px;
  white-space: pre-wrap; word-break: break-word; font-size: 13px; max-height: 420px; overflow: auto;
}
.changelog.small { max-height: 160px; font-size: 12px; margin: 0; }

code { background: #eef2f7; padding: 2px 6px; border-radius: 4px; font-size: 13px; }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 30px; width: 100%; max-width: 380px; box-shadow: 0 12px 32px rgba(19,26,36,.08);
}
.login-card .brand small { color: var(--muted); }
.login-foot { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; margin-top: 16px; }
  .sidebar-foot { margin-top: 16px; }
  .content, .topbar, .flashes, .footer { padding-left: 16px; padding-right: 16px; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
}
