:root {
  --bg0: #070b14;
  --bg1: #0c1220;
  --surface: rgba(22, 32, 51, 0.72);
  --surface-solid: #141e30;
  --surface-2: #1c2a42;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #eef3fb;
  --muted: #93a4bd;
  --accent: #5b8cff;
  --accent-2: #8b5cf6;
  --accent-hover: #4a7af0;
  --pass: #34d399;
  --pass-bg: rgba(52, 211, 153, 0.12);
  --fail: #fb7185;
  --fail-bg: rgba(251, 113, 133, 0.12);
  --warn: #fbbf24;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(91, 140, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(139, 92, 246, 0.14), transparent 50%),
    radial-gradient(800px 400px at 50% 100%, rgba(52, 211, 153, 0.06), transparent 45%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin: 0 auto;
}

/* ——— Nav ——— */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-brand:hover {
  text-decoration: none;
  color: #fff;
}

.logo-glyph {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(91, 140, 255, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
  color: #fff;
  background: rgba(91, 140, 255, 0.15);
}

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

.nav-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-user-meta strong {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

.nav-user-meta small {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--surface-2), #243552);
  border: 1px solid var(--border-strong);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

/* ——— Layout ——— */
main {
  padding: 1.75rem 0 3.5rem;
}

.page-header {
  margin-bottom: 1.25rem;
}

.page-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  font-weight: 750;
}

.lead {
  margin: 0;
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 42rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.45rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow);
}

.glass {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card-sub {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.muted {
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.tile {
  display: block;
  background: linear-gradient(160deg, rgba(28, 42, 66, 0.9), rgba(20, 30, 48, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.tile:hover {
  border-color: rgba(91, 140, 255, 0.45);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.tile h3 {
  margin: 0 0 0.4rem;
  color: var(--text);
  font-size: 1.05rem;
}

.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tile-soon {
  opacity: 0.7;
  cursor: default;
}

.tile-soon:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

/* ——— Forms ——— */
label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

input[type='text'],
input[type='password'],
input[type='number'],
select,
textarea {
  width: 100%;
  background: rgba(7, 11, 20, 0.65);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea,
.input-data {
  font-family: var(--mono);
  font-size: 0.85rem;
  min-height: 200px;
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(91, 140, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}

.field {
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.2rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #6d7dff 60%, var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 22px rgba(91, 140, 255, 0.28);
  transition: transform 0.12s, filter 0.12s, opacity 0.12s;
}

.btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.btn-block {
  width: 100%;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  filter: none;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  box-shadow: none;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border);
  filter: none;
  background: rgba(255, 255, 255, 0.04);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  border-radius: 8px;
  box-shadow: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

/* ——— Login ——— */
.page-login {
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none !important;
  }
}

.login-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem;
  border-right: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(20, 30, 48, 0.5), rgba(7, 11, 20, 0.2));
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}

.login-orb-a {
  width: 280px;
  height: 280px;
  background: #5b8cff;
  top: 12%;
  left: 18%;
}

.login-orb-b {
  width: 220px;
  height: 220px;
  background: #8b5cf6;
  bottom: 22%;
  right: 12%;
}

.login-mark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  z-index: 1;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}

.login-card {
  width: min(400px, 100%);
  padding: 2rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 0 0 0.25rem;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.login-card > .muted {
  margin: 0 0 1.35rem;
}

.login-foot {
  margin-top: 1rem;
  font-size: 0.82rem;
  text-align: center;
}

.error-banner {
  background: var(--fail-bg);
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.35);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: none;
}

.error-banner.show {
  display: block;
}

/* ——— Check cards ——— */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.check-card {
  display: block;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(7, 11, 20, 0.35);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.check-card:hover {
  border-color: var(--border-strong);
}

.check-card.is-on {
  border-color: rgba(91, 140, 255, 0.45);
  background: rgba(91, 140, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(91, 140, 255, 0.12);
}

.check-card-top {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.check-card-top input[type='checkbox'] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.check-card-top strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.check-desc {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.check-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  transition: opacity 0.15s;
}

.check-fields.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.mini-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 5.5rem;
  flex: 1;
}

.mini-field span {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.mini-field input {
  padding: 0.45rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}

.mini-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
}

.mini-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* ——— Results ——— */
.summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
  align-items: stretch;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.95rem;
  min-width: 96px;
  backdrop-filter: blur(12px);
}

.stat .label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.stat .value {
  font-size: 1.35rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat.pass .value {
  color: var(--pass);
}

.stat.fail .value {
  color: var(--fail);
}

.summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-left: auto;
}

.chip {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(91, 140, 255, 0.12);
  color: #bfdbfe;
  border: 1px solid rgba(91, 140, 255, 0.25);
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 900px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}

.results-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 220px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.results-panel.pass {
  border-color: rgba(52, 211, 153, 0.28);
}

.results-panel.fail {
  border-color: rgba(251, 113, 133, 0.28);
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: rgba(7, 11, 20, 0.35);
  border-bottom: 1px solid var(--border);
}

.results-header h3 {
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.results-header .count {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  display: inline-block;
}

.dot.pass {
  background: var(--pass);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
}

.dot.fail {
  background: var(--fail);
  box-shadow: 0 0 10px rgba(251, 113, 133, 0.55);
}

.table-wrap {
  overflow: auto;
  max-height: 420px;
  flex: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-family: var(--mono);
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: var(--surface-solid);
  color: var(--muted);
  font-weight: 650;
  font-family: var(--font);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 1;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.tag {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-family: var(--font);
  font-weight: 600;
}

.tag.fail {
  background: var(--fail-bg);
  color: #fecdd3;
}

.tag.pass {
  background: var(--pass-bg);
  color: #a7f3d0;
}

.empty-state {
  padding: 1.75rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.status-line {
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.4em;
  margin: 0.85rem 0 0;
}

.status-line.error {
  color: #fecdd3;
}

.status-line.ok {
  color: #a7f3d0;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

.hidden {
  display: none !important;
}

.mode-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  vertical-align: middle;
  margin-left: 0.35rem;
}
