/* ═══════════════════════════════════════════════════════════════════
   SECURITY PORTAL — Dark SOC Theme
   Paleta: Deep Navy · Teal Accent · Gold Warning · Red Danger
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg-void:       #060a14;
  --bg-base:       #0b1120;
  --bg-card:       #101828;
  --bg-card-hover: #141f35;
  --bg-input:      #0f1928;
  --sidebar-bg:    #080e1c;
  --sidebar-w:     255px;

  --teal:          #00d4aa;
  --teal-dim:      rgba(0,212,170,.12);
  --teal-glow:     rgba(0,212,170,.25);
  --gold:          #f5a623;
  --gold-dim:      rgba(245,166,35,.12);
  --red:           #ff4757;
  --red-dim:       rgba(255,71,87,.12);
  --blue:          #3b82f6;
  --blue-dim:      rgba(59,130,246,.12);
  --purple:        #a855f7;

  --text-1:        #e8edf8;
  --text-2:        #8892a4;
  --text-3:        #4a566a;
  --border:        rgba(255,255,255,.07);
  --border-strong: rgba(255,255,255,.12);

  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px rgba(0,0,0,.5);
  --shadow-glow:   0 0 30px rgba(0,212,170,.15);

  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --sidebar-transition: 0.28s cubic-bezier(.4,0,.2,1);
}

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

html { font-size: 15px; }

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-1);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0,212,170,.06) 0%, transparent 70%);
}

/* ─── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--sidebar-transition);
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.brand-icon  { font-size: 22px; }
.brand-text  {
  font-size: 15px; font-weight: 700;
  color: var(--text-1);
  letter-spacing: .3px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.nav-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all .18s ease;
  margin-bottom: 2px;
  position: relative;
}
.nav-item i { font-size: 15px; flex-shrink: 0; }
.nav-item:hover {
  color: var(--text-1);
  background: var(--bg-card);
}
.nav-item.active {
  color: var(--teal);
  background: var(--teal-dim);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--teal);
  border-radius: 0 3px 3px 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  animation: pulse-badge 2s infinite;
}
.nav-badge-count {
  margin-left: auto;
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid var(--teal-glow);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: .7; }
}

/* Threat meter */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.threat-meter { padding: 2px 0; }
.threat-label { font-size: 10px; color: var(--text-3); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .8px; }
.threat-bar {
  height: 4px;
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
}
.threat-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease;
}
.threat-low      { background: var(--teal); }
.threat-medium   { background: var(--gold); }
.threat-high     { background: #ff8c00; }
.threat-critical { background: var(--red); animation: pulse-glow 1.5s infinite; }
.threat-status   { font-size: 10px; font-weight: 700; letter-spacing: 1px; }

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #0099ff);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name  { font-size: 12px; font-weight: 600; line-height: 1.2; }
.user-role  { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.user-details { flex: 1; overflow: hidden; }
.btn-logout {
  color: var(--text-3);
  font-size: 15px;
  transition: color .2s;
  padding: 2px;
}
.btn-logout:hover { color: var(--red); }

/* ─── Main Layout ───────────────────────────────────────────────── */
.main-layout {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--sidebar-transition);
}

.topbar {
  position: sticky; top: 0; z-index: 90;
  height: 58px;
  background: rgba(11,17,32,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
}
.btn-toggle-sidebar {
  background: none; border: none;
  color: var(--text-2); font-size: 20px;
  cursor: pointer; padding: 4px;
  display: none;
}
.page-title {
  font-size: 16px; font-weight: 600;
  color: var(--text-1); margin: 0;
}
.topbar-left  { flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-time  { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.realtime-indicator { display: flex; align-items: center; gap: 7px; }
.dot-pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-glow 2s infinite;
}
.realtime-txt { font-size: 11px; color: var(--text-3); }
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--teal-glow); }
  50%       { box-shadow: 0 0 0 5px transparent; }
}

.content-area { flex: 1; padding: 24px; }

/* ─── Flash messages ────────────────────────────────────────────── */
.flash-msg {
  display: flex; align-items: center;
  padding: 12px 20px;
  font-size: 13.5px;
  gap: 8px;
  position: relative;
}
.flash-success { background: rgba(0,212,170,.12); border-bottom: 1px solid rgba(0,212,170,.2); color: var(--teal); }
.flash-error   { background: var(--red-dim);  border-bottom: 1px solid rgba(255,71,87,.2);  color: var(--red); }
.flash-info    { background: var(--blue-dim); border-bottom: 1px solid rgba(59,130,246,.2); color: var(--blue); }
.flash-close   { margin-left: auto; background: none; border: none; color: inherit; cursor: pointer; font-size: 18px; }

/* ─── Stats Cards ───────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all .2s ease;
}
.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.stat-card.teal::before   { background: var(--teal); }
.stat-card.gold::before   { background: var(--gold); }
.stat-card.red::before    { background: var(--red); }
.stat-card.blue::before   { background: var(--blue); }
.stat-card.purple::before { background: var(--purple); }

.stat-icon {
  font-size: 22px;
  margin-bottom: 12px;
  opacity: .8;
}
.stat-value {
  font-size: 28px; font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-1);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label  { font-size: 12px; color: var(--text-2); font-weight: 500; }
.stat-delta  { font-size: 11px; color: var(--text-3); margin-top: 6px; }

/* ─── Cards ─────────────────────────────────────────────────────── */
.card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.card-dark-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-dark-header h3 {
  font-size: 14px; font-weight: 600;
  color: var(--text-1); margin: 0;
  flex: 1;
}
.card-dark-body { padding: 20px; }

/* ─── Tables ─────────────────────────────────────────────────────── */
.table-dark-custom {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table-dark-custom th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-dark-custom td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
.table-dark-custom tr:last-child td { border-bottom: none; }
.table-dark-custom tr:hover td { background: var(--bg-card-hover); }
.table-dark-custom .mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-1); }

/* Badges */
.badge-tipo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
}
.badge-danger    { background: var(--red-dim);  color: var(--red);  border: 1px solid rgba(255,71,87,.2); }
.badge-warning   { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(245,166,35,.2); }
.badge-info      { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(59,130,246,.2); }
.badge-secondary { background: rgba(255,255,255,.05); color: var(--text-3); border: 1px solid var(--border); }
.badge-success   { background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(0,212,170,.2); }

.ip-cell {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-1);
  display: flex; align-items: center; gap: 8px;
}
.ip-flag { font-size: 16px; }

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn-teal {
  background: var(--teal);
  color: #000;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-teal:hover { background: #00bfa0; transform: translateY(-1px); }

.btn-outline-teal {
  background: transparent;
  color: var(--teal);
  border: 1px solid rgba(0,212,170,.4);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-outline-teal:hover { background: var(--teal-dim); color: var(--teal); }

.btn-danger-sm {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255,71,87,.2);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  transition: all .18s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-danger-sm:hover { background: var(--red); color: #fff; }

.btn-success-sm {
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid rgba(0,212,170,.2);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  transition: all .18s;
}
.btn-success-sm:hover { background: var(--teal); color: #000; }

/* ─── Forms ─────────────────────────────────────────────────────── */
.form-dark {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  padding: 9px 13px;
  font-size: 13px;
  font-family: var(--font-body);
  width: 100%;
  transition: border-color .18s;
}
.form-dark:focus {
  outline: none;
  border-color: rgba(0,212,170,.4);
  box-shadow: 0 0 0 3px rgba(0,212,170,.06);
}
.form-dark::placeholder { color: var(--text-3); }
.form-label-dark { font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; display: block; }

/* Filtro bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.filter-bar select.form-dark { width: auto; min-width: 140px; }
.filter-bar input.form-dark  { width: auto; min-width: 180px; }

/* ─── Charts ─────────────────────────────────────────────────────── */
.chart-wrap {
  position: relative;
  width: 100%;
}

/* ─── Login Page ─────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(0,212,170,.08) 0%, transparent 60%),
    var(--bg-void);
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,.7);
}
.login-header {
  padding: 36px 32px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0,212,170,.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}
.login-icon   { font-size: 44px; margin-bottom: 14px; }
.login-title  { font-size: 22px; font-weight: 700; color: var(--text-1); }
.login-sub    { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.login-body   { padding: 28px 32px 32px; }
.login-field  { margin-bottom: 18px; }
.login-field .form-label-dark { font-size: 12px; margin-bottom: 7px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap i {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 14px;
}
.input-icon-wrap .form-dark { padding-left: 38px; }
.login-btn {
  width: 100%;
  padding: 11px;
  font-size: 14px;
  justify-content: center;
  margin-top: 6px;
}
.login-error {
  background: var(--red-dim);
  border: 1px solid rgba(255,71,87,.2);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}

/* ─── Modal ──────────────────────────────────────────────────────── */
.modal-dark .modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.modal-dark .modal-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}
.modal-dark .modal-title { font-size: 15px; font-weight: 600; }
.modal-dark .modal-body  { padding: 20px; }
.modal-dark .modal-footer { border-top: 1px solid var(--border); padding: 14px 20px; }
.modal-dark .btn-close { filter: invert(1); opacity: .5; }

/* ─── Pagination ─────────────────────────────────────────────────── */
.pagination { gap: 4px; }
.page-link {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-2);
  border-radius: var(--radius-sm) !important;
  font-size: 13px;
  padding: 6px 12px;
}
.page-item.active .page-link { background: var(--teal); border-color: var(--teal); color: #000; }
.page-link:hover { background: var(--bg-card-hover); color: var(--text-1); border-color: var(--border); }

/* ─── Alerts list ───────────────────────────────────────────────── */
.alert-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.alert-item:last-child { border-bottom: none; }
.alert-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.alert-dot.critical { background: var(--red); }
.alert-dot.warning  { background: var(--gold); }
.alert-dot.info     { background: var(--blue); }
.alert-dot.success  { background: var(--teal); }
.alert-msg  { font-size: 13px; color: var(--text-1); }
.alert-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }

/* ─── Activity feed ─────────────────────────────────────────────── */
.feed-item {
  display: flex;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 13px;
  transition: background .15s;
}
.feed-item:hover { background: var(--bg-card-hover); }
.feed-item:last-child { border-bottom: none; }
.feed-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.feed-icon.red    { background: var(--red-dim); color: var(--red); }
.feed-icon.gold   { background: var(--gold-dim); color: var(--gold); }
.feed-icon.teal   { background: var(--teal-dim); color: var(--teal); }
.feed-icon.blue   { background: var(--blue-dim); color: var(--blue); }
.feed-main        { flex: 1; }
.feed-ip          { font-family: var(--font-mono); font-size: 12px; color: var(--text-1); }
.feed-desc        { font-size: 12px; color: var(--text-3); }
.feed-time        { font-size: 11px; color: var(--text-3); white-space: nowrap; }

/* ─── Grid helpers ──────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ─── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(0,0,0,.6); }
  .main-layout { margin-left: 0; }
  .btn-toggle-sidebar { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .content-area { padding: 16px; }
  .stats-grid   { grid-template-columns: 1fr 1fr; }
}

/* ─── Animations ─────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-card, .card-dark { animation: fadeInUp .3s ease both; }
.stat-card:nth-child(2) { animation-delay: .05s; }
.stat-card:nth-child(3) { animation-delay: .10s; }
.stat-card:nth-child(4) { animation-delay: .15s; }
.stat-card:nth-child(5) { animation-delay: .20s; }
.stat-card:nth-child(6) { animation-delay: .25s; }

/* New attack row highlight */
@keyframes highlight-row {
  0%   { background: rgba(255,71,87,.15); }
  100% { background: transparent; }
}
.new-row { animation: highlight-row 3s ease forwards; }

/* Empty state */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-3);
}
.empty-state i    { font-size: 48px; margin-bottom: 16px; display: block; opacity: .3; }
.empty-state h4   { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.empty-state p    { font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════════
   2FA + reCAPTCHA + Login extras
   ═══════════════════════════════════════════════════════════════════ */

/* ─── OTP digit inputs ───────────────────────────────────────────── */
.otp-input-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 4px 0 20px;
}
.otp-digit {
  width: 48px;
  height: 56px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  text-align: center;
  transition: border-color .18s, box-shadow .18s, transform .1s;
  -moz-appearance: textfield;
}
.otp-digit::-webkit-outer-spin-button,
.otp-digit::-webkit-inner-spin-button { -webkit-appearance: none; }
.otp-digit:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
  transform: translateY(-2px);
}
.otp-digit:not(:placeholder-shown) {
  border-color: rgba(0,212,170,.4);
  color: var(--teal);
}

/* ─── TOTP countdown ring ────────────────────────────────────────── */
.totp-countdown {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 10px;
  background: var(--bg-void);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.countdown-ring {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.countdown-svg {
  width: 44px;
  height: 44px;
}
.countdown-num {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
  transition: color .3s;
}
.countdown-hint {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}

/* ─── Login security info bar ────────────────────────────────────── */
.login-security-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-void);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.login-security-info i { color: var(--teal); font-size: 13px; }

/* ─── Login footer note ──────────────────────────────────────────── */
.login-footer-note {
  position: fixed; bottom: 16px; left: 0; right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  pointer-events: none;
}

/* ─── Math captcha question ──────────────────────────────────────── */
.math-question {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-dim);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0,212,170,.2);
}

/* ─── reCAPTCHA dark override ────────────────────────────────────── */
.g-recaptcha {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}
.g-recaptcha iframe { border-radius: var(--radius-sm) !important; }

/* ─── 2FA status badge en tabla de usuarios ─────────────────────── */
.badge-2fa-on  { background: var(--teal-dim); color: var(--teal); border: 1px solid rgba(0,212,170,.2); }
.badge-2fa-off { background: rgba(255,255,255,.04); color: var(--text-3); border: 1px solid var(--border); }
.badge-2fa-on, .badge-2fa-off {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}

/* ─── QR code container ──────────────────────────────────────────── */
.qr-wrapper {
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  display: inline-block;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.qr-wrapper img { display: block; border-radius: 4px; }

/* ─── Backup codes grid ──────────────────────────────────────────── */
.backup-codes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.backup-code-item {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-void);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  letter-spacing: 3px;
  color: var(--text-1);
  transition: border-color .15s;
}
.backup-code-item:hover { border-color: var(--teal); }
.backup-code-item.usado { opacity: .35; text-decoration: line-through; }

/* ─── 2FA setup steps visual ─────────────────────────────────────── */
.setup-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.setup-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px;
  background: var(--bg-void);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
}
.setup-step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─── Login card: 2FA shimmer animation on verify page ──────────── */
@keyframes shimmer-border {
  0%   { border-color: rgba(0,212,170,.2); }
  50%  { border-color: rgba(0,212,170,.6); box-shadow: 0 0 20px rgba(0,212,170,.15); }
  100% { border-color: rgba(0,212,170,.2); }
}
.login-card.verifying {
  animation: shimmer-border 2s ease-in-out infinite;
}

/* ─── reCAPTCHA config section in configuracion.php ─────────────── */
.recaptcha-keys {
  background: var(--bg-void);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.8;
}
.recaptcha-keys code { color: var(--teal); font-size: 11px; }
