/**
style.css
Estilos globales de Gestión OT - Emitel
Colores corporativos: Azul petróleo #004C66, Cian #01A7E1, grises azulados y blanco
GOT v2
*/

:root {
    --primario: #004C66;
    --primario-oscuro: #003547;
    --primario-claro: #E6F1F6;
    --secundario: #01A7E1;
    --secundario-oscuro: #0186B5;
    --secundario-claro: #DFF3FC;
    --gris-oscuro: #2B3A44;
    --gris-medio: #5B6B76;
    --gris-claro: #DCE4E9;
    --gris-fondo: #F3F6F8;
    --blanco: #FFFFFF;
    --rojo: #DC3545;
    --naranja: #FD7E14;
    --azul: #0D6EFD;
    --morado: #6F42C1;
    --verde: #00A651;
    --sombra: 0 2px 8px rgba(0, 53, 71, 0.08);
    --sombra-hover: 0 4px 16px rgba(0, 53, 71, 0.12);
    --radio: 8px;
    --sidebar-width: 260px;
    --header-height: 60px;
    --transicion: all 0.25s ease;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--gris-fondo);
    color: var(--gris-oscuro);
    line-height: 1.5;
    font-size: 14px;
}

::selection {
    background: rgba(1, 167, 225, 0.25);
}

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

a:hover {
    color: var(--primario);
}

/* ============================================================
FIX GLOBAL: box-sizing para evitar desbordes
============================================================ */
.form-control,
.btn,
.btn-block,
.card,
.card-header,
.alert,
.badge,
.sidebar-footer,
.sidebar-footer *,
.form-group,
.form-row,
table.data-table,
table.data-table th,
table.data-table td {
    box-sizing: border-box;
}

/* ============================================================
LOGIN
============================================================ */
.login-html {
    margin: 0;
    background: var(--primario-oscuro);
    overflow-x: hidden;
}

body.login-page,
body.login-page *,
body.login-page *::before,
body.login-page *::after {
    box-sizing: border-box;
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    background: linear-gradient(160deg, #002b3a 0%, var(--primario) 40%, #0179a8 74%, var(--secundario) 100%);
    background-size: 160% 160%;
    animation: bgShift 22s ease-in-out infinite;
}

@keyframes bgShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

body.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 16px),
        radial-gradient(70% 55% at 10% -5%, rgba(1,167,225,0.22), transparent 60%);
}

body.login-page::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42vh;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(120% 100% at 50% 130%, rgba(1,167,225,0.40), rgba(1,167,225,0) 62%);
    animation: floorPulse 9s ease-in-out infinite;
}

@keyframes floorPulse {
    0%, 100% { opacity: 0.75; }
    50%      { opacity: 1; }
}

.login-shell {
    position: relative;
    z-index: 1;
    margin: auto 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
}

.login-container {
    width: 100%;
    max-width: 440px;
    animation: loginRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes loginRise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-card {
    width: 100%;
    background: var(--blanco);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 18px 50px rgba(0, 33, 48, 0.35);
    text-align: center;
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo-img {
    width: 220px;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto 14px;
    mix-blend-mode: multiply;
    animation: logoIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
    transition: transform 0.4s ease;
}

.login-logo-img:hover {
    transform: scale(1.04);
}

@keyframes logoIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

.login-header h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--gris-oscuro);
    margin: 4px 0 4px;
}

.login-header p {
    color: var(--gris-medio);
    font-size: 13px;
    letter-spacing: 0.3px;
}

.login-form {
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.login-form .form-group {
    margin-bottom: 18px;
    text-align: center;
}

.login-form .form-group label {
    text-align: center;
}

.login-form .form-control {
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.login-form .form-control::placeholder {
    text-align: center;
    opacity: 0.7;
}

body.login-page .form-control:focus {
    border-color: var(--secundario);
    box-shadow: 0 0 0 4px rgba(1, 167, 225, 0.16);
    transform: translateY(-1px);
}

body.login-page .btn-primary {
    position: relative;
    overflow: hidden;
}

body.login-page .btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

body.login-page .btn-primary:hover::after {
    left: 130%;
}

.login-bottom-footer {
    width: 100%;
    max-width: 440px;
    margin-top: 22px;
    padding: 6px 24px 4px;
    text-align: center;
    font-size: 12px;
    line-height: 1.7;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 2px rgba(0, 20, 30, 0.4);
    position: relative;
    z-index: 1;
    animation: footerIn 0.8s ease 0.55s both;
    transition: color 0.3s ease;
}

.login-bottom-footer::before {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    margin: 0 auto 12px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}

.login-bottom-footer:hover {
    color: rgba(255, 255, 255, 0.98);
}

@keyframes footerIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .login-shell {
        padding: 24px 14px;
    }

    .login-card {
        padding: 30px 22px;
    }

    .login-logo-img {
        width: 170px;
    }

    .login-bottom-footer {
        padding: 6px 16px 4px;
        font-size: 11px;
        margin-top: 18px;
    }
}

@media (max-height: 620px) {
    .login-shell {
        margin: 0;
    }
}

/* ============================================================
LAYOUT PRINCIPAL
============================================================ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--blanco);
    border-right: 1px solid var(--gris-claro);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    max-height: 100dvh;
    z-index: 100;
    transition: var(--transicion);
    box-shadow: 2px 0 8px rgba(0, 53, 71, 0.06);
    overflow-y: auto;
}

.sidebar-header {
    height: auto;
    min-height: calc(var(--header-height) + 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gris-claro);
    background: linear-gradient(135deg, var(--primario-claro) 0%, var(--blanco) 100%);
    flex-shrink: 0;
}

.sidebar-logo-wrapper {
    text-align: center;
    width: 100%;
}

.sidebar-logo-img {
    width: 160px;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto 6px;
    mix-blend-mode: multiply;
}

.sidebar-subtitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--primario);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radio);
    color: var(--gris-medio);
    font-weight: 500;
    margin-bottom: 4px;
    transition: var(--transicion);
}

.nav-item:hover {
    background: var(--primario-claro);
    color: var(--primario);
}

.nav-item.active {
    background: var(--primario);
    color: var(--blanco);
    box-shadow: 0 2px 8px rgba(0, 76, 102, 0.25);
}

.nav-item .icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--gris-claro);
    background: var(--gris-fondo);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primario);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--gris-oscuro);
}

.user-role {
    font-size: 11px;
    color: var(--gris-medio);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--header-height);
    background: var(--blanco);
    border-bottom: 1px solid var(--gris-claro);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gris-oscuro);
}

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

/* ============================================================
COMPONENTES COMUNES
============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: none;
    border-radius: var(--radio);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion);
    text-decoration: none;
}

.btn-primary {
    background: var(--primario);
    color: white;
}

.btn-primary:hover {
    background: var(--primario-oscuro);
    color: white;
}

.btn-secondary {
    background: var(--gris-claro);
    color: var(--gris-oscuro);
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-danger {
    background: var(--rojo);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-menu {
    background: var(--gris-claro);
    border: none;
    border-radius: var(--radio);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    display: none;
}

.card {
    background: var(--blanco);
    border-radius: 10px;
    box-shadow: var(--sombra);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gris-claro);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gris-oscuro);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--gris-oscuro);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gris-claro);
    border-radius: var(--radio);
    font-size: 14px;
    transition: var(--transicion);
    background: var(--blanco);
}

.form-control:focus {
    outline: none;
    border-color: var(--secundario);
    box-shadow: 0 0 0 3px rgba(1, 167, 225, 0.18);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radio);
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-error {
    background: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f5c2c2;
}

.alert-success {
    background: #e6f7ed;
    color: #0d6832;
    border: 1px solid #a3e4b8;
}

.alert-info {
    background: #e8f4fd;
    color: #0c4a6e;
    border: 1px solid #bae0fd;
}

.table-responsive {
    overflow-x: auto;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.data-table th {
    background: var(--gris-fondo);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--gris-medio);
    border-bottom: 2px solid var(--gris-claro);
    white-space: nowrap;
}

table.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--gris-claro);
    vertical-align: middle;
}

table.data-table tr:hover td {
    background: #fafbfc;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pendiente {
    background: #fff3cd;
    color: #856404;
}

.badge-en_proceso,
.badge-en_curso {
    background: #cce5ff;
    color: #004085;
}

.badge-cotizada,
.badge-enviada {
    background: #d4edda;
    color: #155724;
}

.badge-aceptada,
.badge-finalizada,
.badge-emitida {
    background: #d1e7dd;
    color: #0f5132;
}

.badge-rechazada,
.badge-cancelada,
.badge-anulada {
    background: #f8d7da;
    color: #842029;
}

.badge-borrador {
    background: #e2e3e5;
    color: #41464b;
}

.badge-urgente {
    background: #f8d7da;
    color: #842029;
}

.badge-alta {
    background: #ffe5d0;
    color: #984c0c;
}

.badge-media {
    background: #fff3cd;
    color: #856404;
}

.badge-baja {
    background: #d1e7dd;
    color: #0f5132;
}

/* ============================================================
AGENDA (CALENDARIO MENSUAL)
============================================================ */
.agenda-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.agenda-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agenda-mes-anio {
    font-size: 20px;
    font-weight: 700;
    min-width: 180px;
    text-align: center;
}

.calendario {
    background: var(--blanco);
    border-radius: 12px;
    box-shadow: var(--sombra);
    overflow: hidden;
}

.calendario-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--primario);
    color: white;
}

.calendario-header div {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

.calendario-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.dia {
    min-height: 120px;
    border: 1px solid var(--gris-claro);
    padding: 8px;
    position: relative;
    background: var(--blanco);
    transition: var(--transicion);
}

.dia:hover {
    background: #fafbfc;
}

.dia.otro-mes {
    background: #f9fafb;
    color: #adb5bd;
}

.dia.hoy {
    background: var(--primario-claro);
}

.dia.hoy .dia-numero {
    background: var(--primario);
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dia-numero {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
}

.evento {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    color: white;
    font-weight: 500;
}

.evento-solicitud {
    background: #0D6EFD;
}

.evento-cotizacion {
    background: #FD7E14;
}

.evento-orden {
    background: var(--primario);
}

.evento-prefactura {
    background: #6F42C1;
}

.leyenda {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.leyenda-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.leyenda-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

/* ============================================================
MODALES
============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 30, 45, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transicion);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--blanco);
    border-radius: 12px;
    width: 95%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 30, 45, 0.2);
    transform: translateY(20px);
    transition: var(--transicion);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--gris-claro);
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--gris-medio);
    line-height: 1;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gris-claro);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================================
PIE DE PÁGINA DEL SISTEMA
============================================================ */
.app-footer {
    background: var(--blanco);
    border-top: 1px solid var(--gris-claro);
    padding: 14px 24px;
    font-size: 12px;
    color: var(--gris-medio);
    text-align: center;
    margin-top: auto;
}

/* ============================================================
RESPONSIVE
============================================================ */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .dia {
        min-height: 80px;
    }

    .btn-menu {
        display: inline-block;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 30, 45, 0.5);
        z-index: 99;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* ============================================================
UTILIDADES
============================================================ */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 16px;
}

.d-flex {
    display: flex;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 16px;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.w-100 {
    width: 100%;
}

/* ============================================================
GOT v2 - NUEVOS ESTILOS
============================================================ */

/* ============================================================
BADGES - ESTADOS DE PRECOTIZACIÓN (PC)
============================================================ */
.badge-no_ingresada_lioren {
    background: #e2e3e5;
    color: #41464b;
}

.badge-ingresada_lioren {
    background: #cce5ff;
    color: #004085;
}

.badge-no_aceptada {
    background: #f8d7da;
    color: #842029;
}

.badge-modificada_no_ingresada {
    background: #fff3cd;
    color: #856404;
}

/* ============================================================
EVENTOS DEL CALENDARIO - GOT v2
============================================================ */
.evento-precotizacion {
    background: var(--azul);
}

.evento-guia {
    background: var(--naranja);
}

/* ============================================================
GUÍA DE DESPACHO - PISTOLEO DE SERIES
============================================================ */
.input-scan {
    border: 2px dashed var(--secundario) !important;
    background: var(--secundario-claro) !important;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    letter-spacing: 1px;
}

.input-scan:focus {
    border-color: var(--primario) !important;
    box-shadow: 0 0 0 3px rgba(0, 76, 102, 0.15) !important;
}

.lista-series {
    margin-top: 8px;
}

.contador-series {
    font-weight: 700;
    color: var(--primario);
}

/* ============================================================
CAMPOS DE SOLO LECTURA (totales calculados)
============================================================ */
input.form-control[readonly] {
    background: var(--gris-fondo);
    color: var(--gris-medio);
    cursor: not-allowed;
}

/* ============================================================
TABLA DE ÍTEMS (PC / GD) - inputs compactos
============================================================ */
table.data-table td input[type="number"].form-control,
table.data-table td input[type="text"].form-control,
table.data-table td select.form-control {
    padding: 6px 8px;
}

table.data-table td input[type="number"].form-control {
    text-align: right;
}

/* ============================================================
TOTALES Y RENTABILIDAD (PC)
============================================================ */
.form-row .form-group input[readonly]#rentabilidad {
    font-weight: 700;
    color: var(--verde);
}

/* ============================================================
GOT v2 - FASE 1: menú usuario, reloj, tema oscuro
============================================================ */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gris-oscuro);
    font-size: 13px;
    font-weight: 600;
}

.user-menu-nombre {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--blanco);
    border: 1px solid var(--gris-claro);
    border-radius: 10px;
    box-shadow: var(--sombra-hover);
    min-width: 260px;
    display: none;
    z-index: 300;
    overflow: hidden;
}

.user-dropdown.open {
    display: block;
}

.user-dropdown a {
    display: flex;
    gap: 8px;
    padding: 11px 14px;
    font-size: 13px;
    color: var(--gris-oscuro);
}

.user-dropdown a:hover {
    background: var(--primario-claro);
}

.topbar-reloj {
    font-size: 12px;
    color: var(--gris-medio);
    font-variant-numeric: tabular-nums;
}

/* ============================================================
FASE 3: AVATAR DE USUARIO
La imagen de perfil debe verse completa dentro del círculo.
Si es cuadrada, llena el círculo.
Si no es cuadrada, se centra y se muestra completa.
No se usa cover para no recortar.
============================================================ */
.user-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    background: var(--gris-fondo);
    border: 2px solid var(--secundario);
    box-sizing: border-box;
    flex-shrink: 0;
}

body[data-theme="oscuro"] .user-avatar-img {
    background: var(--gris-claro);
}

.user-avatar {
    flex-shrink: 0;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.avatar-md {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.avatar-lg {
    width: 72px;
    height: 72px;
    font-size: 26px;
}

/* ============================================================
TEMA OSCURO
============================================================ */
body[data-theme="oscuro"] {
    --gris-fondo: #12181c;
    --blanco: #1c2429;
    --gris-oscuro: #e6ecef;
    --gris-medio: #9fb0b9;
    --gris-claro: #2c363c;
    --primario-claro: #12303f;
    --sombra: 0 2px 8px rgba(0, 0, 0, .4);
    --sombra-hover: 0 4px 16px rgba(0, 0, 0, .5);
}

body[data-theme="oscuro"] .form-control {
    background: #232d33;
    color: var(--gris-oscuro);
    border-color: var(--gris-claro);
}

body[data-theme="oscuro"] table.data-table th {
    background: #232d33;
}

body[data-theme="oscuro"] .login-card {
    background: var(--blanco);
}

/* ============================================================
CONFIGURACIÓN - PESTAÑAS (responsive)
============================================================ */
.config-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.config-tab {
    background: var(--blanco);
    border: 1px solid var(--gris-claro);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gris-medio);
}

.config-tab:hover {
    background: var(--primario-claro);
    color: var(--primario);
}

.config-tab.active {
    background: var(--primario);
    color: var(--blanco);
    border-color: var(--primario);
}

@media (max-width: 600px) {
    .config-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
    }

    .config-tab {
        white-space: nowrap;
    }
}

/* fin */
