/* =====================================================
   VARIABLES GLOBALES DE COLOR
   Paleta oficial MedinAutos
===================================================== */
:root {
    --rojo: #d81822;
    --gris-oscuro: #302e2f;
    --gris-claro: #f0eaea;
    --blanco: #ffffff;
}

/* =====================================================
   RESET GENERAL
   Evita inconsistencias entre navegadores
===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =====================================================
   FUENTE GENERAL
   (NO rompe Font Awesome)
===================================================== */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #e5e7eb 0%, #f9fafc 40%);
    color: var(--gris-oscuro);
}


/* =====================================================
   FORZAR FONT AWESOME
   SOLUCIÓN CLAVE PARA ICONOS
===================================================== */
.fa,
.fas,
.far,
.fab,
.fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
}

/* =====================================================
   HEADER PRINCIPAL
===================================================== */
.main-header {
    background-color: var(--gris-oscuro);
    color: var(--blanco);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.main-header .logo a {
    color: var(--blanco);
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
}

/* Navegación */
.main-nav a {
    color: var(--blanco);
    margin-left: 25px;
    text-decoration: none;
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--rojo);
}

/* =====================================================
   BOTONES
===================================================== */
.btn-primary {
    background-color: var(--rojo);
    color: var(--blanco);
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: #b8141c;
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #111827;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

/* =====================================================
   PAGE (CONTENEDOR CENTRAL)
===================================================== */
.page {
    max-width: 1100px;
    margin: 0 auto;
}

/* =====================================================
   HEADER DE CLIENTES
===================================================== */
.clientes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.clientes-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2e2e2e;
}

/* =====================================================
   CARD CLIENTES
===================================================== */
.clientes-card {
    background: var(--blanco);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   TABLA
===================================================== */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

/* Cabecera */
.table thead {
    background-color: #2b2b2b;
}

.table thead th {
    color: var(--blanco);
    font-weight: 600;
    padding: 14px 16px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Filas */
.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(216, 24, 34, 0.04);
}

/* Columna acciones */
.table th:last-child,
.table td:last-child {
    text-align: center;
    width: 130px;
}

/* =====================================================
   ACCIONES (ICONOS)
===================================================== */
.actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Botón base */
.action-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.25s ease;
}

/* Iconos visibles siempre */
.action-btn i {
    font-size: 15px;
    line-height: 1;
}

/* EDITAR */
.action-btn.edit {
    background-color: #e8f0ff;
}

.action-btn.edit i {
    color: #2563eb;
}

.action-btn.edit:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

.action-btn.edit:hover i {
    color: var(--blanco);
}

/* ELIMINAR */
.action-btn.delete {
    background-color: #fdecec;
}

.action-btn.delete i {
    color: #dc2626;
}

.action-btn.delete:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.action-btn.delete:hover i {
    color: var(--blanco);
}

/* =====================================================
   ESTADO VACÍO
===================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #777;
}

.empty-state h3 {
    margin-bottom: 6px;
    font-size: 18px;
}

/* =====================================================
   FOOTER
===================================================== */
.main-footer {
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    color: #666;
    font-size: 14px;
}

/* =====================================================
   FORMULARIO CLIENTE
===================================================== */
.page {
    max-width: 900px;
}

.card {
    max-width: 700px;
    margin: 0 auto;
}

/* Grid del formulario */
.form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

/* Labels */
.form-group label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #666;
    margin-bottom: 6px;
}

/* Inputs */
.form-group input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d0d0d0;
    font-size: 14px;
    background-color: #fafafa;
    transition: all 0.25s ease;
}

.form-group input:focus {
    outline: none;
    background-color: var(--blanco);
    border-color: var(--rojo);
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.15);
}

/* Email ocupa toda la fila */
.form-group:nth-child(4) {
    grid-column: span 2;
}

/* Acciones */
.form-actions {
    grid-column: span 2;
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

/* =====================================================
   ALERTAS
===================================================== */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background-color: #fdecec;
    color: #b91c1c;
    border: 1px solid #f5c2c7;
}

/* ===============================
   ICONOS DE ACCIONES (PRO)
================================ */

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}

/* Icono interno */
.action-icon i {
    font-size: 16px;
}

/* ✏️ EDITAR */
.action-icon.edit {
    background-color: #eef2ff;
}

.action-icon.edit i {
    color: #2563eb;
}

.action-icon.edit:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

.action-icon.edit:hover i {
    color: #ffffff;
}

/* 🗑️ ELIMINAR */
.action-icon.delete {
    background-color: #fee2e2;
}

.action-icon.delete i {
    color: #dc2626;
}

.action-icon.delete:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.action-icon.delete:hover i {
    color: #ffffff;
}

/* =====================================================
   SIDEBAR MODERNO – MEDINAUTOS
===================================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: #f9fafc;
    border-right: 1px solid #e5e7eb;
    padding: 20px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

/* LOGO */
.sidebar-logo {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar-logo a {
    font-size: 22px;
    font-weight: 800;
    color: var(--gris-oscuro);
    text-decoration: none;
}

/* NAV */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding-right: 6px;
}

/* SECCIONES */
.sidebar-section {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #8b8b8b;
    margin: 18px 0 8px;
}

.sidebar-module {
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
    margin-bottom: 14px;
}

.sidebar-submenu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    margin-left: 8px;
    padding-left: 12px;
    border-left: 2px solid #eef0f4;
}

.sidebar-subitem {
    font-size: 0.92rem;
    font-weight: 600;
    background: #f6f7fb;
    margin-bottom: 0;
}

.sidebar-subitem .icon-box {
    width: 30px;
    height: 30px;
}

/* ITEM */
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--gris-oscuro);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* ICONO */
.icon-box {
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.icon-box i {
    font-size: 16px;
}

/* HOVER */
.sidebar-item:hover {
    background-color: #eef0f4;
}

/* ESPACIADOR */
.sidebar-spacer {
    flex-grow: 1;
}

/* LOGOUT */
.sidebar-item.logout {
    background-color: #fdecec;
    color: #b91c1c;
}

.sidebar-item.logout:hover {
    background-color: var(--rojo);
    color: var(--blanco);
}

/* =====================================================
   LAYOUT PRINCIPAL (EMPRESARIAL)
===================================================== */

.app-layout {
    margin-left: 260px;
    /* ancho del sidebar */
    min-height: 100vh;
    padding: 30px 40px;
}

/* =====================================================
   TOPBAR (HEADER SUPERIOR)
===================================================== */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.topbar {
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.topbar-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.topbar-text {
    display: flex;
    flex-direction: column;
}

.sidebar-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sidebar-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

.breadcrumb {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-top: 4px;
}

/* Usuario */
.user-box {
    text-align: right;
}

.user-box strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.user-box span {
    font-size: 12px;
    color: #6b7280;
}

/* =====================================================
   CONTENIDO CENTRAL (CARD GRANDE)
===================================================== */

.content-wrapper {
    display: flex;
}

.content-card {
    width: 100%;
    background-color: var(--blanco);
    border-radius: 22px;
    padding: 32px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 900;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

body.sidebar-open {
    overflow: hidden;
}

/* =====================================================
   TABLAS DENTRO DE CONTENT-CARD
===================================================== */

.content-card .table {
    background-color: var(--blanco);
    border-radius: 14px;
    overflow: hidden;
}

.content-card .table thead {
    background-color: #1f2933;
}


.content-card h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.content-card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
}

/* =====================================================
   RESPONSIVE BASE
===================================================== */

@media (max-width: 1100px) {
    .sidebar {
        width: 220px;
    }

    .app-layout {
        margin-left: 220px;
        padding: 24px;
    }
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(82vw, 300px);
        height: 100vh;
        padding: 16px 18px;
        border-right: 1px solid #e5e7eb;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
    }

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

    .sidebar-nav {
        flex-direction: column;
        height: calc(100vh - 90px);
    }

    .sidebar-section {
        margin: 16px 0 6px;
    }

    .sidebar-item {
        padding: 10px 12px;
    }

    .icon-box {
        width: 32px;
        height: 32px;
    }

    .app-layout {
        margin-left: 0;
        padding: 20px 16px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .content-card {
        padding: 20px;
        overflow-x: hidden;
    }

    .main-footer {
        margin-top: 20px;
        padding: 16px;
    }
}

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

    .sidebar-nav {
        flex-direction: column;
    }

    .sidebar-item {
        width: 100%;
    }

    .user-box {
        text-align: left;
    }

    .page-title {
        font-size: 22px;
    }
}

/* =====================================================
   Visual refresh 2026 - tecnologia + taller
===================================================== */

:root {
    --rojo: #e11d2f;
    --rojo-profundo: #a30f1d;
    --carbon: #10141c;
    --carbon-2: #171c25;
    --metal: #eef2f7;
    --texto: #111827;
    --texto-suave: #667085;
    --linea: rgba(148, 163, 184, 0.28);
    --cyan: #22d3ee;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    color: var(--texto);
    background:
        linear-gradient(115deg, rgba(225, 29, 47, 0.055), transparent 34%),
        linear-gradient(180deg, #f7f8fb 0%, #eef2f7 100%);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    pointer-events: none;
}

.sidebar {
    width: 278px;
    padding: 20px 16px;
    color: #f8fafc;
    background:
        linear-gradient(145deg, rgba(225, 29, 47, 0.15), transparent 40%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 13px),
        linear-gradient(180deg, #10141c 0%, #151a23 54%, #0f131a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 18px 0 55px rgba(15, 23, 42, 0.18);
}

.sidebar-logo {
    margin-bottom: 22px;
    text-align: left;
}

.sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 28px rgba(0, 0, 0, 0.24);
}

.brand-mark img {
    width: 36px;
    height: auto;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 18px;
    line-height: 1;
}

.brand-copy small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

.sidebar-module {
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.sidebar-section {
    color: rgba(255, 255, 255, 0.44);
    margin: 10px 4px 8px;
    font-size: 10px;
    letter-spacing: 1.2px;
}

.sidebar-submenu {
    border-left-color: rgba(255, 255, 255, 0.10);
}

.sidebar-item,
.sidebar-subitem {
    color: rgba(255, 255, 255, 0.78);
    background: transparent;
    border: 1px solid transparent;
}

.sidebar-item:hover,
.sidebar-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-item.active {
    box-shadow: inset 3px 0 0 var(--rojo);
}

.icon-box {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: none;
}

.sidebar-item.active .icon-box,
.sidebar-item:hover .icon-box {
    background: linear-gradient(135deg, var(--rojo), var(--rojo-profundo));
    border-color: rgba(255, 255, 255, 0.14);
}

.sidebar-item.logout {
    color: #fecaca;
    background: rgba(225, 29, 47, 0.12);
    border-color: rgba(225, 29, 47, 0.22);
}

.sidebar-item.logout:hover {
    background: var(--rojo);
}

.app-layout {
    margin-left: 278px;
    padding: 28px 34px 34px;
}

.topbar {
    min-height: 78px;
    margin-bottom: 24px;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--linea);
}

.breadcrumb {
    color: var(--texto-suave);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.page-title {
    color: #0f172a;
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 850;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 999px;
    color: #0f5132;
    background: #eafaf1;
    border: 1px solid #b7ebc8;
    font-size: 12px;
    font-weight: 850;
}

.system-status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14);
}

.user-box {
    min-width: 132px;
    padding: 10px 13px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.user-box strong {
    color: #111827;
}

.content-card,
.clientes-card,
.card {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

.content-card {
    padding: 28px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--rojo), #f04455 54%, var(--rojo-profundo));
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(225, 29, 47, 0.24);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f04455, var(--rojo));
    transform: translateY(-1px);
}

.btn-secondary {
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: #ffffff;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead,
.content-card .table thead {
    background: linear-gradient(135deg, #111827, #1f2937);
}

.table thead th {
    padding: 15px 16px;
    letter-spacing: 0.6px;
}

.table tbody td {
    border-bottom-color: #edf0f4;
}

.table tbody tr:hover {
    background: rgba(225, 29, 47, 0.045);
}

.action-btn,
.action-icon,
.btn-icon {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.action-btn:hover,
.action-icon:hover,
.btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.main-footer {
    margin-left: 278px;
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .sidebar {
        width: 238px;
    }

    .app-layout,
    .main-footer {
        margin-left: 238px;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: min(84vw, 320px);
    }

    .app-layout,
    .main-footer {
        margin-left: 0;
    }

    .sidebar-toggle {
        border-color: rgba(148, 163, 184, 0.32);
        background: rgba(255, 255, 255, 0.86);
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .app-layout {
        padding: 18px 14px;
    }

    .content-card {
        padding: 18px;
        border-radius: 18px;
    }

    .system-status {
        display: none;
    }
}

/* Cohesion visual: shell carbon para modulos tecnologicos */
body {
    color: #e5e7eb;
    background:
        radial-gradient(circle at 12% 8%, rgba(225, 29, 47, 0.18), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.10), transparent 24%),
        linear-gradient(135deg, #080c13 0%, #111722 46%, #070a10 100%);
}

body::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    opacity: 0.65;
}

.app-layout {
    color: #e5e7eb;
}

.topbar {
    border-bottom-color: rgba(255, 255, 255, 0.10);
}

.breadcrumb {
    color: rgba(226, 232, 240, 0.58);
}

.page-title {
    color: #f8fafc;
}

.system-status {
    color: #bbf7d0;
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(134, 239, 172, 0.24);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.user-box {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.user-box strong {
    color: #f8fafc;
}

.user-box span {
    color: rgba(226, 232, 240, 0.58);
}

.main-footer {
    color: rgba(226, 232, 240, 0.42);
}

/* Sidebar hardening: evita desbordes y scrollbars visualmente rotos */
.sidebar {
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.20);
    border-radius: 999px;
}

.sidebar-logo,
.sidebar-logo a,
.brand-mark,
.brand-copy {
    min-width: 0;
}

.sidebar-logo a {
    text-align: left;
}

.brand-mark {
    width: 52px !important;
    height: 52px !important;
    max-width: 52px;
    max-height: 52px;
    overflow: hidden;
}

.brand-mark img,
.sidebar-logo img {
    width: 38px !important;
    max-width: 38px !important;
    height: auto !important;
    max-height: 38px !important;
    object-fit: contain;
}

.brand-copy strong,
.brand-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav {
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.sidebar-module {
    flex: 0 0 auto;
}

.sidebar-item {
    width: 100%;
    min-width: 0;
}


/* =====================================================
   CENTRALIZED FROM backend/app/static/css/system.css
===================================================== */
/* =====================================================
   MedinAutos Design System
   Capa final cargada despues de los estilos por modulo.
===================================================== */

:root {
    --ma-red: #e11d2f;
    --ma-red-dark: #a30f1d;
    --ma-bg: #080c13;
    --ma-bg-2: #111722;
    --ma-panel: rgba(255, 255, 255, 0.88);
    --ma-panel-solid: #ffffff;
    --ma-panel-dark: rgba(255, 255, 255, 0.075);
    --ma-text: #111827;
    --ma-muted: #667085;
    --ma-line: rgba(148, 163, 184, 0.26);
    --ma-soft: #f4f6fa;
    --ma-success: #16a34a;
    --ma-warning: #f59e0b;
    --ma-danger: #dc2626;
    --ma-info: #0284c7;
    --ma-radius: 18px;
    --ma-radius-sm: 12px;
    --ma-shadow: 0 22px 56px rgba(15, 23, 42, 0.12);
    --ma-shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

body {
    color: #e5e7eb;
    background:
        radial-gradient(circle at 12% 8%, rgba(225, 29, 47, 0.18), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.10), transparent 24%),
        linear-gradient(135deg, var(--ma-bg) 0%, var(--ma-bg-2) 46%, #070a10 100%) !important;
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0;
}

body::before {
    opacity: 0.55;
}

.app-layout {
    color: #e5e7eb;
}

.topbar {
    min-height: 76px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10) !important;
}

.breadcrumb {
    color: rgba(226, 232, 240, 0.58) !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.page-title {
    color: #f8fafc !important;
    font-size: clamp(24px, 2vw, 32px);
    font-weight: 850;
}

.content-wrapper {
    display: block !important;
    width: 100%;
}

.content-card {
    width: 100%;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Encabezados de modulo */
.servicios-header,
.clientes-header,
.nomina-header,
.novedades-header,
.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 20px !important;
    padding: 22px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(225, 29, 47, 0.18), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--ma-radius);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}

.servicios-header h1,
.clientes-header h1,
.nomina-header h1,
.novedades-header h1,
.form-header h1 {
    margin: 0;
    color: #ffffff !important;
    font-size: clamp(22px, 2vw, 30px) !important;
    font-weight: 850;
    line-height: 1.1;
}

.servicios-subtitle,
.clientes-subtitle,
.nomina-subtitle,
.novedades-subtitle,
.section-help,
.card-meta {
    color: rgba(226, 232, 240, 0.66) !important;
}

/* Heroes existentes */
.dashboard-hero,
.clientes-hero,
.contabilidad-hero {
    border-radius: var(--ma-radius) !important;
    background:
        linear-gradient(135deg, rgba(225, 29, 47, 0.22), transparent 40%),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 16px),
        linear-gradient(145deg, #10141c 0%, #151c27 55%, #0b1018 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.20) !important;
}

/* Tarjetas, paneles y secciones */
.servicios-card,
.clientes-card,
.form-card,
.cliente-form-card,
.categoria-form-card,
.dashboard-card,
.contabilidad-section,
.nomina-section,
.novedades-section,
.novedades-alertas,
.panel,
.table-wrapper,
.orden-card {
    color: var(--ma-text) !important;
    background: var(--ma-panel) !important;
    border: 1px solid var(--ma-line) !important;
    border-radius: var(--ma-radius) !important;
    box-shadow: var(--ma-shadow) !important;
}

.servicios-card,
.clientes-card,
.form-card,
.cliente-form-card,
.categoria-form-card,
.contabilidad-section,
.nomina-section,
.novedades-section,
.novedades-alertas,
.panel,
.orden-card {
    padding: 22px !important;
}

.dashboard-card {
    padding: 20px !important;
}

.dashboard-card::before {
    background: linear-gradient(180deg, var(--ma-red), var(--ma-red-dark)) !important;
}

.section-header,
.panel-title,
.form-card-header,
.clientes-table-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #edf0f4;
}

.section-header h2,
.panel-title h2,
.form-card-header strong,
.clientes-table-header strong,
.card-label {
    color: var(--ma-text) !important;
    font-weight: 850;
}

.panel-title p,
.form-card-header span,
.clientes-table-header span {
    color: var(--ma-muted) !important;
}

/* Botones */
.btn-primary,
button.btn-primary,
a.btn-primary {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--ma-red), #f04455 56%, var(--ma-red-dark)) !important;
    border: 0 !important;
    border-radius: var(--ma-radius-sm) !important;
    box-shadow: 0 12px 26px rgba(225, 29, 47, 0.24) !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-primary:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(225, 29, 47, 0.30) !important;
}

.btn-secondary,
button.btn-secondary,
a.btn-secondary {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px !important;
    color: #1f2937 !important;
    background: #ffffff !important;
    border: 1px solid #d8dee8 !important;
    border-radius: var(--ma-radius-sm) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-secondary:hover {
    background: #f8fafc !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.10) !important;
}

.btn-small {
    min-height: 36px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
}

/* Formularios */
.form-grid,
.panel-form .form-grid,
.cliente-form-card .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px !important;
}

.form-row,
.form-group,
.filter-group {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.form-row label,
.form-group label,
.filter-group label,
.field span {
    color: #475467 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    letter-spacing: 0.4px !important;
    text-transform: uppercase;
}

input,
select,
textarea {
    min-height: 42px;
    width: 100%;
    color: var(--ma-text);
    background: #ffffff;
    border: 1px solid #d8dee8;
    border-radius: var(--ma-radius-sm);
    padding: 10px 12px;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--ma-red);
    box-shadow: 0 0 0 4px rgba(225, 29, 47, 0.12);
}

.input-shell {
    min-height: 42px;
    border-color: #d8dee8 !important;
    border-radius: var(--ma-radius-sm) !important;
}

.form-actions,
.filter-actions,
.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px !important;
}

/* Tablas */
.table-wrapper {
    overflow-x: auto;
    padding: 0 !important;
}

.table,
.servicios-table,
.clientes-table,
.categorias-table,
.ordenes-table,
.orden-table,
.rule-table table,
.detalle-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    color: var(--ma-text);
    background: #ffffff;
    border-radius: var(--ma-radius);
    overflow: hidden;
}

.table thead,
.servicios-table thead,
.clientes-table thead,
.categorias-table thead,
.ordenes-table thead,
.orden-table thead,
.rule-table thead,
.detalle-table thead {
    background: linear-gradient(135deg, #111827, #1f2937) !important;
}

.table thead th,
.servicios-table thead th,
.clientes-table thead th,
.categorias-table thead th,
.ordenes-table thead th,
.orden-table thead th,
.rule-table thead th,
.detalle-table th {
    padding: 14px 15px !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    letter-spacing: 0.55px !important;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody td,
.servicios-table tbody td,
.clientes-table tbody td,
.categorias-table tbody td,
.ordenes-table tbody td,
.orden-table tbody td,
.rule-table tbody td,
.detalle-table td {
    padding: 14px 15px !important;
    color: #344054 !important;
    border-bottom: 1px solid #edf0f4 !important;
    font-size: 14px;
    vertical-align: middle;
}

.table tbody tr,
.servicios-table tbody tr,
.clientes-table tbody tr,
.categorias-table tbody tr,
.ordenes-table tbody tr,
.orden-table tbody tr,
.rule-table tbody tr,
.detalle-table tr {
    background: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
}

.table tbody tr:hover,
.servicios-table tbody tr:hover,
.clientes-table tbody tr:hover,
.categorias-table tbody tr:hover,
.ordenes-table tbody tr:hover,
.orden-table tbody tr:hover,
.rule-table tbody tr:hover,
.detalle-table tr:hover {
    background: #fff7f8 !important;
}

.actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

td.acciones,
th.acciones {
    display: table-cell !important;
    text-align: right !important;
    white-space: nowrap;
}

td.acciones > *,
th.acciones > * {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 6px;
}

.btn-icon,
.action-btn,
.action-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    color: #475467 !important;
    background: #f2f4f7 !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 11px !important;
    text-decoration: none;
    cursor: pointer;
}

.btn-edit,
.action-btn.edit,
.action-icon.edit {
    color: #2563eb !important;
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}

.btn-delete,
.action-btn.delete,
.action-icon.delete,
.btn-danger {
    color: var(--ma-danger) !important;
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
}

.btn-icon:hover,
.action-btn:hover,
.action-icon:hover {
    transform: translateY(-1px);
    box-shadow: var(--ma-shadow-soft) !important;
}

.table-empty,
.servicios-empty,
.servicios-loading,
.empty,
.empty-state {
    color: var(--ma-muted) !important;
    text-align: center !important;
}

/* Estados y chips */
.status-pill,
.table-chip,
.rule-status,
.badge,
.estado-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.status-pill,
.table-chip {
    color: #1f2937;
    background: #f2f4f7;
    border: 1px solid #e4e7ec;
}

.is-active,
.status-ok {
    color: #15803d !important;
}

.is-inactive {
    color: #b45309 !important;
}

.alert {
    border-radius: var(--ma-radius-sm) !important;
    border: 1px solid #d8dee8;
}

/* Sidebar y footer */
.sidebar {
    width: 278px !important;
}

.app-layout,
.main-footer {
    margin-left: 278px !important;
}

.main-footer {
    color: rgba(226, 232, 240, 0.42) !important;
}

@media (max-width: 1100px) {
    .sidebar {
        width: 238px !important;
    }

    .app-layout,
    .main-footer {
        margin-left: 238px !important;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: min(84vw, 320px) !important;
    }

    .app-layout,
    .main-footer {
        margin-left: 0 !important;
    }

    .topbar {
        align-items: stretch;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .servicios-header,
    .clientes-header,
    .nomina-header,
    .novedades-header,
    .form-header,
    .contabilidad-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid,
    .panel-form .form-grid,
    .cliente-form-card .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .app-layout {
        padding: 18px 14px !important;
    }

    .system-status {
        display: none !important;
    }

    .servicios-card,
    .clientes-card,
    .form-card,
    .cliente-form-card,
    .categoria-form-card,
    .contabilidad-section,
    .nomina-section,
    .novedades-section,
    .novedades-alertas,
    .panel,
    .orden-card {
        padding: 16px !important;
        border-radius: 16px !important;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    td.acciones .btn-primary,
    td.acciones .btn-secondary,
    td.acciones .btn-icon,
    td.acciones .action-btn,
    td.acciones .action-icon,
    th.acciones .btn-primary,
    th.acciones .btn-secondary,
    th.acciones .btn-icon,
    th.acciones .action-btn,
    th.acciones .action-icon {
        width: auto;
    }
}

/* Formularios de tecnicos: regla centralizada antes estaba inline en plantillas. */
@media (max-width: 1200px) {
    #form-mecanico .form-grid {
        grid-template-columns: 1fr !important;
    }

    #form-mecanico .form-group,
    #form-mecanico input,
    #form-mecanico textarea,
    #form-mecanico select {
        width: 100% !important;
        min-width: 0;
    }

    #form-mecanico.form-card {
        width: 100%;
        max-width: none;
        padding: 22px;
    }

    #form-mecanico .form-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px;
        width: 100%;
    }

    #form-mecanico .form-actions .btn-primary,
    #form-mecanico .form-actions .btn-secondary {
        width: 100% !important;
        display: flex !important;
        justify-content: center;
    }
}

/* Guardrail final: el login vive en main.css, pero no debe pisar el shell interno. */
body:not(.login-body) {
    color: #e5e7eb;
    background:
        radial-gradient(circle at 12% 8%, rgba(225, 29, 47, 0.18), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.10), transparent 24%),
        linear-gradient(135deg, #080c13 0%, #111722 46%, #070a10 100%) !important;
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body.login-body {
    min-height: 100vh;
    color: #2b2a2a;
    background: #070b12;
    font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
}

/* Override final de tablas: colores limpios y legibles en todo el sistema. */
body:not(.login-body) .servicios-card,
body:not(.login-body) .clientes-card,
body:not(.login-body) .categorias-card,
body:not(.login-body) .table-wrapper {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.20) !important;
}

body:not(.login-body) .clientes-table-header,
body:not(.login-body) .section-header,
body:not(.login-body) .panel-title {
    border-bottom-color: #dfe5ee !important;
}

body:not(.login-body) .clientes-table-header span,
body:not(.login-body) .section-help,
body:not(.login-body) .panel-title p {
    color: #64748b !important;
}

body:not(.login-body) .clientes-table-header strong,
body:not(.login-body) .section-header h2,
body:not(.login-body) .panel-title h2 {
    color: #111827 !important;
}

body:not(.login-body) .table,
body:not(.login-body) .servicios-table,
body:not(.login-body) .clientes-table,
body:not(.login-body) .categorias-table,
body:not(.login-body) .ordenes-table,
body:not(.login-body) .orden-table,
body:not(.login-body) .rule-table table,
body:not(.login-body) .detalle-table {
    color: #1f2937 !important;
    background: #ffffff !important;
    border: 1px solid #e5e9f0 !important;
    border-radius: 18px !important;
    overflow: hidden;
}

body:not(.login-body) .table thead,
body:not(.login-body) .servicios-table thead,
body:not(.login-body) .clientes-table thead,
body:not(.login-body) .categorias-table thead,
body:not(.login-body) .ordenes-table thead,
body:not(.login-body) .orden-table thead,
body:not(.login-body) .rule-table thead,
body:not(.login-body) .detalle-table thead {
    background: linear-gradient(135deg, #111827, #1f2937) !important;
}

body:not(.login-body) .table thead th,
body:not(.login-body) .servicios-table thead th,
body:not(.login-body) .clientes-table thead th,
body:not(.login-body) .categorias-table thead th,
body:not(.login-body) .ordenes-table thead th,
body:not(.login-body) .orden-table thead th,
body:not(.login-body) .rule-table thead th,
body:not(.login-body) .detalle-table th {
    color: #f8fafc !important;
    border-bottom: 0 !important;
}

body:not(.login-body) .table tbody tr,
body:not(.login-body) .servicios-table tbody tr,
body:not(.login-body) .clientes-table tbody tr,
body:not(.login-body) .categorias-table tbody tr,
body:not(.login-body) .ordenes-table tbody tr,
body:not(.login-body) .orden-table tbody tr,
body:not(.login-body) .rule-table tbody tr,
body:not(.login-body) .detalle-table tr {
    background: #ffffff !important;
}

body:not(.login-body) .table tbody tr:nth-child(even),
body:not(.login-body) .servicios-table tbody tr:nth-child(even),
body:not(.login-body) .clientes-table tbody tr:nth-child(even),
body:not(.login-body) .categorias-table tbody tr:nth-child(even),
body:not(.login-body) .ordenes-table tbody tr:nth-child(even),
body:not(.login-body) .orden-table tbody tr:nth-child(even),
body:not(.login-body) .rule-table tbody tr:nth-child(even),
body:not(.login-body) .detalle-table tr:nth-child(even) {
    background: #fbfcff !important;
}

body:not(.login-body) .table tbody tr:hover,
body:not(.login-body) .servicios-table tbody tr:hover,
body:not(.login-body) .clientes-table tbody tr:hover,
body:not(.login-body) .categorias-table tbody tr:hover,
body:not(.login-body) .ordenes-table tbody tr:hover,
body:not(.login-body) .orden-table tbody tr:hover,
body:not(.login-body) .rule-table tbody tr:hover,
body:not(.login-body) .detalle-table tr:hover {
    background: #fff4f5 !important;
}

body:not(.login-body) .table tbody td,
body:not(.login-body) .servicios-table tbody td,
body:not(.login-body) .clientes-table tbody td,
body:not(.login-body) .categorias-table tbody td,
body:not(.login-body) .ordenes-table tbody td,
body:not(.login-body) .orden-table tbody td,
body:not(.login-body) .rule-table tbody td,
body:not(.login-body) .detalle-table td {
    color: #1f2937 !important;
    border-bottom: 1px solid #e5e9f0 !important;
}

body:not(.login-body) .client-id,
body:not(.login-body) .servicios-loading,
body:not(.login-body) .servicios-empty,
body:not(.login-body) .table-empty,
body:not(.login-body) .empty,
body:not(.login-body) .empty-state {
    color: #64748b !important;
}

body:not(.login-body) .cliente-nombre strong,
body:not(.login-body) .servicio-nombre,
body:not(.login-body) .orden-numero,
body:not(.login-body) .table strong {
    color: #0f172a !important;
}

body:not(.login-body) .table-chip,
body:not(.login-body) .status-pill {
    color: #9f1239 !important;
    background: #ffe4e8 !important;
    border-color: #f7a8b3 !important;
}

body:not(.login-body) .btn-icon,
body:not(.login-body) .action-btn,
body:not(.login-body) .action-icon {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
    box-shadow: none !important;
}

body:not(.login-body) .btn-delete,
body:not(.login-body) .action-btn.delete,
body:not(.login-body) .action-icon.delete,
body:not(.login-body) .btn-danger {
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
    color: #dc2626 !important;
}

/* Override final de tablas: colores limpios y legibles en todo el sistema. */
body:not(.login-body) .servicios-card,
body:not(.login-body) .clientes-card,
body:not(.login-body) .categorias-card,
body:not(.login-body) .table-wrapper {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.20) !important;
}

body:not(.login-body) .clientes-table-header,
body:not(.login-body) .section-header,
body:not(.login-body) .panel-title {
    border-bottom-color: #dfe5ee !important;
}

body:not(.login-body) .clientes-table-header span,
body:not(.login-body) .section-help,
body:not(.login-body) .panel-title p {
    color: #64748b !important;
}

body:not(.login-body) .clientes-table-header strong,
body:not(.login-body) .section-header h2,
body:not(.login-body) .panel-title h2 {
    color: #111827 !important;
}

body:not(.login-body) .table,
body:not(.login-body) .servicios-table,
body:not(.login-body) .clientes-table,
body:not(.login-body) .categorias-table,
body:not(.login-body) .ordenes-table,
body:not(.login-body) .orden-table,
body:not(.login-body) .rule-table table,
body:not(.login-body) .detalle-table {
    color: #1f2937 !important;
    background: #ffffff !important;
    border: 1px solid #e5e9f0 !important;
    border-radius: 18px !important;
    overflow: hidden;
}

body:not(.login-body) .table thead,
body:not(.login-body) .servicios-table thead,
body:not(.login-body) .clientes-table thead,
body:not(.login-body) .categorias-table thead,
body:not(.login-body) .ordenes-table thead,
body:not(.login-body) .orden-table thead,
body:not(.login-body) .rule-table thead,
body:not(.login-body) .detalle-table thead {
    background: linear-gradient(135deg, #111827, #1f2937) !important;
}

body:not(.login-body) .table thead th,
body:not(.login-body) .servicios-table thead th,
body:not(.login-body) .clientes-table thead th,
body:not(.login-body) .categorias-table thead th,
body:not(.login-body) .ordenes-table thead th,
body:not(.login-body) .orden-table thead th,
body:not(.login-body) .rule-table thead th,
body:not(.login-body) .detalle-table th {
    color: #f8fafc !important;
    border-bottom: 0 !important;
}

body:not(.login-body) .table tbody tr,
body:not(.login-body) .servicios-table tbody tr,
body:not(.login-body) .clientes-table tbody tr,
body:not(.login-body) .categorias-table tbody tr,
body:not(.login-body) .ordenes-table tbody tr,
body:not(.login-body) .orden-table tbody tr,
body:not(.login-body) .rule-table tbody tr,
body:not(.login-body) .detalle-table tr {
    background: #ffffff !important;
}

body:not(.login-body) .table tbody tr:nth-child(even),
body:not(.login-body) .servicios-table tbody tr:nth-child(even),
body:not(.login-body) .clientes-table tbody tr:nth-child(even),
body:not(.login-body) .categorias-table tbody tr:nth-child(even),
body:not(.login-body) .ordenes-table tbody tr:nth-child(even),
body:not(.login-body) .orden-table tbody tr:nth-child(even),
body:not(.login-body) .rule-table tbody tr:nth-child(even),
body:not(.login-body) .detalle-table tr:nth-child(even) {
    background: #fbfcff !important;
}

body:not(.login-body) .table tbody tr:hover,
body:not(.login-body) .servicios-table tbody tr:hover,
body:not(.login-body) .clientes-table tbody tr:hover,
body:not(.login-body) .categorias-table tbody tr:hover,
body:not(.login-body) .ordenes-table tbody tr:hover,
body:not(.login-body) .orden-table tbody tr:hover,
body:not(.login-body) .rule-table tbody tr:hover,
body:not(.login-body) .detalle-table tr:hover {
    background: #fff4f5 !important;
}

body:not(.login-body) .table tbody td,
body:not(.login-body) .servicios-table tbody td,
body:not(.login-body) .clientes-table tbody td,
body:not(.login-body) .categorias-table tbody td,
body:not(.login-body) .ordenes-table tbody td,
body:not(.login-body) .orden-table tbody td,
body:not(.login-body) .rule-table tbody td,
body:not(.login-body) .detalle-table td {
    color: #1f2937 !important;
    border-bottom: 1px solid #e5e9f0 !important;
}

body:not(.login-body) .client-id,
body:not(.login-body) .servicios-loading,
body:not(.login-body) .servicios-empty,
body:not(.login-body) .table-empty,
body:not(.login-body) .empty,
body:not(.login-body) .empty-state {
    color: #64748b !important;
}

body:not(.login-body) .cliente-nombre strong,
body:not(.login-body) .servicio-nombre,
body:not(.login-body) .orden-numero,
body:not(.login-body) .table strong {
    color: #0f172a !important;
}

body:not(.login-body) .table-chip,
body:not(.login-body) .status-pill {
    color: #9f1239 !important;
    background: #ffe4e8 !important;
    border-color: #f7a8b3 !important;
}

body:not(.login-body) .btn-icon,
body:not(.login-body) .action-btn,
body:not(.login-body) .action-icon {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
    box-shadow: none !important;
}

body:not(.login-body) .btn-delete,
body:not(.login-body) .action-btn.delete,
body:not(.login-body) .action-icon.delete,
body:not(.login-body) .btn-danger {
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
    color: #dc2626 !important;
}

/* =====================================================
   Sistema global de tablas
   Debe quedar al final para neutralizar estilos heredados por modulo.
===================================================== */
:root {
    --ma-table-shell: #f8fafc;
    --ma-table-header: #111827;
    --ma-table-header-2: #1f2937;
    --ma-table-row: #ffffff;
    --ma-table-row-alt: #fbfcff;
    --ma-table-hover: #fff4f5;
    --ma-table-line: #e5e9f0;
    --ma-table-text: #1f2937;
    --ma-table-muted: #64748b;
}

.servicios-card,
.clientes-card,
.categorias-card,
.contabilidad-section,
.nomina-section,
.novedades-section,
.novedades-alertas,
.table-wrapper {
    background: var(--ma-table-shell) !important;
    border: 1px solid rgba(203, 213, 225, 0.92) !important;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.20) !important;
}

.clientes-table-header,
.section-header,
.panel-title {
    border-bottom-color: #dfe5ee !important;
}

.clientes-table-header span,
.section-help,
.panel-title p {
    color: var(--ma-table-muted) !important;
}

.clientes-table-header strong,
.section-header h2,
.panel-title h2 {
    color: #111827 !important;
}

.table-chip,
.status-pill {
    color: #9f1239 !important;
    background: #ffe4e8 !important;
    border-color: #f7a8b3 !important;
}

.table,
.servicios-table,
.clientes-table,
.categorias-table,
.ordenes-table,
.orden-table,
.rule-table table,
.detalle-table {
    color: var(--ma-table-text) !important;
    background: var(--ma-table-row) !important;
    border: 1px solid var(--ma-table-line) !important;
    border-radius: 18px !important;
    overflow: hidden;
}

.table thead,
.servicios-table thead,
.clientes-table thead,
.categorias-table thead,
.ordenes-table thead,
.orden-table thead,
.rule-table thead,
.detalle-table thead {
    background: linear-gradient(135deg, var(--ma-table-header), var(--ma-table-header-2)) !important;
}

.table thead th,
.servicios-table thead th,
.clientes-table thead th,
.categorias-table thead th,
.ordenes-table thead th,
.orden-table thead th,
.rule-table thead th,
.detalle-table th {
    color: #f8fafc !important;
    border-bottom: 0 !important;
}

.table tbody tr,
.servicios-table tbody tr,
.clientes-table tbody tr,
.categorias-table tbody tr,
.ordenes-table tbody tr,
.orden-table tbody tr,
.rule-table tbody tr,
.detalle-table tr {
    background: var(--ma-table-row) !important;
}

.table tbody tr:nth-child(even),
.servicios-table tbody tr:nth-child(even),
.clientes-table tbody tr:nth-child(even),
.categorias-table tbody tr:nth-child(even),
.ordenes-table tbody tr:nth-child(even),
.orden-table tbody tr:nth-child(even),
.rule-table tbody tr:nth-child(even),
.detalle-table tr:nth-child(even) {
    background: var(--ma-table-row-alt) !important;
}

.table tbody tr:hover,
.servicios-table tbody tr:hover,
.clientes-table tbody tr:hover,
.categorias-table tbody tr:hover,
.ordenes-table tbody tr:hover,
.orden-table tbody tr:hover,
.rule-table tbody tr:hover,
.detalle-table tr:hover {
    background: var(--ma-table-hover) !important;
}

.table tbody td,
.servicios-table tbody td,
.clientes-table tbody td,
.categorias-table tbody td,
.ordenes-table tbody td,
.orden-table tbody td,
.rule-table tbody td,
.detalle-table td {
    color: var(--ma-table-text) !important;
    border-bottom: 1px solid var(--ma-table-line) !important;
}

.table tbody tr:last-child td,
.servicios-table tbody tr:last-child td,
.clientes-table tbody tr:last-child td,
.categorias-table tbody tr:last-child td,
.ordenes-table tbody tr:last-child td,
.orden-table tbody tr:last-child td,
.rule-table tbody tr:last-child td,
.detalle-table tr:last-child td {
    border-bottom: 0 !important;
}

.client-id,
.card-meta,
.servicios-loading,
.servicios-empty,
.table-empty,
.empty,
.empty-state {
    color: var(--ma-table-muted) !important;
}

.cliente-nombre strong,
.servicio-nombre,
.orden-numero,
.table strong {
    color: #0f172a !important;
}

.client-avatar {
    color: #ffffff !important;
    background: linear-gradient(135deg, #e11d2f, #b11222) !important;
    box-shadow: 0 10px 22px rgba(225, 29, 47, 0.24) !important;
}

.btn-icon,
.action-btn,
.action-icon {
    background: #eef4ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
    box-shadow: none !important;
}

.btn-edit,
.action-btn.edit,
.action-icon.edit {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
}

.btn-delete,
.action-btn.delete,
.action-icon.delete,
.btn-danger {
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
    color: #dc2626 !important;
}

.btn-icon:hover,
.action-btn:hover,
.action-icon:hover {
    filter: brightness(0.98);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10) !important;
}

@media (max-width: 760px) {
    .clientes-table tbody tr,
    .servicios-table tbody tr,
    .categorias-table tbody tr,
    .ordenes-table tbody tr,
    .table tbody tr {
        background: #ffffff !important;
        border: 1px solid var(--ma-table-line) !important;
    }

    .clientes-table tbody td::before,
    .servicios-table tbody td::before,
    .categorias-table tbody td::before,
    .ordenes-table tbody td::before,
    .table tbody td::before {
        color: var(--ma-table-muted) !important;
    }
}


/* =====================================================
   CENTRALIZED FROM backend/app/static/css/dashboard.css
===================================================== */
/* ===============================
   DASHBOARD MEDINAUTOS - PRO UI
   =============================== */

body {
    background: linear-gradient(135deg, #f4eeee 0%, #efe7e7 100%);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: #302e2f;
}

/* ===== TÍTULO ===== */
.dashboard-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* ===== GRID TARJETAS ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

/* ===== TARJETA ===== */
.card {
    position: relative;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 25px 28px;
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
    transition: all 0.35s ease;
    animation: fadeUp 0.6s ease forwards;
}

/* Barra lateral roja */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #d81822, #e1868a);
}

/* Glow decorativo */
.card::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(216, 24, 34, 0.15), transparent);
}

/* Hover PRO */
.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ===== TEXTO ===== */
.card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b6b6b;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card span {
    font-size: 2.8rem;
    font-weight: 800;
    color: #302e2f;
}

/* ===== ESTADO SISTEMA ===== */
.status-ok {
    color: #1e9f4d;
    font-size: 1.6rem;
    font-weight: 700;
}

/* ===== FOOTER ===== */
.dashboard-footer {
    text-align: center;
    font-size: 0.85rem;
    color: #7a7a7a;
    opacity: 0.8;
}

/* ===== ANIMACIÓN ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delay escalonado */
.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card span {
    transition: transform 0.3s ease;
}

.card:hover span {
    transform: scale(1.05);
}

/* Dashboard - MedinAutos Taller OS */

.content-wrapper {
    display: block;
}

.content-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

.dashboard-page {
    display: grid;
    gap: 22px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    min-height: 210px;
    padding: clamp(24px, 4vw, 42px);
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(225, 29, 47, 0.22), transparent 38%),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 16px),
        linear-gradient(145deg, #10141c 0%, #161c27 55%, #0c1119 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.dashboard-hero::after {
    content: "\f013";
    position: absolute;
    right: -32px;
    bottom: -52px;
    color: rgba(255, 255, 255, 0.045);
    font-family: "Font Awesome 6 Free";
    font-size: 14rem;
    font-weight: 900;
    line-height: 1;
}

.dashboard-hero-copy,
.dashboard-hero-panel {
    position: relative;
    z-index: 1;
}

.dashboard-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fecdd3;
    background: rgba(225, 29, 47, 0.14);
    border: 1px solid rgba(225, 29, 47, 0.28);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.dashboard-hero h1 {
    max-width: 760px;
    margin: 18px 0 10px;
    font-size: clamp(2.35rem, 4vw, 4.1rem);
    line-height: 0.96;
    font-weight: 900;
    letter-spacing: 0;
}

.dashboard-hero p {
    max-width: 650px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 1rem;
    line-height: 1.6;
}

.dashboard-hero-panel {
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-rpm {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(from 35deg, #e11d2f, #22d3ee, rgba(255, 255, 255, 0.12), #e11d2f);
}

.hero-rpm span {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #10141c;
}

.dashboard-hero-panel strong,
.dashboard-hero-panel span {
    display: block;
}

.dashboard-hero-panel strong {
    font-size: 1.15rem;
}

.dashboard-hero-panel span {
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.56);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.dashboard-alert-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 18px;
    color: #fed7aa;
    background: rgba(154, 52, 18, 0.14);
    border: 1px solid rgba(251, 146, 60, 0.28);
    font-weight: 800;
}

.dashboard-alert-bar.is-visible {
    display: flex;
}

.dashboard-grid,
.dashboard-analytics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border-radius: 22px;
    padding: 22px;
    color: #f8fafc;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
        linear-gradient(180deg, rgba(18, 24, 34, 0.96), rgba(12, 17, 26, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
}

.dashboard-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 0%, rgba(225, 29, 47, 0.16), transparent 24%),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 16px);
    pointer-events: none;
}

.dashboard-card > * {
    position: relative;
    z-index: 1;
}

.dashboard-kpi {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 150px;
}

.kpi-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #e11d2f, #a30f1d);
    box-shadow: 0 14px 28px rgba(225, 29, 47, 0.24);
}

.card-label {
    color: rgba(226, 232, 240, 0.56);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-value {
    margin-top: 8px;
    color: #ffffff;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 900;
    line-height: 1;
}

.card-meta {
    margin-top: 10px;
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.92rem;
}

.card-status {
    display: inline-flex;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 900;
}

.status-ok {
    color: #bbf7d0;
    background: rgba(22, 163, 74, 0.14);
    border: 1px solid rgba(134, 239, 172, 0.24);
}

.wide-card {
    grid-column: span 2;
}

.chart-card {
    min-height: 320px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.section-title span {
    color: rgba(226, 232, 240, 0.54);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-title strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 1.25rem;
}

.chart-legend {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(226, 232, 240, 0.64);
    font-size: 0.85rem;
    font-weight: 800;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.legend-ingresos {
    background: #22c55e;
}

.legend-egresos {
    background: #f97316;
}

.chart-bars {
    min-height: 230px;
    display: grid;
    grid-template-columns: repeat(7, minmax(38px, 1fr));
    align-items: end;
    gap: 14px;
    padding-top: 18px;
}

.chart-bar {
    min-width: 0;
    display: grid;
    gap: 10px;
    align-items: end;
}

.bar-values {
    height: 170px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bar {
    width: 12px;
    min-height: 4px;
    border-radius: 999px 999px 4px 4px;
}

.bar-ingresos {
    background: linear-gradient(180deg, #4ade80, #16a34a);
}

.bar-egresos {
    background: linear-gradient(180deg, #fb923c, #ea580c);
}

.bar-label {
    color: rgba(226, 232, 240, 0.56);
    font-size: 0.74rem;
    font-weight: 800;
    text-align: center;
}

.metric-grid {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.metric-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.metric-card span,
.top-servicio-meta,
.status-meta {
    color: rgba(226, 232, 240, 0.58);
    font-size: 0.78rem;
    font-weight: 800;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    color: #ffffff;
    font-size: 1.25rem;
}

.status-bars,
.top-servicios {
    display: grid;
    gap: 13px;
    margin-top: 16px;
}

.status-item,
.top-servicio-item {
    display: grid;
    gap: 7px;
}

.status-label,
.top-servicio-header {
    color: rgba(248, 250, 252, 0.86);
    font-weight: 850;
}

.top-servicio-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.status-bar,
.top-servicio-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
}

.status-fill,
.top-servicio-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.estado-abierta,
.estado-proceso,
.top-servicio-bar span {
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
}

.estado-cerrada {
    background: linear-gradient(90deg, #22c55e, #86efac);
}

.estado-cancelada {
    background: linear-gradient(90deg, #ef4444, #fb7185);
}

.dashboard-birthdays,
.dashboard-alertas {
    display: grid;
}

.birthday-lists,
.alertas-operativas-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.alertas-operativas-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.birthday-lists > div,
.alertas-operativas-grid > div {
    min-width: 0;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.birthday-lists h3,
.alertas-operativas-grid h3 {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 0.95rem;
}

.birthday-lists ul,
.alertas-operativas-grid ul,
.alertas-vencidas-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.birthday-lists li,
.alertas-operativas-grid li,
.alertas-vencidas-list li {
    padding: 12px;
    border-radius: 14px;
    color: rgba(226, 232, 240, 0.78);
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.birthday-lists li strong,
.alertas-operativas-grid li strong {
    color: #ffffff;
}

.empty,
.chart-empty {
    color: rgba(226, 232, 240, 0.50) !important;
}

.alerta-vencida-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.alerta-item-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.alerta-placa,
.alerta-placa-link {
    color: #ffffff;
    font-weight: 900;
}

.alerta-total {
    padding: 5px 9px;
    border-radius: 999px;
    color: #fecaca;
    background: rgba(225, 29, 47, 0.16);
    font-size: 0.78rem;
    font-weight: 900;
}

.alerta-item-meta {
    margin-top: 7px;
    color: rgba(226, 232, 240, 0.55);
    font-size: 0.82rem;
}

@media (max-width: 1280px) {
    .dashboard-grid,
    .dashboard-analytics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-panel {
        width: 100%;
    }

    .dashboard-grid,
    .dashboard-analytics,
    .birthday-lists,
    .alertas-operativas-grid {
        grid-template-columns: 1fr;
    }

    .wide-card {
        grid-column: span 1;
    }

    .chart-bars {
        overflow-x: auto;
        grid-template-columns: repeat(7, 64px);
    }
}

@media (max-width: 560px) {
    .dashboard-hero,
    .dashboard-card {
        border-radius: 20px;
        padding: 18px;
    }

    .dashboard-hero h1 {
        font-size: clamp(2rem, 12vw, 2.75rem);
    }

    .dashboard-hero-panel {
        display: none;
    }

    .dashboard-kpi {
        grid-template-columns: 48px minmax(0, 1fr);
        min-height: 128px;
    }

    .kpi-icon {
        width: 46px;
        height: 46px;
        border-radius: 15px;
    }
}

/* Fondo cohesivo del dashboard */
body {
    color: #e5e7eb;
    background:
        radial-gradient(circle at 12% 8%, rgba(225, 29, 47, 0.18), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.10), transparent 24%),
        linear-gradient(135deg, #080c13 0%, #111722 46%, #070a10 100%) !important;
}

.dashboard-alert-bar {
    color: #fed7aa;
    background:
        linear-gradient(135deg, rgba(154, 52, 18, 0.22), rgba(225, 29, 47, 0.10)),
        rgba(12, 17, 26, 0.82);
    border-color: rgba(251, 146, 60, 0.28);
}


/* =====================================================
   CENTRALIZED FROM backend/app/static/css/clientes.css
===================================================== */
/* ===============================
   CLIENTES - ESTILO
================================ */

.clientes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.clientes-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #d81822;
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    box-shadow: 0 8px 20px rgba(216, 24, 34, .25);
}

.btn-primary:hover {
    background-color: #b8141d;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(216, 24, 34, .3);
}

/* CARD CONTENEDORA */
.clientes-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
}

/* TABLA */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.table thead th {
    text-align: left;
    font-size: 14px;
    color: #666;
    padding-bottom: 10px;
}

.table tbody tr {
    background-color: #f9f9f9;
    border-radius: 12px;
    transition: background .2s ease, transform .15s ease, box-shadow .15s ease;
}

.table tbody tr:hover {
    background-color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .06);
}

.table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #333;
}

.table td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* ACCIONES */
.actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #ececec;
    color: #444;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.action-btn:hover {
    background-color: #d81822;
    color: #fff;
}

/* ESTADO VACÍO */
.empty-state {
    text-align: center;
    padding: 40px 10px;
    color: #777;
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 12px;
    color: #d81822;
}

.empty-state p {
    margin-top: 6px;
}

/* ===============================
   FORMULARIO CLIENTES
================================ */

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background-color: #ececec;
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: #dcdcdc;
}

.form-card {
    background-color: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
    max-width: 720px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.form-group input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #d81822;
}

.form-actions {
    grid-column: span 2;
    margin-top: 10px;
}

/* Clientes - Taller OS visual refresh */

.content-wrapper {
    display: block;
}

.content-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

.clientes-page {
    display: grid;
    gap: 22px;
}

.clientes-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(24px, 4vw, 40px);
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(225, 29, 47, 0.23), transparent 40%),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 16px),
        linear-gradient(145deg, #10141c 0%, #151c27 55%, #0b1018 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.clientes-hero::after {
    content: "\f0c0";
    position: absolute;
    right: -28px;
    bottom: -48px;
    color: rgba(255, 255, 255, 0.045);
    font-family: "Font Awesome 6 Free";
    font-size: 13rem;
    font-weight: 900;
}

.clientes-hero > * {
    position: relative;
    z-index: 1;
}

.clientes-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fecdd3;
    background: rgba(225, 29, 47, 0.14);
    border: 1px solid rgba(225, 29, 47, 0.28);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.clientes-hero h1 {
    max-width: 760px;
    margin: 18px 0 10px;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: 0;
}

.clientes-hero p {
    max-width: 660px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 1rem;
    line-height: 1.6;
}

.clientes-new {
    flex: 0 0 auto;
}

.clientes-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border-radius: 22px;
    color: #f8fafc;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
        linear-gradient(180deg, rgba(18, 24, 34, 0.96), rgba(12, 17, 26, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.stat-card > span {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    background: linear-gradient(135deg, #e11d2f, #a30f1d);
    box-shadow: 0 14px 28px rgba(225, 29, 47, 0.22);
}

.stat-card strong {
    display: block;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
}

.stat-card small {
    display: block;
    margin-top: 6px;
    color: rgba(226, 232, 240, 0.58);
    font-weight: 800;
}

.clientes-card {
    padding: 22px;
    overflow: hidden;
    color: #f8fafc;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
        linear-gradient(180deg, rgba(18, 24, 34, 0.96), rgba(12, 17, 26, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.clientes-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.clientes-table-header span {
    display: block;
    color: rgba(226, 232, 240, 0.54);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.clientes-table-header strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 1.35rem;
}

.table-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    color: #fecdd3;
    background: rgba(225, 29, 47, 0.14);
    border: 1px solid rgba(225, 29, 47, 0.26);
    font-size: 0.78rem;
    font-weight: 900;
}

.clientes-table {
    width: 100%;
    border-collapse: collapse;
}

.clientes-table thead th {
    padding: 14px 12px;
    text-align: left;
    color: rgba(226, 232, 240, 0.50);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.clientes-table tbody td {
    padding: 15px 12px;
    color: rgba(226, 232, 240, 0.74);
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    vertical-align: middle;
}

.clientes-table tbody tr {
    transition: background 0.2s ease;
}

.clientes-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.045);
}

.client-id {
    color: rgba(226, 232, 240, 0.48);
    font-weight: 900;
}

.cliente-nombre {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cliente-nombre strong {
    color: #ffffff;
}

.client-avatar {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #e11d2f, #a30f1d);
    font-weight: 900;
}

.acciones {
    text-align: right;
    white-space: nowrap;
    min-width: 190px;
}

.btn-icon {
    min-width: 82px;
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 850;
    vertical-align: middle;
    cursor: pointer;
    margin-left: 8px;
}

.btn-icon:hover {
    transform: translateY(-1px);
}

.btn-edit:hover {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.16);
}

.btn-delete {
    color: #fecaca;
}

.btn-delete:hover {
    background: rgba(225, 29, 47, 0.18);
}

.btn-text {
    display: inline;
    line-height: 1;
}

.clientes-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 54px 20px;
    text-align: center;
    color: rgba(226, 232, 240, 0.68);
}

.clientes-empty i {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, #e11d2f, #a30f1d);
}

.clientes-empty h3 {
    color: #ffffff;
}

.form-hero {
    min-height: 180px;
}

.cliente-form-card {
    max-width: 1120px;
    padding: 26px;
    color: #f8fafc;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
        linear-gradient(180deg, rgba(18, 24, 34, 0.96), rgba(12, 17, 26, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.form-card-header span {
    display: block;
    color: rgba(226, 232, 240, 0.54);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-card-header strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 1.35rem;
}

.cliente-form-card .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.cliente-form-card .form-group label {
    color: rgba(226, 232, 240, 0.78);
    font-weight: 850;
    margin-bottom: 9px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.cliente-form-card .input-shell {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 24px rgba(0, 0, 0, 0.14);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cliente-form-card .input-shell:focus-within {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(225, 29, 47, 0.62);
    box-shadow: 0 0 0 4px rgba(225, 29, 47, 0.12), 0 16px 30px rgba(0, 0, 0, 0.18);
}

.cliente-form-card .input-shell i {
    width: 18px;
    color: rgba(226, 232, 240, 0.58);
    text-align: center;
}

.cliente-form-card .form-group input {
    width: 100%;
    min-height: 56px;
    padding: 0;
    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 750;
}

.cliente-form-card .form-group input:focus {
    outline: none;
    box-shadow: none;
}

.cliente-form-card .form-group input::placeholder {
    color: rgba(226, 232, 240, 0.42);
}

.cliente-form-card .form-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin-top: 6px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.cliente-form-card .btn-secondary {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 54px;
    padding: 0 22px;
    border-radius: 15px;
}

.cliente-form-card .btn-primary {
    min-height: 54px;
    padding: 0 22px;
    border-radius: 15px;
}

@media (max-width: 980px) {
    .clientes-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .clientes-new {
        width: 100%;
        justify-content: center;
    }

    .clientes-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .clientes-card {
        padding: 18px;
    }

    .clientes-table-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .clientes-table thead {
        display: none;
    }

    .clientes-table,
    .clientes-table tbody,
    .clientes-table tr,
    .clientes-table td {
        display: block;
        width: 100%;
    }

    .clientes-table tbody tr {
        padding: 14px;
        border-radius: 18px;
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.055);
        border: 1px solid rgba(255, 255, 255, 0.10);
    }

    .clientes-table tbody td {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .clientes-table tbody td::before {
        content: attr(data-label);
        color: rgba(226, 232, 240, 0.48);
        font-size: 0.76rem;
        font-weight: 900;
        letter-spacing: 0.7px;
        text-transform: uppercase;
    }

    .clientes-table tbody td:last-child {
        border-bottom: 0;
    }

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

    .acciones {
        text-align: left;
        min-width: 0;
        display: flex !important;
        justify-content: flex-end;
        gap: 10px;
    }

    .acciones::before {
        margin-right: auto;
    }

    .acciones .btn-icon {
        margin-left: 0;
        min-width: 92px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        grid-column: span 1;
        display: grid;
    }

    .cliente-form-card .form-grid {
        grid-template-columns: 1fr;
    }

    .cliente-form-card .form-actions {
        display: grid;
    }

    .cliente-form-card .btn-primary,
    .cliente-form-card .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .clientes-hero,
    .clientes-card,
    .cliente-form-card {
        border-radius: 20px;
        padding: 18px;
    }

    .clientes-hero h1 {
        font-size: clamp(2rem, 12vw, 2.75rem);
    }

    .stat-card {
        border-radius: 18px;
    }

    .form-card-header {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =====================================================
   CENTRALIZED FROM backend/app/static/css/servicios.css
===================================================== */
/* ===============================
   SERVICIOS - MEDINAUTOS
================================ */

.servicios-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
}

.servicios-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.servicios-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.servicios-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #d81822, #e1868a);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(216, 24, 34, 0.3);
}

.btn-secondary {
    background: #eee;
    color: #333;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

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

.servicios-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
    width: 100%;
    max-width: none;
}

.servicios-table {
    width: 100%;
    border-collapse: collapse;
}

.servicios-table thead th {
    text-align: left;
    padding: 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b6b6b;
    border-bottom: 1px solid #e0e0e0;
}

.servicios-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    vertical-align: middle;
}

.servicios-table tbody tr:hover {
    background: rgba(216, 24, 34, 0.05);
}

.servicios-table tbody tr {
    animation: fadeInUp 0.4s ease both;
}

.servicio-nombre {
    font-weight: 700;
    color: #302e2f;
}

.servicios-loading {
    text-align: center;
    padding: 30px;
    color: #888;
}

.servicios-empty {
    text-align: center;
    padding: 30px;
    color: #888;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-activo {
    background: #e7f8ef;
    color: #0f766e;
}

.badge-inactivo {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-alerta {
    background: #fef3c7;
    color: #b45309;
}

.badge-estado-abierta {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-estado-proceso {
    background: #fef3c7;
    color: #b45309;
}

.badge-estado-cerrada {
    background: #dcfce7;
    color: #15803d;
}

.badge-estado-cancelada {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-estado-disponible {
    background: #dcfce7;
    color: #15803d;
}

.badge-estado-prestada,
.badge-estado-mantenimiento {
    background: #fef3c7;
    color: #b45309;
}

.acciones {
    text-align: center;
    white-space: nowrap;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    margin: 0 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-text {
    display: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-edit {
    color: #2c3e50;
}

.btn-edit:hover {
    background: rgba(44, 62, 80, 0.1);
}

.btn-delete {
    color: #d81822;
}

.btn-delete:hover {
    background: rgba(216, 24, 34, 0.12);
}

.inline-form {
    display: inline;
}

.btn-toggle {
    color: #0f766e;
}

.btn-toggle.is-inactive {
    color: #b91c1c;
}

.btn-toggle:hover {
    background: rgba(15, 118, 110, 0.12);
}

.btn-toggle.is-inactive:hover {
    background: rgba(185, 28, 28, 0.12);
}

@media (max-width: 900px) {
    .servicios-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

@media (max-width: 700px) {
    .servicios-card {
        padding: 16px;
        overflow-x: hidden;
    }

    .servicios-table thead {
        display: none;
    }

    .servicios-table,
    .servicios-table tbody,
    .servicios-table tr,
    .servicios-table td {
        display: block;
        width: 100%;
    }

    .servicios-table tbody tr {
        position: relative;
        background: rgba(255, 255, 255, 0.92);
        border-radius: 18px;
        border: 1px solid #eef2f7;
        padding: 16px 16px 16px 22px;
        margin-bottom: 16px;
        box-shadow:
            0 12px 26px rgba(15, 23, 42, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
        display: block;
    }

    .servicios-table tbody tr::before {
        content: "";
        position: absolute;
        left: 0;
        top: 10px;
        bottom: 10px;
        width: 6px;
        border-radius: 999px;
        background: linear-gradient(180deg, #d81822, #e1868a);
    }

    .servicios-table tbody td {
        display: grid;
        gap: 4px;
        padding: 10px 0;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.92rem;
        text-align: left;
        width: 100%;
        min-width: 0;
    }

    .servicios-table tbody td::before {
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: #94a3b8;
    }

    .servicios-table tbody td:not(.acciones) {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .servicios-table tbody td:last-child {
        border-bottom: none;
    }

    .acciones {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: center;
        justify-content: stretch;
        padding-top: 6px;
        padding-right: 2px;
        width: 100%;
    }

    .acciones::before {
        flex-basis: 100%;
    }

    .btn-icon {
        width: 100%;
        height: 56px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 6px 12px;
        margin: 0;
        border: 1px solid transparent;
        box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
        box-sizing: border-box;
        max-width: 100%;
        white-space: nowrap;
        flex-direction: column;
    }

    .btn-edit {
        background: #eef2ff;
        border-color: #dbeafe;
        color: #1e3a8a;
    }

    .btn-edit:hover {
        background: linear-gradient(135deg, #cbd5f5, #eef2ff);
    }

    .btn-delete {
        background: #fee2e2;
        border-color: #fecaca;
        color: #b91c1c;
    }

    .btn-delete:hover {
        background: linear-gradient(135deg, #dc2626, #f87171);
    }

    .servicios-table tbody td[data-label="Nombre"] {
        font-size: 1.1rem;
        font-weight: 700;
        color: #111827;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 8px;
    }

    .servicios-table tbody td[data-label="Email"] {
        word-break: break-all;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .servicios-table tbody td[data-label="Email"] span,
    .servicios-table tbody td[data-label="Email"] a {
        display: inline-block;
        max-width: 100%;
    }

    .servicios-table tbody td[data-label="Nombre"]::before,
    .servicios-table tbody td[data-label="Acciones"]::before {
        display: none;
    }

    .btn-text {
        display: inline;
        font-size: 0.85rem;
        line-height: 1;
    }

    .btn-icon i {
        font-size: 18px;
    }
}

@media (hover: none) {
    .servicios-table tbody tr:hover {
        background: #ffffff;
    }
}

@media (max-width: 520px) {
    .servicios-header h1 {
        font-size: 1.6rem;
    }

    .servicios-subtitle {
        font-size: 0.9rem;
    }
}

.form-card {
    background-color: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: none;
}

.servicio-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    background-color: #fff;
}

.form-group textarea {
    resize: vertical;
}

.price-hint {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #d81822;
    box-shadow: 0 0 0 2px rgba(216, 24, 34, 0.15);
}

.categorias-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
}

.categorias-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: none;
}

.categorias-table {
    width: 100%;
    border-collapse: collapse;
}

.categorias-table thead th {
    text-align: left;
    padding: 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b6b6b;
    border-bottom: 1px solid #e0e0e0;
}

.categorias-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    vertical-align: middle;
}

.categorias-empty {
    text-align: center;
    padding: 30px;
    color: #888;
}

.categoria-form-card {
    background-color: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: none;
}

.categoria-form-card h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.categoria-form-card .form-actions {
    justify-content: flex-start;
}

@media (max-width: 900px) {
    .categorias-layout {
        grid-template-columns: 1fr;
    }

    .categorias-card,
    .categoria-form-card {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 700px) {
    .categorias-card {
        padding: 16px;
    }

    .categorias-table thead {
        display: none;
    }

    .categorias-table,
    .categorias-table tbody,
    .categorias-table tr,
    .categorias-table td {
        display: block;
        width: 100%;
    }

    .categorias-table tbody tr {
        position: relative;
        background: rgba(255, 255, 255, 0.92);
        border-radius: 18px;
        border: 1px solid #eef2f7;
        padding: 16px 16px 16px 22px;
        margin-bottom: 16px;
        box-shadow:
            0 12px 26px rgba(15, 23, 42, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }

    .categorias-table tbody tr::before {
        content: "";
        position: absolute;
        left: 0;
        top: 10px;
        bottom: 10px;
        width: 6px;
        border-radius: 999px;
        background: linear-gradient(180deg, #d81822, #e1868a);
    }

    .categorias-table tbody td {
        display: grid;
        gap: 4px;
        padding: 10px 0;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.92rem;
        text-align: left;
        min-width: 0;
    }

    .categorias-table tbody td::before {
        content: attr(data-label);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: #94a3b8;
    }

    .categorias-table tbody td[data-label="Categoria"] {
        font-size: 1.1rem;
        font-weight: 700;
        color: #111827;
    }

    .categorias-table tbody td:last-child {
        border-bottom: none;
    }

    .categorias-table .acciones {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: center;
        justify-content: stretch;
        padding-top: 6px;
        width: 100%;
    }

    .categorias-table .acciones::before {
        display: none;
    }

    .categorias-table .btn-icon {
        width: 100%;
        height: 56px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 6px 12px;
        margin: 0;
        border: 1px solid transparent;
        box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
        box-sizing: border-box;
        flex-direction: column;
    }

    .categorias-table .btn-icon i {
        font-size: 18px;
    }

    .categorias-table .btn-text {
        display: inline;
        font-size: 0.85rem;
        line-height: 1;
    }

    .categorias-table .btn-edit {
        background: #eef2ff;
        border-color: #dbeafe;
        color: #1e3a8a;
    }

    .categorias-table .btn-toggle {
        background: #ecfdf3;
        border-color: #bbf7d0;
        color: #0f766e;
    }

    .categorias-table .btn-toggle.is-inactive {
        background: #fff7ed;
        border-color: #fed7aa;
        color: #b45309;
    }

    .categorias-table .btn-delete {
        background: #fee2e2;
        border-color: #fecaca;
        color: #b91c1c;
    }

    .categoria-form-card {
        padding: 22px;
        width: 100%;
        max-width: none;
    }
}

.orden-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 24px;
}

.orden-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.orden-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: none;
    border: 1px solid rgba(226, 232, 240, 0.9);
    position: relative;
}

.orden-card h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #111827;
}

.orden-card h2::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #d81822, #f0a0a4);
    box-shadow: 0 0 0 4px rgba(216, 24, 34, 0.12);
}

.orden-card::after {
    content: none;
}

.orden-total {
    margin-top: 10px;
    font-weight: 700;
    color: #302e2f;
    background: #f8fafc;
    padding: 10px 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
}

.orden-detalle-form {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 120px) auto;
    gap: 16px;
    margin-bottom: 16px;
    align-items: end;
}

.orden-detalle-form .form-actions {
    grid-column: auto;
    margin-top: 0;
}

.orden-mecanico-form {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) auto;
    gap: 16px;
    margin-bottom: 16px;
    align-items: end;
}

.orden-mecanico-form .form-actions {
    grid-column: auto;
    margin-top: 0;
}

.orden-table tbody td {
    font-size: 0.9rem;
}

.orden-card .servicios-table {
    table-layout: fixed;
    width: 100%;
}

.orden-card .servicios-table th,
.orden-card .servicios-table td {
    word-break: break-word;
}

.orden-card .servicios-table thead th {
    font-size: 0.72rem;
    color: #475569;
    letter-spacing: 1.5px;
}

.orden-card .servicios-table tbody tr {
    border-radius: 12px;
}

.orden-card .servicios-table tbody tr:hover {
    background: rgba(216, 24, 34, 0.04);
}

.orden-card .servicios-table tbody td {
    color: #111827;
}

.orden-card .form-group label {
    font-size: 0.75rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.orden-card .form-group input,
.orden-card .form-group textarea,
.orden-card .form-group select {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.orden-card .form-group input:focus,
.orden-card .form-group textarea:focus,
.orden-card .form-group select:focus {
    border-color: #d81822;
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.12);
}

.orden-card--wide {
    grid-column: span 2;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.dashboard-birthdays {
    margin-top: 12px;
}

.dashboard-analytics {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.dashboard-analytics .dashboard-card.wide-card {
    grid-column: 1 / -1;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-right: 6px;
}

.legend-ingresos {
    background: #16a34a;
}

.legend-egresos {
    background: #f97316;
}

.chart-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    min-height: 160px;
}

.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.bar-values {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
}

.bar {
    width: 10px;
    border-radius: 8px;
    background: #e5e7eb;
    transition: height 0.3s ease;
}

.bar-ingresos {
    background: #16a34a;
}

.bar-egresos {
    background: #f97316;
}

.bar-label {
    font-size: 11px;
    color: #6b7280;
}

.chart-empty {
    color: #9ca3af;
    font-size: 13px;
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
    padding: 10px;
}

.metric-grid {
    display: grid;
    gap: 10px;
}

.metric-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
}

.metric-card span {
    font-size: 12px;
    color: #6b7280;
    display: block;
    margin-bottom: 4px;
}

.metric-card strong {
    font-size: 16px;
    color: #111827;
}

.status-bars {
    display: grid;
    gap: 12px;
}

.status-item {
    display: grid;
    gap: 6px;
}

.status-label {
    font-size: 12px;
    color: #6b7280;
}

.status-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.status-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.estado-abierta {
    background: #38bdf8;
}

.estado-proceso {
    background: #f59e0b;
}

.estado-cerrada {
    background: #22c55e;
}

.estado-cancelada {
    background: #ef4444;
}

.status-meta {
    font-size: 12px;
    color: #374151;
}

.top-servicios {
    display: grid;
    gap: 12px;
}

.top-servicio-item {
    display: grid;
    gap: 6px;
}

.top-servicio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #111827;
}

.top-servicio-bar {
    width: 100%;
    height: 8px;
    background: #fee2e2;
    border-radius: 999px;
    overflow: hidden;
}

.top-servicio-bar span {
    display: block;
    height: 100%;
    background: #ef4444;
    border-radius: 999px;
}

.top-servicio-meta {
    font-size: 12px;
    color: #6b7280;
}

.dashboard-card.wide-card {
    grid-column: 1 / -1;
}

.birthday-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.birthday-lists h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #111827;
}

.birthday-lists ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.birthday-lists li {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    color: #374151;
}

.birthday-lists li strong {
    color: #111827;
}

.birthday-lists .empty {
    color: #9ca3af;
}

.dashboard-alertas {
    margin-top: 18px;
}

.dashboard-alert-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-weight: 600;
    margin: 12px 0 16px;
    box-shadow: 0 10px 20px rgba(234, 88, 12, 0.12);
}

.dashboard-alert-bar strong {
    font-weight: 800;
}

.dashboard-alert-bar.is-visible {
    display: flex;
}

.alertas-operativas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.alertas-operativas-grid h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #111827;
}

.alertas-operativas-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.alertas-operativas-grid li {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    color: #374151;
}

.alertas-operativas-grid li strong {
    color: #111827;
}

.alertas-operativas-grid .empty {
    color: #9ca3af;
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
}

.alertas-vencidas-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0 0;
    display: grid;
    gap: 10px;
}

.alerta-vencida-item {
    background: #fff7f7;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 12px 14px;
}

.alerta-vencida-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.alerta-vencida-link:hover .alerta-placa-link {
    color: #b91c1c;
    text-decoration: underline;
}

.alerta-vencida-link:hover {
    cursor: pointer;
}

.alerta-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.alerta-placa {
    font-weight: 700;
    color: #111827;
}

.alerta-placa-link {
    font-weight: 700;
    color: #111827;
    text-decoration: none;
}

.alerta-total {
    background: #fee2e2;
    color: #b91c1c;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.alerta-item-meta {
    margin-top: 6px;
    font-size: 13px;
    color: #6b7280;
}

.alertas-vencidas-list .empty {
    color: #9ca3af;
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
}

.dashboard-card {
    position: relative;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 24px 26px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: fadeInUp 0.4s ease both;
}

.dashboard-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #d81822, #e1868a);
}

.card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b6b6b;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: #302e2f;
}

.card-meta {
    margin-top: 8px;
    color: #6b7280;
    font-size: 0.9rem;
}

.card-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    background: #e7f8ef;
    color: #0f766e;
}

.form-group-full {
    grid-column: span 2;
}

.form-group-switch {
    display: flex;
    align-items: center;
    gap: 16px;
}

.switch-label {
    margin-bottom: 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.2s;
    border-radius: 999px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.switch input:checked + .slider {
    background-color: #16a34a;
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
}

.form-actions {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .orden-layout {
        grid-template-columns: 1fr;
    }

    .orden-detalle-form {
        grid-template-columns: 1fr;
    }

    .orden-mecanico-form {
        grid-template-columns: 1fr;
    }

    .servicio-form .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        justify-content: flex-start;
    }

    .orden-card--wide {
        grid-column: auto;
    }
}

@media (max-width: 700px) {
    .servicios-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .servicios-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .servicios-table {
        min-width: 640px;
    }

    .form-actions {
        grid-column: span 1;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: stretch;
        width: 100% !important;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100% !important;
        justify-content: center;
        display: flex !important;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .form-actions button,
    .form-actions a {
        max-width: 100% !important;
        width: 100% !important;
    }

    .form-card {
        padding: 22px;
        width: 100%;
        max-width: none;
    }

    .servicio-form .form-grid {
        grid-template-columns: 1fr !important;
    }

    .form-group,
    .form-group input,
    .form-group textarea,
    .form-group select {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 700px) {
    .servicios-table {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 900px) {
    #form-mecanico .form-grid {
        grid-template-columns: 1fr;
    }

    #form-mecanico .form-group,
    #form-mecanico input,
    #form-mecanico textarea,
    #form-mecanico select {
        width: 100%;
        min-width: 0;
    }

    #form-mecanico .form-group-switch {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 700px) {
    #form-mecanico.form-card {
        padding: 22px;
        width: 100%;
        max-width: none;
    }

    #form-mecanico .form-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    #form-mecanico .form-actions .btn-primary,
    #form-mecanico .form-actions .btn-secondary {
        width: 100%;
        justify-content: center;
        display: flex;
    }
}


/* =====================================================
   CENTRALIZED FROM backend/app/static/css/ordenes.css
===================================================== */
/* =====================================================
   ORDENES - MEDINAUTOS
===================================================== */

.ordenes-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 16px;
}

.ordenes-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ordenes-subtitle {
    color: #6b7280;
    margin-top: 6px;
    font-size: 14px;
}

.ordenes-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
}

.ordenes-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    background: #111827;
    color: #ffffff;
    padding: 16px 18px;
    border-radius: 16px;
    display: grid;
    gap: 6px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.kpi-card span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.7);
}

.kpi-card strong {
    font-size: 26px;
    font-weight: 700;
}

.kpi-total {
    background: #d81822;
}

.ordenes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ordenes-table thead {
    background: #111827;
}

.ordenes-table thead th {
    color: #ffffff;
    font-weight: 600;
    padding: 14px 16px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.4px;
}

.ordenes-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    vertical-align: middle;
}

.ordenes-table tbody tr:hover {
    background: #f9fafb;
}

.ordenes-table .acciones {
    text-align: center;
    width: 120px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    margin: 0 4px;
}

.btn-icon i {
    font-size: 15px;
}

.btn-icon:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.15);
}

.btn-edit {
    color: #1d4ed8;
    background: #eef2ff;
}

.btn-edit:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-delete {
    color: #dc2626;
    background: #fee2e2;
}

.btn-delete:hover {
    background: #dc2626;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-pdf {
    color: #b91c1c;
    background: #fee2e2;
}

.btn-pdf:hover {
    background: #b91c1c;
    color: #ffffff;
    transform: translateY(-2px);
}

.orden-numero {
    font-weight: 700;
    color: #111827;
}

.ordenes-empty {
    text-align: center;
    padding: 24px;
    color: #6b7280;
}

.badge-estado {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-estado-abierta {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-estado-proceso {
    background: #fef9c3;
    color: #854d0e;
}

.badge-estado-cerrada {
    background: #dcfce7;
    color: #166534;
}

.badge-estado-cancelada {
    background: #fee2e2;
    color: #b91c1c;
}

.orden-layout {
    display: grid;
    gap: 20px;
}

.orden-panel {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.orden-panel--full {
    grid-column: 1 / -1;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.panel-help {
    color: #6b7280;
    font-size: 13px;
    margin-top: 4px;
}

.orden-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: #f9fafb;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d81822;
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.12);
}

.orden-total {
    font-weight: 700;
    color: #111827;
    background: #f3f4f6;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.orden-total span {
    margin-left: 6px;
    color: #d81822;
}

.orden-fechas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #374151;
    margin: 8px 0 6px;
}

.orden-desglose {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #374151;
    margin-bottom: 8px;
}

.orden-desglose strong {
    color: #111827;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.form-actions-inline {
    align-self: flex-end;
}

@media (max-width: 900px) {
    .orden-panel .orden-form-grid {
        grid-template-columns: 1fr !important;
        grid-auto-flow: row;
        column-gap: 0;
    }

    .orden-panel .orden-form-grid .form-group,
    .orden-panel .orden-form-grid .form-group-full,
    .orden-panel .orden-form-grid .form-actions {
        grid-column: 1 / -1;
    }

    .orden-form-grid .form-group-full {
        grid-column: auto;
    }

    .form-actions,
    .form-actions-inline {
        width: 100%;
        align-self: stretch;
        justify-content: stretch;
        flex-direction: column;
    }

    .form-actions a,
    .form-actions button {
        width: 100%;
        justify-content: center;
    }

    .orden-panel .form-group,
    .orden-panel .form-group input,
    .orden-panel .form-group select,
    .orden-panel .form-group textarea {
        width: 100% !important;
        max-width: 100% !important;
    }

    .orden-panel {
        padding: 18px 16px;
    }

    .orden-panel .form-group label {
        word-break: normal;
        white-space: normal;
        line-height: 1.2;
    }
}

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

.select-search {
    position: relative;
    display: grid;
    gap: 8px;
}

.select-search select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.select-input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: #f9fafb;
}

.select-input:focus {
    outline: none;
    border-color: #d81822;
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.12);
}

.select-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    z-index: 20;
}

.select-menu.is-open {
    display: block;
}

.select-option {
    padding: 10px 12px;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
}

.select-option:hover {
    background: #f3f4f6;
}

.select-option.is-placeholder {
    color: #9ca3af;
}

.orden-table {
    margin-top: 8px;
}

@media (max-width: 900px) {
    .ordenes-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .orden-total {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .ordenes-table {
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    .ordenes-table thead {
        display: none;
    }

    .ordenes-table tbody tr {
        display: block;
        background: #ffffff;
        border-radius: 16px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
        padding: 10px 14px;
    }

    .ordenes-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 6px 0;
        border-bottom: 1px dashed #e5e7eb;
    }

    .ordenes-table tbody td:last-child {
        border-bottom: none;
    }

    .ordenes-table tbody td::before {
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        flex: 0 0 auto;
        min-width: 90px;
    }

    .ordenes-table tbody td.acciones {
        justify-content: flex-start;
        gap: 10px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ordenes-table tbody td.acciones::before {
        display: none;
    }

    .ordenes-table tbody td.acciones::-webkit-scrollbar {
        display: none;
    }

    .ordenes-table tbody td.acciones .btn-icon {
        margin: 0;
    }

    .ordenes-table tbody td[data-label="Total"] {
        font-weight: 700;
        color: #111827;
        background: rgba(216, 24, 34, 0.06);
        border-radius: 10px;
        padding: 8px 10px;
    }

    .ordenes-table tbody td[data-label="Total"]::before {
        color: #d81822;
    }

    .ordenes-table tbody td[colspan] {
        display: block;
        text-align: center;
        border-bottom: none;
    }

    .ordenes-table tbody td[colspan]::before {
        content: "";
    }
}

.orden-novedades .novedades-list {
    display: grid;
    gap: 12px;
}

.novedad-item {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #ffffff;
}

.novedad-item strong {
    font-size: 14px;
    color: #111827;
}

.novedad-item span {
    font-size: 12px;
    color: #6b7280;
}

.novedad-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
}

.novedad-ok {
    background: #f0fdf4;
}

.novedad-proximo {
    background: #fffbeb;
}

.novedad-vencido {
    background: #fef2f2;
}


/* =====================================================
   CENTRALIZED FROM backend/app/static/css/contabilidad.css
===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --conta-ink: #0f172a;
    --conta-muted: #5b677a;
    --conta-surface: #ffffff;
    --conta-line: #e2e8f0;
    --conta-accent: #0f766e;
    --conta-accent-strong: #0b4f49;
    --conta-warm: #f59e0b;
    --conta-soft: #f8fafc;
    --conta-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
    --conta-shadow-soft: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.contabilidad-shell {
    position: relative;
    padding: 28px;
    border-radius: 28px;
    background: radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 45%),
        radial-gradient(circle at 15% 85%, rgba(245, 158, 11, 0.16), transparent 50%),
        linear-gradient(135deg, #fdfcfb 0%, #f8fafc 60%, #f3f4f6 100%);
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--conta-ink);
    overflow: hidden;
}

.contabilidad-shell::before,
.contabilidad-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(0);
    opacity: 0.08;
    pointer-events: none;
}

.contabilidad-shell::before {
    width: 260px;
    height: 260px;
    top: -120px;
    right: 10%;
    background: #0f766e;
}

.contabilidad-shell::after {
    width: 200px;
    height: 200px;
    bottom: -110px;
    left: 5%;
    background: #f59e0b;
}

.contabilidad-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}

.contabilidad-hero h1 {
    font-family: "Fraunces", "Manrope", serif;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 700;
    margin: 6px 0;
    letter-spacing: 0.2px;
}

.contabilidad-eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px;
    color: var(--conta-accent-strong);
    font-weight: 700;
}

.contabilidad-subtitle {
    color: var(--conta-muted);
    margin-top: 6px;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.contabilidad-section {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 22px;
    padding: 22px 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--conta-shadow-soft);
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--conta-ink);
}

.section-help {
    color: var(--conta-muted);
    font-size: 13px;
    margin-top: 4px;
}

.status-pill {
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.status-pill.is-open {
    background: #dcfce7;
    color: #166534;
}

.section-body {
    display: grid;
    gap: 16px;
}

.two-columns {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.section-split {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    align-items: start;
}

.panel {
    background: var(--conta-surface);
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--conta-line);
    display: grid;
    gap: 14px;
}

.panel-summary {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.panel-provider {
    position: sticky;
    top: 18px;
}

.panel-forms {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.panel-highlight {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.panel-highlight span {
    display: block;
    font-size: 12px;
    color: var(--conta-muted);
}

.panel-highlight strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    margin-top: 4px;
    color: var(--conta-ink);
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
}

.alert-info {
    background: #eef2ff;
    color: #1e40af;
}

.panel-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    display: grid;
    gap: 12px;
}

.panel-form h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
}

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

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row label {
    font-size: 11px;
    font-weight: 700;
    color: var(--conta-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-help {
    font-size: 12px;
    color: var(--conta-muted);
    line-height: 1.4;
}

.form-row input,
.form-row select {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: #f9fafb;
}

.currency-input {
    text-align: right;
    letter-spacing: 0.3px;
}

.select-search {
    position: relative;
    display: grid;
    gap: 8px;
    width: 100%;
}

.select-search select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.select-input {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: #f9fafb;
    width: 100%;
    min-width: 0;
}

.select-input:focus {
    outline: none;
    border-color: var(--conta-accent);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.select-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    z-index: 20;
}

.select-menu.is-open {
    display: block;
}

.select-option {
    padding: 10px 12px;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
}

.select-option:hover {
    background: #f3f4f6;
}

.select-option.is-placeholder {
    color: #9ca3af;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--conta-accent);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--conta-ink);
    padding: 8px 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.contabilidad-shell .btn-primary {
    background: linear-gradient(135deg, var(--conta-accent) 0%, #0ea5a4 100%);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    box-shadow: 0 10px 18px rgba(14, 165, 164, 0.25);
}

.contabilidad-shell .btn-primary:hover {
    background: linear-gradient(135deg, #0b7a73 0%, #0d8f8c 100%);
}

.table-wrapper {
    margin-top: 14px;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--conta-line);
    background: #ffffff;
    padding: 12px;
}

.filters-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
    padding: 8px 6px 14px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--conta-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-size: 13px;
}

.filter-grow {
    grid-column: span 2;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-small {
    padding: 8px 12px;
    font-size: 12px;
}

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

.table thead {
    background: #f8fafc;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.6px;
    color: var(--conta-muted);
}

.table th,
.table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
}

.table tbody tr:hover {
    background: rgba(15, 118, 110, 0.05);
}

.table-empty {
    text-align: center;
    padding: 20px;
    color: var(--conta-muted);
}

.guia-caja {
    text-align: left;
    font-size: 0.95rem;
}

.guia-caja-intro {
    margin-bottom: 12px;
    color: #36506b;
}

.guia-caja-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.guia-caja-kpis span {
    display: block;
    font-size: 0.8rem;
    color: #7b8794;
}

.guia-caja-kpis strong {
    font-size: 1rem;
    color: #0f172a;
}

.guia-caja-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}

.guia-caja-resumen .resumen-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    background: #f8fafc;
}

.guia-caja-resumen .resumen-item span {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.guia-caja-resumen .resumen-item strong {
    display: block;
    margin-top: 6px;
    font-size: 1rem;
    color: #0f766e;
}

.guia-caja-section {
    margin-top: 10px;
}

.guia-caja-section h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: #0f172a;
}

.guia-caja-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: grid;
    gap: 10px;
}

.guia-caja-checklist li {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
}

.guia-caja-checklist .check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #0f766e;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
}

.guia-caja-detalle {
    margin-top: 4px;
    color: #5b6b7f;
    font-size: 0.85rem;
}

.guia-caja-actions {
    display: grid;
    gap: 6px;
    padding: 8px 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.9rem;
}

.guia-caja-actions label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.guia-caja hr {
    border: 0;
    border-top: 1px solid #e6ecf2;
    margin: 12px 0;
}

.guia-caja-nota {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f5f9ff;
    border-radius: 10px;
    color: #2f4b6b;
}

.historial-detalle-row {
    background: #f8fafc;
}

.detalle-panel {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    background: #ffffff;
    display: grid;
    gap: 12px;
}

.detalle-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.detalle-resumen div span {
    font-size: 11px;
    color: var(--conta-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.detalle-resumen div strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-top: 4px;
}

.detalle-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.detalle-tabla th,
.detalle-tabla td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.detalle-tabla thead {
    background: #f1f5f9;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: var(--conta-muted);
}

@media (max-width: 1024px) {
    .section-split {
        grid-template-columns: 1fr;
    }

    .panel-provider {
        position: static;
    }
}

@media (max-width: 900px) {
    .contabilidad-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-forms {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .contabilidad-shell {
        padding: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-grow {
        grid-column: auto;
    }

    .filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .table-wrapper {
        overflow-x: visible;
        padding: 10px;
    }

    .table thead,
    .detalle-tabla thead {
        display: none;
    }

    .table tbody,
    .table tr,
    .detalle-tabla tbody,
    .detalle-tabla tr {
        display: block;
    }

    .table tr,
    .detalle-tabla tr {
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 12px 10px;
        margin-bottom: 10px;
        background: #ffffff;
        display: grid;
        gap: 8px;
    }

    .table td,
    .detalle-tabla td {
        border: none;
        padding: 0;
        display: flex;
        justify-content: space-between;
        gap: 12px;
        font-size: 13px;
    }

    .table td::before,
    .detalle-tabla td::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: var(--conta-muted);
    }

    .table td.table-empty {
        justify-content: center;
    }

    .table td.table-empty::before {
        content: "";
    }

    .table tbody tr:hover {
        background: #ffffff;
    }

    .historial-detalle-row {
        border: none;
        background: transparent;
        margin-bottom: 0;
    }

    .historial-detalle-row td {
        border: none;
        padding: 0;
    }

    .detalle-panel {
        padding: 10px;
    }
}


/* =====================================================
   CENTRALIZED FROM backend/app/static/css/nomina.css
===================================================== */
/* =====================================================
   NOMINA - MEDINAUTOS
===================================================== */

.nomina-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 16px;
}

.nomina-subtitle {
    color: #6b7280;
    margin-top: 6px;
    font-size: 14px;
}

.nomina-section {
    background: #f9fafb;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.section-help {
    color: #6b7280;
    font-size: 13px;
    margin-top: 4px;
}

.panel-form {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    display: grid;
    gap: 12px;
}

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

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-row input,
.form-row select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: #f9fafb;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #d81822;
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.12);
}

.table-wrapper {
    margin-top: 14px;
    overflow-x: auto;
}

.acciones {
    text-align: center;
    white-space: nowrap;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    margin: 0 4px;
}

.btn-icon i {
    font-size: 14px;
}

.btn-edit {
    color: #1d4ed8;
    background: #eef2ff;
}

.btn-edit:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-toggle {
    color: #047857;
    background: #d1fae5;
}

.btn-toggle:hover {
    background: #047857;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-pdf {
    color: #b91c1c;
    background: #fee2e2;
}

.btn-pdf:hover {
    background: #b91c1c;
    color: #ffffff;
    transform: translateY(-2px);
}

.badge-estado {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pagado {
    background: #dcfce7;
    color: #166534;
}

.badge-pendiente {
    background: #fef3c7;
    color: #b45309;
}

.table-empty {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

.tabla-totales td {
    font-weight: 700;
    background: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
}

.nomina-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
}

.detalle-row {
    background: #f9fafb;
}

.detalle-wrapper {
    padding: 12px 16px 18px;
}

.detalle-title {
    font-weight: 700;
    margin-bottom: 10px;
    color: #111827;
}

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

.detalle-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6b7280;
    padding-bottom: 6px;
}

.detalle-table td {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.detalle-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 900px) {
    .nomina-filters {
        grid-template-columns: 1fr;
    }
}

.select-search {
    position: relative;
    display: grid;
    gap: 8px;
    width: 100%;
}

.select-search select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.select-input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: #f9fafb;
    width: 100%;
    min-width: 0;
}

.select-input:focus {
    outline: none;
    border-color: #d81822;
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.12);
}

.select-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    z-index: 20;
}

.select-menu.is-open {
    display: block;
}

.select-option {
    padding: 10px 12px;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
}

.select-option:hover {
    background: #f3f4f6;
}

.select-option.is-placeholder {
    color: #9ca3af;
}

@media (max-width: 900px) {
    .nomina-header {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =====================================================
   CENTRALIZED FROM backend/app/static/css/novedades.css
===================================================== */
/* =====================================================
   NOVEDADES - MEDINAUTOS
===================================================== */

:root {
    --novedad-bg: #f8fafc;
    --novedad-card: #ffffff;
    --novedad-accent: #0f172a;
    --novedad-brand: #d81822;
    --novedad-muted: #6b7280;
    --novedad-border: #e5e7eb;
    --novedad-ok: #10b981;
    --novedad-soon: #f59e0b;
    --novedad-bad: #ef4444;
}

.content-card {
    background: var(--novedad-bg);
    border: none;
    box-shadow: none;
    padding: 0;
}

.novedades-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.novedades-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--novedad-accent);
}

.novedades-subtitle {
    color: var(--novedad-muted);
    margin-top: 6px;
}

.novedades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.novedades-section {
    margin-bottom: 24px;
}

.panel {
    background: var(--novedad-card);
    border-radius: 18px;
    padding: 20px;
    border: 1px solid var(--novedad-border);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.panel-title h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--novedad-accent);
}

.panel-title p {
    color: var(--novedad-muted);
    font-size: 13px;
    margin-top: 4px;
}

.novedades-form {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.form-row {
    display: grid;
    gap: 8px;
}

.form-row-inline {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.form-row label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--novedad-muted);
}

.form-row input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--novedad-border);
    background: #f9fafb;
}

.form-row input:focus {
    outline: none;
    border-color: var(--novedad-brand);
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.15);
}

.rule-table {
    margin-top: 16px;
    overflow-x: auto;
}

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

.rule-table thead th {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.4px;
    color: var(--novedad-muted);
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--novedad-border);
}

.rule-table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid #eef2f7;
    color: #111827;
    vertical-align: top;
}

.rule-table .acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rule-table .acciones form {
    margin: 0;
}

.rule-status.is-active {
    color: var(--novedad-ok);
}

.rule-status.is-inactive {
    color: var(--novedad-bad);
}

.rule-edit-row {
    display: none;
}

.rule-edit-row.is-open {
    display: table-row;
    background: #f8fafc;
}

.rule-edit-row td {
    padding: 16px;
}

.rule-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.rule-filters input,
.rule-filters select {
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--novedad-border);
    background: #f9fafb;
    font-size: 13px;
}

.rule-filters input:focus,
.rule-filters select:focus {
    outline: none;
    border-color: var(--novedad-brand);
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.12);
}

.rule-card {
    border: 1px dashed var(--novedad-border);
    border-radius: 14px;
    padding: 12px 14px;
    display: grid;
    gap: 8px;
}

.rule-card strong {
    font-size: 15px;
}

.rule-card span {
    font-size: 13px;
    color: var(--novedad-muted);
}

.rule-status {
    display: inline-flex;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--novedad-accent);
}

.rule-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--novedad-accent);
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #b91c1c;
    color: #ffffff;
}

.vehiculo-alertas {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.vehiculo-card {
    border: 1px solid var(--novedad-border);
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vehiculo-header {
    width: 100%;
    border: none;
    background: #f8fafc;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: pointer;
}

.vehiculo-header strong {
    font-size: 16px;
    color: #111827;
}

.vehiculo-header span {
    display: block;
    font-size: 12px;
    color: var(--novedad-muted);
}

.vehiculo-meta {
    display: grid;
    gap: 4px;
    font-size: 12px;
    color: #111827;
    text-align: right;
}

.vehiculo-alertas-list {
    display: none;
    padding: 16px 18px 18px;
    gap: 12px;
    background: #f8fafc;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.vehiculo-card.is-open .vehiculo-alertas-list {
    display: grid;
}

.vehiculo-card.is-open {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.vehiculo-card .badge {
    font-size: 10px;
    letter-spacing: 0.4px;
}

.vehiculo-card .alerta-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.novedades-alertas {
    background: var(--novedad-card);
    border-radius: 18px;
    padding: 20px;
    border: 1px solid var(--novedad-border);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.alertas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.alerta-card {
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--novedad-border);
    display: grid;
    gap: 12px;
}

.alerta-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.alerta-header strong {
    font-size: 15px;
}

.alerta-header span {
    font-size: 12px;
    color: var(--novedad-muted);
}

.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
}

.badge-ok {
    background: rgba(16, 185, 129, 0.15);
    color: var(--novedad-ok);
}

.badge-proximo {
    background: rgba(245, 158, 11, 0.15);
    color: var(--novedad-soon);
}

.badge-vencido {
    background: rgba(239, 68, 68, 0.15);
    color: var(--novedad-bad);
}

.alerta-body p {
    font-size: 13px;
    color: var(--novedad-muted);
    margin: 0;
}

.progress {
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0f172a, #d81822);
    border-radius: 999px;
}

.alerta-meta {
    display: grid;
    gap: 4px;
    font-size: 12px;
    color: var(--novedad-accent);
}

.alerta-ok {
    background: linear-gradient(180deg, #ffffff, #f0fdf4);
}

.alerta-proximo {
    background: linear-gradient(180deg, #ffffff, #fffbeb);
}

.alerta-vencido {
    background: linear-gradient(180deg, #ffffff, #fef2f2);
}

.empty {
    color: var(--novedad-muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .novedades-header {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =====================================================
   CENTRALIZED FROM backend/app/static/css/reportes.css
===================================================== */
/* =====================================================
   REPORTES - MEDINAUTOS
===================================================== */

.reportes-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 16px;
}

.reportes-subtitle {
    color: #6b7280;
    margin-top: 6px;
    font-size: 14px;
}

.reportes-section {
    background: #f9fafb;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.section-help {
    color: #6b7280;
    font-size: 13px;
    margin-top: 4px;
}

.reportes-actions {
    display: flex;
    gap: 10px;
}

.reportes-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-row input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: #f9fafb;
}

.form-row input:focus {
    outline: none;
    border-color: #d81822;
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.12);
}

.export-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-outline {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: border 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-outline:hover {
    border-color: #d81822;
    color: #d81822;
    transform: translateY(-1px);
}

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

.kpi-card {
    background: #111827;
    color: #ffffff;
    padding: 18px;
    border-radius: 16px;
    display: grid;
    gap: 6px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.kpi-card span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.7);
}

.kpi-card strong {
    font-size: 26px;
    font-weight: 700;
}

.kpi-card small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.kpi-highlight {
    background: #d81822;
}

.table-wrapper {
    margin-top: 12px;
    overflow-x: auto;
}

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

.table thead {
    background: #111827;
}

.table thead th {
    color: #ffffff;
    font-weight: 600;
    padding: 14px 16px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.4px;
}

.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f3f4f6;
}

.badge-estado {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-cerrada {
    background: #dcfce7;
    color: #166534;
}

.badge-cancelada {
    background: #fee2e2;
    color: #b91c1c;
}

.table-empty {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

@media (max-width: 720px) {
    .reportes-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}


/* =====================================================
   CENTRALIZED FROM backend/app/static/css/vehiculos.css
===================================================== */
/* ================================
   VEHÍCULOS - MEDINAUTOS
   ================================ */

/* ===============================
   CABECERA
================================ */
.vehiculos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.vehiculos-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

/* ===============================
   BOTONES PRINCIPALES
================================ */
.btn-primary {
    background: linear-gradient(135deg, #d81822, #e1868a);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(216, 24, 34, 0.3);
}

.btn-secondary {
    background: #eee;
    color: #333;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.btn-secondary:hover {
    background: #ddd;
}

/* ===============================
   CARD CONTENEDORA
================================ */
.vehiculos-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* ===============================
   TABLA
================================ */
.vehiculos-table {
    width: 100%;
    border-collapse: collapse;
}

.vehiculos-table thead th {
    text-align: left;
    padding: 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b6b6b;
    border-bottom: 1px solid #e0e0e0;
}

.vehiculos-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    vertical-align: middle;
}

/* Hover filas */
.vehiculos-table tbody tr:hover {
    background: rgba(216, 24, 34, 0.05);
}

/* Animación entrada filas */
.vehiculos-table tbody tr {
    animation: fadeInUp 0.4s ease both;
}

/* ===============================
   PLACA DESTACADA
================================ */
.placa {
    font-weight: 700;
    color: #302e2f;
}

/* ===============================
   MENSAJE VACÍO
================================ */
.empty {
    text-align: center;
    padding: 30px;
    color: #888;
}

/* ===============================
   FORMULARIOS
================================ */
.vehiculos-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.form-group input,
.form-group select {
    padding: 0.65rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #d81822;
    box-shadow: 0 0 0 2px rgba(216, 24, 34, 0.15);
}

/* ===============================
   ACCIONES FORMULARIO
================================ */
.form-actions {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

/* ===============================
   SELECT CLIENTE - PRO
================================ */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper select {
    width: 100%;
    padding: 14px 44px 14px 14px;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid #d0d0d0;
    background-color: #fff;
    appearance: none;
    cursor: pointer;
}

.select-wrapper select:hover {
    border-color: #d81822;
}

.select-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    font-size: 14px;
}

/* ===============================
   BOTONES DE ACCIÓN (TABLA)
================================ */
.acciones {
    text-align: center;
    white-space: nowrap;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    margin: 0 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* Editar */
.btn-edit {
    color: #2c3e50;
}

.btn-edit:hover {
    background: rgba(44, 62, 80, 0.1);
}

/* Eliminar */
.btn-delete {
    color: #d81822;
}

.btn-delete:hover {
    background: rgba(216, 24, 34, 0.12);
}

/* ===============================
   ANIMACIONES
================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   CENTRALIZED FROM backend/app/static/css/login.css
===================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --rojo: #d81822;
    --rojo-claro: #e1868a;
    --gris-oscuro: #2b2a2a;
    --gris: #6b7280;
    --blanco: #ffffff;
}

body {
    font-family: "Manrope", sans-serif;
    background: radial-gradient(circle at top left, #f8fafc 0%, #e5e7eb 35%, #e2e2e2 100%);
    color: var(--gris-oscuro);
    min-height: 100vh;
    line-height: 1.4;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-image:
        linear-gradient(135deg, rgba(216, 24, 34, 0.07), rgba(255, 255, 255, 0)),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.02) 0 1px, transparent 1px 60px);
}

.login-shell {
    width: min(960px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 22px 40px rgba(17, 24, 39, 0.15);
    backdrop-filter: blur(12px);
    animation: fadeUp 0.5s ease both;
}

.login-brand {
    background: linear-gradient(160deg, #111827, #2f2f2f);
    color: var(--blanco);
    border-radius: 18px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.login-brand::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(225, 134, 138, 0.35), transparent 70%);
}

.brand-logo {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.25);
}

.brand-logo img {
    width: 90px;
    height: auto;
}

.login-brand h1 {
    font-family: "Playfair Display", serif;
    font-size: 2rem;
    font-weight: 600;
}

.login-brand p {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.brand-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.brand-tags span {
    background: rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
}

.login-card {
    background: var(--blanco);
    border-radius: 18px;
    padding: 28px;
    box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.05);
}

.login-card h2 {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--gris);
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.login-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
}

.field input {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 0.95rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
    outline: none;
    border-color: var(--rojo);
    box-shadow: 0 0 0 3px rgba(216, 24, 34, 0.15);
    background: var(--blanco);
}

.login-form button {
    margin-top: 6px;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--rojo), var(--rojo-claro));
    color: var(--blanco);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(216, 24, 34, 0.25);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 860px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 680px) {
    .login-page {
        padding: 18px;
    }

    .login-shell {
        width: min(420px, 100%);
        padding: 20px;
        border-radius: 20px;
    }

    .login-brand {
        padding: 22px;
        gap: 12px;
    }

    .brand-logo {
        width: 110px;
        height: 110px;
        border-radius: 26px;
    }

    .brand-logo img {
        width: 86px;
    }

    .login-card {
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .login-page {
        padding: 14px;
    }

    .login-shell {
        width: min(400px, 100%);
        padding: 16px;
        gap: 18px;
        border-radius: 18px;
        box-shadow: 0 16px 32px rgba(17, 24, 39, 0.14);
    }

    .login-brand h1 {
        font-size: 1.55rem;
    }

    .login-card h2 {
        font-size: 1.4rem;
    }

    .login-subtitle {
        font-size: 0.88rem;
    }

    .brand-tags span {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .login-brand {
        min-height: 240px;
    }
}

@media (max-width: 420px) {
    .login-page {
        padding: 12px;
    }

    .login-shell {
        width: min(380px, 100%);
        padding: 14px;
    }

    .login-brand {
        padding: 18px;
    }

    .brand-tags {
        justify-content: center;
    }

    .brand-tags span {
        font-size: 0.7rem;
    }

    .login-card {
        padding: 20px;
    }

    .field input,
    .login-form button {
        font-size: 0.9rem;
    }
}

/* =====================================================
   Visual refresh 2026 - tecnologia + taller
===================================================== */

:root {
    --tech-red: #e11d2f;
    --tech-red-dark: #a30f1d;
    --tech-ink: #10141c;
    --tech-muted: #6b7280;
}

body {
    font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
    background:
        linear-gradient(115deg, rgba(225, 29, 47, 0.10), transparent 32%),
        linear-gradient(180deg, #f7f8fb 0%, #ebeef4 100%);
}

.login-page {
    display: grid;
    place-items: center;
    padding: 28px;
    position: relative;
    overflow: hidden;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
}

.login-shell {
    width: min(1080px, 100%);
    min-height: 560px;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.20);
    backdrop-filter: blur(18px);
}

.login-brand {
    min-height: 560px;
    padding: 44px;
    border-radius: 0;
    background:
        linear-gradient(145deg, rgba(225, 29, 47, 0.18), transparent 42%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 13px),
        linear-gradient(155deg, #10141c 0%, #181d27 52%, #252b34 100%);
    justify-content: space-between;
}

.login-brand::after {
    display: none;
}

.brand-logo {
    width: 104px;
    height: 104px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 36px rgba(0, 0, 0, 0.28);
}

.brand-logo img {
    width: 78px;
}

.login-brand h1 {
    margin-top: 34px;
    font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.6rem);
    line-height: 0.95;
    letter-spacing: 0;
    font-weight: 800;
}

.login-brand p {
    width: min(440px, 100%);
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 1.05rem;
}

.brand-tags {
    gap: 10px;
    margin-top: 28px;
}

.brand-tags span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
    font-weight: 700;
}

.brand-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 36px;
}

.metric {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.metric strong {
    display: block;
    color: #ffffff;
    font-size: 1.15rem;
}

.metric span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 5vw, 58px);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: none;
}

.login-card h2 {
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    line-height: 1.05;
    font-weight: 800;
}

.login-subtitle {
    margin: 12px 0 26px;
}

.field {
    gap: 8px;
    color: #1f2937;
    font-size: 0.88rem;
    font-weight: 800;
}

.field input {
    height: 54px;
    padding: 0 16px;
    border-radius: 16px;
    border-color: #d8dde7;
    background: #f8fafc;
    font-weight: 600;
}

.field input:focus {
    border-color: rgba(225, 29, 47, 0.74);
    box-shadow: 0 0 0 4px rgba(225, 29, 47, 0.14);
}

.login-form button {
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--tech-red) 0%, #f04455 52%, var(--tech-red-dark) 100%);
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 18px 32px rgba(225, 29, 47, 0.28);
}

.login-form button:hover {
    box-shadow: 0 22px 40px rgba(225, 29, 47, 0.34);
    filter: saturate(1.05);
}

@media (max-width: 860px) {
    .login-brand {
        min-height: auto;
        align-items: flex-start;
        text-align: left;
        padding: 30px;
    }

    .brand-metrics {
        display: none;
    }
}

@media (max-width: 560px) {
    .login-page {
        padding: 14px;
    }

    .login-shell {
        border-radius: 22px;
    }

    .login-brand,
    .login-card {
        padding: 24px;
    }

    .brand-logo {
        width: 86px;
        height: 86px;
        border-radius: 20px;
    }

    .brand-logo img {
        width: 66px;
    }
}

/* =====================================================
   Redesign: Command Center Login
===================================================== */

body {
    background: #070b12;
}

.login-page {
    padding: clamp(18px, 4vw, 42px);
    background:
        radial-gradient(circle at 18% 18%, rgba(225, 29, 47, 0.32), transparent 26%),
        radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.16), transparent 24%),
        linear-gradient(135deg, #080c13 0%, #111722 46%, #070a10 100%);
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.login-page::after {
    content: "";
    position: absolute;
    inset: auto 8% 6% 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(225, 29, 47, 0.65), rgba(34, 211, 238, 0.45), transparent);
    box-shadow: 0 0 38px rgba(225, 29, 47, 0.55);
}

.ambient {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.45;
    pointer-events: none;
}

.ambient-red {
    left: -120px;
    top: 8%;
    background: rgba(225, 29, 47, 0.34);
}

.ambient-blue {
    right: -150px;
    bottom: 6%;
    background: rgba(34, 211, 238, 0.16);
}

.login-shell {
    width: min(1180px, 100%);
    min-height: min(640px, calc(100vh - 56px));
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 18px;
    padding: 18px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
}

.login-hero,
.login-panel {
    min-height: min(604px, calc(100vh - 92px));
    border-radius: 26px;
    position: relative;
    overflow: hidden;
}

.login-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 4vw, 52px);
    color: #ffffff;
    background:
        linear-gradient(150deg, rgba(225, 29, 47, 0.18), transparent 38%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 36%),
        #0e141d;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 0 44%, rgba(255, 255, 255, 0.035) 44% 46%, transparent 46% 54%, rgba(255, 255, 255, 0.035) 54% 56%, transparent 56% 100%),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 16px),
        radial-gradient(circle at 70% 28%, rgba(225, 29, 47, 0.24), transparent 22%);
    background-size: 220px 100%, auto, auto;
    opacity: 0.95;
}

.login-hero::after {
    content: "\f013";
    position: absolute;
    right: -34px;
    bottom: -42px;
    color: rgba(255, 255, 255, 0.045);
    font-family: "Font Awesome 6 Free";
    font-size: 15rem;
    font-weight: 900;
    line-height: 1;
}

.login-hero > * {
    position: relative;
    z-index: 1;
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 70px;
    height: 70px;
    border-radius: 20px;
}

.brand-logo img {
    width: 54px;
}

.brand-top strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1;
}

.brand-top span {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.hero-copy {
    max-width: 690px;
}

.eyebrow,
.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 8px 11px;
    border-radius: 999px;
    color: #fecdd3;
    background: rgba(225, 29, 47, 0.12);
    border: 1px solid rgba(225, 29, 47, 0.28);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.hero-copy h1 {
    width: min(720px, 100%);
    margin: 20px 0 18px;
    font-size: clamp(2.75rem, 5vw, 5rem);
    line-height: 0.94;
    letter-spacing: 0;
    font-weight: 900;
}

.hero-copy > p:not(.eyebrow) {
    width: min(560px, 100%);
    color: rgba(255, 255, 255, 0.68);
    font-size: 1.05rem;
    line-height: 1.55;
}

.telemetry {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    width: min(520px, 100%);
}

.telemetry-ring {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(from 45deg, #e11d2f, #22d3ee, rgba(255, 255, 255, 0.12), #e11d2f);
    box-shadow: 0 0 42px rgba(225, 29, 47, 0.24);
    position: relative;
}

.telemetry-ring::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.28);
}

.telemetry-ring span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #0e141d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1.45rem;
}

.telemetry-ring span::after {
    content: "RPM";
    position: absolute;
    bottom: 28px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.7px;
}

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.telemetry-grid div,
.panel-footer div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.telemetry-grid span,
.panel-footer span {
    display: block;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.telemetry-grid strong,
.panel-footer strong {
    display: block;
    margin-top: 5px;
    color: #ffffff;
    font-size: 1rem;
}

.brand-tags {
    margin-top: 0;
}

.workshop-line {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: min(520px, 100%);
}

.workshop-line span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.74);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 0.78rem;
    font-weight: 850;
}

.workshop-line i {
    color: #f04455;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 4vw, 46px);
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.80);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.80);
}

.login-panel {
    color: #eef2f7;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
        linear-gradient(180deg, rgba(18, 24, 34, 0.96), rgba(13, 18, 27, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        0 22px 55px rgba(0, 0, 0, 0.22);
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 8%, rgba(225, 29, 47, 0.12), transparent 28%),
        radial-gradient(circle at 92% 18%, rgba(34, 211, 238, 0.10), transparent 24%),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 16px);
    pointer-events: none;
}

.login-panel > * {
    position: relative;
    z-index: 1;
}

.panel-header {
    margin-bottom: 28px;
}

.status-pill {
    color: #bbf7d0;
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(134, 239, 172, 0.24);
}

.status-pill i {
    color: #16a34a;
    font-size: 0.55rem;
}

.login-panel h2 {
    margin-top: 18px;
    color: #f8fafc;
    font-size: clamp(1.85rem, 2.5vw, 2.55rem);
    line-height: 1;
    font-weight: 900;
}

.panel-header p {
    margin-top: 12px;
    color: rgba(226, 232, 240, 0.62);
    font-size: 1rem;
}

.login-form {
    gap: 18px;
}

.field {
    color: rgba(248, 250, 252, 0.88);
    font-size: 0.84rem;
    letter-spacing: 0.2px;
}

.input-shell {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 22px rgba(0, 0, 0, 0.16);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-shell:focus-within {
    border-color: rgba(225, 29, 47, 0.62);
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 0 0 4px rgba(225, 29, 47, 0.14), 0 14px 26px rgba(0, 0, 0, 0.20);
}

.input-shell i {
    color: rgba(226, 232, 240, 0.62);
}

.input-shell input {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #ffffff;
}

.input-shell input::placeholder {
    color: rgba(226, 232, 240, 0.56);
}

.input-shell input:focus {
    box-shadow: none;
}

.login-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ef233c 0%, #c1121f 100%);
    box-shadow: 0 18px 36px rgba(225, 29, 47, 0.30);
}

.panel-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 28px;
}

.panel-footer div {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        width: min(680px, 100%);
    }

    .login-hero,
    .login-panel {
        min-height: auto;
    }

    .hero-copy h1 {
        font-size: clamp(2.35rem, 8vw, 4rem);
    }
}

@media (max-height: 820px) and (min-width: 961px) {
    .login-page {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .login-shell {
        min-height: calc(100vh - 36px);
    }

    .login-hero,
    .login-panel {
        min-height: calc(100vh - 72px);
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .hero-copy h1 {
        font-size: clamp(2.5rem, 4.2vw, 4.25rem);
        margin: 14px 0 12px;
    }

    .hero-copy > p:not(.eyebrow) {
        font-size: 0.98rem;
        line-height: 1.45;
    }

    .telemetry {
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 12px;
    }

    .telemetry-ring {
        width: 84px;
        height: 84px;
    }

    .telemetry-ring span {
        width: 62px;
        height: 62px;
    }

    .telemetry-grid div,
    .panel-footer div {
        padding: 11px;
    }

    .panel-header {
        margin-bottom: 20px;
    }

    .login-form {
        gap: 14px;
    }

    .input-shell {
        height: 52px;
    }

    .login-form button {
        height: 54px;
    }
}

@media (max-height: 700px) and (min-width: 961px) {
    .telemetry,
    .brand-tags,
    .workshop-line,
    .panel-footer {
        display: none;
    }

    .hero-copy h1 {
        font-size: clamp(2.25rem, 4vw, 3.7rem);
    }
}

@media (max-width: 620px) {
    .login-page {
        padding: 12px;
    }

    .login-shell {
        padding: 10px;
        border-radius: 24px;
        width: 100%;
    }

    .login-hero,
    .login-panel {
        border-radius: 20px;
        padding: 22px;
    }

    .brand-top {
        gap: 10px;
    }

    .brand-logo {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .brand-logo img {
        width: 42px;
    }

    .hero-copy {
        margin-top: 28px;
    }

    .hero-copy h1 {
        font-size: clamp(2.05rem, 13vw, 3rem);
        line-height: 0.98;
        margin: 14px 0 10px;
    }

    .hero-copy > p:not(.eyebrow) {
        font-size: 0.94rem;
        line-height: 1.45;
    }

    .login-panel h2 {
        font-size: clamp(1.8rem, 9vw, 2.35rem);
    }

    .input-shell,
    .login-form button {
        height: 52px;
        border-radius: 15px;
    }

    .telemetry {
        display: none;
    }

    .brand-tags {
        display: none;
    }

    .workshop-line {
        display: none;
    }

    .panel-footer {
        display: none;
    }
}

@media (max-width: 420px) {
    .login-page {
        padding: 8px;
    }

    .login-shell {
        padding: 8px;
        border-radius: 20px;
    }

    .login-hero,
    .login-panel {
        padding: 18px;
        border-radius: 18px;
    }

    .hero-copy h1 {
        font-size: clamp(1.85rem, 12vw, 2.55rem);
    }

    .panel-header {
        margin-bottom: 20px;
    }
}

/* Guardrail final: el login vive en main.css, pero no debe pisar el shell interno. */
body:not(.login-body) {
    color: #e5e7eb;
    background:
        radial-gradient(circle at 12% 8%, rgba(225, 29, 47, 0.18), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.10), transparent 24%),
        linear-gradient(135deg, #080c13 0%, #111722 46%, #070a10 100%) !important;
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body.login-body {
    min-height: 100vh;
    color: #2b2a2a;
    background: #070b12;
    font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
}
/* EOF table override marker */
