/* =====================================================================
   base.css  —  Estilos globales del sistema LAB
   Aplica a todas las páginas vía base.html
   ===================================================================== */

/* ─── Variables de diseño ─────────────────────────────────────────── */
/* Colores claros */
:root {
    --bg: hsl(233, 27%, 94%);
    --surface: #ffffff;
    --surface2: #e8ecf5;
    --border: #2e3750;
    --accent: #143f9b;
    --accent2: #0ea870;
    --text: #020514;
    --text-muted: #1a254b;
    --danger: #e03030;
    --radius: 10px;
    --tag-bg: #dce4f5;
    --tag-border: #040916;
}

/* Colores oscuros */
/*
:root {
    --bg: #0f1117;
    --surface: #181c27;
    --surface2: #1e2336;
    --border: #2a3050;
    --accent: #4f8ef7;
    --accent2: #38e0a1;
    --text: #e8ecf5;
    --text-muted: #7a85a8;
    --danger: #f75f5f;
    --radius: 10px;
    --tag-bg: #253060;
    --tag-border: #3a4f99;
}
*/
/* ─── Reset base ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Body ────────────────────────────────────────────────────────── */
body {
    background: var(--bg);
    font-family: "DM Sans", sans-serif;
    color: var(--text);
    min-height: 100vh;
}

.main-content {
    padding: 2rem 1rem;
}

/* ─── Tipografía base ─────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Syne", sans-serif;
}

/* ─── Encabezado de página (page-header) ──────────────────────────── */
.page-header {
    max-width: 960px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.page-title {
    font-family: "Syne", sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ─── Badges y chips globales ─────────────────────────────────────── */
.nro-badge {
    background: rgba(79, 142, 247, 0.12);
    border: 1px solid rgba(79, 142, 247, 0.25);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
}

.eg-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(79, 142, 247, 0.15);
    border: 1px solid rgba(79, 142, 247, 0.3);
    color: var(--accent);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    vertical-align: middle;
}

/* ─── Form controls globales (Bootstrap override dark) ───────────── */
.form-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    display: block;
}

.form-control,
.form-select {
    background: var(--surface2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: var(--radius) !important;
    font-size: 0.875rem;
    padding: 0.55rem 0.8rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.12) !important;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
    opacity: 1;
}

.form-control:disabled,
.form-select:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}

/* Checkboxes y radios oscuros */
.form-check-dark .form-check-input {
    background-color: var(--surface);
    border-color: var(--border);
}

.form-check-dark .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-dark .form-check-input[type="radio"]:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-dark .form-check-label {
    font-size: 0.82rem;
    color: var(--text);
    cursor: pointer;
}

/* ─── Botones globales ────────────────────────────────────────────── */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--accent), #3a72e8);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.65rem 1.8rem;
    border-radius: var(--radius);
    transition: opacity 0.2s, transform 0.1s;
}

.btn-primary-custom:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius);
    transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── Scrollbar personalizada ─────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface2);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}