/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 10000;
    background: #2E6DF6;
    color: #F2F4F7;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 1rem;
}

/* Importar Google Font - Inter (moderna y legible) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ====== PANTALLA DE LOGIN ====== */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(180deg, #0B1F3A 0%, #0E2747 100%);
    padding: 1rem;
}

.login-card {
    background: #1F2A3C;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    text-align: center;
    border: 1px solid #1E2F4A;
}

.login-logo {
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wordmark {
    width: min(100%, 300px);
    height: auto;
    display: block;
    object-fit: contain;
}

.tf-isotype {
    width: 52px;
    height: 52px;
    object-fit: contain;
    display: block;
    flex: 0 0 auto;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #B8BDC6;
    margin-bottom: 1.75rem;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 1rem;
}

.login-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #B8BDC6;
    margin-bottom: 0.35rem;
}

.login-form input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #7A828E;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    background: #0B1F3A;
    color: #F2F4F7;
}

.login-form input::placeholder {
    color: #7A828E;
}

.login-form input:focus {
    outline: none;
    border-color: #2E6DF6;
    box-shadow: 0 0 0 3px rgba(46, 109, 246, 0.25);
}

.login-error {
    background: rgba(197, 42, 42, 0.15);
    color: #ff6b6b;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(197, 42, 42, 0.3);
}

.login-btn {
    width: 100%;
    margin-top: 0.5rem;
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #7A828E;
}

.login-footer a {
    color: #B8BDC6;
    text-decoration: none;
}

.login-footer a:hover {
    color: #F2F4F7;
    text-decoration: underline;
}

.btn-logout {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(46, 109, 246, 0.1);
    color: #2E6DF6;
    border: 1.5px solid rgba(46, 109, 246, 0.3);
    font-size: 0.98rem;
    font-weight: 700;
    padding: 0.62rem 1.12rem;
    min-width: 118px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 20;
}

.btn-logout:hover {
    background: rgba(46, 109, 246, 0.2);
    color: #F2F4F7;
    border-color: #2E6DF6;
}

.header {
    position: relative;
}

/* Variables CSS - Sistema de color oscuro TallerFlow */
:root {
    --brand-dark: #0A1120;
    --primary-color: #667eea;
    --primary-hover: #5568d3;
    --success-color: #4ade80;
    --warning-color: #fbbf24;
    --danger-color: #f87171;
    --white-tech: #F2F4F7;
    --gray-light: #94A3B8;
    --gray-medium: #64748B;
    --gray-dark-ui: #0F1928;
    --gray-50: #0A1120;
    --gray-100: #0F1928;
    --gray-200: #1E2D42;
    --gray-300: #253347;
    --gray-400: #94A3B8;
    --gray-500: #94A3B8;
    --gray-600: #CBD5E1;
    --gray-700: #E2E8F0;
    --gray-800: #1F2A3C;
    --gray-900: #0B1F3A;
    --text-color: #E2E8F0;
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --bg-primary: #0A1120;
    --bg-secondary: #0F1928;
    --border-color: rgba(255,255,255,0.09);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.45);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.55);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-primary);
    font-weight: 400;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ====== NAVBAR BURBUJA FLOTANTE — ESTILO PÍLDORA IPHONE ====== */

/* El header es solo el wrapper flotante: fondo de página transparente */
.header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: transparent;
    padding: 22px 1.5rem 0;
    pointer-events: none; /* el wrapper no atrapa clicks */
}

/* La píldora en sí */
.header-layout {
    pointer-events: all;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 112px;
    gap: 0;
    padding: 0 40px;
    max-width: 1200px;
    margin: 0 auto;

    /* Forma oval / cápsula */
    border-radius: 999px;

    /* Fondo oscuro con glassmorphism */
    background: rgba(10, 17, 32, 0.88);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);

    /* Borde luminoso sutil */
    border: 1px solid rgba(255, 255, 255, 0.1);

    /* Sombra elevada — efecto flotante */
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 8px 32px rgba(0, 0, 0, 0.55),
        0 2px 8px rgba(0, 0, 0, 0.4);

    color: #F2F4F7;

    /* Animación de entrada */
    animation: navbarFloat 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes navbarFloat {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.header-topbar {
    display: contents;
}

/* Área derecha: todo en fila, centrado verticalmente */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    justify-content: flex-end;
    height: 100%;
}

.header-context {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Separador vertical entre secciones */
.header-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.13);
    flex-shrink: 0;
}

.header-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.logo {
    margin: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    text-decoration: none;
}

.logo .tf-wordmark {
    width: auto;
    max-width: 100%;
    height: 60px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 16px rgba(102, 126, 234, 0.35));
}

.logo .tf-isotype-mobile {
    display: none;
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.3));
}

.logo::after {
    content: none;
}

.powered-by {
    font-size: 0.875rem;
    opacity: 0.85;
    margin-bottom: 0.75rem;
    font-style: italic;
    font-weight: 300;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.lance-powered-logo {
    height: 18px;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
}

.powered-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.workshop-label {
    font-size: 0.82rem;
    margin: 0;
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(242, 244, 247, 0.85);
    font-weight: 500;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.workshop-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
}

.workshop-caption {
    display: none;
    margin: 0;
    color: #93A2B7;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.workshop-switch {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

/* Botón de logout estilo ToDesktop - compacto con ícono */
.btn-logout-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(242, 244, 247, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-logout-nav:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.btn-logout-text {
    letter-spacing: 0.01em;
}

/* Compatibilidad con el botón viejo (si queda alguna referencia) */
.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(242, 244, 247, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.action-buttons {
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.action-label {
    display: none;
}

/* Dropdown de acciones - Estilo moderno todesktop */
.actions-dropdown {
    position: relative;
    display: inline-block;
}

.actions-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.85rem;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(242, 244, 247, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.actions-dropdown-trigger:hover {
    background: rgba(102, 126, 234, 0.18);
    border-color: rgba(102, 126, 234, 0.4);
    color: #a5b4fc;
}

.actions-dropdown-trigger[aria-expanded="true"] {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    color: #a5b4fc;
}

.actions-dropdown-trigger:active {
    transform: scale(0.97);
}

.actions-dropdown-label {
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.actions-dropdown-chevron {
    transition: transform 0.2s ease;
    opacity: 0.9;
}

.actions-dropdown-trigger[aria-expanded="true"] .actions-dropdown-chevron {
    transform: rotate(180deg);
}

.actions-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    background: #141b2d;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
    padding: 0.45rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.actions-dropdown-menu[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.actions-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: rgba(242, 244, 247, 0.75);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    text-align: left;
}

.actions-dropdown-item:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #a5b4fc;
}

.actions-dropdown-item:active {
    transform: scale(0.98);
    background: rgba(102, 126, 234, 0.22);
}

.actions-item-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.actions-item-text {
    flex: 1;
    line-height: 1.3;
}

/* Estilos antiguos para compatibilidad */
.action-buttons .btn-manage-workshops,
.action-buttons .btn-manage-users,
.action-buttons .btn-performance,
.action-buttons .btn-export-report {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    color: rgba(242,244,247,0.9);
    font-size: 1rem;
    padding: 0;
}

.action-buttons .btn-manage-workshops:hover,
.action-buttons .btn-manage-users:hover,
.action-buttons .btn-performance:hover,
.action-buttons .btn-export-report:hover {
    background: rgba(102,126,234,0.18);
    border-color: rgba(102,126,234,0.4);
}

.workshop-switch label {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(242, 244, 247, 0.6);
    white-space: nowrap;
    display: none;
}

/* ── Workshop custom dropdown (mismo estilo que Acciones) ── */
.workshop-dropdown {
    position: relative;
    display: inline-block;
}

.workshop-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.85rem;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(242, 244, 247, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.workshop-dropdown-trigger:hover,
.workshop-dropdown-trigger[aria-expanded="true"] {
    background: rgba(102, 126, 234, 0.18);
    border-color: rgba(102, 126, 234, 0.4);
    color: #a5b4fc;
}

.workshop-dropdown-chevron {
    transition: transform 0.2s ease;
    opacity: 0.9;
    flex-shrink: 0;
}

.workshop-dropdown-trigger[aria-expanded="true"] .workshop-dropdown-chevron {
    transform: rotate(180deg);
}

.workshop-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 200px;
    background: #141b2d;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
    padding: 0.45rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.09);
}

.workshop-dropdown-menu[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.workshop-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: rgba(242, 244, 247, 0.75);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    text-align: left;
}

.workshop-dropdown-item:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #a5b4fc;
}

.workshop-dropdown-item.active {
    color: #a5b4fc;
    background: rgba(102, 126, 234, 0.1);
}

.workshop-dropdown-item-icon {
    width: 16px;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #a5b4fc;
}

/* ── Workshop bottom sheet (móvil) ── */
.workshop-sheet-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1200;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(4px);
}

.workshop-sheet-backdrop.visible {
    display: block;
    opacity: 1;
}

.workshop-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #141b2d;
    border-radius: 22px 22px 0 0;
    padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 16px);
    z-index: 1201;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
    max-height: 70vh;
    overflow-y: auto;
}

.workshop-sheet.visible {
    transform: translateY(0);
}

.workshop-sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 12px auto 0;
}

.workshop-sheet-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(242, 244, 247, 0.4);
    padding: 14px 20px 8px;
    margin: 0;
}

.workshop-sheet-list {
    padding: 0 8px 8px;
}

.workshop-sheet-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: 'Inter', sans-serif;
    text-align: left;
}

.workshop-sheet-item:hover,
.workshop-sheet-item:active {
    background: rgba(102, 126, 234, 0.15);
}

.workshop-sheet-item.active .workshop-sheet-item-name {
    color: #a5b4fc;
    font-weight: 600;
}

.workshop-sheet-item-icon {
    width: 20px;
    font-size: 0.85rem;
    color: #a5b4fc;
    flex-shrink: 0;
    text-align: center;
}

.workshop-sheet-item-name {
    font-size: 1rem;
    color: rgba(242, 244, 247, 0.85);
    font-weight: 500;
}

/* Main content */
.main {
    padding: 1.6rem 0 2rem;
}

/* Cards — dark glass */
.card {
    background: rgba(15, 25, 40, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.04) inset;
    border: 1px solid rgba(255,255,255,0.08);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    border-color: rgba(102,126,234,0.18);
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(102,126,234,0.3);
    padding-bottom: 0.65rem;
    letter-spacing: -0.02em;
}

/* Formulario */
.form {
    display: grid;
    gap: 1.25rem;
}

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

.form-group label {
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.form-group input {
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: rgba(255,255,255,0.05);
    color: #F1F5F9;
    font-family: 'Inter', sans-serif;
}

.form-group input::placeholder {
    color: rgba(148,163,184,0.6);
}

.search-group {
    margin-bottom: 1rem;
}

.search-group input {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: #F1F5F9;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
    background: rgba(102,126,234,0.06);
}

/* Botones mejorados */
.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.975rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    letter-spacing: 0.025em;
    box-shadow: var(--shadow);
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--border-radius);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white-tech);
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.register-card .btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
}

.register-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 !important;
    margin-bottom: 0;
    border: 0 !important;
    border-bottom: none;
    background: transparent !important;
}

.register-header h2 {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.register-toggle-btn {
    flex: 0 0 auto;
}

.register-toggle-btn:not(.open) .register-toggle-chevron {
    transform: rotate(-90deg);
}

.register-toggle-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.register-card .card-header h2 {
    margin-bottom: 0;
}

.register-card .card-body {
    padding: 0;
}

.register-form-panel {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding-top 0.25s ease;
}

.register-form-panel.open {
    max-height: 560px;
    opacity: 1;
    padding-top: 0.75rem !important;
}

.summary-card {
    margin-bottom: 1.1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(15, 25, 40, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-header h2 {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.summary-toggle-btn {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: rgba(242,244,247,0.7);
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.summary-toggle-btn:hover {
    background: rgba(102,126,234,0.15);
    border-color: rgba(102,126,234,0.3);
    color: #a5b4fc;
}

.summary-toggle-chevron {
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.24s ease;
}

.summary-card:not(.open) .summary-toggle-chevron {
    transform: rotate(-90deg);
}

.summary-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.26s ease, opacity 0.22s ease;
}

.summary-body.open {
    opacity: 1;
}

.summary-grid {
    display: grid;
    grid-template-columns: minmax(200px, 0.8fr) minmax(300px, 1.2fr);
    gap: 0.7rem;
    padding-top: 0.75rem;
}

.summary-primary,
.summary-mini-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 0.72rem 0.85rem;
}

.summary-caption {
    display: block;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(148,163,184,0.8);
    font-weight: 600;
}

.summary-main-number {
    display: block;
    font-size: 1.45rem;
    line-height: 1.15;
    color: #F1F5F9;
    margin-top: 0.22rem;
    margin-bottom: 0;
}

.summary-substates {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.summary-substate {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.83rem;
    color: rgba(203,213,225,0.9);
}

.summary-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.dot-review {
    background: #F1C40F;
}

.dot-waiting {
    background: #8E44AD;
}

.dot-ready {
    background: #27AE60;
}

.summary-secondary {
    display: grid;
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    gap: 0.7rem;
}

.summary-mini-card strong {
    display: block;
    margin-top: 0.22rem;
    color: #F1F5F9;
    font-size: 1.2rem;
    line-height: 1.1;
}

.eta-dropdown-wrap {
    position: relative;
}

.eta-dropdown-trigger {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #F1F5F9;
    border-radius: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.8rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.eta-dropdown-trigger:hover {
    border-color: rgba(102,126,234,0.4);
    background: rgba(102,126,234,0.08);
}

.eta-dropdown-trigger.open {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}

.eta-dropdown-chevron {
    transition: transform 0.15s ease;
}

.eta-dropdown-trigger.open .eta-dropdown-chevron {
    transform: rotate(180deg);
}

.eta-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    z-index: 30;
    background: #141b2d;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    padding: 0.35rem;
}

.eta-dropdown-item {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 0.92rem;
    color: rgba(242,244,247,0.8);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.eta-dropdown-item:hover {
    background: rgba(102,126,234,0.15);
    color: #a5b4fc;
}

.eta-dropdown-item.selected {
    background: rgba(102,126,234,0.18);
    color: #a5b4fc;
    font-weight: 600;
}

.tf-modern-ui .form-control {
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    min-height: 44px;
    box-shadow: none;
    background: rgba(255,255,255,0.05);
    color: #F1F5F9;
}

.tf-modern-ui .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
    background: rgba(102,126,234,0.06);
}

.deploy-wrapper {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.4s cubic-bezier(.4,0,.2,1),
        opacity 0.3s ease;
}

.deploy-wrapper.open {
    opacity: 1;
}

.deploy-content {
    padding-top: 20px;
}

.success-card {
    background: rgba(102,126,234,0.08);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid rgba(102,126,234,0.25);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: fadeInUp 0.35s ease;
}

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

/* Grid de botones de estado — auto-ajusta por número de estados */
.status-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Layout 2×2 para exactamente 4 estados */
.status-buttons[data-count="4"] {
    grid-template-columns: repeat(2, 1fr);
}

/* Layout 3+2 para 5 estados */
.status-buttons[data-count="5"] {
    grid-template-columns: repeat(3, 1fr);
}

/* Botones de estado con colores sobrios */
.btn-status {
    min-height: 64px;
    padding: 1.2rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    border: 1.5px solid;
}

/* Especificidad doble (.btn-status.btn-*) para sobrescribir Bootstrap's .btn */
.btn-status.btn-awaiting-review {
    background-color: #3498DB;
    color: #F2F4F7;
    border-color: #2a7caf;
}

.btn-status.btn-awaiting-review:hover:not(:disabled) {
    background-color: #2a7caf;
    border-color: #206792;
}

.btn-status.btn-revision {
    background-color: #F1C40F;
    color: #0F1C2E;
    border-color: #b6900b;
}

.btn-status.btn-revision:hover:not(:disabled) {
    background-color: #ddb30d;
    border-color: #b6900b;
}

.btn-status.btn-mounting {
    background-color: #D35400;
    color: #F2F4F7;
    border-color: #aa4300;
}

.btn-status.btn-mounting:hover:not(:disabled) {
    background-color: #aa4300;
    border-color: #8f3900;
}

.btn-status.btn-waiting {
    background-color: #8E44AD;
    color: #F2F4F7;
    border-color: #71368b;
}

.btn-status.btn-waiting:hover:not(:disabled) {
    background-color: #71368b;
    border-color: #5f2e75;
}

.btn-status.btn-budget {
    background-color: #E67E22;
    color: #F2F4F7;
    border-color: #b8641b;
}

.btn-status.btn-budget:hover:not(:disabled) {
    background-color: #cb6f1e;
    border-color: #b8641b;
}

.btn-status.btn-ready {
    background-color: #27AE60;
    color: #F2F4F7;
    border-color: #1f8d4e;
}

.btn-status.btn-ready:hover:not(:disabled) {
    background-color: #1f8d4e;
    border-color: #18713f;
}

/* ETA chips en modal de confirmación de estado */
.confirm-eta-section {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.confirm-eta-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.55rem;
}

.confirm-eta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.eta-chip {
    padding: 0.28rem 0.8rem;
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(226, 232, 240, 0.95);
    font-size: 0.82rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    white-space: nowrap;
}

.eta-chip:hover {
    border-color: rgba(125, 180, 255, 0.8);
    color: #7db4ff;
    background: rgba(125, 180, 255, 0.1);
}

.eta-chip.selected {
    background: rgba(52, 152, 219, 0.18);
    border-color: #3498db;
    color: #7db4ff;
    font-weight: 600;
}

/* ETA chips in light (tf-modern-ui) modal */
body.tf-modern-ui .eta-chip {
    border-color: rgba(18, 34, 56, 0.25);
    background: rgba(18, 34, 56, 0.04);
    color: #25405e;
}
body.tf-modern-ui .eta-chip:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
}
body.tf-modern-ui .eta-chip.selected {
    background: rgba(59, 130, 246, 0.12);
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* Tabla */
.table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 360px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(10,17,32,0.6);
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-kpi-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
}

.dashboard-kpi-item p {
    margin: 0;
    color: rgba(148,163,184,0.8);
    font-size: 0.77rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.dashboard-kpi-item strong {
    display: block;
    margin-top: 0.22rem;
    color: #F1F5F9;
    font-size: 1.2rem;
    line-height: 1.1;
}

.tf-modern-ui .table > :not(caption) > * > * {
    padding: 0.92rem 0.85rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    table-layout: auto;
}

.table th,
.table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: middle;
    color: #E2E8F0;
}

/* Bootstrap cell bg override */
.tf-modern-ui .table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: rgba(255,255,255,0.06);
    color: #E2E8F0;
}

.table th {
    background-color: rgba(255,255,255,0.05);
    font-weight: 600;
    color: rgba(148,163,184,0.85);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table tbody tr {
    transition: background-color 0.2s;
    cursor: pointer;
}

.table tbody tr:hover {
    background-color: rgba(102,126,234,0.07);
}

.table tbody tr.selected {
    background-color: rgba(102,126,234,0.15);
    outline: 2px solid rgba(102,126,234,0.5);
    outline-offset: -2px;
}

.table tbody tr.selected td {
    background-color: rgba(102,126,234,0.12);
}

.table tbody tr.active {
    background-color: rgba(102,126,234,0.18);
}

/* Estados en tabla con colores sobrios */
.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    display: inline-block;
    border: 1px solid;
}

.status-esperando-revision {
    background-color: #3498DB;
    color: #F2F4F7;
    border-color: #2a7caf;
}

.status-en-revision {
    background-color: #F1C40F;
    color: #0F1C2E;
    border-color: #b6900b;
}

.status-montando-pieza {
    background-color: #D35400;
    color: #F2F4F7;
    border-color: #aa4300;
}

.status-esperando-pieza {
    background-color: #8E44AD;
    color: #F2F4F7;
    border-color: #71368b;
}

.status-presupuesto-pendiente {
    background-color: #E67E22;
    color: #F2F4F7;
    border-color: #b8641b;
}

.status-listo {
    background-color: #27AE60;
    color: #F2F4F7;
    border-color: #1f8d4e;
}

/* Mensajes */
.message-container {
    margin: 1.5rem 0;
}

.message {
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.message.success {
    background-color: rgba(46, 109, 246, 0.1);
    border-color: var(--primary-color);
    color: #7db4ff;
}

.message.error {
    background-color: rgba(197, 42, 42, 0.15);
    border-color: var(--danger-color);
    color: #ff6b6b;
}

.message.info {
    background-color: rgba(46, 109, 246, 0.1);
    border-color: var(--primary-color);
    color: #7db4ff;
}

/* Estados auxiliares */
.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

.help-text {
    color: var(--gray-600);
    margin-bottom: 1rem;
    font-style: normal;
    font-weight: 500;
}

.selected-info {
    background-color: rgba(255,255,255,0.04);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255,255,255,0.08);
    margin-top: 1rem;
}

#selectedVehicleText {
    color: var(--text-primary);
}

.legal-note {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Footer */
.footer {
    background-color: var(--brand-dark);
    color: var(--white-tech);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer p {
    opacity: 0.8;
}

.footer a {
    color: #B8BDC6;
    text-decoration: none;
}

.footer a:hover {
    color: #F2F4F7;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .summary-secondary {
        grid-template-columns: repeat(2, 1fr);
    }

    .summary-primary {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.65rem 0.85rem;
    }

    .summary-main-number {
        font-size: 2rem;
        margin: 0;
    }

    .summary-mini-card {
        padding: 0.55rem 0.7rem;
    }

    .summary-mini-card strong {
        font-size: 1.1rem;
    }

    .summary-caption {
        font-size: 0.68rem;
    }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 12px 0.6rem 0;
    }

    .header-layout {
        flex-wrap: wrap;
        height: auto;
        min-height: 56px;
        padding: 10px 16px;
        border-radius: 22px;
        max-width: 100%;
        row-gap: 6px;
    }

    .logo {
        order: 1;
        flex: 0 0 auto;
    }

    .workshop-label {
        order: 2;
        flex: 1;
        justify-content: flex-end;
        font-size: 0.74rem;
        padding: 0.22rem 0.5rem;
        margin-left: 8px;
        max-width: none;
    }

    .header-right {
        order: 3;
        width: 100%;
        gap: 0.3rem;
        padding-top: 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
        justify-content: center;
    }

    .header-context {
        gap: 0.3rem;
    }

    .industry-dropdown-trigger,
    .workshop-dropdown-trigger,
    .actions-dropdown-trigger {
        padding: 0.28rem 0.55rem;
        font-size: 0.72rem;
        gap: 0.25rem;
        border-radius: 14px;
    }

    .industry-dropdown-trigger svg,
    .workshop-dropdown-trigger svg,
    .actions-dropdown-trigger svg {
        width: 10px;
        height: 10px;
    }

    .header-divider {
        display: none;
    }

    .logo .tf-wordmark {
        display: none;
    }

    .logo .tf-isotype-mobile {
        display: block;
        width: 42px;
        height: 42px;
    }

    .workshop-caption {
        display: none;
    }

    .workshop-switch label {
        display: none;
    }

    .workshop-switch select {
        min-width: 0;
        max-width: 130px;
        font-size: 0.76rem;
        padding: 0.32rem 1.8rem 0.32rem 0.65rem;
        height: auto;
    }

    .btn-logout-nav .btn-logout-text {
        display: none;
    }

    .btn-logout-nav {
        padding: 0.4rem 0.5rem;
        border-radius: 50%;
    }

    /* Dropdown responsive */
    .actions-dropdown-trigger {
        padding: 0.35rem 0.65rem;
    }
    
    .actions-dropdown-menu {
        left: auto;
        right: 0;
        min-width: 190px;
    }
    
    .export-modal {
        max-width: calc(100vw - 2rem) !important;
    }

    .container {
        padding: 0 0.75rem;
    }

    .card {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 14px;
    }

    input, select, textarea {
        height: 44px;
        font-size: 16px !important;
        border-radius: 10px;
    }

    textarea {
        height: auto;
        min-height: 80px;
    }

    .action-buttons .btn-manage-workshops,
    .action-buttons .btn-manage-users,
    .action-buttons .btn-performance,
    .action-buttons .btn-export-report {
        width: 100%;
        min-width: 0;
        height: 48px;
        min-height: 48px;
        border-radius: 12px;
        background: #102743;
        border-color: rgba(184, 189, 198, 0.35);
        color: #F2F4F7;
        gap: 0.35rem;
        font-size: 0.95rem;
    }

    .lance-powered-logo {
        height: 15px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .card h2 {
        font-size: 1.25rem;
    }
    
    .status-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 0.9rem;
    }

    .btn-status {
        min-height: 60px;
        font-size: 1rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Ocultar columnas secundarias para evitar descuadre */
    .table th:nth-child(3),
    .table td:nth-child(3),
    .table th:nth-child(5),
    .table td:nth-child(5),
    .table th:nth-child(6),
    .table td:nth-child(6),
    .table th:nth-child(7),
    .table td:nth-child(7) {
        display: none;
    }

    .waiting-piece-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 0.6rem 0;
    }

    .register-header {
        flex-direction: column;
        align-items: stretch;
    }

    .register-toggle-btn {
        width: 100% !important;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .tf-isotype {
        width: 42px;
        height: 42px;
    }

    .logo {
        margin-bottom: 0;
    }

    .header {
        padding-top: 0.35rem;
        padding-bottom: 0.45rem;
    }

    .header-topbar {
        height: 52px;
    }

    .action-buttons {
        gap: 0.4rem;
    }

    .action-buttons .btn-manage-workshops,
    .action-buttons .btn-manage-users,
    .action-buttons .btn-performance,
    .action-buttons .btn-export-report {
        height: 46px;
        min-height: 46px;
    }

    .action-label {
        font-size: 0.7rem;
    }

    .lance-powered-logo {
        height: 13px;
    }
    
    .btn-status {
        width: 100%;
        min-height: 56px;
        padding: 0.95rem;
        font-size: 0.98rem;
    }

    .status-buttons {
        grid-template-columns: 1fr;
    }

    .table th,
    .table td {
        padding: 0.6rem 0.45rem;
        font-size: 0.84rem;
    }

    .btn-action {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .btn-track-link {
        min-width: 74px;
        height: 38px;
    }

    .workshop-switch {
        margin-top: 0.2rem;
        gap: 0.4rem;
        justify-content: center;
    }

    .workshop-switch label {
        display: none;
    }

    .workshop-switch select {
        width: auto;
        max-width: min(86vw, 250px);
        min-width: 0;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(17, 24, 39, 0.15);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ====== MODAL OVERLAY ====== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tf-modal {
    background: var(--gray-dark-ui);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease-out;
    border: 1px solid var(--border-color);
}

#confirmStatusModal .tf-modal {
    max-width: 760px;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body .form-group {
    margin-bottom: 1rem;
}

#confirmStatusDynamicContent {
    margin-top: 0.9rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #CBD5E1;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
    background: rgba(102,126,234,0.12);
    border-color: rgba(102,126,234,0.3);
    color: #a5b4fc;
}

/* ====== ACTION BUTTONS IN TABLE ====== */

.actions-cell {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
}

.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: rgba(226,232,240,0.8);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.btn-action:hover {
    background: rgba(102,126,234,0.15);
    border-color: rgba(102,126,234,0.35);
    color: #a5b4fc;
}

.btn-edit:hover {
    color: var(--primary-color);
}

.btn-track:hover {
    color: var(--success-color);
}

.btn-deactivate:hover {
    color: var(--danger-color);
}

.btn-track-link {
    width: auto;
    min-width: 68px;
    padding: 0 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive: ocultar columna acciones en pantallas muy pequeñas */
@media (max-width: 480px) {
    .actions-cell {
        flex-direction: row;
        gap: 0.35rem;
    }
}

/* ====== GESTIÓN DE TALLERES ====== */

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #CBD5E1;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-small:hover {
    background: rgba(102,126,234,0.12);
    border-color: rgba(102,126,234,0.3);
    color: #a5b4fc;
}

.btn-manage-workshops {
    margin-left: 0;
}

.btn-manage-users {
    margin-left: 0;
}

.tf-modal-wide {
    max-width: 960px;
}

.tf-modal-users {
    max-width: 980px;
}

.tf-modal-users .modal-body {
    padding: 1.5rem 1.75rem;
}

/* ====== MODAL DE EXPORTACIÓN ====== */

.export-modal-overlay .export-modal {
    max-width: 520px;
    background: #0F1928;
    border: 1px solid rgba(255,255,255,0.08);
}

.export-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #FFFFFF;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
}

.export-modal .modal-header h3 {
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 600;
}

.export-modal .modal-close {
    color: rgba(255, 255, 255, 0.9);
}

.export-modal .modal-close:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
}

.export-modal-description {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.export-month-input {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.05);
    color: #F1F5F9;
}

.export-month-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}

.export-info-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.export-info-icon {
    color: #667eea;
    flex-shrink: 0;
    margin-top: 2px;
}

.export-info-text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #94A3B8;
}

.export-info-text strong {
    color: #F1F5F9;
    display: block;
    margin-bottom: 0.25rem;
}

.export-info-detail {
    color: #64748b;
    font-size: 0.8rem;
}

.export-modal .modal-actions {
    background: #F9FAFB;
    border-radius: 0 0 16px 16px;
}

.export-modal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #FFFFFF;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.2s ease;
}

.export-modal .btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.export-modal .btn-primary:active {
    transform: translateY(0);
}

.export-modal .btn-primary .btn-icon {
    font-size: 1.1rem;
}

.workshop-add-form {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.workshop-add-form h4,
.workshop-list-section h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-color, #1e293b);
}

.form-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-row .btn {
    white-space: nowrap;
    height: 42px;
}

.workshop-list-manage {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.workshop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
}

.workshop-item-info {
    display: flex;
    flex-direction: column;
}

.workshop-item-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.workshop-item-slug {
    font-size: 0.8rem;
    color: var(--gray-medium);
    font-family: monospace;
}

.workshop-item-phone {
    font-size: 0.8rem;
    color: #7db4ff;
    font-weight: 500;
}

.workshop-no-phone {
    color: var(--gray-medium);
    font-style: italic;
}

.btn-edit-phone {
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(46, 109, 246, 0.3);
    border-radius: var(--border-radius-sm, 6px);
    background: rgba(46, 109, 246, 0.1);
    color: #7db4ff;
    cursor: pointer;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.18s;
    white-space: nowrap;
}

.btn-edit-phone:hover {
    background: rgba(46, 109, 246, 0.2);
    border-color: #2E6DF6;
}

.btn-delete-workshop {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    background: rgba(197, 42, 42, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(197, 42, 42, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-delete-workshop:hover {
    background: rgba(197, 42, 42, 0.25);
}

.users-form-row {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(120px, 0.6fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.users-form-row #addMechanicBtn {
    min-width: 110px;
}

.user-role-chip {
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(46, 109, 246, 0.3);
    background: rgba(46, 109, 246, 0.1);
    color: #7db4ff;
    font-size: 0.78rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }
    .form-row .btn {
        width: 100%;
    }

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

.waiting-piece-panel {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,0.04);
}

.modern-panel {
    background: rgba(15,25,40,0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.panel-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.panel-header-row h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.btn-outline-details {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #2E6DF6;
    border-radius: 6px;
    background: transparent;
    color: #2E6DF6;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-outline-details:hover {
    background: #2E6DF6;
    color: var(--white-tech);
}

.btn-remove-x {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(197, 42, 42, 0.2);
    color: #ff6b6b;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.btn-remove-x:hover {
    background: rgba(197, 42, 42, 0.35);
    color: #ff8a8a;
}

.waiting-piece-panel h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--primary-color);
}

.waiting-piece-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.waiting-piece-panel input {
    width: 100%;
}

.waiting-buttons-group {
    margin-bottom: 0.25rem;
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.option-chip {
    appearance: none;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.option-chip:hover {
    border-color: rgba(102,126,234,0.4);
    background: rgba(102,126,234,0.1);
}

.option-chip.selected {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.option-empty {
    color: #7A828E;
    font-size: 0.9rem;
}

.waiting-piece-extra-actions {
    margin: 0.25rem 0 0.75rem;
}

.waiting-piece-panel .btn-primary,
.waiting-piece-panel .btn-secondary,
.waiting-piece-panel .btn-outline-details {
    border-radius: 10px;
}

.extra-repair-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.extra-repair-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,0.04);
    padding: 0.5rem 0.65rem;
}

.extra-repair-text {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
}

.pdf-info-text {
    margin-top: 0.65rem;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
    white-space: pre-line;
}

.uploaded-pdf-section {
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.8rem;
}

.uploaded-pdf-section h4 {
    margin: 0 0 0.55rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.uploaded-pdf-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.uploaded-pdf-empty {
    border: 1px dashed rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.uploaded-pdf-item {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.uploaded-pdf-meta {
    min-width: 0;
}

.uploaded-pdf-name {
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uploaded-pdf-date {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.uploaded-pdf-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.uploaded-pdf-actions .btn {
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
}

/* ====== FILTROS ROW ====== */
.filters-row {
    display: grid;
    grid-template-columns: minmax(280px, 1.35fr) minmax(180px, 1fr) minmax(180px, 1fr);
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.filters-row .filter-item {
    min-width: 0;
}

.filters-row select,
.filters-row input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.05);
    color: #F1F5F9;
    outline: none;
    transition: border-color 0.2s;
}

.filters-row select:focus,
.filters-row input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102,126,234,0.18);
}

@media (max-width: 980px) {
    .filters-row {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }
}

/* ====== BOTÓN PERFORMANCE ====== */
.btn-performance {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    border-radius: 10px;
    transition: background 0.18s;
}

.btn-performance:hover {
    background: rgba(102,126,234,0.18);
    border-color: rgba(102,126,234,0.4);
}

/* ====== WORKSHOP ITEM ACTIONS (modal talleres) ====== */
.workshop-item-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-toggle-enabled {
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,0.05);
    color: #CBD5E1;
    cursor: pointer;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.18s;
    white-space: nowrap;
}

.btn-toggle-enabled:hover {
    background: rgba(102,126,234,0.15);
    border-color: rgba(102,126,234,0.3);
    color: #a5b4fc;
}

.workshop-disabled {
    opacity: 0.6;
}

.workshop-status-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    vertical-align: middle;
    margin-left: 0.35rem;
}

.workshop-status-badge.enabled {
    background: rgba(46, 109, 246, 0.15);
    color: #7db4ff;
}

.workshop-status-badge.disabled {
    background: rgba(197, 42, 42, 0.15);
    color: #ff6b6b;
}

/* ====== INDUSTRY BADGES ====== */
.workshop-industry-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.workshop-industry-badge.industry-automotive {
    background: rgba(59, 130, 246, 0.15);
    color: #7db4ff;
}

.workshop-industry-badge.industry-tailoring {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
}

.workshop-dropdown-industry,
.workshop-sheet-industry {
    margin-left: auto;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ====== TAILORING STATUS CLASSES ====== */
.status-tomando-medidas {
    background-color: #3498DB;
    color: #F2F4F7;
    border-color: #2a7caf;
}

.status-cortando {
    background-color: #F1C40F;
    color: #0F1C2E;
    border-color: #b6900b;
}

.status-confeccion {
    background-color: #E67E22;
    color: #F2F4F7;
    border-color: #b8641b;
}

.status-esperando-materiales {
    background-color: #8E44AD;
    color: #F2F4F7;
    border-color: #71368b;
}

.status-prueba {
    background-color: #D35400;
    color: #F2F4F7;
    border-color: #aa4300;
}

/* Modern UI overrides for tailoring statuses */
body.tf-modern-ui #panelScreen .status-tomando-medidas {
    background-color: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1d4ed8;
}

body.tf-modern-ui #panelScreen .status-cortando {
    background-color: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.32);
    color: #a16207;
}

body.tf-modern-ui #panelScreen .status-confeccion {
    background-color: rgba(217, 119, 6, 0.14);
    border-color: rgba(217, 119, 6, 0.3);
    color: #b45309;
}

body.tf-modern-ui #panelScreen .status-esperando-materiales {
    background-color: rgba(147, 51, 234, 0.13);
    border-color: rgba(147, 51, 234, 0.3);
    color: #7e22ce;
}

body.tf-modern-ui #panelScreen .status-prueba {
    background-color: rgba(234, 88, 12, 0.14);
    border-color: rgba(234, 88, 12, 0.3);
    color: #c2410c;
}

.status-corte-patronaje {
    background-color: #3498DB;
    color: #F2F4F7;
    border-color: #2a7caf;
}

.status-ensamblaje-acabados {
    background-color: #D35400;
    color: #F2F4F7;
    border-color: #aa4300;
}

body.tf-modern-ui #panelScreen .status-corte-patronaje {
    background-color: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1d4ed8;
}

body.tf-modern-ui #panelScreen .status-ensamblaje-acabados {
    background-color: rgba(234, 88, 12, 0.14);
    border-color: rgba(234, 88, 12, 0.3);
    color: #c2410c;
}

/* ====== USER ACTIONS ROW (modal usuarios) ====== */
.user-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,0.04);
}

.user-actions-row .user-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.user-actions-row .user-name-line {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.user-actions-row .user-role-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.08rem 0.4rem;
    border-radius: 9999px;
    margin-left: 0.35rem;
}

.user-actions-row .user-role-badge.employee {
    background: rgba(46, 109, 246, 0.15);
    color: #7db4ff;
}

.user-actions-row .user-role-badge.owner {
    background: rgba(46, 109, 246, 0.25);
    color: #a0c4ff;
}

.user-actions-row .user-username-line {
    font-size: 0.78rem;
    color: var(--gray-light);
}

.btn-delete-user {
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(197, 42, 42, 0.3);
    border-radius: var(--border-radius-sm);
    background: rgba(197, 42, 42, 0.15);
    color: #ff6b6b;
    cursor: pointer;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.18s;
    white-space: nowrap;
}

.btn-delete-user:hover {
    background: rgba(197, 42, 42, 0.25);
    border-color: rgba(197, 42, 42, 0.5);
}

/* ====== ROLE SELECT GROUP (modal usuarios) ====== */
#roleSelectGroup {
    margin-bottom: 0.75rem;
    min-width: 120px;
}

#roleSelectGroup label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gray-light);
    margin-bottom: 0.25rem;
    display: block;
}

#roleSelectGroup select {
    width: 100%;
    min-width: 120px;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.05);
    color: #F1F5F9;
}

/* ====== PERFORMANCE MODAL ====== */
#performanceContent {
    max-height: 62vh;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.perf-mechanic-card {
    background: var(--gray-dark-ui);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.perf-mechanic-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.perf-mechanic-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.perf-mechanic-username {
    font-size: 0.8rem;
    color: var(--gray-light);
}

.perf-role-chip {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 700;
    color: #a5b4fc;
    background: rgba(102,126,234,0.15);
    border: 1px solid rgba(102,126,234,0.3);
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
}

.perf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
}

.perf-filter-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.perf-search-wrap {
    min-width: 200px;
}

.perf-filter-label {
    font-size: 0.78rem;
    color: #94A3B8;
    font-weight: 600;
}

.perf-filter-select {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #F1F5F9;
    padding: 0.36rem 0.55rem;
    font-size: 0.82rem;
}

.perf-search-input {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #F1F5F9;
    padding: 0.36rem 0.55rem;
    font-size: 0.82rem;
    min-width: 200px;
}

.perf-search-input:focus,
.perf-filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102,126,234,0.18);
}

.perf-stats-grid {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.perf-summary-row {
    display: flex;
    gap: 0.65rem;
    align-items: stretch;
}

.perf-stat-box {
    flex: 0 0 150px;
    text-align: center;
    padding: 0.6rem 0.5rem;
    border-radius: var(--border-radius-sm);
}

.perf-stat-box.perf-active {
    background: rgba(46, 109, 246, 0.15);
    border: 1px solid rgba(46, 109, 246, 0.3);
}

.perf-stat-box.perf-done {
    background: rgba(46, 109, 246, 0.08);
    border: 1px solid rgba(46, 109, 246, 0.2);
}

.perf-status-inline-list {
    flex: 1;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--border-radius-sm);
    padding: 0.4rem;
    background: rgba(255,255,255,0.04);
}

.perf-status-empty {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.35rem 0.4rem;
}

.perf-stat-number {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.perf-stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--gray-light);
    font-weight: 500;
    margin-top: 0.15rem;
}

.perf-status-detail {
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

.perf-status-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0.45rem;
    font-size: 0.82rem;
    border-radius: 6px;
    margin-bottom: 0.18rem;
}

.perf-status-label {
    color: var(--gray-light);
}

.perf-status-count {
    font-weight: 600;
    color: var(--text-primary);
}

.perf-status-en_revision {
    background: rgba(52,152,219,0.15);
    color: #7ecfff;
}

.perf-status-esperando_revision {
    background: rgba(52,152,219,0.08);
    color: #7ecfff;
}

.perf-status-presupuesto_pendiente {
    background: rgba(211,84,0,0.15);
    color: #fca97e;
}

.perf-status-esperando_pieza {
    background: rgba(142,68,173,0.15);
    color: #c4a0f5;
}

.perf-status-montando_pieza {
    background: rgba(241,196,15,0.15);
    color: #f5d76e;
}

.perf-status-listo {
    background: rgba(39,174,96,0.15);
    color: #6ee7a0;
}

@media (max-width: 768px) {
    .perf-filter-wrap {
        width: 100%;
        align-items: stretch;
    }

    .perf-filter-select,
    .perf-search-input,
    .perf-search-wrap {
        width: 100%;
        min-width: 0;
    }

    .perf-summary-row {
        flex-direction: column;
    }

    .perf-stat-box {
        flex: 1;
    }
}

/* ====== GLOBAL DARK OVERRIDES ====== */
/* Native select / input — ensure dark bg on all browsers */
.tf-modern-ui select,
.tf-modern-ui input[type="text"],
.tf-modern-ui input[type="password"],
.tf-modern-ui input[type="email"],
.tf-modern-ui input[type="number"],
.tf-modern-ui input[type="month"],
.tf-modern-ui input[type="date"],
.tf-modern-ui input[type="search"],
.tf-modern-ui textarea {
    background: rgba(255,255,255,0.05);
    color: #F1F5F9;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
}

.tf-modern-ui select option {
    background: #0F1928;
    color: #F1F5F9;
}

.tf-modern-ui ::placeholder {
    color: rgba(148,163,184,0.55);
}

/* Bootstrap card/modal overrides */
.tf-modern-ui .card,
.tf-modern-ui .modal-content {
    background: rgba(15,25,40,0.9);
    border-color: rgba(255,255,255,0.08);
    color: #E2E8F0;
}

/* Scrollbar — dark */
.tf-modern-ui ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.tf-modern-ui ::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
}
.tf-modern-ui ::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
}
.tf-modern-ui ::-webkit-scrollbar-thumb:hover {
    background: rgba(102,126,234,0.4);
}

/* ====== PANEL OVERRIDES: LIGHT BACKGROUND + DARK GLASS ====== */
body.tf-modern-ui {
    background: #e9eef5;
    color: #15243a;
    min-height: 100vh;
    min-height: 100dvh;
}

body.tf-modern-ui #panelScreen {
    --panel-ink-900: #122238;
    --panel-ink-700: #2a3e59;
    --panel-ink-500: #5a6d86;
    --panel-border: rgba(12, 24, 40, 0.1);
    --panel-shadow: 0 12px 34px rgba(12, 24, 40, 0.08), 0 2px 8px rgba(12, 24, 40, 0.06);
    min-height: 100vh;
    background:
        radial-gradient(1200px 520px at 12% -8%, rgba(72, 102, 190, 0.15), transparent 58%),
        radial-gradient(980px 460px at 88% -14%, rgba(96, 165, 250, 0.12), transparent 62%),
        linear-gradient(180deg, #eef2f8 0%, #e7ecf4 45%, #edf1f7 100%);
    color: var(--panel-ink-900);
}

body.tf-modern-ui #panelScreen .main {
    padding-top: 2rem;
}

body.tf-modern-ui #panelScreen .card {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px) saturate(155%);
    -webkit-backdrop-filter: blur(12px) saturate(155%);
    box-shadow: var(--panel-shadow);
    color: var(--panel-ink-900);
}

body.tf-modern-ui #panelScreen .card:hover {
    border-color: rgba(43, 90, 189, 0.26);
    box-shadow: 0 16px 34px rgba(12, 24, 40, 0.11), 0 4px 10px rgba(12, 24, 40, 0.08);
}

body.tf-modern-ui #panelScreen .card h2 {
    color: var(--panel-ink-900);
    border-bottom-color: rgba(59, 130, 246, 0.45);
}

body.tf-modern-ui #panelScreen .summary-card,
body.tf-modern-ui #panelScreen .summary-primary,
body.tf-modern-ui #panelScreen .summary-mini-card,
body.tf-modern-ui #panelScreen .dashboard-kpi-item,
body.tf-modern-ui #panelScreen .selected-info,
body.tf-modern-ui #panelScreen .waiting-piece-panel,
body.tf-modern-ui #panelScreen .modern-panel,
body.tf-modern-ui #panelScreen .extra-repair-item,
body.tf-modern-ui #panelScreen .uploaded-pdf-item,
body.tf-modern-ui #panelScreen .uploaded-pdf-empty,
body.tf-modern-ui #panelScreen .user-actions-row,
body.tf-modern-ui #panelScreen .workshop-item,
body.tf-modern-ui #panelScreen .perf-status-inline-list {
    background: rgba(255, 255, 255, 0.66);
    border-color: rgba(12, 24, 40, 0.12);
    color: var(--panel-ink-900);
}

body.tf-modern-ui #panelScreen .summary-caption,
body.tf-modern-ui #panelScreen .help-text,
body.tf-modern-ui #panelScreen .legal-note,
body.tf-modern-ui #panelScreen .no-data,
body.tf-modern-ui #panelScreen .pdf-info-text,
body.tf-modern-ui #panelScreen .workshop-item-slug,
body.tf-modern-ui #panelScreen .uploaded-pdf-date,
body.tf-modern-ui #panelScreen .perf-filter-label,
body.tf-modern-ui #panelScreen .perf-stat-label,
body.tf-modern-ui #panelScreen .perf-status-label {
    color: var(--panel-ink-500);
}

body.tf-modern-ui #panelScreen .summary-main-number,
body.tf-modern-ui #panelScreen .summary-mini-card strong,
body.tf-modern-ui #panelScreen .dashboard-kpi-item strong,
body.tf-modern-ui #panelScreen #selectedVehicleText,
body.tf-modern-ui #panelScreen .panel-header-row h3,
body.tf-modern-ui #panelScreen .uploaded-pdf-name,
body.tf-modern-ui #panelScreen .perf-stat-number,
body.tf-modern-ui #panelScreen .perf-status-count {
    color: var(--panel-ink-900);
}

body.tf-modern-ui #panelScreen .register-toggle-btn {
    background: rgba(18, 34, 56, 0.04) !important;
    color: var(--panel-ink-900) !important;
    border-bottom: 1px solid rgba(12, 24, 40, 0.12) !important;
}

body.tf-modern-ui #panelScreen .register-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(59, 130, 246, 0.24) !important;
}

body.tf-modern-ui #panelScreen .summary-toggle-btn {
    border-color: rgba(12, 24, 40, 0.15);
    background: rgba(18, 34, 56, 0.04);
    color: var(--panel-ink-700);
}

body.tf-modern-ui #panelScreen .summary-toggle-btn:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.28);
    color: #2563eb;
}

body.tf-modern-ui #panelScreen input[type="text"],
body.tf-modern-ui #panelScreen input[type="password"],
body.tf-modern-ui #panelScreen input[type="email"],
body.tf-modern-ui #panelScreen input[type="number"],
body.tf-modern-ui #panelScreen input[type="month"],
body.tf-modern-ui #panelScreen input[type="date"],
body.tf-modern-ui #panelScreen input[type="search"],
body.tf-modern-ui #panelScreen input[type="tel"],
body.tf-modern-ui #panelScreen select,
body.tf-modern-ui #panelScreen textarea,
body.tf-modern-ui #panelScreen .form-control,
body.tf-modern-ui #panelScreen .eta-dropdown-trigger {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(12, 24, 40, 0.16);
    color: var(--panel-ink-900);
}

body.tf-modern-ui #panelScreen input::placeholder,
body.tf-modern-ui #panelScreen textarea::placeholder {
    color: rgba(90, 109, 134, 0.8);
}

/* ====== TALLERFLOW MOBILE COMPACT — SaaS style ====== */
@media (max-width: 768px) {
    /* Contenedor compacto centrado */
    body.tf-modern-ui #panelScreen .container {
        max-width: 640px;
        margin: 0 auto;
        padding: 0 12px;
    }

    body.tf-modern-ui #panelScreen .main {
        padding: 10px 0 1.2rem;
    }

    /* Cards compactas */
    body.tf-modern-ui #panelScreen .card {
        padding: 14px 16px;
        margin-bottom: 12px;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    }

    /* Títulos compactos */
    body.tf-modern-ui #panelScreen .card h2 {
        font-size: 1rem;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    /* Labels compactos */
    body.tf-modern-ui #panelScreen .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    /* Inputs compactos */
    body.tf-modern-ui #panelScreen input,
    body.tf-modern-ui #panelScreen select,
    body.tf-modern-ui #panelScreen textarea,
    body.tf-modern-ui #panelScreen .form-control {
        padding: 10px 12px;
        border-radius: 10px;
        font-size: 14px !important;
        height: auto;
    }

    /* Filtros: 2 columnas, búsqueda ocupa todo */
    body.tf-modern-ui #panelScreen .filters-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    body.tf-modern-ui #panelScreen .filters-row .search-group {
        grid-column: span 2;
        margin-bottom: 0;
    }

    body.tf-modern-ui #panelScreen .filters-row .filter-item {
        margin-bottom: 0;
    }

    /* Resumen actividad compacto */
    body.tf-modern-ui #panelScreen .summary-card {
        padding: 10px 12px;
    }

    body.tf-modern-ui #panelScreen .summary-header h2 {
        font-size: 0.95rem;
    }

    body.tf-modern-ui #panelScreen .summary-primary {
        padding: 6px 8px;
    }

    body.tf-modern-ui #panelScreen .summary-main-number {
        font-size: 1.4rem;
    }

    body.tf-modern-ui #panelScreen .summary-mini-card {
        padding: 6px 8px;
    }

    body.tf-modern-ui #panelScreen .summary-mini-card strong {
        font-size: 0.95rem;
    }

    body.tf-modern-ui #panelScreen .summary-caption {
        font-size: 0.62rem;
    }

    /* Botones compactos */
    body.tf-modern-ui #panelScreen .btn {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 10px;
    }

    body.tf-modern-ui #panelScreen .btn-large {
        padding: 12px 20px;
        font-size: 15px;
    }

    /* Status buttons grid compacto */
    body.tf-modern-ui #panelScreen .status-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    body.tf-modern-ui #panelScreen .btn-status {
        min-height: 50px;
        font-size: 0.9rem;
        padding: 10px;
        border-radius: 10px;
    }

    /* Form spacing */
    body.tf-modern-ui #panelScreen .form {
        gap: 12px;
    }

    body.tf-modern-ui #panelScreen .form-group {
        margin-bottom: 0;
    }

    /* Tabla compacta */
    body.tf-modern-ui #panelScreen .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.tf-modern-ui #panelScreen .table th,
    body.tf-modern-ui #panelScreen .table td {
        padding: 7px 5px;
        font-size: 12px;
        white-space: nowrap;
    }

    body.tf-modern-ui #panelScreen .table .status-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* Register panel */
    body.tf-modern-ui #panelScreen .register-card {
        padding: 12px 14px;
    }

    body.tf-modern-ui #panelScreen .register-header h2 {
        font-size: 0.95rem;
    }

    body.tf-modern-ui #panelScreen .register-form-panel {
        padding: 10px 0 0;
    }

    /* Selected vehicle info */
    body.tf-modern-ui #panelScreen .selected-info {
        padding: 8px 10px;
        border-radius: 10px;
        margin-bottom: 8px;
    }

    /* Filtros más compactos */
    body.tf-modern-ui #panelScreen .filters-row label {
        font-size: 12px;
        margin-bottom: 3px;
    }

    /* Toggle buttons compactos */
    body.tf-modern-ui #panelScreen .summary-toggle-btn,
    body.tf-modern-ui #panelScreen .register-toggle-btn {
        width: 30px;
        height: 30px;
        border-radius: 9px;
    }

    /* Vehículos card header */
    body.tf-modern-ui #panelScreen .card > h2 {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    /* Status section compacto */
    body.tf-modern-ui #panelScreen #statusManagementSection {
        padding: 12px 14px;
    }

    body.tf-modern-ui #panelScreen #statusManagementSection h2 {
        font-size: 0.95rem;
        margin-bottom: 6px;
        padding-bottom: 6px;
    }

    /* Ocultar help-text duplicado — la selected-info ya muestra la placa */
    body.tf-modern-ui #panelScreen #statusSectionInstruction {
        display: none;
    }

    body.tf-modern-ui #panelScreen .selected-info {
        padding: 8px 10px;
        margin-top: 0;
        margin-bottom: 8px;
        border-radius: 8px;
    }

    body.tf-modern-ui #panelScreen .selected-info p {
        font-size: 13px;
        margin: 0;
    }

    body.tf-modern-ui #panelScreen .status-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 10px;
    }

    body.tf-modern-ui #panelScreen .btn-status {
        min-height: 48px;
        font-size: 0.85rem;
        font-weight: 600;
        padding: 8px;
        border-radius: 10px;
    }

    /* Repair history panel compacto */
    body.tf-modern-ui #panelScreen .waiting-piece-panel {
        padding: 10px 12px;
        margin-top: 8px;
    }

    body.tf-modern-ui #panelScreen .waiting-piece-panel h3 {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

    body.tf-modern-ui #panelScreen .pdf-info-text {
        font-size: 0.8rem;
        margin-top: 4px;
    }
}

body.tf-modern-ui #panelScreen select option {
    background: #ffffff;
    color: #122238;
}

body.tf-modern-ui #panelScreen input:focus,
body.tf-modern-ui #panelScreen select:focus,
body.tf-modern-ui #panelScreen textarea:focus,
body.tf-modern-ui #panelScreen .form-control:focus,
body.tf-modern-ui #panelScreen .eta-dropdown-trigger.open {
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    background: #ffffff;
}

body.tf-modern-ui #panelScreen .table-container {
    border: 1px solid rgba(12, 24, 40, 0.12);
    background: rgba(255, 255, 255, 0.62);
}

body.tf-modern-ui #panelScreen .table th,
body.tf-modern-ui #panelScreen .table td,
body.tf-modern-ui #panelScreen .table > :not(caption) > * > * {
    color: var(--panel-ink-900);
    border-bottom-color: rgba(12, 24, 40, 0.1);
    background-color: transparent;
}

body.tf-modern-ui #panelScreen .table th {
    background-color: rgba(12, 24, 40, 0.06);
    color: var(--panel-ink-700);
}

body.tf-modern-ui #panelScreen .table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.08);
}

body.tf-modern-ui #panelScreen .table tbody tr.selected {
    background-color: rgba(59, 130, 246, 0.14);
    outline-color: rgba(59, 130, 246, 0.45);
}

body.tf-modern-ui #panelScreen .btn-primary {
    background: linear-gradient(145deg, #13233a 0%, #1c3356 100%);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(18, 34, 56, 0.24);
}

body.tf-modern-ui #panelScreen .btn-primary:hover:not(:disabled) {
    background: linear-gradient(145deg, #1a2f4d 0%, #274372 100%);
    box-shadow: 0 10px 24px rgba(18, 34, 56, 0.28);
}

body.tf-modern-ui #panelScreen .btn-secondary,
body.tf-modern-ui #panelScreen .btn-small,
body.tf-modern-ui #panelScreen .btn-action {
    background: rgba(18, 34, 56, 0.06);
    border-color: rgba(12, 24, 40, 0.16);
    color: var(--panel-ink-700);
}

body.tf-modern-ui #panelScreen .btn-secondary:hover,
body.tf-modern-ui #panelScreen .btn-small:hover,
body.tf-modern-ui #panelScreen .btn-action:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.32);
    color: #1d4ed8;
}

body.tf-modern-ui #panelScreen .btn-track-link {
    color: #122238;
    font-weight: 700;
}

body.tf-modern-ui #panelScreen .btn-status {
    color: #f8fafc;
    border-width: 1.5px;
    border-color: rgba(18, 34, 56, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 16px rgba(18, 34, 56, 0.22);
}

body.tf-modern-ui #panelScreen .btn-status:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 20px rgba(18, 34, 56, 0.28);
}

body.tf-modern-ui #panelScreen .btn-status.btn-awaiting-review { background: #3498DB; border-color: rgba(18,34,56,0.3); }
body.tf-modern-ui #panelScreen .btn-status.btn-revision        { background: #F1C40F; border-color: rgba(18,34,56,0.3); color: #122238; }
body.tf-modern-ui #panelScreen .btn-status.btn-budget          { background: #E67E22; border-color: rgba(18,34,56,0.3); }
body.tf-modern-ui #panelScreen .btn-status.btn-waiting         { background: #8E44AD; border-color: rgba(18,34,56,0.3); }
body.tf-modern-ui #panelScreen .btn-status.btn-mounting        { background: #D35400; border-color: rgba(18,34,56,0.3); }
body.tf-modern-ui #panelScreen .btn-status.btn-ready           { background: #27AE60; border-color: rgba(18,34,56,0.3); }

body.tf-modern-ui #panelScreen .status-badge {
    font-weight: 600;
    font-size: 0.8rem;
}

body.tf-modern-ui #panelScreen .status-esperando-revision {
    background-color: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1d4ed8;
}

body.tf-modern-ui #panelScreen .status-en-revision {
    background-color: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.32);
    color: #a16207;
}

body.tf-modern-ui #panelScreen .status-montando-pieza {
    background-color: rgba(234, 88, 12, 0.14);
    border-color: rgba(234, 88, 12, 0.3);
    color: #c2410c;
}

body.tf-modern-ui #panelScreen .status-esperando-pieza {
    background-color: rgba(147, 51, 234, 0.13);
    border-color: rgba(147, 51, 234, 0.3);
    color: #7e22ce;
}

body.tf-modern-ui #panelScreen .status-presupuesto-pendiente {
    background-color: rgba(217, 119, 6, 0.14);
    border-color: rgba(217, 119, 6, 0.3);
    color: #b45309;
}

body.tf-modern-ui #panelScreen .status-listo {
    background-color: rgba(22, 163, 74, 0.14);
    border-color: rgba(22, 163, 74, 0.28);
    color: #15803d;
}

body.tf-modern-ui #panelScreen .waiting-piece-panel h3,
body.tf-modern-ui #panelScreen .repairHistoryPanel h3 {
    color: #1d4ed8;
}

body.tf-modern-ui #panelScreen .footer {
    background: transparent;
    color: var(--panel-ink-500);
    border-top: 1px solid rgba(12, 24, 40, 0.1);
}

body.tf-modern-ui #panelScreen .footer a {
    color: #1d4ed8;
}

body.tf-modern-ui #panelScreen .footer a:hover {
    color: #1e3a8a;
}

body.tf-modern-ui .export-modal-description {
    color: #c3d1e6;
}

body.tf-modern-ui .export-info-detail {
    color: #94a9c7;
}

body.tf-modern-ui .export-modal .modal-actions {
    background: rgba(15, 25, 40, 0.72);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Better collapse toggles: summary + register */
body.tf-modern-ui #panelScreen .summary-header,
body.tf-modern-ui #panelScreen .register-header {
    min-height: 44px;
}

body.tf-modern-ui #panelScreen .summary-toggle-btn,
body.tf-modern-ui #panelScreen .register-toggle-btn {
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.tf-modern-ui #panelScreen .summary-toggle-btn:focus-visible,
body.tf-modern-ui #panelScreen .register-toggle-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

body.tf-modern-ui #panelScreen .summary-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

body.tf-modern-ui #panelScreen .summary-toggle-chevron {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1rem;
    line-height: 1;
    transition: transform 0.24s ease, background-color 0.2s ease, color 0.2s ease;
}

body.tf-modern-ui #panelScreen .summary-card.open .summary-toggle-chevron {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

body.tf-modern-ui #panelScreen .register-header h2 {
    color: var(--panel-ink-900);
}

body.tf-modern-ui #panelScreen .register-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 11px;
}

body.tf-modern-ui #panelScreen .register-toggle-chevron {
    width: 100%;
    height: 100%;
}

body.tf-modern-ui #panelScreen .register-toggle-btn.open .register-toggle-chevron {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.36);
    color: #1d4ed8;
}

body.tf-modern-ui #panelScreen .register-toggle-btn:not(.open) .register-toggle-chevron {
    transform: rotate(-90deg);
}

/* Desktop table body scroll: header stays fixed above the scroll area */
@media (min-width: 992px) {
    body.tf-modern-ui #panelScreen .vehicles-table-wrap {
        --vehicles-table-body-max-height: 300px;
        overflow: hidden;
        max-height: none;
    }

    body.tf-modern-ui #panelScreen #vehiclesTable {
        width: 100%;
        table-layout: fixed;
        margin-bottom: 0;
    }

    body.tf-modern-ui #panelScreen #vehiclesTable thead,
    body.tf-modern-ui #panelScreen #vehiclesTable tbody tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    body.tf-modern-ui #panelScreen #vehiclesTable tbody {
        display: block;
        max-height: var(--vehicles-table-body-max-height);
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-gutter: stable;
    }

    body.tf-modern-ui #panelScreen #vehiclesTable th,
    body.tf-modern-ui #panelScreen #vehiclesTable td {
        word-break: break-word;
    }

    body.tf-modern-ui #panelScreen #vehiclesTable th:nth-child(1),
    body.tf-modern-ui #panelScreen #vehiclesTable td:nth-child(1) { width: 10%; }
    body.tf-modern-ui #panelScreen #vehiclesTable th:nth-child(2),
    body.tf-modern-ui #panelScreen #vehiclesTable td:nth-child(2) { width: 14%; }
    body.tf-modern-ui #panelScreen #vehiclesTable th:nth-child(3),
    body.tf-modern-ui #panelScreen #vehiclesTable td:nth-child(3) { width: 11%; }
    body.tf-modern-ui #panelScreen #vehiclesTable th:nth-child(4),
    body.tf-modern-ui #panelScreen #vehiclesTable td:nth-child(4) { width: 16%; }
    body.tf-modern-ui #panelScreen #vehiclesTable th:nth-child(5),
    body.tf-modern-ui #panelScreen #vehiclesTable td:nth-child(5) { width: 15%; }
    body.tf-modern-ui #panelScreen #vehiclesTable th:nth-child(6),
    body.tf-modern-ui #panelScreen #vehiclesTable td:nth-child(6) { width: 18%; }
    body.tf-modern-ui #panelScreen #vehiclesTable th:nth-child(7),
    body.tf-modern-ui #panelScreen #vehiclesTable td:nth-child(7) { width: 16%; }

    body.tf-modern-ui #panelScreen #vehiclesTable tbody::-webkit-scrollbar {
        width: 8px;
    }

    body.tf-modern-ui #panelScreen #vehiclesTable tbody::-webkit-scrollbar-track {
        background: rgba(18, 34, 56, 0.08);
    }

    body.tf-modern-ui #panelScreen #vehiclesTable tbody::-webkit-scrollbar-thumb {
        background: rgba(59, 130, 246, 0.42);
        border-radius: 999px;
    }

    body.tf-modern-ui #panelScreen #vehiclesTable tbody::-webkit-scrollbar-thumb:hover {
        background: rgba(37, 99, 235, 0.58);
    }
}

@media (max-width: 768px) {
    body.tf-modern-ui #panelScreen .main {
        padding-top: 1rem;
    }
}

/* ====== LIGHT THEME — MODALES / POPUPS ====== */

body.tf-modern-ui .tf-modal {
    background: #ffffff;
    color: #122238;
    border: 1px solid rgba(12, 24, 40, 0.1);
    box-shadow: 0 24px 64px rgba(12, 24, 40, 0.16), 0 4px 16px rgba(12, 24, 40, 0.08);
}

body.tf-modern-ui .modal-header {
    background: #f8faff;
    border-bottom: 1px solid rgba(12, 24, 40, 0.1);
}

body.tf-modern-ui .modal-header h3,
body.tf-modern-ui .modal-header h4 {
    color: #122238;
}

body.tf-modern-ui .modal-close {
    color: #5a6d86;
}

body.tf-modern-ui .modal-close:hover {
    color: #dc2626;
}

body.tf-modern-ui .modal-body {
    color: #25405e;
}

body.tf-modern-ui .modal-body label,
body.tf-modern-ui .modal-body h4 {
    color: #122238;
}

body.tf-modern-ui .modal-actions {
    border-top: 1px solid rgba(12, 24, 40, 0.1);
    background: #f8faff;
}

/* Inputs inside modals — already light from panel rules but modals are outside panelScreen */
body.tf-modern-ui .tf-modal input[type="text"],
body.tf-modern-ui .tf-modal input[type="password"],
body.tf-modern-ui .tf-modal input[type="email"],
body.tf-modern-ui .tf-modal input[type="tel"],
body.tf-modern-ui .tf-modal input[type="number"],
body.tf-modern-ui .tf-modal input[type="month"],
body.tf-modern-ui .tf-modal input[type="date"],
body.tf-modern-ui .tf-modal select,
body.tf-modern-ui .tf-modal textarea {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(12, 24, 40, 0.16);
    color: #122238;
    border-radius: 10px;
}

body.tf-modern-ui .tf-modal input::placeholder,
body.tf-modern-ui .tf-modal textarea::placeholder {
    color: rgba(90, 109, 134, 0.8);
}

body.tf-modern-ui .tf-modal input:focus,
body.tf-modern-ui .tf-modal select:focus,
body.tf-modern-ui .tf-modal textarea:focus {
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

body.tf-modern-ui .tf-modal select option {
    background: #ffffff;
    color: #122238;
}

body.tf-modern-ui .tf-modal .btn-secondary {
    background: rgba(18, 34, 56, 0.06);
    border-color: rgba(12, 24, 40, 0.16);
    color: #25405e;
}

body.tf-modern-ui .tf-modal .btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1d4ed8;
}

/* Workshop list inside modal */
body.tf-modern-ui .tf-modal .workshop-item {
    background: rgba(248, 250, 255, 0.9);
    border-color: rgba(12, 24, 40, 0.1);
    color: #122238;
}

body.tf-modern-ui .tf-modal .workshop-item-name {
    color: #122238;
}

body.tf-modern-ui .tf-modal .workshop-item-slug {
    color: #5a6d86;
}

/* Confirm status modal dynamic content */
body.tf-modern-ui #confirmStatusModal .tf-modal .waiting-piece-panel,
body.tf-modern-ui #confirmStatusModal .tf-modal .modern-panel {
    background: rgba(243, 247, 255, 0.9);
    border: 1px solid rgba(12, 24, 40, 0.1);
    color: #122238;
}

body.tf-modern-ui #confirmStatusModal .tf-modal .panel-header-row h3 {
    color: #1d4ed8;
}

body.tf-modern-ui #confirmStatusModal .tf-modal .modern-panel label {
    color: #25405e;
}

/* Export modal */
body.tf-modern-ui .export-modal {
    background: #ffffff;
    color: #122238;
    border: 1px solid rgba(12, 24, 40, 0.1);
}

body.tf-modern-ui .export-modal .modal-header {
    background: #f8faff;
    border-bottom: 1px solid rgba(12, 24, 40, 0.1);
}

body.tf-modern-ui .export-modal .modal-header h3 {
    color: #122238;
}

body.tf-modern-ui .export-modal-description {
    color: #25405e;
}

body.tf-modern-ui .export-info-detail {
    color: #5a6d86;
}

body.tf-modern-ui .export-modal .modal-actions {
    background: #f8faff;
    border-top: 1px solid rgba(12, 24, 40, 0.1);
}

body.tf-modern-ui .export-modal .modal-close {
    color: #5a6d86;
}

/* ====== BIGGER STATUS MANAGEMENT SECTION ====== */

body.tf-modern-ui #panelScreen #statusManagementSection {
    padding: 1.75rem;
}

@media (min-width: 769px) {
    body.tf-modern-ui #panelScreen .status-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.85rem;
    }

    body.tf-modern-ui #panelScreen .btn-status {
        min-height: 80px;
        font-size: 1rem;
        font-weight: 700;
        border-radius: 12px;
        padding: 1rem 0.75rem;
    }
}

/* ====== INDUSTRY SWITCHER DROPDOWN ====== */

.industry-dropdown {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.industry-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.85rem;
    background: rgba(139, 92, 246, 0.12);
    color: rgba(196, 181, 253, 0.9);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.industry-dropdown-trigger:hover,
.industry-dropdown-trigger[aria-expanded="true"] {
    background: rgba(139, 92, 246, 0.22);
    border-color: rgba(139, 92, 246, 0.45);
    color: #c4b5fd;
}

.industry-dropdown-chevron {
    transition: transform 0.2s ease;
    opacity: 0.9;
    flex-shrink: 0;
}

.industry-dropdown-trigger[aria-expanded="true"] .industry-dropdown-chevron {
    transform: rotate(180deg);
}

.industry-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 180px;
    background: #141b2d;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
    padding: 0.45rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.09);
}

.industry-dropdown-menu[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.industry-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: rgba(242, 244, 247, 0.75);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    text-align: left;
}

.industry-dropdown-item:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
}

.industry-dropdown-item.active {
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.1);
}

.industry-dropdown-item-icon {
    width: 16px;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #c4b5fd;
}

