/* ============================================
   THEME.CSS - Sistema de Diseño Unificado
   Basado en el theme original, optimizado y extendido
   ============================================ */

/* ============================================
   1. TOKENS DE DISEÑO (Modo oscuro/claro)
   ============================================ */
:root {
    /* --- Fondos --- */
    --bg: #1e1e1e;
    --bg-primary: #0A0A0A;
    --bg-secondary: #151515;
    --bg-gradient: radial-gradient(circle at 20% 20%, rgba(243, 197, 0, 0.16) 0%, transparent 40%),
                    radial-gradient(circle at 70% 90%, rgba(255, 255, 255, 0.06) 0%, transparent 42%),
                    linear-gradient(135deg, #1e1e1e, #2a2a2a);
    --card: rgba(255, 255, 255, 0.05);

    /* --- Texto --- */
    --text-strong: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.65);
    --text-muted-soft: rgba(255, 255, 255, 0.5);
    --text-secondary: #A1A1AA;
    --text-muted-dash: #6B6B76;
    --ink: #121212;

    /* --- Glassmorphism --- */
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-blur: 16px;
   

    /* --- Inputs --- */
    --input-bg: rgba(255, 255, 255, 0.06);
    --input-border: rgba(243, 197, 0, 0.35);
    --input-placeholder: rgba(255, 255, 255, 0.45);
    --input-text: #ffffff;

    /* --- Colores primarios --- */
    --yellow: #f3c500;
    --yellow-soft: #f8dd69;
    --danger: #ef4444;
    --blue: #007AFF;
    --green: #34C759;
    --red: #FF3B30;

    /* --- Botones --- */
    --ghost-bg: rgba(255, 255, 255, 0.06);
    --ghost-border: rgba(243, 197, 0, 0.3);
    --ghost-text: #ffffff;
    --ghost-hover-bg: rgba(243, 197, 0, 0.15);

    /* --- Bordes y sombras --- */
    --border-color: rgba(255, 255, 255, 0.04);
    --border-light: rgba(255, 255, 255, 0.08);
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    --shadow-dash: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-light: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-card: 0 8px 32px rgba(243, 197, 0, 0.12), 0 18px 45px rgba(0, 0, 0, 0.35);

    /* --- Chips y estados --- */
    --chip-bg: rgba(255, 255, 255, 0.08);
    --chip-text: #ffffff;
    --skeleton-bg: rgba(255, 255, 255, 0.08);
    --danger-text: #f87171;

    /* --- Radios --- */
    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 18px;
    --radius-2xl: 20px;
    --radius-3xl: 22px;
    --radius: 22px;

    /* --- Transiciones --- */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* --- Navbar --- */
    --navbar-yellow: #FFD60A;
    --navbar-yellow-soft: #FFE17A;
    --navbar-black: #0A0A0A;
    --navbar-white: #FFFFFF;
    --navbar-white-soft: rgba(255, 255, 255, 0.88);
    --navbar-white-muted: rgba(255, 255, 255, 0.6);
    --navbar-white-border: rgba(255, 255, 255, 0.08);
    --navbar-white-bg-soft: rgba(255, 255, 255, 0.06);
    --navbar-topbar-start: rgba(10, 10, 10, 0.92);
    --navbar-topbar-end: rgba(10, 10, 10, 0.85);
    --navbar-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);

    /* --- Sidebar --- */
    --sidebar-bg: #0A0A0A;
    --sidebar-shadow: rgba(0, 0, 0, 0.3);
    --sidebar-border: rgba(255, 255, 255, 0.04);
    --sidebar-text: #FFFFFF;
    --sidebar-link-color: rgba(255, 255, 255, 0.55);
    --sidebar-link-hover: rgba(255, 255, 255, 0.05);
    --sidebar-link-hover-text: #FFFFFF;
    --sidebar-icon-color: rgba(255, 255, 255, 0.4);
    --sidebar-header-bg: rgba(255, 255, 255, 0.03);
    --sidebar-header-border: rgba(255, 255, 255, 0.04);
    --sidebar-scrollbar: rgba(255, 214, 10, 0.25);

    /* --- Tabla --- */
    --table-header: rgba(255, 255, 255, 0.02);
    --table-row: transparent;
    --table-row-hover: rgba(255, 255, 255, 0.03);
    --table-border: rgba(255, 255, 255, 0.03);

    /* --- Z-index --- */
    --z-modal-overlay: 999;
    --z-modal: 1000;
    --z-modal-top: 2000;
    --z-notification: 9999;

    /* --- Espaciado --- */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    --spacing-2xl: 2rem;

    /* --- Tipografía --- */
    --font-family-base: "Manrope", sans-serif;
    --font-family-heading: "Space Grotesk", sans-serif;

    /* --- Dashboard (oscuro) --- */
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --bg-input: #1a1a1a;
    --text-primary: #FFFFFF;
}

/* ============================================
   MODO CLARO
   ============================================ */
[data-theme="light"] {
    --bg: #e8e8ed;
    --bg-primary: #E8E8ED;
    --bg-secondary: #EDEDF2;
    --bg-gradient: radial-gradient(circle at 20% 20%, rgba(243, 197, 0, 0.08) 0%, transparent 40%),
                    radial-gradient(circle at 70% 90%, rgba(18, 18, 18, 0.02) 0%, transparent 42%),
                    linear-gradient(135deg, #e8e8ed, #dddee3);

    --text-strong: #1a1a1e;
    --text-muted: rgba(26, 26, 30, 0.6);
    --text-muted-soft: rgba(26, 26, 30, 0.4);
    --text-secondary: #5C5C60;
    --text-muted-dash: #8A8A90;
    --text-primary: #1A1A1E;

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(243, 197, 0, 0.5);
    --glass-shadow: 0 8px 28px rgba(243, 197, 0, 0.08), 0 14px 36px rgba(18, 18, 18, 0.06);
    --shadow-card: 0 8px 28px rgba(243, 197, 0, 0.08), 0 14px 36px rgba(18, 18, 18, 0.06);
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.12);

    --input-bg: #f5f5f8;
    --input-border: rgba(18, 18, 18, 0.12);
    --input-placeholder: rgba(18, 18, 18, 0.35);
    --input-text: #1a1a1e;

    --ghost-bg: rgba(18, 18, 18, 0.04);
    --ghost-border: rgba(18, 18, 18, 0.12);
    --ghost-text: #1a1a1e;
    --ghost-hover-bg: rgba(243, 197, 0, 0.15);

    --border-color: rgba(0, 0, 0, 0.06);
    --border-light: rgba(0, 0, 0, 0.10);
    --shadow-dash: 0 8px 28px rgba(0, 0, 0, 0.06);
    --shadow-light: 0 4px 16px rgba(0, 0, 0, 0.04);

    --chip-bg: rgba(17, 24, 39, 0.06);
    --chip-text: rgba(18, 18, 18, 0.85);
    --skeleton-bg: rgba(17, 24, 39, 0.08);
    --danger-text: #7f1d1d;

    --table-header: #EDEDF2;
    --table-row: #F5F5F8;
    --table-row-hover: #E3E3E8;
    --table-border: rgba(0, 0, 0, 0.06);

    --bg-card: #F5F5F8;
    --bg-card-hover: #E3E3E8;
    --bg-input: #F5F5F8;

    --navbar-black: #1a1a1e;
    --navbar-white: #1a1a1e;
    --navbar-white-soft: rgba(26, 26, 30, 0.75);
    --navbar-white-muted: rgba(26, 26, 30, 0.5);
    --navbar-white-border: rgba(26, 26, 30, 0.06);
    --navbar-white-bg-soft: rgba(26, 26, 30, 0.04);
    --navbar-topbar-start: rgba(245, 245, 248, 0.92);
    --navbar-topbar-end: rgba(245, 245, 248, 0.85);
    --navbar-shadow: 0 12px 32px rgba(18, 18, 18, 0.08);

    --sidebar-bg: #F5F5F8;
    --sidebar-shadow: rgba(0, 0, 0, 0.06);
    --sidebar-border: rgba(26, 26, 30, 0.06);
    --sidebar-text: #1A1A1E;
    --sidebar-link-color: rgba(26, 26, 30, 0.45);
    --sidebar-link-hover: rgba(26, 26, 30, 0.04);
    --sidebar-link-hover-text: #1A1A1E;
    --sidebar-icon-color: rgba(26, 26, 30, 0.35);
    --sidebar-header-bg: rgba(26, 26, 30, 0.02);
    --sidebar-header-border: rgba(26, 26, 30, 0.04);
    --sidebar-scrollbar: rgba(26, 26, 30, 0.12);
}

/* ============================================
   2. ESTILOS BASE
   ============================================ */
* { box-sizing: border-box; }

html {
	min-height: 100%;
	background-color: var(--bg);
}

body {
	margin: 0;
	min-height: 100%;
	font-family: var(--font-family-base);
	color: var(--text-strong);
	background: var(--bg-gradient);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.page {
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.4rem 1.1rem 2.2rem;
}

/* ============================================
   3. BREADCRUMB (unificado)
   ============================================ */
.breadcrumb {
    font-size: 14px;
    margin: 0.75rem 0 1rem;
}

.breadcrumb__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb__list li + li:before {
    content: ">";
    margin: 0 0.5rem;
    color: var(--yellow);
    font-weight: 800;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.15s ease;
}

.breadcrumb a:hover { color: var(--text-strong); }

.breadcrumb li[aria-current="page"] {
    color: var(--text-muted);
    font-weight: 700;
}

.breadcrumb__current {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.breadcrumb__current:hover,
.breadcrumb__current:focus-visible {
    color: var(--text-strong);
    outline: none;
}

/* ============================================
   4. HERO (encabezados de sección) - UNIFICADO
   ============================================ */
.hero,
.cargos-hero,
.empleados-hero,
.especialidades-hero,
.taller-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.hero__copy,
.cargos-hero__copy,
.empleados-hero__copy,
.especialidades-hero__copy,
.taller-hero {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-3xl);
    padding: 1.4rem 1.5rem;
    box-shadow: var(--glass-shadow);
}

/* Hero específico de taller (no tiene .hero__copy) */
.taller-hero {
    padding: 1.4rem 1.5rem;
    width: fit-content;
    max-width: 100%;
    margin-right: auto;
}

.hero__eyebrow,
.cargos-hero__eyebrow,
.empleados-hero__eyebrow,
.especialidades-hero__eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-muted);
}

.hero__title,
.cargos-hero__title,
.empleados-hero__title,
.especialidades-hero__title,
.taller-hero__title {
    margin: 0.8rem 0 0;
    font-family: var(--font-family-heading);
    font-size: clamp(1.5rem, 2.4vw, 2.1rem);
    line-height: 0.98;
    color: var(--text-strong);
}

.hero__description,
.cargos-hero__description,
.empleados-hero__description,
.especialidades-hero__description,
.taller-hero__description {
    margin: 0.45rem 0 0;
    max-width: 60ch;
    color: var(--text-muted);
    font-size: 1.02rem;
}

/* ============================================
   5. STATS (unificado)
   ============================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.stats--single {
    grid-template-columns: minmax(220px, 280px);
    justify-content: end;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--glass-shadow);
}

.stat-card__label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 700;
}

.stat-card__value {
    display: block;
    margin-top: 0.4rem;
    font-family: var(--font-family-heading);
    font-size: 2rem;
    color: var(--text-strong);
}

.stat-card__meta {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.86rem;
    color: var(--text-muted);
}

/* ============================================
   6. CARDS (Glassmorphism) - UNIFICADO
   ============================================ */
.card {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    color: var(--text-strong);
    border-radius: var(--radius-3xl);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    padding: 1.2rem 1.25rem;
}

.card--table {
    display: grid;
    gap: 0.85rem;
    align-content: start;
}

.card--form {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.15rem;
}

.card__header-left {
    display: grid;
    gap: 0.25rem;
}

.card__title {
    margin: 0;
    font-family: var(--font-family-heading);
    font-size: 1.16rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--text-strong);
}

.card__subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.card__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ============================================
   7. BOTONES - UI BUTTONS (unificado)
   ============================================ */
.ui-btn {
    appearance: none;
    border: 0;
    border-radius: var(--radius-md);
    padding: 0.78rem 1.1rem;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
}

.ui-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.ui-btn:focus-visible { outline: 3px solid rgba(243, 197, 0, 0.28); outline-offset: 2px; }

.ui-btn--primary {
    background: var(--yellow);
    color: var(--ink);
    border: 1px solid rgba(243, 197, 0, 0.6);
}
.ui-btn--primary:hover {
    background: var(--yellow-soft);
    border-color: var(--yellow-soft);
}

.ui-btn--ghost {
    background: var(--ghost-bg);
    color: var(--ghost-text);
    border: 1px solid var(--ghost-border);
}
.ui-btn--ghost:hover {
    background: var(--ghost-hover-bg);
    border-color: rgba(243, 197, 0, 0.5);
}

.ui-btn--danger {
    background: rgba(220, 38, 38, 0.2);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.3);
}
.ui-btn--danger:hover {
    background: rgba(220, 38, 38, 0.3);
    border-color: #dc2626;
}

.ui-btn--success {
    background: rgba(34, 197, 94, 0.08);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.ui-btn--success:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: #16a34a;
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.ui-btn--sm {
    padding: 0.45rem 1rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.ui-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Botón de acción con icono (verde) - UNIFICADO con .ui-btn--success */
.btn-icon-action--success {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid #22c55e;
    background: rgba(34, 197, 94, 0.08);
    color: #22c55e;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.btn-icon-action--success:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: #16a34a;
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.15);
    transform: translateY(-2px);
    color: #16a34a;
}
.btn-icon-action--success:active { transform: scale(0.95); }
.btn-icon-action--success svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   8. SWITCHER DE VISTAS (TABS)
   ============================================ */
.vista-switcher {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    width: 100%;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.vista-switcher__btn {
    appearance: none;
    border: 0;
    border-radius: var(--radius-md);
    padding: 0.7rem 1.2rem;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    flex: 1 1 auto;
    text-align: center;
    min-width: 120px;
}

.vista-switcher__btn:hover {
    color: var(--text-strong);
    background: var(--ghost-bg);
}

.vista-switcher__btn.is-active {
    color: var(--ink);
    background: var(--yellow);
    box-shadow: 0 4px 16px rgba(243, 197, 0, 0.25);
}

.vista-switcher__btn:focus-visible {
    outline: 3px solid rgba(243, 197, 0, 0.28);
    outline-offset: 2px;
}

/* ============================================
   9. TABLA Y CONTROLES (unificado)
   ============================================ */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

.table-wrap::-webkit-scrollbar {
    height: 0;
    background: transparent;
}
.table-wrap { scrollbar-width: none; -ms-overflow-style: none; }

.table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table th {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 900;
    background: var(--table-header);
}

.table td {
    color: var(--text-strong);
    font-weight: 700;
    font-size: 0.95rem;
}

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

.table tbody tr {
    cursor: default;
    transition: background 0.15s ease, transform 0.15s ease;
}
.table tbody tr:hover { background: var(--table-row-hover) !important; }
.table tbody tr.is-selected { background: rgba(243, 197, 0, 0.13); }

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

.row-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
}

.row-actions--center {
    justify-content: center;
}

/* Estados de tabla */
.table__empty,
.table__loading,
.table__error {
    text-align: center;
    padding: 2rem !important;
}
.table__empty { color: var(--text-muted); font-style: italic; }
.table__loading { color: var(--text-muted); }
.table__error { color: var(--danger); }

/* Controles de tabla */
.table-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin: 0 0 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.table-controls.is-empty { opacity: 0.6; }

.table-controls__search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 220px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.table-controls__input {
    flex: 1 1 auto;
    min-width: 160px;
    border-radius: var(--radius-md);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);
    font: inherit;
    padding: 0.5rem 0.75rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.table-controls__input::placeholder { color: var(--input-placeholder); }
.table-controls__input:focus {
    border-color: rgba(243, 197, 0, 0.8);
    box-shadow: 0 0 0 3px rgba(243, 197, 0, 0.25);
}

.table-controls__meta {
    display: flex;
    align-items: center;
    gap: 0.6rem 0.85rem;
    flex-wrap: wrap;
}

.table-controls__pager {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.table-controls__btn {
    appearance: none;
    border: 1px solid var(--input-border);
    background: var(--ghost-bg);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.9rem;
    font: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}
.table-controls__btn:hover:not(:disabled) {
    border-color: rgba(243, 197, 0, 0.5);
    background: rgba(243, 197, 0, 0.12);
    color: var(--text-strong);
    transform: translateY(-1px);
}
.table-controls__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.table-controls__info {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 0.25rem;
    min-width: 80px;
    text-align: center;
}

.table-controls__size {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.table-controls__select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);
    font: inherit;
    padding: 0.4rem 1.5rem 0.4rem 0.75rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3c500' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 0.85rem;
}
.table-controls__select:focus {
    border-color: rgba(243, 197, 0, 0.8);
    box-shadow: 0 0 0 3px rgba(243, 197, 0, 0.25);
}
.table-controls__select option {
    background: var(--bg);
    color: var(--text-strong);
}

/* ============================================
   10. CHIPS Y BADGES (unificado)
   ============================================ */
.chip {
    display: inline-block;
    padding: 0.15rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-strong);
    background: rgba(243, 197, 0, 0.15);
    border: 1px solid rgba(243, 197, 0, 0.3);
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-align: center;
    min-width: 30px;
    transition: background 0.2s ease, transform 0.2s ease;
}
.chip:hover {
    background: rgba(243, 197, 0, 0.3);
    transform: scale(1.05);
}

/* Badge de estado - UNIFICADO */
.estado-badge {
    display: inline-block;
    padding: 0.15rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    transition: background 0.2s ease, transform 0.2s ease;
    color: var(--text-strong);
}
.estado-badge:hover { transform: scale(1.05); }

.estado-pendiente { background: rgba(255, 193, 7, 0.2); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.3); }
.estado-revision { background: rgba(23, 162, 184, 0.2); color: #17a2b8; border: 1px solid rgba(23, 162, 184, 0.3); }
.estado-reparacion { background: rgba(253, 126, 20, 0.2); color: #fd7e14; border: 1px solid rgba(253, 126, 20, 0.3); }
.estado-completado { background: rgba(40, 167, 69, 0.2); color: #28a745; border: 1px solid rgba(40, 167, 69, 0.3); }
.estado-entregado { background: rgba(108, 117, 125, 0.2); color: #9ca3af; border: 1px solid rgba(108, 117, 125, 0.3); }
.estado-asignada { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.estado-default { background: rgba(108, 117, 125, 0.15); color: #9ca3af; border: 1px solid rgba(108, 117, 125, 0.2); }

/* ============================================
   11. ICONOS DE ACCIÓN (unificado)
   ============================================ */
.icon-action {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-light);
    background: var(--ghost-bg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    padding: 0;
}
.icon-action:hover { transform: translateY(-2px); }
.icon-action svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* Editar - Amarillo */
.icon-action--edit,
.icon-action[data-action="editar"] {
    border-color: var(--yellow);
    background: rgba(243, 197, 0, 0.08);
}
.icon-action--edit svg,
.icon-action[data-action="editar"] svg { color: var(--yellow); }
.icon-action--edit:hover,
.icon-action[data-action="editar"]:hover {
    border-color: var(--yellow-soft);
    background: rgba(243, 197, 0, 0.18);
    box-shadow: 0 0 24px rgba(243, 197, 0, 0.15);
}

/* Eliminar - Rojo */
.icon-action--danger,
.icon-action[data-action="eliminar"] {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}
.icon-action--danger svg,
.icon-action[data-action="eliminar"] svg { color: #dc2626; }
.icon-action--danger:hover,
.icon-action[data-action="eliminar"]:hover {
    border-color: #ef4444;
    background: rgba(220, 38, 38, 0.18);
    box-shadow: 0 0 24px rgba(220, 38, 38, 0.15);
}

/* Ver - Azul */
.icon-action--view,
.icon-action[data-action="ver"],
.icon-action[data-accion="ver-orden"],
.icon-action[data-accion="ver-test"],
.icon-action[data-accion="ver-test-modal"] {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.08);
}
.icon-action--view svg,
.icon-action[data-action="ver"] svg,
.icon-action[data-accion="ver-orden"] svg,
.icon-action[data-accion="ver-test"] svg,
.icon-action[data-accion="ver-test-modal"] svg { color: var(--blue); }
.icon-action--view:hover,
.icon-action[data-action="ver"]:hover,
.icon-action[data-accion="ver-orden"]:hover,
.icon-action[data-accion="ver-test"]:hover,
.icon-action[data-accion="ver-test-modal"]:hover {
    border-color: #60a5fa;
    background: rgba(59, 130, 246, 0.18);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.15);
}

/* Éxito/Verde - Tomar orden, ver detalle */
.icon-action--success,
.icon-action[data-accion="tomar-orden"],
.icon-action[data-accion="ver-detalle"] {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}
.icon-action--success svg,
.icon-action[data-accion="tomar-orden"] svg,
.icon-action[data-accion="ver-detalle"] svg { color: #22c55e; }
.icon-action--success:hover,
.icon-action[data-accion="tomar-orden"]:hover,
.icon-action[data-accion="ver-detalle"]:hover {
    border-color: #16a34a;
    background: rgba(34, 197, 94, 0.18);
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.15);
}

/* Liberar orden - Rojo */
.icon-action[data-accion="liberar-orden"] {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}
.icon-action[data-accion="liberar-orden"] svg { color: #dc2626; }
.icon-action[data-accion="liberar-orden"]:hover {
    border-color: #ef4444;
    background: rgba(220, 38, 38, 0.18);
    box-shadow: 0 0 24px rgba(220, 38, 38, 0.15);
}

/* Descargar - Azul */
.icon-action--download {
    border-color: var(--blue);
    background: rgba(59, 130, 246, 0.08);
}
.icon-action--download svg { color: var(--blue); }
.icon-action--download:hover {
    border-color: #60a5fa;
    background: rgba(59, 130, 246, 0.18);
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.15);
}

/* Restaurar - Ámbar */
.icon-action--restore {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.08);
}
.icon-action--restore svg { color: #f59e0b; }
.icon-action--restore:hover {
    border-color: #d97706;
    background: rgba(245, 158, 11, 0.18);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.15);
}

/* ============================================
   12. FORMULARIOS (unificado) - SIN CAMBIAR FONDO
   ============================================ */
/* Grid de formularios */
.ui-form__grid {
    display: grid;
    gap: 1rem;
}
.ui-form__grid--one { grid-template-columns: 1fr; }
.ui-form__grid--two { grid-template-columns: repeat(2, 1fr); }

.ui-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

/* Sección interna de formulario */
.ui-form__section {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.ui-form__subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.4rem;
}

/* Campos de formulario - UNIFICADO */
.field,
.cargo-form__field,
.empleado-form__field,
.service-form__field {
    display: grid;
    gap: 0.35rem;
    color: var(--text-strong);
    font-weight: 700;
}

.field > span,
.field > label > span,
.cargo-form__field > span,
.empleado-form__field > span {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.field--full,
.cargo-form__field--full,
.empleado-form__field--full {
    grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea,
.cargo-form__field input,
.cargo-form__field textarea,
.empleado-form__field input,
.empleado-form__field textarea,
.empleado-form__field .select-wrapper select {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--input-text);
    font: inherit;
    padding: 0.85rem 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    /* ← Eliminado 'background' de la transición */
}
.field input::placeholder,
.field textarea::placeholder,
.cargo-form__field input::placeholder,
.cargo-form__field textarea::placeholder,
.empleado-form__field input::placeholder,
.empleado-form__field textarea::placeholder {
    color: var(--input-placeholder);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.cargo-form__field input:focus,
.cargo-form__field textarea:focus,
.empleado-form__field input:focus,
.empleado-form__field textarea:focus,
.empleado-form__field .select-wrapper select:focus {
    border-color: rgba(243, 197, 0, 0.8);
    box-shadow: 0 0 0 3px rgba(243, 197, 0, 0.25);
    /* NO se cambia el background */
}

.field select,
.empleado-form__field .select-wrapper select {
    appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
}
.field select option,
.empleado-form__field .select-wrapper select option {
    background: var(--bg);
    color: var(--text-strong);
}

.field textarea,
.cargo-form__field textarea,
.empleado-form__field textarea {
    resize: vertical;
    min-height: 120px;
}

.field-hint {
    font-size: 0.7rem;
    color: var(--text-muted-soft);
    margin-top: 0.25rem;
    display: block;
}

.field input:disabled,
.field select:disabled,
.empleado-form__field input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   ESTADOS DE VALIDACIÓN - SOLO BORDE Y SOMBRA
   ============================================ */
.field-success,
.input-success {
    border-color: #28a745 !important;
    /* background: ELIMINADO - no se cambia el fondo */
}
.field-success:focus,
.input-success:focus {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25) !important;
}

.field-error,
.input-error {
    border-color: #dc3545 !important;
    /* background: ELIMINADO - no se cambia el fondo */
}
.field-error:focus,
.input-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25) !important;
}

/* Select personalizado */
.select-wrapper {
    position: relative;
    display: block;
    width: 100%;
}
.select-wrapper select { padding: 0.85rem 2.5rem 0.85rem 0.95rem; cursor: pointer; appearance: none; }

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f3c500' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    transition: transform 0.25s ease;
}
.select-wrapper:focus-within::after,
.select-wrapper.is-open::after {
    transform: translateY(-50%) rotate(90deg);
}

/* ============================================
   13. MODALES (UiModal) - UNIFICADO
   ============================================ */
.ui-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.ui-modal[hidden] { display: none !important; }

.ui-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    z-index: var(--z-modal-overlay);
}

.ui-modal__dialog {
    position: relative;
    background: rgba(30, 30, 30, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-modal);
    color: var(--text-strong);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    z-index: 1;
    width: 100%;
}

.ui-modal__dialog--sm { max-width: 450px; }
.ui-modal__dialog--md { max-width: 640px; }
.ui-modal__dialog--lg { max-width: 860px; }
.ui-modal__dialog--xl { max-width: 1140px; }

.ui-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.ui-modal__title {
    margin: 0;
    font-family: var(--font-family-heading);
    font-size: 1.16rem;
    font-weight: 800;
    color: var(--text-strong);
}

.ui-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.15s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}
.ui-modal__close:hover {
    color: var(--text-strong);
    background: var(--ghost-bg);
}

.ui-modal__body {
    padding: 1.5rem;
    color: var(--text-strong);
}
.ui-modal__body .device-detail__empty.error {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
    padding: 1rem;
    border-radius: 8px;
}

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

.ui-modal--confirm .ui-modal__dialog {
    margin: 1rem;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    animation: modalFadeIn 0.2s ease-out;
}

.ui-modal--confirm-danger .ui-modal__dialog {
    border-top: 4px solid var(--danger);
}

.ui-modal--confirm-success .ui-modal__dialog {
    border-top: 4px solid #16a34a;
}

.ui-modal--confirm-info .ui-modal__dialog {
    border-top: 4px solid var(--yellow);
}

.ui-modal--confirm .ui-modal__body {
    padding: 1.5rem;
}

.ui-modal--confirm .ui-modal__footer {
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
}

.ui-modal__footer--center {
    justify-content: center;
}

.ui-modal__footer--end {
    justify-content: flex-end;
}

.confirm-modal__icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.confirm-modal__message {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--text-strong);
    white-space: pre-wrap;
    line-height: 1.5;
}

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

.confirm-modal__message--left {
    text-align: left;
}

/* Texto de confirmación */
.confirm-text {
    color: var(--text-strong);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    padding: 0.5rem 0;
}

/* ============================================
   MODAL DE EMPLEADOS - SIN SCROLL
   ============================================ */
#modal-registrar-empleado .ui-modal__dialog {
    max-height: none;
    overflow: visible;
}

#modal-registrar-empleado .ui-modal__body {
    overflow: visible;
    max-height: none;
    padding: 1.5rem;
}

#modal-registrar-empleado .ui-form {
    overflow: visible;
}

/* ============================================
   14. NOTIFICACIONES
   ============================================ */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--z-notification);
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    background: var(--bg);
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-strong);
    border-left: 4px solid #17a2b8;
    animation: slideIn 0.3s ease-out;
}

.notification--success { border-left-color: #28a745; }
.notification--error { border-left-color: #dc3545; }
.notification--info { border-left-color: #17a2b8; }
.notification--warning { border-left-color: #ffc107; }

.notification--closing { animation: slideOut 0.3s ease-in; }

.notification__close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0 5px;
}

/* ============================================
   15. SPINNER Y ESTADOS DE CARGA
   ============================================ */
.spinner {
    animation: spin 1s linear infinite;
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

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

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.is-loading { opacity: 0.6; pointer-events: none; }
.is-disabled { opacity: 0.5; pointer-events: none; }
.modal-open { overflow: hidden; }

/* ============================================
   16. DETALLE DE DISPOSITIVO (taller)
   ============================================ */
.device-detail {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    background: var(--glass-bg);
}

.device-detail__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.device-detail__empty {
    margin: 0;
    color: var(--text-muted);
    font-weight: 700;
    text-align: center;
    padding: 2rem;
}

.detail-group {
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
}

.detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-strong);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.device-detail__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Sección de dispositivo (taller) */
.device-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}
.device-section:first-of-type {
    margin-top: 0.5rem;
    padding-top: 0;
    border-top: none;
}

.device-section__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.device-section__header .card__subtitle { margin: 0; flex-shrink: 0; }

.device-section__header .section-line {
    flex: 1;
    height: 1px;
    background: var(--border-light);
    min-width: 20px;
}

.device-section__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

/* Fotos grid (taller) */
.fotos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 0.5rem;
}

.foto-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid rgba(243, 197, 0, 0.2);
    transition: var(--transition);
}
.foto-item:hover {
    transform: scale(1.02);
    border-color: rgba(243, 197, 0, 0.5);
    box-shadow: 0 4px 16px rgba(243, 197, 0, 0.15);
}

.foto-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.foto-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.foto-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(220, 38, 38, 0.92);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.foto-delete-btn:hover { background: #dc2626; transform: scale(1.1); }

/* Foto modal overlay */
.foto-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}
.foto-modal-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: zoomIn 0.25s ease;
}
.foto-modal-overlay .close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10000;
}
.foto-modal-overlay .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ============================================
   17. COMPONENTES DE TEST (revisión técnica)
   ============================================ */
.test-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    grid-column: span 2;
    box-sizing: border-box;
}

.test-row-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    gap: 8px;
}

.test-component-name {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-group {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    user-select: none;
    white-space: nowrap;
    color: var(--text-muted);
}
.radio-label input[type="radio"] {
    accent-color: var(--yellow);
    width: 16px;
    height: 16px;
    margin: 0;
}
.radio-label--success { color: #4ade80; }
.radio-label--danger { color: #f87171; }

/* Test modal grid */
.test-modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.test-item-card {
    background: var(--glass-bg);
    padding: 12px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
.test-item-card .test-component-name {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}
.test-item-card strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-strong);
    word-break: break-word;
}

/* ============================================
   18. ESPECIALIDADES (tags)
   ============================================ */
.especialidades-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    min-height: 40px;
}

.especialidad-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.especialidad-tag .remove-especialidad {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-muted-soft);
    transition: color 0.2s;
    margin-left: 0.25rem;
}
.especialidad-tag .remove-especialidad:hover { color: #dc2626; }

.especialidades-empty {
    color: var(--text-muted-soft);
    font-style: italic;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

/* Tags de especialidad en detalle (readonly) */
.especialidad-tag-readonly {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* ============================================
   19. REPUESTOS (taller)
   ============================================ */
.repuestos-list-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.25rem;
}

.repuesto-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.repuesto-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    border-color: rgba(243, 197, 0, 0.5);
}

.repuesto-info { flex: 1; }

.repuesto-nombre {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-strong);
    display: block;
    margin-bottom: 0.25rem;
}

.repuesto-cantidad-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.repuesto-cantidad-control label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.repuesto-cantidad-input {
    width: 65px;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    background: var(--input-bg);
    color: var(--input-text);
}
.repuesto-cantidad-input:focus {
    border-color: var(--yellow);
    outline: none;
    box-shadow: 0 0 0 2px rgba(243, 197, 0, 0.2);
}
.repuesto-cantidad-input.error {
    border-color: #dc2626 !important;
    /* background: ELIMINADO - no se cambia el fondo */
}

.btn-eliminar-repuesto {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    flex-shrink: 0;
}
.btn-eliminar-repuesto:hover {
    background: rgba(220, 38, 38, 0.3);
    border-color: #dc2626;
    transform: scale(1.02);
}

/* ============================================
   20. INVENTARIO (taller - filas clickeables)
   ============================================ */
.inventario-row-clickable {
    transition: var(--transition);
    cursor: pointer;
}
.inventario-row-clickable:hover {
    background: rgba(34, 197, 94, 0.15) !important;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.inventario-row-sinstock {
    opacity: 0.6;
    cursor: not-allowed;
}
.inventario-row-sinstock:hover { background: rgba(220, 53, 69, 0.1) !important; }

.inventario-row-clickable:active {
    transform: scale(0.99);
    background: rgba(34, 197, 94, 0.2) !important;
}

/* ============================================
   21. DETALLE DE EMPLEADO (modal readonly)
   ============================================ */
.empleado-detalle {
    padding: 0.5rem 0;
}

.empleado-detalle__avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.avatar-inicial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--yellow), var(--yellow-soft));
    border-radius: 50%;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ink);
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(243, 197, 0, 0.3);
}

.empleado-detalle__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detalle-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.detalle-item--full { grid-column: 1 / -1; }

.detalle-item label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: var(--text-muted);
}

.detalle-item p {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-strong);
    word-break: break-word;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--border-light);
}

.especialidades-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

/* ============================================
   22. UTILIDADES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

/* ============================================
   23. ANIMACIONES
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ============================================
   24. SCROLLBAR PERSONALIZADA
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--glass-bg);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(243, 197, 0, 0.4);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(243, 197, 0, 0.7); }

/* ============================================
   25. RESPONSIVE (unificado)
   ============================================ */
@media (max-width: 1100px) {
    .hero,
    .cargos-hero,
    .empleados-hero,
    .especialidades-hero,
    .taller-hero {
        grid-template-columns: 1fr;
    }
    .stats--single { justify-content: start; }
}

@media (max-width: 992px) {
    .test-options-grid { grid-template-columns: repeat(2, 1fr); }
    .test-modal-grid { grid-template-columns: repeat(2, 1fr); }
    .fotos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
    .page {
        width: min(100%, calc(100% - 1rem));
        padding-top: 1rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .hero,
    .cargos-hero,
    .empleados-hero,
    .especialidades-hero,
    .taller-hero {
        margin-bottom: 0.85rem;
        width: 100%;
        padding: 1rem;
    }

    .stats { grid-template-columns: 1fr; }
    .card { padding: 1rem; }

    .card__header {
        flex-direction: column;
        align-items: stretch;
    }
    .card__actions { justify-content: flex-start; }

    .table { min-width: 640px; }

    .table-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .table-controls__search { flex-wrap: wrap; }
    .table-controls__input { min-width: 100%; }
    .table-controls__meta {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .table-controls__pager { justify-content: center; flex-wrap: wrap; }
    .table-controls__size { justify-content: center; }

    .ui-modal__dialog {
        max-width: 95vw;
        margin: 0.5rem;
    }
    .ui-modal__body { padding: 1rem; }
    .ui-modal__header { padding: 0.75rem 1rem; }
    .ui-modal__footer {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .ui-form__grid--two { grid-template-columns: 1fr; }

    .ui-btn { width: 100%; justify-content: center; }
    .ui-form__actions { flex-direction: column; }
    .ui-form__actions .ui-btn { width: 100%; justify-content: center; }

    .device-detail__grid { grid-template-columns: 1fr; }
    .vista-switcher {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
    }
    .vista-switcher__btn {
        width: 100%;
        text-align: center;
        padding: 0.7rem;
        flex: none;
        min-width: unset;
    }

    .service-form__grid { grid-template-columns: 1fr; }
    .test-options-grid { grid-template-columns: 1fr; }
    .test-modal-grid { grid-template-columns: 1fr; }

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

@media (max-width: 560px) {
    .row-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .icon-action { width: 100%; }

    .table th,
    .table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }

    .empleado-detalle__grid { grid-template-columns: 1fr; }
    .detalle-item--full { grid-column: 1; }

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

    .foto-modal-overlay .close-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .confirm-modal-actions { flex-direction: column; }
    .confirm-modal-actions .ui-btn { width: 100%; justify-content: center; }
}

/* ============================================
   UTILIDADES GLOBALES (para eliminar estilos inline por CSP)
   ============================================ */
.is-hidden {
    display: none !important;
}

.input-readonly {
    background: var(--input-bg);
    opacity: 0.7;
    cursor: not-allowed;
}

.input-readonly--bold {
    font-weight: bold;
}

/* Alineación de celdas de tabla (para eliminar estilos inline por CSP) */
.cell-center { text-align: center; }
.cell-right { text-align: right; }
.cell-right-bold { text-align: right; font-weight: 600; }