/* CSS de Estilo Premium - SARLaboral */
:root {
    --bg-dark: #0a0c14;
    --bg-panel: rgba(22, 28, 45, 0.7);
    --bg-panel-hover: rgba(30, 39, 61, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(138, 43, 226, 0.4);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.3);
    --accent-teal: #06b6d4;
    --accent-teal-glow: rgba(6, 182, 212, 0.3);
    
    --gradient-purple-teal: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    --gradient-card: linear-gradient(135deg, rgba(22, 28, 45, 0.8) 0%, rgba(13, 17, 28, 0.9) 100%);
    
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.2);
    --shadow-glow-teal: 0 0 20px rgba(6, 182, 212, 0.2);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* Scrollbar Personalizado */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Contenedor Principal de la App */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    background: linear-gradient(180deg, rgba(13, 17, 28, 0.95) 0%, rgba(8, 10, 18, 0.98) 100%);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    backdrop-filter: blur(10px);
}

.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.logo-accent {
    background: var(--gradient-purple-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tarjeta Perfil de Usuario */
.user-profile-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-premium);
}

.user-profile-card .avatar {
    background: var(--gradient-purple-teal);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.profile-name {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.profile-badge {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    text-transform: uppercase;
}

.badge-diamante {
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent-teal);
    border: 1px solid rgba(6, 182, 212, 0.4);
}

.badge-plata {
    background: rgba(156, 163, 175, 0.2);
    color: #d1d5db;
    border: 1px solid rgba(156, 163, 175, 0.4);
}

.badge-oro {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Navegación Sidebar */
.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sidebar-nav a:hover:not(.nav-disabled) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.sidebar-nav a.active {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: var(--shadow-glow-purple);
}

.sidebar-nav a.nav-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    position: relative;
}

.sidebar-nav a.nav-disabled::after {
    content: "\f023";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Wrapper Contenido */
.main-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header de la App */
.app-header {
    height: 80px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 12, 20, 0.5);
    backdrop-filter: blur(10px);
}

.header-search {
    position: relative;
    width: 320px;
}

.header-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-search input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    color: var(--text-primary);
    outline: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.header-search input:focus {
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-glow-purple);
    background: rgba(255, 255, 255, 0.08);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notification-btn {
    color: var(--text-secondary);
    font-size: 1.2rem;
    position: relative;
    text-decoration: none;
}

.notification-btn .dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: var(--accent-teal);
    border-radius: 50%;
}

.user-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* Área de Contenido */
.content-container {
    padding: 2.5rem 2rem;
    flex: 1;
}

.app-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Dashboard de Soluciones Grid & Header Titles */
.dashboard-title-area,
.admin-header {
    margin-bottom: 2rem;
}

.dashboard-title-area h2,
.admin-header h2,
.page-header h2,
.tickets-header h2,
.admin-module h2,
h2.title-gradient {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-purple-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.dashboard-title-area h2 i,
.admin-header h2 i,
.page-header h2 i,
.tickets-header h2 i,
.admin-module h2 i,
h2.title-gradient i {
    background: var(--gradient-purple-teal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-title-area p,
.admin-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Tarjeta de Solución (Premium Glass Card) */
.solution-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    text-decoration: none;
    color: inherit;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.solution-card:hover:not(.locked) {
    transform: translateY(-5px);
    border-color: var(--border-color-glow);
    box-shadow: var(--shadow-glow-purple), var(--shadow-premium);
}

.solution-card:hover:not(.locked)::before {
    opacity: 1;
}

.card-icon-wrapper {
    background: rgba(255, 255, 255, 0.04);
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-purple);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.solution-card:hover:not(.locked) .card-icon-wrapper {
    background: var(--gradient-purple-teal);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
}

.card-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: auto;
}

.learn-more {
    color: var(--accent-teal);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.2s ease;
}

.solution-card:hover:not(.locked) .learn-more {
    transform: translateX(3px);
}

/* Tarjetas Bloqueadas (Locked) */
.solution-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.solution-card.locked .card-footer {
    color: var(--text-muted);
}

.lock-badge {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-demo {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-teal);
    border: 1px solid rgba(6, 182, 212, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
}

/* Floating Role Simulator */
.role-simulator-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(13, 17, 28, 0.9);
    border: 1px solid var(--accent-purple);
    border-radius: 16px;
    padding: 0.8rem 1.2rem;
    box-shadow: var(--shadow-glow-purple), var(--shadow-premium);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    backdrop-filter: blur(15px);
}

.simulator-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-purple);
}

.role-simulator-widget select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-simulator-widget select:focus {
    border-color: var(--accent-teal);
}

.role-simulator-widget select option {
    background: var(--bg-dark);
    color: white;
}

/* CHAT TRÍA INTERFACE */
.chat-page-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    height: calc(100vh - 200px);
}

.chat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

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

.chat-bot-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bot-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient-purple-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: var(--shadow-glow-purple);
}

.bot-status h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.bot-status .status-indicator {
    font-size: 0.75rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.chat-history {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(10, 12, 20, 0.2);
}

/* Burbujas de Mensaje */
.message {
    max-width: 75%;
    padding: 1rem 1.25rem;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.5;
    position: relative;
    animation: fadeInUp 0.3s ease;
}

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

.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-top-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background: var(--accent-purple);
    color: white;
    border-top-right-radius: 4px;
    box-shadow: var(--shadow-glow-purple);
}

.message.system-alert {
    align-self: center;
    max-width: 90%;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    text-align: center;
}

.chat-input-area {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(13, 17, 28, 0.5);
}

.chat-input-form {
    display: flex;
    gap: 1rem;
}

.chat-input-form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.85rem 1.2rem;
    color: white;
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.chat-input-form input:focus {
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-glow-purple);
    background: rgba(255, 255, 255, 0.08);
}

.send-btn {
    background: var(--gradient-purple-teal);
    color: white;
    border: none;
    border-radius: 14px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow-purple);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow-teal);
}

/* Lateral Info Chat */
.chat-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-premium);
}

.info-card h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-teal);
}

.info-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-card li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.info-card li i {
    color: var(--accent-purple);
    margin-top: 0.2rem;
}

/* Modales e Interfaz de Pago */
.payment-simulation-box {
    margin-top: 1rem;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-teal);
    font-family: var(--font-heading);
}

.pay-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Tickets Layout (Solicitudes) */
.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-primary {
    background: var(--gradient-purple-teal);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-purple);
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-premium);
}

.ticket-main h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.ticket-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.ticket-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ticket-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-abierto {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-valorado {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-respondido {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ticket-action {
    display: flex;
    gap: 0.5rem;
}

/* FORM CREATE TICKET */
.form-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    max-width: 600px;
    box-shadow: var(--shadow-premium);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: white;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-glow-purple);
}

/* Light Theme Variables & Overrides */
body.light-theme {
    --bg-dark: #f8fafc;
    --bg-panel: rgba(255, 255, 255, 0.85);
    --bg-panel-hover: rgba(243, 244, 246, 0.95);
    --border-color: rgba(0, 0, 0, 0.1);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(249, 250, 251, 0.95) 100%);
}

body.light-theme .app-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.98) 100%);
}

body.light-theme .app-header {
    background: rgba(255, 255, 255, 0.8);
}

body.light-theme .role-simulator-widget select {
    color: var(--text-primary);
}

body.light-theme .role-simulator-widget select option {
    background: #ffffff;
    color: var(--text-primary);
}

body.light-theme .sidebar-nav a {
    color: var(--text-secondary);
}

body.light-theme .sidebar-nav a:hover:not(.nav-disabled) {
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.05);
}

body.light-theme .sidebar-nav a.active {
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

body.light-theme .chat-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .chat-history {
    background: #f8fafc !important;
}

body.light-theme .message.bot {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

body.light-theme .chat-input-area {
    background: #f8fafc !important;
    border-top-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .chat-input-form input {
    color: #111827 !important;
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}

body.light-theme .header-search input {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.8);
}

body.light-theme input,
body.light-theme select,
body.light-theme textarea {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

body.light-theme select option {
    background-color: #ffffff !important;
    color: #1e293b !important;
}

body.light-theme .glass-panel {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .calendar-row {
    background: rgba(241, 245, 249, 0.8) !important;
}

body.light-theme #editCalendarModal .glass-panel {
    background: #ffffff !important;
    color: #1e293b !important;
}

/* Estándar de Tarjetas: Radio 15px & Padding Mejorado */
.glass-panel,
.calendar-row,
.month-card-item,
.event-item-card,
.metric-card-item,
#editCalendarModal .glass-panel {
    border-radius: 15px !important;
}

body.light-theme .month-card-item,
body.light-theme .event-item-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important;
}

body.light-theme .month-pill-btn:not(.active) {
    background: #ffffff !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
}

/* ==========================================
   TRÍA INTERACTIVE ONBOARDING HERO BANNER
   ========================================== */
.tria-interactive-hero {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(6, 182, 212, 0.12) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 1.8rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.tria-hero-header {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    position: relative;
    margin-bottom: 1.5rem;
}

.tria-avatar-box {
    position: relative;
    flex-shrink: 0;
}

.tria-avatar-box .bot-avatar.large {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.8rem;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.tria-avatar-box .online-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background-color: #10b981;
    border: 2px solid var(--bg-card);
    border-radius: 50%;
}

.tria-hero-text {
    flex: 1;
}

.tria-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(139, 92, 246, 0.18);
    color: var(--accent-purple);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.tria-hero-text h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.tria-hero-text p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.tria-dismiss-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tria-dismiss-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Quick Actions Grid */
.tria-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.tria-quick-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tria-quick-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(139, 92, 246, 0.4);
}

.tria-quick-card .quick-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tria-quick-card.accent-purple .quick-icon { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.tria-quick-card.accent-teal .quick-icon { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.tria-quick-card.accent-blue .quick-icon { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.tria-quick-card.accent-orange .quick-icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.tria-quick-card.accent-green .quick-icon { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.tria-quick-card .quick-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tria-quick-card .quick-info strong {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
}

.tria-quick-card .quick-info span {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.tria-quick-card .arrow-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.tria-quick-card:hover .arrow-icon {
    transform: translateX(3px);
    color: var(--accent-purple);
}

/* Quick Query Box */
.tria-quick-query-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
}

.tria-quick-query-box input {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1.2rem !important;
    border-radius: 10px !important;
    font-size: 0.88rem !important;
}

.tria-quick-query-box button {
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0.75rem 1.4rem !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3) !important;
    transition: all 0.2s ease !important;
}

.tria-quick-query-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45) !important;
}

body.light-theme .tria-interactive-hero {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%) !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .tria-quick-card {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .tria-quick-query-box {
    background: #f8fafc !important;
}

/* ==========================================
   1. SCORE DE CUMPLIMIENTO LABORAL (GAMIFICACIÓN)
   ========================================== */
.labor-score-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.4rem;
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.score-circle-box {
    position: relative;
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-circle-box svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-circle-box circle {
    fill: none;
    stroke-width: 7;
    stroke-linecap: round;
}

.score-circle-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.score-circle-progress {
    stroke: #10b981;
    stroke-dasharray: 220;
    stroke-dashoffset: 26; /* 88% */
    transition: stroke-dashoffset 1s ease;
}

.score-number-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-number-text strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.score-number-text span {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.score-info-content {
    flex: 1;
}

.score-info-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-badge-low-risk {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.score-checklist-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.score-pill {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.score-pill.done {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.score-pill.pending {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

/* ==========================================
   3. DICTADO POR VOZ (MICRÓFONO WEB SPEECH API)
   ========================================== */
.voice-dictation-btn {
    background: rgba(139, 92, 246, 0.12) !important;
    color: #8b5cf6 !important;
    border: 1px solid rgba(139, 92, 246, 0.3) !important;
    border-radius: 10px !important;
    padding: 0.65rem 0.9rem !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
}

.voice-dictation-btn:hover {
    background: rgba(139, 92, 246, 0.25) !important;
    transform: scale(1.05);
}

.voice-dictation-btn.recording {
    background: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    animation: mic-pulse 1.2s infinite;
}

@keyframes mic-pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================
   4. ALERTAS INTELIGENTES DE CALENDARIO
   ========================================== */
.calendar-alerts-banner {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 16px;
    padding: 1.1rem 1.4rem;
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.alert-item-group {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.alert-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-text-box strong {
    color: var(--text-primary);
    font-size: 0.92rem;
    display: block;
}

.alert-text-box span {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.alert-cta-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    white-space: nowrap;
}

/* ==========================================
   6. WIZARD PASO A PASO PARA PLANTILLAS
   ========================================== */
.wizard-stepper-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.wizard-stepper-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
    transform: translateY(-50%);
}

.wizard-step-node {
    position: relative;
    z-index: 2;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.wizard-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.wizard-step-item.active .wizard-step-node {
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    border-color: #8b5cf6;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.wizard-step-item.completed .wizard-step-node {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.wizard-step-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.wizard-step-item.active .wizard-step-label {
    color: var(--text-primary);
    font-weight: 700;
}

.wizard-step-panel {
    display: none;
}

.wizard-step-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.split-preview-box {
    background: #ffffff;
    color: #1e293b;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    max-height: 450px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

body.light-theme .labor-score-widget {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .score-pill {
    background: #f8fafc !important;
}


