/* =====================================================
   ALTORQUE - Tema visual
   Paleta: Azul acero profundo + Naranja torque (acento)
   ===================================================== */

:root {
    --altorque-azul: #151515;
    --altorque-azul-claro: #2b2b2b;
    --altorque-naranja: #e5a800;
    --altorque-naranja-oscuro: #c79200;
    --altorque-gris-fondo: #f4f6f9;
    --altorque-gris-borde: #e2e6ec;
    --altorque-texto: #1f2937;
}

body {
    background-color: var(--altorque-gris-fondo);
    color: var(--altorque-texto);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Sidebar ---------- */
.altorque-sidebar {
    background: linear-gradient(180deg, #1b1b1b 0%, #000000 100%);
    height: 100vh;
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

/* El menú scrollea si hay más ítems que pantalla; marca y pie quedan fijos */
.altorque-sidebar nav {
    flex: 1 1 auto;
    flex-wrap: nowrap;   /* sin esto, Bootstrap parte el menú en 2 columnas en vez de scrollear */
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) transparent;
}
.altorque-sidebar nav::-webkit-scrollbar { width: 6px; }
.altorque-sidebar nav::-webkit-scrollbar-track { background: transparent; }
.altorque-sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.altorque-sidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.35); }

.altorque-sidebar .brand {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.altorque-sidebar .brand h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    margin: 0;
}

.altorque-sidebar .brand span {
    color: var(--altorque-naranja);
}

.altorque-sidebar .brand small {
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.altorque-sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.7rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.altorque-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.altorque-sidebar .nav-link.active {
    background: rgba(242,119,43,0.12);
    color: #fff;
    border-left-color: var(--altorque-naranja);
}

.altorque-sidebar .nav-section-title {
    color: rgba(255,255,255,0.35);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 1.25rem 0.35rem;
    font-weight: 700;
}

.altorque-sidebar .sidebar-footer {
    flex-shrink: 0;
    width: 100%;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.55);
    font-size: 0.8rem;
    background: #000000;
}

/* ---------- Contenido principal ---------- */
.altorque-main {
    margin-left: 250px;
    min-height: 100vh;
}

.altorque-topbar {
    background: #fff;
    border-bottom: 1px solid var(--altorque-gris-borde);
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.altorque-topbar h5 {
    margin: 0;
    font-weight: 700;
    color: var(--altorque-azul);
}

.altorque-content {
    padding: 1.5rem;
}

/* ---------- Cards / KPIs ---------- */
.kpi-card {
    background: #fff;
    border: 1px solid var(--altorque-gris-borde);
    border-radius: 0.6rem;
    padding: 1.25rem;
    border-left: 4px solid var(--altorque-naranja);
}

.kpi-card .kpi-valor {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--altorque-azul);
}

.kpi-card .kpi-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card {
    border: 1px solid var(--altorque-gris-borde);
    border-radius: 0.6rem;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid var(--altorque-gris-borde);
    font-weight: 700;
    color: var(--altorque-azul);
}

/* ---------- Botones ---------- */
.btn-altorque {
    background-color: var(--altorque-naranja);
    border-color: var(--altorque-naranja);
    color: #151515;
    font-weight: 600;
}

.btn-altorque:hover {
    background-color: var(--altorque-naranja-oscuro);
    border-color: var(--altorque-naranja-oscuro);
    color: #151515;
}

.btn-azul {
    background-color: var(--altorque-azul);
    border-color: var(--altorque-azul);
    color: #fff;
    font-weight: 600;
}

.btn-azul:hover {
    background-color: var(--altorque-azul-claro);
    border-color: var(--altorque-azul-claro);
    color: #fff;
}

/* ---------- Tablas ---------- */
.table thead th {
    background-color: var(--altorque-azul);
    color: #fff;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    border: none;
    white-space: nowrap;
}

.table-hover tbody tr:hover {
    background-color: rgba(242,119,43,0.05);
}

/* ---------- Login ---------- */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--altorque-azul) 0%, #0a1828 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.login-card .login-header {
    background: var(--altorque-azul);
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
}

.login-card .login-header h1 {
    color: #fff;
    font-weight: 800;
    font-size: 1.9rem;
    letter-spacing: 1px;
    margin: 0;
}

.login-card .login-header h1 span {
    color: var(--altorque-naranja);
}

.login-card .login-header p {
    color: rgba(255,255,255,0.55);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

.login-card .login-body {
    padding: 1.75rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .altorque-sidebar {
        margin-left: -250px;
    }
    .altorque-sidebar.show {
        margin-left: 0;
    }
    .altorque-main {
        margin-left: 0;
    }
}

.badge {
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.4em 0.65em;
}

textarea, input, select {
    text-transform: uppercase;
}

.no-uppercase, .no-uppercase input, .no-uppercase textarea {
    text-transform: none !important;
}
