/* Monitor de DNS: site público e painel admin (tema escuro, azul e verde) */
:root {
  color-scheme: dark;
  --bg: #090604;
  --panel: rgba(34, 21, 10, .62);
  --panel-solid: #1c120a;
  --field: rgba(12, 8, 5, .85);
  --line: rgba(255, 140, 30, .30);
  --line-soft: rgba(255, 170, 90, .15);
  --ink: #fff7ef;
  --ink-2: #d6bda3;
  --ink-3: #a08566;
  --blue: #ff8a00;
  --cyan: #ffb02e;
  --green: #22e07a;
  --yellow: #f5b82e;
  --red: #ff5566;
  --indigo: #ff5a1f;
  --radius: 16px;
  --gut: clamp(12px, 2.4vw, 44px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(255, 110, 0, .30), transparent 62%),
    radial-gradient(800px 420px at 96% 2%, rgba(255, 190, 60, .13), transparent 60%),
    var(--bg);
}
a { color: var(--cyan); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.ico { flex: none; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* ---------- Barra superior e marca ---------- */
.topbar { height: 90px; border-bottom: 1px solid var(--line-soft); background: rgba(10, 7, 4, .72); backdrop-filter: blur(8px); }
.topbar-in { height: 100%; width: 100%; padding: 0 var(--gut); margin: 0; display: flex; align-items: center; gap: 16px; }
.topbar-in .push { margin-left: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-name { font-size: 1.55rem; font-weight: 800; letter-spacing: .05em; }
.brand-img { display: block; height: 68px; width: auto; max-width: 60vw; object-fit: contain; filter: drop-shadow(0 2px 10px rgba(255, 120, 0, .35)); }
.userpill {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 138, 0, .08); font-size: 14px;
}
.userpill .dot { width: 12px; height: 12px; color: var(--green); }

/* ---------- Componentes ---------- */
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; flex: none; }
.tile {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none; color: #fff;
}
.t-blue   { background: linear-gradient(145deg, #ff8a00, #b34700); box-shadow: 0 0 26px rgba(255, 138, 0, .35); }
.t-green  { background: linear-gradient(145deg, #1fbf5f, #0a7a36); box-shadow: 0 0 26px rgba(34, 224, 122, .28); }
.t-indigo { background: linear-gradient(145deg, #ff6a1f, #a83a00); box-shadow: 0 0 26px rgba(255, 90, 31, .35); }
.t-cyan   { background: linear-gradient(145deg, rgba(255, 176, 46, .25), rgba(255, 176, 46, .08)); border: 1px solid rgba(255, 176, 46, .55); color: var(--cyan); box-shadow: 0 0 26px rgba(255, 176, 46, .2); }
.t-shield { background: rgba(255, 138, 0, .12); border: 1px solid rgba(255, 138, 0, .55); color: var(--blue); box-shadow: 0 0 22px rgba(255, 138, 0, .18); width: 50px; height: 50px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 11px;
  background: rgba(255, 138, 0, .12); color: var(--ink);
  font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: rgba(255, 170, 70, .7); background: rgba(255, 138, 0, .2); }
.btn-primary { background: linear-gradient(135deg, #ff8a00, #e05a00); border-color: #ffa433; box-shadow: 0 0 22px rgba(255, 138, 0, .35); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-danger { color: #ff8a96; border-color: rgba(255, 85, 102, .5); background: rgba(255, 85, 102, .08); }
.btn-danger:hover { background: rgba(255, 85, 102, .16); border-color: rgba(255, 85, 102, .8); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }

label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { color: var(--ink-3); font-size: 13px; margin: 6px 0 0; }
input[type=text], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--field); color: var(--ink); font: inherit;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(255, 176, 46, .16); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a3b8e6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
textarea { min-height: 150px; resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); vertical-align: -3px; margin-right: 10px; }
.check { display: flex; align-items: center; font-weight: 500; margin: 0; }

.notice { padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); margin: 0 0 14px; }
.notice-ok { border-color: rgba(34, 224, 122, .6); }
.notice-warn { border-color: rgba(245, 184, 46, .6); }
.notice-err { border-color: rgba(255, 85, 102, .65); }

.pill {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 9px; white-space: nowrap;
  border: 1px solid rgba(255, 90, 31, .65); background: rgba(255, 90, 31, .18); color: #ffe0b8; font-size: 12.5px; font-weight: 600;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; border: 1px solid; white-space: nowrap;
}
.b-good { color: #35f092; border-color: rgba(34, 224, 122, .7); background: rgba(34, 224, 122, .10); }
.b-warn { color: #ffc84a; border-color: rgba(245, 184, 46, .7); background: rgba(245, 184, 46, .10); }
.b-bad  { color: #ff7a88; border-color: rgba(255, 85, 102, .7); background: rgba(255, 85, 102, .10); }
.b-idle { color: var(--ink-2); border-color: var(--line); background: rgba(255, 170, 90, .06); }
.c-good { color: var(--green); }
.c-warn { color: var(--yellow); }
.c-bad  { color: var(--red); }
.c-idle { color: var(--ink-3); }

.tag { display: inline-block; padding: 1px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 0 34px rgba(255, 138, 0, .07); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { font-size: 1.5rem; font-weight: 700; }
.panel-head p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }
.tools { margin-left: auto; display: flex; flex-wrap: wrap; gap: 12px; }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search input { width: 300px; max-width: 100%; padding-left: 42px; }
.tools select { width: 170px; }

.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 26px 0; }
.kpi { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 0 28px rgba(255, 138, 0, .08); min-width: 0; }
.kpi .tile { width: 60px; height: 60px; }
.kpi-body { min-width: 0; }
.kpi-label { color: var(--ink-2); font-size: 15px; }
.kpi-val { font-size: 2.05rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.kpi-val small { font-size: 1.1rem; font-weight: 600; color: var(--ink-2); margin-left: 3px; }
.kpi-sub { color: var(--ink-2); font-size: 13.5px; overflow-wrap: anywhere; }

.note { margin-top: 18px; display: flex; gap: 14px; align-items: center; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--ink-2); font-size: 13.5px; }
.note .ico { color: #ff9a2e; }
.note p { margin: 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 10px 18px; border-radius: 11px; background: #4a2000; border: 1px solid var(--line); opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: 1; }
.tip { position: fixed; z-index: 40; pointer-events: none; padding: 6px 10px; border-radius: 8px; background: #1c120a; border: 1px solid var(--line); font-size: 12.5px; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }

/* ---------- Site público ---------- */
.page { width: 100%; margin: 0; padding: 28px var(--gut) 56px; }
.hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.hero-main { display: flex; align-items: center; gap: 22px; flex: 1 1 560px; min-width: 0; }
.hero-icon {
  width: 104px; height: 104px; border-radius: 24px; flex: none; display: grid; place-items: center; color: var(--cyan);
  border: 1.5px solid rgba(255, 138, 0, .55);
  background: linear-gradient(145deg, rgba(255, 138, 0, .14), rgba(255, 176, 46, .10));
  box-shadow: 0 0 44px rgba(255, 138, 0, .18), inset 0 0 30px rgba(255, 176, 46, .10);
}
.hero-logo { width: clamp(110px, 16vw, 210px); height: auto; flex: none; filter: drop-shadow(0 6px 26px rgba(255, 120, 0, .45)); }
.hero h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); font-weight: 700; letter-spacing: -.015em; }
.hero p { margin: 8px 0 0; color: #ffc27a; max-width: 64ch; }
.hero-side { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.stamp { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid rgba(255, 138, 0, .6); border-radius: 15px; background: rgba(255, 138, 0, .06); box-shadow: 0 0 26px rgba(255, 138, 0, .12); }
.stamp .dot { color: var(--green); width: 15px; height: 15px; }
.stamp-label { font-weight: 600; font-size: 14.5px; }
.stamp-val { font-size: 1.15rem; font-weight: 700; }
.stamp.is-stale { border-color: rgba(245, 184, 46, .65); background: rgba(245, 184, 46, .06); box-shadow: 0 0 26px rgba(245, 184, 46, .10); }
.stamp.is-stale .dot { color: var(--yellow); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 138, 0, .1); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { border-color: rgba(255, 170, 70, .7); }
.icon-btn.spin .ico { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.health { display: flex; align-items: center; gap: 14px; }
.globe { width: 190px; height: auto; display: block; }
.health-ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, #1fbf5f, #0a7a36); color: #fff; box-shadow: 0 0 28px rgba(34, 224, 122, .4); flex: none; }
.health.is-warn .health-ico { background: linear-gradient(145deg, #e0a41f, #8a5c07); box-shadow: 0 0 28px rgba(245, 184, 46, .35); }
.health.is-bad .health-ico { background: linear-gradient(145deg, #ff5566, #a02030); box-shadow: 0 0 28px rgba(255, 85, 102, .35); }
.health.is-idle .health-ico { background: linear-gradient(145deg, #a07a55, #5a3818); box-shadow: none; }
.health-text { color: var(--ink-2); font-size: 14.5px; max-width: 17ch; }

.tbl-head, .trow { display: grid; grid-template-columns: var(--cols); gap: 14px; align-items: center; }
.board { --cols: 52px minmax(190px, 1.4fr) 150px minmax(180px, 1.2fr) 128px 128px 118px minmax(140px, 1fr) 44px; }
.tbl-head { padding: 14px 36px 12px; color: var(--ink-2); font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.rows { list-style: none; margin: 0; padding: 4px 14px 16px; }
.trow { margin-top: 10px; padding: 14px 22px; border: 1px solid var(--line-soft); border-radius: 15px; background: rgba(24, 14, 6, .55); }
.trow.is-best { border-color: rgba(34, 224, 122, .38); }
.c-rank { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; background: rgba(255, 138, 0, .18); border: 1px solid rgba(255, 140, 30, .55); color: #ffe2bf; }
.is-best .c-rank { background: rgba(34, 224, 122, .16); border-color: rgba(34, 224, 122, .65); color: #3cf59a; }
.is-down .c-rank { background: rgba(255, 170, 90, .06); border-color: var(--line-soft); color: var(--ink-3); }
.c-name { min-width: 0; }
.nm { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.12rem; }
.nm-t { overflow-wrap: anywhere; }
.copy { width: 26px; height: 26px; padding: 0; border: 0; background: none; color: var(--ink-2); cursor: pointer; border-radius: 7px; display: grid; place-items: center; flex: none; }
.copy:hover { color: var(--ink); background: rgba(255, 138, 0, .2); }
.addr { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.fmt-inline { display: none; margin-top: 6px; }
.c-lat { min-width: 0; }
.lat-val { font-size: 1.12rem; font-weight: 700; }
.lat-val small { font-size: .85rem; font-weight: 500; color: var(--ink-2); margin-left: 3px; }
.bar { height: 8px; margin: 6px 0 5px; border-radius: 99px; background: rgba(255, 170, 90, .16); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff6a00, #ffb02e); min-width: 4px; transition: width .5s ease; }
.lat-sub { color: var(--ink-2); font-size: 12.5px; }
.st-line { display: flex; align-items: center; gap: 9px; font-weight: 600; margin-bottom: 6px; }
.c-up strong { font-size: 1.05rem; font-weight: 700; }
.c-up span, .c-last span { color: var(--ink-2); font-size: 13.5px; }
.c-up div, .c-last div { line-height: 1.5; }
.c-last .t { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.spark-wrap { position: relative; height: 44px; }
.spark { width: 100%; height: 100%; display: block; overflow: visible; }
.spark-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; border: 2px solid #1c120a; pointer-events: none; display: none; }
.c-act { position: relative; }
.kebab { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 138, 0, .1); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.kebab:hover, .kebab[aria-expanded=true] { border-color: rgba(255, 170, 70, .75); background: rgba(255, 138, 0, .22); }
.menu { position: absolute; right: 0; top: 46px; z-index: 25; min-width: 220px; padding: 6px; border-radius: 13px; background: #1c120a; border: 1px solid var(--line); box-shadow: 0 16px 44px rgba(0, 0, 0, .55); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: 500 14px var(--font); text-align: left; cursor: pointer; }
.menu button:hover { background: rgba(255, 138, 0, .2); }
.empty { padding: 34px 22px; text-align: center; color: var(--ink-2); }

@media (max-width: 1239px) {
  .board { --cols: 52px minmax(190px, 1.4fr) minmax(190px, 1.3fr) 128px 128px minmax(120px, 1fr) 44px; }
  .col-type, .col-last { display: none; }
  .fmt-inline { display: block; }
}
@media (max-width: 899px) {
  .hero-side { display: none; }
  .hero-logo { display: none; }
  .hero-icon { width: 72px; height: 72px; border-radius: 18px; }
  .hero-icon .ico { width: 38px; height: 38px; }
  .tools { margin-left: 0; width: 100%; }
  .search { flex: 1 1 220px; }
  .search input { width: 100%; }
  .tools select { flex: 1 1 140px; }
  .tbl-head { display: none; }
  .trow {
    grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) 40px;
    grid-template-areas: "rank name name act" "lat lat lat lat" "stat stat up up" "spark spark spark spark";
    gap: 12px; padding: 14px;
  }
  .c-rank { grid-area: rank; }
  .c-name { grid-area: name; }
  .c-act { grid-area: act; }
  .c-lat { grid-area: lat; }
  .c-st { grid-area: stat; }
  .c-up { grid-area: up; }
  .c-spark { grid-area: spark; }
  .col-type, .col-last { display: none; }
}
@media (max-width: 560px) {
  .brand-img { height: 54px; }
  .topbar { height: 72px; }
  .brand-name { font-size: 1.3rem; }
  .kpi-val { font-size: 1.7rem; }
  .panel-head { padding: 16px; }
  .rows { padding: 2px 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .bar i { transition: none; }
  .icon-btn.spin .ico { animation: none; }
}

/* ---------- Painel admin ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100vh - 90px); }
.side { display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; border-right: 1px solid var(--line-soft); background: rgba(10, 7, 4, .45); }
.side a, .side .navbtn {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid transparent;
  color: var(--ink-2); text-decoration: none; font: 500 15.5px/1.2 var(--font); background: none; cursor: pointer; text-align: left;
}
.side a:hover, .side .navbtn:hover { color: var(--ink); background: rgba(255, 138, 0, .10); }
.side a[aria-current=page] { color: #fff; background: linear-gradient(90deg, rgba(255, 138, 0, .24), rgba(255, 138, 0, .07)); border-color: rgba(255, 138, 0, .5); }
.side a[aria-current=page] .ico { color: var(--blue); }
.side .grp { margin: 20px 14px 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.sys { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 138, 0, .06); font-size: 13.5px; }
.sys .dot { width: 12px; height: 12px; }
.sys small { display: block; color: var(--ink-3); font-size: 11.5px; }
.content { padding: 28px var(--gut) 60px; min-width: 0; width: 100%; }
.pagehead { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.pagehead h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 700; letter-spacing: -.01em; }
.pagehead p { margin: 4px 0 0; color: var(--ink-2); }
.pagehead .tile { width: 64px; height: 64px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.toolbar form { display: inline; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.field { margin-bottom: 16px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl th { font-size: 13.5px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.act { white-space: nowrap; }
.tbl td.act form { display: inline; }
.tbl strong { font-weight: 700; }
.code-block { display: block; padding: 12px 14px; background: var(--field); border: 1px solid var(--line); border-radius: 11px; overflow-x: auto; white-space: pre; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-box { width: min(400px, 100%); }
.login-box .brand { margin-bottom: 22px; }
.login-box .brand-img { height: 96px; }
.login-box h1 { font-size: 1.5rem; margin-bottom: 18px; }
@media (max-width: 899px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); padding: 10px var(--gut); border-right: 0; border-bottom: 1px solid var(--line-soft); gap: 6px; }
  .side a, .side .navbtn { width: 100%; padding: 10px 12px; font-size: 14.5px; gap: 10px; }
  .side .grp, .sys { display: none; }
  .side form { display: block; }
}
.t-red { background: linear-gradient(145deg, #ff5566, #a02030); box-shadow: 0 0 26px rgba(255, 85, 102, .3); }
.t-amber { background: linear-gradient(145deg, #e0a41f, #8a5c07); box-shadow: 0 0 26px rgba(245, 184, 46, .28); }
details.adv { margin: 0 0 18px; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 16px; background: rgba(12, 8, 5, .35); }
details.adv summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
details.adv[open] summary { margin-bottom: 12px; color: var(--ink); }
.subtle-link { color: var(--cyan); }

/* ---------- Telas pequenas: tabela do admin vira cartões ---------- */
.shell, .content, .panel, .card { min-width: 0; max-width: 100%; }
@media (max-width: 1180px) {
  .tbl-wrap { overflow: visible; background: none; border: 0; box-shadow: none; }
  table.tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead { display: none; }
  .tbl tr { margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
  .tbl td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 7px 0; border: 0; text-align: right; }
  .tbl td::before { content: attr(data-label); color: var(--ink-3); font-size: 12.5px; text-align: left; flex: none; }
  .tbl td:first-child { display: block; text-align: left; padding-top: 0; }
  .tbl td:first-child::before { display: none; }
  .tbl td.act { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line-soft); white-space: normal; }
  .tbl td.act::before { display: none; }
  .tbl td.act .btn { min-height: 40px; }
}
@media (max-width: 899px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pagehead { align-items: flex-start; }
}
@media (max-width: 480px) {
  .kpis { grid-template-columns: 1fr; }
  .toolbar .btn { flex: 1 1 140px; }
  .card { padding: 16px; }
  .pagehead .tile { width: 52px; height: 52px; }
  .code-block { white-space: pre-wrap; word-break: break-all; }
}
.grid2 .grid2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .userpill .muted { display: none; } .userpill { padding: 6px 12px; } }
.lat-chan { color: #ffc27a; }
.lat-chan-bad { color: var(--red); }
#cronurl, .code-block { white-space: pre-wrap; word-break: break-all; }
.js-check.spin .ico { animation: spin .8s linear infinite; }
.js-check[disabled] { opacity: .8; cursor: progress; }
.hero-check { display: none; margin-top: 14px; }
@media (max-width: 899px) {
  .hero-check { display: inline-flex; position: fixed; right: 14px; bottom: 16px; z-index: 40; min-height: 48px; padding: 0 20px; border-radius: 999px; box-shadow: 0 8px 28px rgba(0, 0, 0, .6), 0 0 26px rgba(255, 138, 0, .45); margin: 0; }
  .page { padding-bottom: 96px; }
  .toast { bottom: 80px; }
}

/* ---------- Servidores (admin) ---------- */
.srv-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); margin-bottom: 18px; }
.srv-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.srv-card.is-up { border-color: rgba(34, 224, 122, .45); }
.srv-card.is-down { border-color: rgba(255, 85, 102, .85); background: rgba(255, 85, 102, .08); animation: srvpulse 1.2s ease-in-out infinite; }
.srv-card.is-paused { opacity: .65; }
@keyframes srvpulse { 50% { box-shadow: 0 0 26px rgba(255, 85, 102, .55); } }
.srv-head { display: flex; align-items: center; gap: 12px; }
.srv-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.srv-state { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 4px; }
.srv-state .dot { align-self: center; }
.is-up .srv-state .dot { color: var(--green); }
.is-down .srv-state .dot { color: var(--red); }
.is-unknown .srv-state .dot, .is-paused .srv-state .dot { color: var(--ink-3); }
.srv-label { font-size: 1.5rem; letter-spacing: .02em; }
.is-up .srv-label { color: var(--green); }
.is-down .srv-label { color: var(--red); }
.srv-ms { color: var(--ink-2); font-weight: 600; }
.srv-since { color: var(--ink-2); overflow-wrap: anywhere; }
.srv-warn { color: var(--yellow); margin-top: 4px; }
.srv-spark { display: block; width: 100%; height: 40px; margin-top: 12px; }
.srv-line { fill: none; stroke: #22e07a; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.srv-miss { fill: rgba(255, 85, 102, .9); }
.srv-events { list-style: none; margin: 0; padding: 0; }
.srv-events li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.srv-events li:last-child { border-bottom: 0; }
.ev-time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ev-down .ev-kind { color: var(--red); font-weight: 700; }
.ev-up .ev-kind { color: var(--green); font-weight: 700; }

.watch-line{font-size:12px;line-height:1.35;margin-top:6px;color:var(--muted,#a89a8c);overflow-wrap:anywhere}
.watch-line.w-ok{color:#4ade80}
.watch-line.w-warn{color:#fbbf24}
.watch-line.w-bad{color:#f87171}
