@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;600;700&family=Syne:wght@400;600;700;800&display=swap');

/* ─── CSS VARIABLES ─────────────────────────── */
:root {
  --bg:         #03040a;
  --surface:    #07090f;
  --card:       #0b0f1c;
  --card-hover: #101726;
  --border:     #151e30;
  --border-lit: #1f2d47;

  --accent:     #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.12);
  --purple:     #6d28d9;
  --green:      #10b981;
  --red:        #ef4444;
  --amber:      #f59e0b;

  --text:       #dde4f0;
  --muted:      #4a5568;
  --subtle:     #2d3748;

  --mono:       'IBM Plex Mono', monospace;
  --display:    'Syne', sans-serif;

  --radius:     8px;
  --radius-lg:  14px;

  --shadow:     0 4px 24px rgba(0,0,0,0.5);
  --glow:       0 0 30px rgba(0,212,255,0.15);
}

/* ─── RESET ─────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--display);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── TYPOGRAPHY ─────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--display);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; color: var(--text); }
h2 { font-size: clamp(18px, 2.5vw, 22px); font-weight: 700; color: var(--text); }
h3 { font-size: 15px; font-weight: 600; color: var(--text); }

/* ─── GLOBAL GRID BG ─────────────────────────── */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,212,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridMove 25s linear infinite;
}
@keyframes gridMove {
  from { background-position: 0 0; }
  to   { background-position: 48px 48px; }
}

/* ─── BUTTONS ────────────────────────────────── */
button, .btn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 10px 20px;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0,212,255,0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-lit);
}
.btn-ghost:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.btn-danger {
  background: rgba(239,68,68,0.12);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.2);
  border-color: var(--red);
}

/* ─── TABLES ─────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--mono);
}

thead tr {
  border-bottom: 1px solid var(--border-lit);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tbody tr:hover {
  background: var(--card-hover);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ─── CARDS / BOXES ──────────────────────────── */
.box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.box h2 {
  font-size: 14px;
  font-family: var(--mono);
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* ─── ALERTS ─────────────────────────────────── */
.alerta {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: var(--radius);
  padding: 14px 20px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  animation: alertPulse 2s ease-in-out infinite;
}

@keyframes alertPulse {
  0%, 100% { border-color: rgba(239,68,68,0.35); }
  50%       { border-color: rgba(239,68,68,0.7); box-shadow: 0 0 20px rgba(239,68,68,0.12); }
}

/* ─── LOGO ───────────────────────────────────── */
.logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
}

/* ─── BADGE ──────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.badge-success { background: rgba(16,185,129,0.12); color: var(--green); border: 1px solid rgba(16,185,129,0.25); }
.badge-danger  { background: rgba(239,68,68,0.12);  color: var(--red);   border: 1px solid rgba(239,68,68,0.25); }
.badge-warn    { background: rgba(245,158,11,0.12); color: var(--amber); border: 1px solid rgba(245,158,11,0.25); }
.badge-info    { background: var(--accent-dim);     color: var(--accent);border: 1px solid rgba(0,212,255,0.25); }

/* ─── HEADER / TOPBAR ────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(3,4,10,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.topbar-brand span {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── FORM INPUTS ────────────────────────────── */
input[type="text"],
input[type="password"],
input:not([type]) {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
}

input::placeholder {
  color: var(--muted);
}

/* ─── SCROLLBAR ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-lit); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ─── UTILITY ────────────────────────────────── */
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.z1 { position: relative; z-index: 1; }

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 700px) {
  table { font-size: 11px; }
  th, td { padding: 10px 10px; }
  .topbar { padding: 12px 16px; }
  .box { padding: 18px; }
}