/* ===== Extractora Design System ===== */
/* Palette: Slate greys, Sky accent, Pastel badges */

:root {
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: rgba(56, 189, 248, 0.12);
    --sidebar-width: 240px;
    --accent: #38bdf8;
    --accent-dark: #0ea5e9;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-sidebar: #94a3b8;
    --text-sidebar-active: #f1f5f9;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --header-height: 56px;

    /* Badge palette */
    --badge-pendiente-bg: #fef3c7;
    --badge-pendiente-text: #92400e;
    --badge-pendiente-dot: #f59e0b;
    --badge-ejecutado-bg: #d1fae5;
    --badge-ejecutado-text: #065f46;
    --badge-ejecutado-dot: #10b981;
    --badge-reprogramado-bg: #fee2e2;
    --badge-reprogramado-text: #991b1b;
    --badge-reprogramado-dot: #ef4444;
    --badge-aprobada-bg: #d1fae5;
    --badge-aprobada-text: #065f46;
    --badge-aprobada-dot: #10b981;
    --badge-rechazada-bg: #fee2e2;
    --badge-rechazada-text: #991b1b;
    --badge-rechazada-dot: #ef4444;
    --badge-urgente-bg: #fee2e2;
    --badge-urgente-text: #991b1b;
}

/* ===== Typography ===== */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.025em;
    font-weight: 600;
}

/* ===== Layout ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
}

.sidebar-brand img {
    height: 32px;
    border-radius: 6px;
}

.sidebar-brand span {
    color: #f1f5f9;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.sidebar-nav {
    list-style: none;
    padding: 12px 8px;
    margin: 0;
    flex: 1;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

/* Sidebar collapsible sections */
.sidebar-section {
    margin-bottom: 4px;
}

.sidebar-section-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    transition: opacity 0.15s;
    cursor: pointer;
}

.sidebar-section-toggle:hover {
    opacity: 1;
    color: var(--text-sidebar-active);
}

.sidebar-section-toggle i:first-child {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.sidebar-chevron {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s;
}

.sidebar-section-toggle.collapsed .sidebar-chevron {
    transform: rotate(-90deg);
}

.sidebar-submenu {
    list-style: none;
    padding: 0 0 0 8px;
    margin: 0;
}

.sidebar-submenu li {
    margin-bottom: 1px;
}

.sidebar-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-sidebar);
    opacity: 0.5;
    padding: 12px 12px 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
    background: var(--sidebar-hover);
    color: var(--text-sidebar-active);
}

.sidebar-nav a.active {
    background: var(--sidebar-active);
    color: var(--accent);
}

.sidebar-nav a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-version {
    text-align: center;
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    padding: 4px 0 0;
    font-family: monospace;
}

.sidebar-user {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-sidebar);
    font-size: 13px;
}

.sidebar-user-info i {
    font-size: 18px;
}

.sidebar-user a {
    color: var(--text-sidebar);
    font-size: 16px;
    transition: color 0.15s;
}

.sidebar-user a:hover {
    color: #ef4444;
}

.sidebar-logout-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-sidebar);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.15s;
}

.sidebar-logout-btn:hover {
    color: #ef4444;
}

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

/* ===== Header (glassmorphism) ===== */
.app-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.app-header h1 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.app-header .header-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

/* ===== Page body ===== */
.page-body {
    padding: 24px 28px;
    flex: 1;
}

/* ===== KPI Cards ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    align-self: end;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border);
    transition: transform 0.15s, box-shadow 0.15s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.kpi-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.kpi-card.pendiente .kpi-value { color: var(--badge-pendiente-dot); }
.kpi-card.ejecutado .kpi-value { color: var(--badge-ejecutado-dot); }
.kpi-card.reprogramado .kpi-value { color: var(--badge-reprogramado-dot); }
.kpi-card.solicitud { border-left: 3px solid #6f42c1; }
.kpi-card.solicitud .kpi-value { color: #6f42c1; }
.kpi-card.cumplimiento .kpi-value { color: var(--accent-dark); }

.kpi-subtitle {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== Premium Tables ===== */
.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.table-premium thead th {
    background: var(--bg-page);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    border-top: none;
}

.table-premium tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    vertical-align: middle;
}

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

.table-premium tbody tr:hover {
    background: #f1f5f9;
}

/* ===== Badges ===== */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-status.pendiente {
    background: var(--badge-pendiente-bg);
    color: var(--badge-pendiente-text);
}
.badge-status.pendiente::before { background: var(--badge-pendiente-dot); }

.badge-status.ejecutado {
    background: var(--badge-ejecutado-bg);
    color: var(--badge-ejecutado-text);
}
.badge-status.ejecutado::before { background: var(--badge-ejecutado-dot); }

.badge-status.reprogramado {
    background: var(--badge-reprogramado-bg);
    color: var(--badge-reprogramado-text);
}
.badge-status.reprogramado::before { background: var(--badge-reprogramado-dot); }

.badge-status.aprobada {
    background: var(--badge-aprobada-bg);
    color: var(--badge-aprobada-text);
}
.badge-status.aprobada::before { background: var(--badge-aprobada-dot); }

.badge-status.rechazada {
    background: var(--badge-rechazada-bg);
    color: var(--badge-rechazada-text);
}
.badge-status.rechazada::before { background: var(--badge-rechazada-dot); }

/* Lab status badges */
.badge-status.borrador { background: var(--badge-pendiente-bg); color: var(--badge-pendiente-text); }
.badge-status.borrador::before { background: var(--badge-pendiente-dot); }

.badge-status.completada { background: var(--badge-ejecutado-bg); color: var(--badge-ejecutado-text); }
.badge-status.completada::before { background: var(--badge-ejecutado-dot); }

.badge-status.validada { background: #dbeafe; color: #1e40af; }
.badge-status.validada::before { background: #3b82f6; }

.badge-urgente {
    background: var(--badge-urgente-bg);
    color: var(--badge-urgente-text);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== Cards ===== */
.card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.card-premium .card-header-premium {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
}

.card-premium .card-body {
    padding: 20px;
}

/* ===== Buttons ===== */
.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-premium:hover {
    background: var(--bg-page);
    border-color: #cbd5e1;
}

.btn-premium.primary {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: white;
}

.btn-premium.primary:hover {
    background: #0284c7;
}

.btn-premium.success {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.btn-premium.success:hover { background: #059669; }

.btn-premium.warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.btn-premium.warning:hover { background: #d97706; }

.btn-premium.danger {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.btn-premium.danger:hover { background: #dc2626; }

/* ===== Section headers ===== */
.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* ===== Quick actions row ===== */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.quick-action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    flex: 1;
}

.quick-action-card h6 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* ===== Planta cards (dashboard) ===== */
.planta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.planta-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.planta-card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
}

.planta-card-body {
    padding: 16px;
}

.planta-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.planta-stat .value { font-weight: 600; }

/* ===== Forms ===== */
.form-premium .form-control,
.form-premium .form-select {
    border-radius: 7px;
    border: 1px solid var(--border);
    padding: 8px 12px;
    font-size: 13.5px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-premium .form-control:focus,
.form-premium .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* Fix: Tom Select dropdown above Bootstrap modals (backdrop=1050, dialog=1055) */
.ts-dropdown {
    z-index: 1060 !important;
}

.form-premium .form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Fix: Tom Select dropdown above Bootstrap modals (backdrop=1050, dialog=1055) */
.ts-dropdown {
    z-index: 1060 !important;
}

/* ===== Breadcrumb ===== */
.breadcrumb-premium {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    font-size: 13px;
}

.breadcrumb-premium a {
    color: var(--accent-dark);
    text-decoration: none;
}

.breadcrumb-premium a:hover {
    text-decoration: underline;
}

.breadcrumb-premium .separator {
    color: var(--text-secondary);
}

.breadcrumb-premium .current {
    color: var(--text-secondary);
}

/* ===== Horometros (overrides) ===== */
.equipo-row.registrado {
    background-color: #f0fdf4;
}

.equipo-row.pendiente {
    background-color: #fef2f2;
}

/* ===== Tabs ===== */
.tabs-premium {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.tabs-premium a {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.tabs-premium a:hover {
    color: var(--text-primary);
}

.tabs-premium a.active {
    color: var(--accent-dark);
    border-bottom-color: var(--accent-dark);
}

.tabs-premium .tab-badge {
    background: var(--badge-pendiente-bg);
    color: var(--badge-pendiente-text);
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 6px;
}

/* ===== Alerts ===== */
.alert-premium {
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13.5px;
    border: 1px solid var(--border);
    background: #eff6ff;
    color: #1e40af;
}

/* ===== Responsive: not needed (desktop only) ===== */

/* ===== Progress bar overrides ===== */
.progress {
    border-radius: 4px;
    background-color: var(--border);
}

.progress-bar.bg-success { background-color: #10b981 !important; }
.progress-bar.bg-warning { background-color: #f59e0b !important; }
.progress-bar.bg-danger { background-color: #ef4444 !important; }

/* ===== Empty state ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== Info table (orden detail) ===== */
.info-table {
    width: 100%;
}

.info-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 0;
    width: 140px;
    vertical-align: top;
}

.info-table td {
    padding: 8px 0;
    font-size: 13.5px;
}

/* ===== Status badges: new states ===== */
.badge-status.en_progreso { background: #dbeafe; color: #1e40af; }
.badge-status.en_progreso::before { background: #3b82f6; }

.badge-status.en_espera { background: #fef3c7; color: #92400e; }
.badge-status.en_espera::before { background: #f59e0b; }

.badge-status.cancelado { background: #f1f5f9; color: #64748b; text-decoration: line-through; }
.badge-status.cancelado::before { background: #94a3b8; }

/* ===== Priority border ===== */
.prioridad-alta { border-left: 4px solid #ef4444 !important; }
.prioridad-media { border-left: 4px solid #f59e0b !important; }
.prioridad-baja { border-left: 4px solid #94a3b8 !important; }

/* ===== Priority badge ===== */
.badge-prioridad { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.badge-prioridad.alta { background: #fee2e2; color: #dc2626; }
.badge-prioridad.media { background: #fef3c7; color: #d97706; }
.badge-prioridad.baja { background: #f1f5f9; color: #64748b; }

/* ===== Maintenance type badge ===== */
.badge-tipo { font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.badge-tipo.preventivo { background: #dbeafe; color: #1d4ed8; }
.badge-tipo.correctivo { background: #fef3c7; color: #92400e; }
.badge-tipo.emergencia { background: #fee2e2; color: #dc2626; }

/* ===== OT Detail header ===== */
.ot-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.ot-header-info h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
}

.ot-header-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.ot-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* ===== Timeline (historial) ===== */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 16px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-card);
}

.timeline-content {
    font-size: 13px;
}

.timeline-content .text-muted {
    font-size: 12px;
}

/* ===== Photo grid ===== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.photo-grid img {
    width: 100%;
    border-radius: 6px;
    aspect-ratio: 1;
    object-fit: cover;
}

/* ===== Button sizes ===== */
.btn-premium.sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
}

/* ===== Schema Editor ===== */
.expr-preview {
    padding: 8px 12px;
    background: var(--bg-page);
    border-radius: 6px;
    font-size: 13px;
    min-height: 32px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.expr-preview .expr-highlight {
    display: inline-block;
    padding: 1px 6px;
    font-size: 12px;
    font-weight: 500;
    background: #d1fae5;
    color: #065f46;
    border-radius: 10px;
}

.param-pill {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s;
}

.param-pill:hover {
    background: #d1fae5;
}

.operator-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 14px;
    font-family: monospace;
    font-weight: 700;
    background: var(--bg-page);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.operator-btn:hover {
    background: #e2e8f0;
}

.function-btn {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    font-family: monospace;
    font-weight: 500;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.function-btn:hover {
    background: #fef3c7;
}

.comparison-btn {
    display: inline-block;
    padding: 2px 10px;
    height: 32px;
    font-size: 13px;
    font-family: monospace;
    font-weight: 700;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.comparison-btn:hover {
    background: #dbeafe;
}

.fx-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-dark);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.fx-btn:hover {
    background: rgba(56, 189, 248, 0.15);
}

.fx-btn .fx-icon {
    font-style: italic;
    font-weight: 700;
}

.expr-truncate {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-secondary);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.validation-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-page);
    border-radius: 8px;
    margin-bottom: 8px;
}

.validation-card:last-child {
    margin-bottom: 0;
}

/* ===== Rol Cards (usuario permisos) ===== */
.rol-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    background: var(--bg-card);
}

.rol-card:hover {
    border-color: #cbd5e1;
    background: var(--bg-page);
}

.rol-card.selected {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.04);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.rol-card.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: var(--bg-page);
}

.rol-card input[type="checkbox"] {
    display: none;
}

.rol-card .rol-nombre {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.rol-card .rol-descripcion {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.rol-card .rol-capacidades {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rol-card .rol-capacidades li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 1px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rol-card .rol-capacidades li i {
    color: #10b981;
    font-size: 11px;
    flex-shrink: 0;
}

.rol-card .rol-check-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all 0.15s;
}

.rol-card.selected .rol-check-indicator {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.modulo-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.modulo-header i {
    font-size: 18px;
}

.modulo-header .modulo-nombre {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.modulo-header .modulo-descripcion {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: auto;
}

.modulo-section {
    margin-bottom: 20px;
}

.modulo-section:last-child {
    margin-bottom: 0;
}

.modulo-roles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
