/*
 * Art&Tech · capa de marca sobre Tabler 1.7.0 (MIT).
 * Reutilizable en BuilderAR, PuntoClub, Los Remates, AulaIQ… Ver docs/kit-visual.md.
 * Orden de carga: tabler.min.css → artntech-tabler.css → css propio del producto.
 * Requiere Poppins (Google Fonts, pesos 400/500/600/700).
 */

/* 1. Tokens de marca ------------------------------------------------------ */
:root {
  --at-red: #C62828;          /* primario */
  --at-red-dark: #8E0000;     /* hover / activo */
  --at-red-bright: #E53935;   /* acento sobre fondo oscuro */
  --at-red-neon: #FF5252;     /* detalles, foco en oscuro */
  --at-black: #1A1A1A;        /* menú lateral, títulos */
  --at-ink: #334155;          /* texto */
  --at-white: #FFFFFF;
  --at-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --at-radius: 10px;
  --at-radius-sm: 6px;
  --at-radius-lg: 16px;
  --at-shadow: 0 1px 2px rgba(26, 26, 26, .06), 0 4px 16px rgba(26, 26, 26, .06);
  --at-focus: 0 0 0 .2rem rgba(198, 40, 40, .35);

  /* Tabler: color primario, tipografía y radios */
  --tblr-primary: var(--at-red);
  --tblr-primary-rgb: 198, 40, 40;
  --tblr-primary-fg: #fff;
  --tblr-primary-darken: var(--at-red-dark);
  --tblr-primary-lt-rgb: 249, 233, 233;
  --tblr-link-color: var(--at-red);
  --tblr-link-color-rgb: 198, 40, 40;
  --tblr-link-hover-color: var(--at-red-dark);
  --tblr-link-hover-color-rgb: 142, 0, 0;
  --tblr-font-sans-serif: var(--at-font);
  --tblr-body-font-family: var(--at-font);
  --tblr-border-radius: var(--at-radius-sm);
  --tblr-border-radius-lg: var(--at-radius);
  --tblr-border-radius-xl: var(--at-radius-lg);
  --tblr-card-border-radius: var(--at-radius);
}
:root:not([data-bs-theme="dark"]) {
  --tblr-body-color: var(--at-ink);
  --tblr-body-bg: #f5f6f8;
}
[data-bs-theme="dark"] {
  --tblr-link-color: var(--at-red-neon);
  --tblr-link-hover-color: #ff8a80;
  --at-focus: 0 0 0 .2rem rgba(255, 82, 82, .45);
}

/* 2. Base ----------------------------------------------------------------- */
[hidden] { display: none !important; }
body { font-family: var(--at-font); font-feature-settings: normal; }
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .page-title, .card-title { font-family: var(--at-font); font-weight: 600; letter-spacing: -.01em; }
:root:not([data-bs-theme="dark"]) .page-title, :root:not([data-bs-theme="dark"]) h1 { color: var(--at-black); }

/* Foco siempre visible (teclado) */
:focus-visible { outline: 2px solid var(--at-red); outline-offset: 2px; }
.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus { box-shadow: var(--at-focus); border-color: var(--at-red); outline: none; }

/* Botones con la marca */
.btn-primary { --tblr-btn-bg: var(--at-red); --tblr-btn-border-color: var(--at-red); --tblr-btn-hover-bg: var(--at-red-dark); --tblr-btn-hover-border-color: var(--at-red-dark); --tblr-btn-active-bg: var(--at-red-dark); --tblr-btn-color: #fff; --tblr-btn-hover-color: #fff; }
.btn { font-weight: 500; }

/* Tarjetas */
.card { border-radius: var(--at-radius); box-shadow: var(--at-shadow); }
.card-header { border-top-left-radius: var(--at-radius); border-top-right-radius: var(--at-radius); }

/* 3. Logotipo (cubo en marco de escaneo + nombre) ------------------------ */
.at-logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--at-font); font-weight: 700; font-size: 1.25rem; line-height: 1; letter-spacing: -.02em; text-decoration: none; }
.at-logo__mark { width: 2rem; height: 2rem; flex: none; }
.at-logo__text b { color: var(--at-red-bright); font-weight: 700; margin-left: .18em; }
.at-logo--dark { color: var(--at-white); }
.at-logo--light { color: var(--at-black); }
.at-logo--light .at-logo__text b { color: var(--at-red); }
[data-bs-theme="dark"] .at-logo--light { color: var(--at-white); }
.at-logo--lg { font-size: 1.9rem; }
.at-logo--lg .at-logo__mark { width: 3rem; height: 3rem; }

/* 4. Menú lateral negro de marca ----------------------------------------- */
.navbar-vertical.at-sidebar { --tblr-navbar-bg: var(--at-black); background: var(--at-black) !important; border-right: 0; }
.at-sidebar .navbar-brand { padding: 1rem .25rem; }
.at-sidebar .nav-link { border-radius: var(--at-radius-sm); margin: 1px 0; color: rgba(255, 255, 255, .78); }
.at-sidebar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.at-sidebar .nav-item.active > .nav-link, .at-sidebar .nav-link.active { color: #fff; background: rgba(229, 57, 53, .18); box-shadow: inset 3px 0 0 var(--at-red-bright); }
.at-sidebar .nav-item.active .nav-link-icon { color: var(--at-red-neon); }
.at-sidebar .at-nav-title { color: rgba(255, 255, 255, .45); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; padding: 1.1rem .75rem .35rem; }
.at-sidebar .navbar-toggler { color: #fff; }
.at-sidebar :focus-visible { outline-color: var(--at-red-neon); }

/* Barra superior */
.at-topbar { background: var(--tblr-bg-surface); border-bottom: 1px solid var(--tblr-border-color); }

/* 5. Pantalla de acceso a pantalla completa ------------------------------ */
.at-auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--tblr-body-bg); }
.at-auth__brand { display: none; }
.at-auth__main { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.at-auth__box { width: 100%; max-width: 420px; }
@media (min-width: 992px) {
  .at-auth { grid-template-columns: minmax(380px, 46%) 1fr; }
  .at-auth__brand { display: flex; flex-direction: column; justify-content: space-between; padding: 3rem; color: #fff;
    background: radial-gradient(120% 80% at 0% 0%, rgba(229, 57, 53, .35) 0%, transparent 55%), radial-gradient(90% 70% at 100% 100%, rgba(142, 0, 0, .55) 0%, transparent 60%), var(--at-black); }
  .at-auth__brand h2 { color: #fff; font-size: 2rem; line-height: 1.2; font-weight: 600; max-width: 26ch; }
  .at-auth__brand p { color: rgba(255, 255, 255, .75); max-width: 40ch; }
}

/* 6. Utilidades de marca -------------------------------------------------- */
.text-brand { color: var(--at-red) !important; }
.bg-brand { background: var(--at-red) !important; color: #fff !important; }
.bg-brand-lt { background: rgba(198, 40, 40, .1) !important; color: var(--at-red-dark) !important; }
[data-bs-theme="dark"] .bg-brand-lt { color: var(--at-red-neon) !important; }
.at-stat { font-size: 1.75rem; font-weight: 600; line-height: 1.1; color: var(--tblr-emphasis-color, inherit); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
