/* =====================================================
   PRODEXA - Sistema de Notificaciones
   CSS CORREGIDO - Layout 3 columnas
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563EB;
    --primary-dark: #1E3A8A;
    --primary-light: #EFF6FF;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --white: #FFFFFF;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    font-size: 14px;
}

/* =====================================================
   UTILIDADES
   ===================================================== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast */
#toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
}

.toast {
    background: var(--white);
    padding: 12px 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 8px;
    border-left: 4px solid var(--primary);
    min-width: 280px;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

.toast-title { font-weight: 600; font-size: 13px; }
.toast-message { font-size: 12px; color: var(--gray-500); }

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-container {
    min-height: 100vh;
    display: flex;
}

.login-form-side {
    width: 55%;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: var(--white);
}

.login-logo {
    position: absolute;
    top: 11px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    background: var(--primary);
    padding: 8px;
    border-radius: var(--radius);
}

.logo-icon svg { width: 24px; height: 24px; color: var(--white); }
.logo-text { font-size: 20px; font-weight: 800; color: var(--primary-dark); }

.login-content { max-width: 400px; margin: 0 auto; width: 100%; }

.login-header { text-align: center; margin-bottom: 12px; }
.login-title { font-size: 42px; font-weight: 900; color: var(--primary-dark); margin-bottom: 12px; }

.login-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0.6;
}

.subtitle-line { height: 1px; width: 40px; background: var(--primary-dark); }
.login-subtitle p { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; color: var(--primary-dark); }

.login-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 11px; font-weight: 700; color: var(--primary-dark); text-transform: uppercase; letter-spacing: 0.05em; }

.form-input {
    height: 48px;
    padding: 0 16px;
    background: var(--gray-50);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

/* Custom Select */
.custom-select { position: relative; }

.select-trigger {
    height: 48px;
    padding: 0 16px;
    background: var(--gray-50);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.custom-select.open .select-trigger { border-color: var(--primary); }
.select-value { font-size: 14px; font-weight: 600; color: var(--gray-700); }
.select-arrow { width: 18px; height: 18px; color: var(--gray-400); transition: transform 0.2s; }
.custom-select.open .select-arrow { transform: rotate(180deg); }

.select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.custom-select.open .select-options { display: block; }

.select-option {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-option:hover { background: var(--gray-50); }
.select-option.selected { background: var(--primary-light); color: var(--primary); }
.select-option span { font-size: 13px; font-weight: 600; }
.option-check { width: 14px; height: 14px; display: none; }
.select-option.selected .option-check { display: block; color: var(--primary); }

/* Password */
.password-input-wrapper { position: relative; }
.password-input-wrapper .form-input { padding-right: 44px; }

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 4px;
}

.password-toggle svg { width: 18px; height: 18px; }

/* Form Options */
.form-options { display: flex; justify-content: space-between; align-items: center; }

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-wrapper input { display: none; }

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
}

.checkbox-wrapper input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label { font-size: 11px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; }

.forgot-password {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400);
    cursor: pointer;
}

.forgot-password:hover { color: var(--primary); }

/* Login Button */
.btn-login {
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.2s;
    margin-top: 3%;

}

.btn-login:hover { background: var(--primary-dark); }

.login-footer { margin-top: 32px; text-align: center; padding-top: 20px; border-top: 1px solid var(--gray-100); }
.login-footer p { font-size: 12px; color: var(--gray-400); }
.login-footer span { font-weight: 600; color: var(--gray-600); }

/* Right Side */
.login-illustration-side {
    width: 45%;
    background: var(--primary-light);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.illustration-text { position: absolute; top: 24px; right: 24px; text-align: right; }
.illustration-text p { font-size: 13px; color: var(--gray-500); max-width: 240px; line-height: 1.5; }
.illustration-text span { font-size: 11px; font-weight: 600; color: var(--primary); }

.illustration-image { width: 100%; max-width: 500px; margin-bottom: -20px; }
.illustration-image img { width: 100%; height: auto; }

/* =====================================================
   SELECTION PAGE
   ===================================================== */
.selection-container {
    min-height: 100vh;
    background: var(--gray-50);
    display: flex;
    flex-direction: column;
}

.selection-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo { display: flex; align-items: center; gap: 10px; }
.header-logo .logo-icon { padding: 6px; }
.header-logo .logo-icon svg { width: 18px; height: 18px; }
.header-logo .logo-text { font-size: 18px; }

.logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.logout-btn:hover { color: var(--primary); }
.logout-btn svg { width: 16px; height: 16px; }

.selection-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.selection-title { text-align: center; margin-bottom: 32px; }
.selection-title h1 { font-size: 28px; font-weight: 900; color: var(--primary-dark); margin-bottom: 8px; }
.selection-title p { font-size: 14px; color: var(--gray-500); }

.modules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 700px; }

.module-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s;
}

.module-card:hover { transform: translateY(-4px); }

.module-icon { width: 120px; height: 120px; margin: 0 auto 16px; }
.module-icon img { width: 100%; height: 100%; object-fit: contain; }

.module-title { font-size: 18px; font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; }
.module-description { font-size: 13px; color: var(--gray-500); margin-bottom: 20px; }

.module-btn {
    width: 100%;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-btn:hover { background: var(--primary-dark); }

.selection-footer { margin-top: 24px; font-size: 11px; color: var(--gray-400); }

/* =====================================================
   DASHBOARD PAGE - LAYOUT CORRECTO 3 COLUMNAS
   ===================================================== */
.dashboard-container {
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 60px;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    transition: width 0.3s;
    z-index: 100;
    flex-shrink: 0;
}

.sidebar.expanded { width: 200px; }

.sidebar-header {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

.sidebar.expanded .sidebar-header { justify-content: flex-start; gap: 10px; }

.sidebar-logo svg { width: 22px; height: 22px; color: var(--white); }
.sidebar-title { font-size: 14px; font-weight: 700; color: var(--white); display: none; }
.sidebar.expanded .sidebar-title { display: block; }

.sidebar-nav { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 4px; }

.nav-item {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar.expanded .nav-item { justify-content: flex-start; padding: 0 12px; gap: 10px; }

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item span { font-size: 10px; font-weight: 600; text-transform: uppercase; display: none; }
.sidebar.expanded .nav-item span { display: block; }

.nav-item:hover { background: rgba(255,255,255,0.1); }
.nav-item.active { background: var(--white); color: var(--primary); }

.sidebar-footer { padding: 12px; }

.logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 10px;
}

.sidebar.expanded .logout-link { justify-content: flex-start; }
.logout-link svg { width: 14px; height: 14px; }
.logout-link span { display: none; }
.sidebar.expanded .logout-link span { display: block; }

/* Main Dashboard - 2 columnas: centro y derecha */
.dashboard-main {
    flex: 1;
    padding: 12px;
    display: flex;
    gap: 12px;
    overflow: hidden;
    background: var(--gray-50);
}

/* Centro: Info Card + Cronograma */
.center-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Derecha: Calendario + Confeccionistas + Stats */
.right-column {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

/* =====================================================
   INFO CARD (arriba del centro)
   ===================================================== */
.info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    overflow: hidden;
    position: relative;
    height: 115px;
    flex-shrink: 0;
}

.card-loading, .no-data {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray-400);
}

.no-data svg { width: 32px; height: 32px; opacity: 0.3; }

/* Card Navigation */
.card-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.card-nav svg { width: 14px; height: 14px; }
.card-nav-prev { left: 8px; background: rgba(255,255,255,0.3); color: var(--white); }
.card-nav-next { right: 8px; background: var(--primary-light); color: var(--primary); }

/* Card Left */
.card-left {
    width: 180px;
    background: linear-gradient(135deg, #2F75DD 0%, #1E5BB8 100%);
    padding: 10px;
    padding-left: calc(25px + 2%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.card-avatar { width: 32px; height: 32px; border-radius: var(--radius); overflow: hidden; background: #A3D8C6; }
.card-avatar img { width: 100%; height: 100%; object-fit: cover; }

.card-person-info { margin-top: 4px; }
.card-person-info h2 { font-size: 11px; font-weight: 700; line-height: 1.2; }
.card-person-info p { font-size: 8px; opacity: 0.7; margin-top: 1px; text-transform: uppercase; }

.card-dates { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.date-item .date-label { font-size: 7px; opacity: 0.6; display: block; }
.date-item .date-value { font-size: 10px; font-weight: 600; }

/* Card Right */
.card-right {
    flex: 1;
    background: var(--primary-light);
    padding: 10px 14px;
    display: flex;
    align-items: center;
}

.card-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 100%;
}

.info-item { text-align: center; }
.info-item .info-label { font-size: 7px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; margin-bottom: 1px; }
.info-item .info-value { font-size: 10px; font-weight: 600; color: var(--gray-700); }

.info-item-double { display: flex; gap: 8px; justify-content: center; }
.info-sub { text-align: center; }

.info-status {
    font-size: 8px;
    font-weight: 600;
    padding: 2px 6px;
    background: var(--white);
    border-radius: 4px;
    color: var(--warning);
    display: inline-block;
}

/* =====================================================
   MINI CALENDAR
   ===================================================== */
.mini-calendar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 10px;
    box-shadow: var(--shadow);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.calendar-header h3 { font-size: 13px; font-weight: 600; color: var(--gray-800); }

.calendar-nav { display: flex; gap: 4px; }

.cal-nav-btn {
    width: 22px;
    height: 22px;
    background: var(--gray-100);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-nav-btn:hover { background: var(--primary); color: var(--white); }
.cal-nav-btn svg { width: 12px; height: 12px; }

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 4px;
}

.calendar-weekdays span { font-size: 8px; font-weight: 600; color: var(--gray-400); }

.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }

.cal-day {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 500;
    border-radius: 50%;
    margin: 0 auto;
    cursor: pointer;
}

.cal-day.today { background: var(--primary); color: var(--white); font-weight: 700; }
.cal-day.has-delivery { background: #ECFDF5; color: var(--success); font-weight: 600; }

/* =====================================================
   CONFECCIONISTAS LIST
   ===================================================== */
.confeccionistas-list {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

.confeccionistas-list h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.confeccionistas-list h3 svg { width: 12px; height: 12px; }

.list-container {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.conf-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid;
}

.conf-item.color-red { background: #FEF2F2; border-color: #FECACA; }
.conf-item.color-yellow { background: #FFFBEB; border-color: #FDE68A; }
.conf-item.color-green { background: #ECFDF5; border-color: #A7F3D0; }
.conf-item.color-gray { background: var(--gray-100); border-color: var(--gray-200); }

.conf-avatar { position: relative; }
.conf-avatar img { width: 28px; height: 28px; border-radius: 50%; }

.conf-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 7px;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

.color-red .conf-badge { background: var(--danger); }
.color-yellow .conf-badge { background: var(--warning); }
.color-green .conf-badge { background: var(--success); }
.color-gray .conf-badge { background: var(--gray-400); }

.conf-info { flex: 1; min-width: 0; }
.conf-info h4 { font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conf-info p { font-size: 8px; color: var(--gray-500); }

.color-red .conf-info h4 { color: var(--danger); }
.color-yellow .conf-info h4 { color: var(--warning); }
.color-green .conf-info h4 { color: var(--success); }

.conf-day { text-align: right; }
.day-label { font-size: 7px; font-weight: 600; color: var(--gray-400); display: block; text-transform: uppercase; }
.day-value { font-size: 14px; font-weight: 700; }

.color-red .day-value { color: var(--danger); }
.color-yellow .day-value { color: var(--warning); }
.color-green .day-value { color: var(--success); }

/* =====================================================
   STATS CARD
   ===================================================== */
.stats-card {
    background: var(--white);
    padding: 10px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.stats-row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.stat-item { text-align: center; }
.stat-label { font-size: 8px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; }
.stat-value { font-size: 20px; font-weight: 700; }
.stat-green { color: var(--success); }
.stat-red { color: var(--danger); }

.btn-report {
    width: 130%;
    height: 72px;
    background: #F27256;
    color: var(--white);
    border: none;
    border-radius: 5%;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-report:hover { background: #E06145; }

/* =====================================================
   WEEKLY SCHEDULE (debajo del info card)
   ===================================================== */
.weekly-schedule {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.schedule-header h3 { font-size: 13px; font-weight: 600; }

.schedule-nav { display: flex; gap: 4px; }

.schedule-nav-btn {
    width: 26px;
    height: 26px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-nav-btn:hover { background: var(--primary); color: var(--white); }
.schedule-nav-btn svg { width: 14px; height: 14px; }

/* Grid principal del cronograma */
.schedule-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* Header con días - FIJO arriba */
.schedule-days-header {
    display: flex;
    flex-shrink: 0;
    background: var(--white);
    border-bottom: 2px solid var(--gray-200);
    z-index: 10;
}

.schedule-days-header .time-corner {
    width: 55px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--gray-200);
}

.schedule-days-header .time-corner svg {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
}

.schedule-days-header .days-row {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.day-header {
    text-align: center;
    padding: 8px 4px;
    border-left: 1px solid var(--gray-100);
    background: var(--white);
}

.day-header:first-child { border-left: none; }

.day-num { font-size: 20px; font-weight: 700; color: var(--gray-700); display: block; }
.day-name { font-size: 9px; color: var(--gray-400); text-transform: uppercase; font-weight: 600; }

/* Contenido scrolleable - horas + eventos */
.schedule-body {
    flex: 1;
    display: flex;
    overflow-y: auto;
    min-height: 0;
}

/* Columna de horas - se mueve con scroll vertical pero está a la izquierda */
.schedule-times {
    width: 55px;
    flex-shrink: 0;
    background: var(--gray-50);
    border-right: 1px solid var(--gray-200);
}

.time-slot {
    height: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-100);
}

/* Contenedor de días con eventos */
.schedule-days-content {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.schedule-day {
    border-left: 1px solid var(--gray-100);
    position: relative;
    min-height: 540px; /* 9 horas * 60px */
}

.schedule-day:first-child { border-left: none; }

/* Líneas de hora en cada día */
.hour-line {
    height: 60px;
    border-bottom: 1px solid var(--gray-100);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.hour-line:nth-child(odd) { background: rgba(0,0,0,0.01); }

.hour-line:hover {
    background: rgba(37, 99, 235, 0.05);
}

.hour-line:hover::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

/* Event Blocks */
.event-block {
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 4px;
    border-radius: 4px;
    border-left: 3px solid;
    cursor: pointer;
    min-height: 54px;
    overflow: hidden;
    font-size: 8px;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.event-block.color-red { background: #FEF2F2; border-left-color: var(--danger); }
.event-block.color-yellow { background: #FFFBEB; border-left-color: var(--warning); }
.event-block.color-green { background: #ECFDF5; border-left-color: var(--success); }
.event-block.color-gray { background: var(--gray-100); border-left-color: var(--gray-400); }

.event-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.event-name { font-weight: 700; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.event-time { font-size: 7px; color: var(--gray-500); font-weight: 600; }

.color-red .event-name { color: var(--danger); }
.color-yellow .event-name { color: var(--warning); }
.color-green .event-name { color: var(--success); }

.event-details { display: flex; justify-content: space-between; font-size: 7px; color: var(--gray-500); margin-bottom: 2px; }

.event-status { display: flex; justify-content: space-between; align-items: center; }
.event-status .status-badge { font-size: 6px; padding: 1px 4px; background: rgba(0,0,0,0.1); border-radius: 3px; }
.event-status .status-date { font-size: 7px; color: var(--gray-400); }

/* Badge de múltiples referencias */
.event-multi-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary);
    color: white;
    font-size: 7px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 8px;
    min-width: 14px;
    text-align: center;
}

.event-time { font-size: 7px; color: var(--gray-500); }
.event-details { font-size: 7px; color: var(--gray-600); display: flex; justify-content: space-between; }
.event-status { display: flex; justify-content: space-between; margin-top: 1px; }

.status-badge {
    font-size: 6px;
    font-weight: 600;
    padding: 1px 3px;
    background: rgba(255,255,255,0.7);
    border-radius: 2px;
}

.status-date { font-size: 6px; color: var(--gray-400); }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--white);
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
}

.modal-header {
    background: var(--primary);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-avatar { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; border: 3px solid rgba(255,255,255,0.3); }
.modal-avatar img { width: 100%; height: 100%; object-fit: cover; }

.modal-person h2 { font-size: 16px; font-weight: 700; color: var(--white); }
.modal-person p { font-size: 12px; color: rgba(255,255,255,0.8); }

.modal-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.2);
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 6px;
    font-size: 10px;
    color: var(--white);
}

.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

.modal-body { padding: 16px; }

.modal-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: var(--gray-50);
    padding: 12px;
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.modal-date .date-label { font-size: 10px; color: var(--gray-400); font-weight: 600; display: block; margin-bottom: 2px; }
.modal-date .date-value { font-size: 13px; font-weight: 600; color: var(--gray-700); }

.modal-production {
    background: var(--primary-light);
    padding: 12px;
    border-radius: var(--radius);
}

.production-header { margin-bottom: 10px; }
.production-label { font-size: 9px; color: var(--gray-500); font-weight: 600; display: block; }
.production-name { font-size: 18px; font-weight: 700; color: #f16b4e; }

.production-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.detail-label { font-size: 9px; color: var(--gray-500); display: block; }
.detail-value { font-size: 12px; font-weight: 600; color: var(--gray-700); }

.production-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(37, 99, 235, 0.2);
    padding-top: 10px;
}

.production-total span:first-child { font-size: 11px; color: var(--gray-500); }
.total-value { font-size: 18px; font-weight: 800; color: var(--primary); }

.modal-actions { display: flex; gap: 8px; padding: 0 16px 16px; }

/* Sección de cambio de estado en modal */
.modal-estado-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.estado-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.estado-select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232563EB' 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 10px center;
    background-size: 18px;
}

.estado-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Modal con múltiples referencias - DISEÑO COMPACTO Y PROFESIONAL */
.modal-referencias-list {
    margin-top: 14px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 6px;
}

.modal-referencias-list::-webkit-scrollbar {
    width: 4px;
}

.modal-referencias-list::-webkit-scrollbar-track {
    background: #e8f1f8;
    border-radius: 4px;
}

.modal-referencias-list::-webkit-scrollbar-thumb {
    background: #9bc3e3;
    border-radius: 4px;
}

.modal-referencias-title {
    font-size: 10px;
    font-weight: 700;
    color: #1a315e;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    background: #e8f1f8;
    border-radius: 8px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.modal-referencias-title svg {
    width: 14px;
    height: 14px;
    color: #3988c8;
}

.modal-referencias-title .ref-count {
    background: #3988c8;
    color: white;
    font-size: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Tarjeta de referencia compacta */
.ref-card {
    background: var(--white);
    border-radius: 8px;
    padding: 0;
    margin-bottom: 8px;
    border: 1px solid #9bc3e3;
    overflow: hidden;
    transition: all 0.2s ease;
}

.ref-card:hover {
    border-color: #3988c8;
    box-shadow: 0 2px 8px rgba(57, 136, 200, 0.15);
}

.ref-card:last-child { margin-bottom: 0; }

/* Header de la tarjeta con color */
.ref-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #e8f1f8;
    border-bottom: 1px solid #9bc3e3;
}

.ref-card-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.ref-card-number {
    width: 26px;
    height: 26px;
    background: #f16b4e;
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.ref-card-producto {
    font-size: 13px;
    font-weight: 700;
    color: #1a315e;
    line-height: 1.2;
}

.ref-card-estado {
    font-size: 9px;
    padding: 4px 10px;
    background: var(--white);
    color: #1a315e;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid #9bc3e3;
}

/* Contenido de la tarjeta */
.ref-card-content {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ref-card-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    flex: 1;
}

.ref-detail-item {
    text-align: left;
}

.ref-detail-label {
    font-size: 8px;
    color: #9bc3e3;
    text-transform: uppercase;
    display: block;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.ref-detail-value {
    font-size: 12px;
    font-weight: 700;
    color: #1a315e;
}

/* Select de estado inline */
.ref-estado-wrapper {
    display: flex;
    flex-direction: column;
    margin-left: auto;
    padding-left: 12px;
    border-left: 1px solid #e8f1f8;
    min-width: 110px;
}

.ref-estado-wrapper .ref-estado-label {
    font-size: 8px;
    color: #9bc3e3;
    margin-bottom: 3px;
    display: block;
}

.ref-estado-select {
    height: 32px;
    padding: 0 28px 0 10px;
    background: #e8f1f8;
    border: 1px solid #9bc3e3;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #1a315e;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: 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='%231a315e' 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 6px center;
    background-size: 14px;
}

.ref-estado-select:hover {
    border-color: #3988c8;
}

.ref-estado-select:focus {
    outline: none;
    border-color: #3988c8;
    box-shadow: 0 0 0 2px rgba(57, 136, 200, 0.2);
}

/* Colores de estado en el badge - paleta */
.ref-card-estado.estado-corte { background: #e8f1f8; color: #1a315e; border-color: #9bc3e3; }
.ref-card-estado.estado-bordado { background: #e8f1f8; color: #3988c8; border-color: #3988c8; }
.ref-card-estado.estado-estampado { background: #fff5f3; color: #f16b4e; border-color: #f16b4e; }
.ref-card-estado.estado-tintoreria { background: #e8f1f8; color: #1a315e; border-color: #1a315e; }
.ref-card-estado.estado-piedras { background: #9bc3e3; color: #1a315e; border-color: #3988c8; }
.ref-card-estado.estado-entregado { background: #d1fae5; color: #047857; border-color: #6ee7b7; }

/* =====================================================
   MODAL NUEVO PEDIDO DESDE CRONOGRAMA
   ===================================================== */
#modalNuevoPedido {
    z-index: 1001;
}

#modalNuevoPedido.active {
    display: flex;
}

.modal-nuevo-pedido {
    background: var(--white);
    border-radius: 16px;
    width: 480px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-nuevo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    border-radius: 16px 16px 0 0;
}

.modal-nuevo-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 15px;
    font-weight: 700;
}

.modal-nuevo-title svg {
    width: 20px;
    height: 20px;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.modal-close-btn svg {
    width: 18px;
    height: 18px;
}

.modal-nuevo-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Info fecha/hora */
.modal-fecha-info {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.fecha-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: 10px;
    flex: 1;
}

.fecha-badge svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.fecha-badge span {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}

/* Form sections */
.form-section {
    margin-bottom: 16px;
}

.form-label-nuevo {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-input-nuevo {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s;
}

.form-input-nuevo:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

textarea.form-input-nuevo {
    height: auto;
    padding: 10px 12px;
    resize: none;
}

/* Lotes section */
.lotes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.btn-agregar-lote {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-agregar-lote:hover {
    background: #059669;
}

.btn-agregar-lote svg {
    width: 14px;
    height: 14px;
}

/* Lote item */
.lote-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.lote-item:last-child {
    margin-bottom: 0;
}

.lote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.lote-numero {
    font-size: 12px;
    font-weight: 700;
    color: #f16b4e;
    background: #fff5f3;
    padding: 4px 10px;
    border-radius: 6px;
}

.btn-eliminar-lote {
    width: 28px;
    height: 28px;
    background: #fef2f2;
    border: none;
    border-radius: 6px;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-eliminar-lote:hover {
    background: var(--danger);
    color: white;
}

.btn-eliminar-lote svg {
    width: 14px;
    height: 14px;
}

.lote-campos .campo-grupo {
    margin-bottom: 10px;
}

.lote-campos .campo-grupo:last-child {
    margin-bottom: 0;
}

.lote-campos label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.lote-campos input,
.lote-campos select {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 12px;
}

.lote-campos input:focus,
.lote-campos select:focus {
    outline: none;
    border-color: var(--primary);
}

.campo-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

/* Footer modal */
.modal-nuevo-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    background: var(--gray-50);
    border-radius: 0 0 16px 16px;
    border-top: 1px solid var(--gray-200);
}

.btn-cancelar {
    flex: 1;
    height: 42px;
    background: var(--white);
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancelar:hover {
    background: var(--gray-100);
}

.btn-guardar {
    flex: 1;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-guardar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-guardar svg {
    width: 16px;
    height: 16px;
}

/* Header modal editar - color diferente */
.modal-editar-header {
    background: linear-gradient(135deg, #f16b4e 0%, #e55a3e 100%);
}

/* Botón editar en cada referencia */
.ref-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-editar-ref {
    width: 28px;
    height: 28px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-editar-ref:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-editar-ref svg {
    width: 14px;
    height: 14px;
}

/* Campos en fila para el modal de edición */
.campo-row-edit {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.campo-row-edit.dos-cols {
    grid-template-columns: repeat(2, 1fr);
}

.campo-grupo-edit {
    display: flex;
    flex-direction: column;
}

/* Botón eliminar pedido */
.btn-eliminar-pedido {
    height: 42px;
    padding: 0 16px;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-eliminar-pedido:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.btn-eliminar-pedido svg {
    width: 14px;
    height: 14px;
}

/* Modal editar - footer con 3 botones */
#modalEditarPedido .modal-nuevo-footer {
    display: flex;
    gap: 10px;
}

#modalEditarPedido .btn-cancelar {
    flex: 0 0 auto;
    padding: 0 20px;
}

#modalEditarPedido .btn-guardar {
    flex: 1;
}

/* =====================================================
   MODAL MEJORADO - INFO CONFECCIONISTA
   ===================================================== */
.modal-conf-info {
    display: flex;
    gap: 16px;
    padding: 10px 12px;
    background: #e8f1f8;
    border-radius: 8px;
    margin-bottom: 12px;
}

.conf-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #1a315e;
}

.conf-info-item svg {
    width: 14px;
    height: 14px;
    color: #3988c8;
}

/* Fechas extendidas */
.modal-dates-extended {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.modal-date-item {
    background: var(--white);
    border: 1px solid #9bc3e3;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.modal-date-item .date-label {
    font-size: 8px;
    color: #9bc3e3;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.modal-date-item .date-value {
    font-size: 13px;
    font-weight: 700;
    color: #1a315e;
}

.modal-date-item .date-value.highlight {
    color: #f16b4e;
}

/* Tarjeta de referencia mejorada */
.ref-card-info {
    display: flex;
    flex-direction: column;
}

.ref-card-sub {
    font-size: 9px;
    color: #9bc3e3;
    margin-top: 1px;
}

.ref-card-details-extended {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    flex: 1;
}

/* Botones de acción en cada referencia */
.btn-action-ref {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-action-ref svg {
    width: 14px;
    height: 14px;
}

.btn-action-ref.btn-ver {
    background: #1a315e;
    color: white;
}

.btn-action-ref.btn-ver:hover {
    background: #0f1f3d;
}

.btn-action-ref.btn-editar {
    background: #3988c8;
    color: white;
}

.btn-action-ref.btn-editar:hover {
    background: #2a6fa3;
}

.btn-action-ref.btn-eliminar {
    background: #fef2f2;
    color: #f16b4e;
}

.btn-action-ref.btn-eliminar:hover {
    background: #f16b4e;
    color: white;
}

/* Label estado en wrapper */
.ref-estado-wrapper .ref-estado-label {
    font-size: 9px;
    color: var(--gray-500);
    margin-bottom: 4px;
    display: block;
}

/* =====================================================
   MODAL VER DETALLE COMPLETO
   ===================================================== */
#modalVerDetalle {
    z-index: 1002;
}

.modal-ver-detalle {
    background: var(--white);
    border-radius: 12px;
    width: 460px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

.modal-ver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #3988c8;
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.modal-ver-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.modal-ver-footer {
    padding: 12px 16px;
    background: #e8f1f8;
    border-top: 1px solid #9bc3e3;
}

.btn-cerrar-detalle {
    width: 100%;
    height: 38px;
    background: #1a315e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cerrar-detalle:hover {
    background: #0f1f3d;
}

/* Contenido del detalle */
.detalle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.detalle-producto {
    font-size: 18px;
    font-weight: 800;
    color: #f16b4e;
}

.detalle-estado {
    font-size: 9px;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    background: #e8f1f8;
    color: #1a315e;
    border: 1px solid #9bc3e3;
}

.detalle-confeccionista {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #e8f1f8;
    border-radius: 8px;
    margin-bottom: 12px;
}

.detalle-confeccionista img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.detalle-confeccionista strong {
    display: block;
    font-size: 13px;
    color: #1a315e;
}

.detalle-confeccionista span {
    font-size: 10px;
    color: #9bc3e3;
}

.detalle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.detalle-item {
    background: var(--white);
    border: 1px solid #9bc3e3;
    border-radius: 6px;
    padding: 10px;
}

.detalle-label {
    font-size: 8px;
    color: #9bc3e3;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.detalle-value {
    font-size: 13px;
    font-weight: 700;
    color: #1a315e;
}

.detalle-value.highlight {
    color: #f16b4e;
    font-size: 14px;
}

.detalle-fechas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.detalle-fecha {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #e8f1f8;
    border-radius: 6px;
}

.detalle-fecha svg {
    width: 18px;
    height: 18px;
    color: #3988c8;
}

.detalle-fecha .fecha-label {
    font-size: 8px;
    color: #9bc3e3;
    display: block;
}

.detalle-fecha .fecha-value {
    font-size: 12px;
    font-weight: 700;
    color: #1a315e;
}

.detalle-fecha .fecha-value.text-danger {
    color: #f16b4e;
}

.detalle-contacto {
    display: flex;
    gap: 16px;
    padding: 10px;
    background: #e8f1f8;
    border-radius: 6px;
    margin-bottom: 12px;
}

.contacto-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #1a315e;
}

.contacto-item svg {
    width: 14px;
    height: 14px;
    color: #3988c8;
}

.detalle-observaciones {
    background: #fff5f3;
    border-radius: 6px;
    padding: 10px;
    border-left: 3px solid #f16b4e;
}

.detalle-observaciones .obs-label {
    font-size: 9px;
    font-weight: 700;
    color: #f16b4e;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.detalle-observaciones p {
    font-size: 12px;
    color: #1a315e;
    margin: 0;
}

/* =====================================================
   MODAL CONFIRMAR ELIMINACIÓN
   ===================================================== */
#modalConfirmarEliminar {
    z-index: 1003;
}

.modal-confirmar {
    background: var(--white);
    border-radius: 12px;
    width: 340px;
    max-width: 95vw;
    padding: 24px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

.confirmar-icon {
    width: 56px;
    height: 56px;
    background: #fff5f3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border: 2px solid #f16b4e;
}

.confirmar-icon svg {
    width: 28px;
    height: 28px;
    color: #f16b4e;
}

.modal-confirmar h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a315e;
    margin-bottom: 6px;
}

.modal-confirmar p {
    font-size: 12px;
    color: #9bc3e3;
    margin-bottom: 4px;
}

.confirmar-producto {
    font-size: 14px;
    font-weight: 700;
    color: #f16b4e;
    margin-bottom: 6px !important;
}

.confirmar-warning {
    font-size: 10px;
    color: #f16b4e;
    margin-bottom: 18px !important;
}

.confirmar-buttons {
    display: flex;
    gap: 10px;
}

.btn-confirmar-cancelar {
    flex: 1;
    height: 38px;
    background: #e8f1f8;
    border: 1px solid #9bc3e3;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #1a315e;
    cursor: pointer;
}

.btn-confirmar-cancelar:hover {
    background: #9bc3e3;
}

.btn-confirmar-eliminar {
    flex: 1;
    height: 38px;
    background: #f16b4e;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-confirmar-eliminar:hover {
    background: #e55a3e;
}

.btn-confirmar-eliminar svg {
    width: 14px;
    height: 14px;
}

.btn-action {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-delivered { background: var(--success); color: var(--white); }
.btn-delivered:hover { background: #059669; }
.btn-history { background: var(--primary); color: var(--white); }
.btn-history:hover { background: var(--primary-dark); }

/* =====================================================
   FORMULARIO DE PRUEBA - COMPACTO
   ===================================================== */
.formulario-main {
    overflow-y: auto !important;
    padding: 16px !important;
    flex-direction: column !important;
}

.page-header {
    margin-bottom: 12px;
    flex-shrink: 0;
}

.page-header h1 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-800);
}

.page-header h1 svg { width: 18px; height: 18px; color: var(--primary); }
.page-header p { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

.form-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 16px;
    flex: 1;
    min-height: 0;
}

.form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.list-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.form-card h2, .list-card h2 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-800);
}

.list-card h2 {
    flex-shrink: 0;
}

/* Form Rows */
.form-row {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
}

.form-row.two-cols {
    grid-template-columns: 1fr 1fr;
}

.form-row.three-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-card .form-group { margin-bottom: 0; }
.form-card .form-group.full-width { grid-column: 1 / -1; }

.form-card label {
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.form-card input,
.form-card select,
.form-card textarea {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 13px;
    transition: all 0.2s;
}

.form-card textarea {
    height: 60px;
    padding: 8px 10px;
    resize: none;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

.form-card input::placeholder,
.form-card textarea::placeholder {
    color: var(--gray-400);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.btn-secondary, .btn-primary {
    flex: 1;
    height: 38px;
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-600);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary svg, .btn-primary svg { width: 14px; height: 14px; }

/* List */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.list-header h2 { margin: 0; padding: 0; border: none; }

.btn-refresh {
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-refresh:hover { background: var(--primary); color: var(--white); }
.btn-refresh svg { width: 14px; height: 14px; }

.pedidos-table-container {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.pedidos-table { width: 100%; border-collapse: collapse; font-size: 11px; }

.pedidos-table th {
    text-align: left;
    padding: 8px 6px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-500);
    background: var(--gray-50);
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--gray-200);
}

.pedidos-table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.pedidos-table tr:hover td { background: var(--gray-50); }
.pedidos-table tr:last-child td { border-bottom: none; }

.pedidos-table .status-badge {
    font-size: 9px;
    padding: 3px 6px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-delete {
    width: 28px;
    height: 28px;
    background: #FEF2F2;
    border: none;
    border-radius: var(--radius);
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-delete:hover { background: var(--danger); color: var(--white); }
.btn-delete svg { width: 12px; height: 12px; }

.loading-row td, .empty-row td {
    text-align: center;
    padding: 24px 16px !important;
    color: var(--gray-400);
}

.loading-row p, .empty-row p {
    margin-top: 6px;
    font-size: 12px;
}

.empty-row svg { width: 32px; height: 32px; opacity: 0.3; margin-bottom: 6px; display: block; margin-left: auto; margin-right: auto; }

.no-data-small { text-align: center; padding: 16px; color: var(--gray-400); font-size: 11px; }

/* Responsive formulario */
@media (max-width: 1100px) {
    .form-layout {
        grid-template-columns: 1fr;
    }
    
    .form-row.three-cols {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .form-row.two-cols,
    .form-row.three-cols {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   PLACEHOLDER
   ===================================================== */
.placeholder-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.placeholder-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.placeholder-icon svg { width: 40px; height: 40px; color: var(--primary); }
.placeholder-content h1 { font-size: 24px; margin-bottom: 8px; }
.placeholder-content p { font-size: 14px; color: var(--gray-500); margin-bottom: 20px; }

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
}

.btn-back svg { width: 14px; height: 14px; }

/* =====================================================
   HISTORIAL
   ===================================================== */
.historial-content { flex: 1; }

.historial-card {
    height: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.historial-empty { text-align: center; padding: 32px; }
.historial-empty svg { width: 48px; height: 48px; color: var(--gray-300); margin-bottom: 12px; }
.historial-empty h3 { font-size: 16px; margin-bottom: 6px; }
.historial-empty p { font-size: 12px; color: var(--gray-500); max-width: 320px; margin: 0 auto 16px; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1200px) {
    .dashboard-main { flex-direction: column; }
    .right-column { width: 100%; flex-direction: row; flex-wrap: wrap; }
    .mini-calendar, .confeccionistas-list, .stats-card { flex: 1; min-width: 200px; }
    .form-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .login-container { flex-direction: column; }
    .login-form-side { width: 100%; }
    .login-illustration-side { display: none; }
    .modules-grid { grid-template-columns: 1fr; }
}
/* =====================================================
   ESTILOS ADICIONALES - MÓDULOS NUEVOS
   ===================================================== */

/* Main Content Full (sin columnas) */
.main-content-full {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--gray-50);
}

/* =====================================================
   INFORMES
   ===================================================== */
.page-header-informe {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #9bc3e3;
}

.page-header-informe h1 {
    font-size: 24px;
    font-weight: 800;
    color: #1a315e;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header-informe h1 svg { width: 28px; height: 28px; color: #3988c8; }

.page-header-informe p {
    font-size: 13px;
    color: #9bc3e3;
    margin-top: 4px;
}

.header-actions { display: flex; gap: 10px; }

.btn-export {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #1a315e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-export:hover { background: #0f1f3d; }
.btn-export.btn-excel { background: #10b981; }
.btn-export.btn-excel:hover { background: #059669; }
.btn-export svg { width: 16px; height: 16px; }

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.kpi-card.kpi-primary::before { background: #3988c8; }
.kpi-card.kpi-success::before { background: #10b981; }
.kpi-card.kpi-warning::before { background: #f59e0b; }
.kpi-card.kpi-danger::before { background: #f16b4e; }

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-primary .kpi-icon { background: #e8f1f8; color: #3988c8; }
.kpi-success .kpi-icon { background: #d1fae5; color: #10b981; }
.kpi-warning .kpi-icon { background: #fef3c7; color: #f59e0b; }
.kpi-danger .kpi-icon { background: #fee2e2; color: #f16b4e; }

.kpi-icon svg { width: 24px; height: 24px; }

.kpi-content { flex: 1; }

.kpi-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #1a315e;
    line-height: 1;
}

.kpi-label {
    font-size: 12px;
    color: #9bc3e3;
    margin-top: 4px;
}

.kpi-trend {
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
}

.kpi-trend svg { width: 12px; height: 12px; }
.kpi-trend.trend-up { background: #d1fae5; color: #10b981; }
.kpi-trend.trend-down { background: #fee2e2; color: #f16b4e; }
.kpi-trend.trend-neutral { background: #e8f1f8; color: #9bc3e3; }

/* Informe Grid */
.informe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.informe-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

.informe-card.card-full {
    grid-column: span 2;
}

.informe-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e8f1f8;
}

.informe-card .card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1a315e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.informe-card .card-header h3 svg { width: 18px; height: 18px; color: #3988c8; }

.badge-beta {
    font-size: 9px;
    padding: 3px 8px;
    background: #3988c8;
    color: white;
    border-radius: 4px;
    font-weight: 600;
}

/* Efectividad Circle */
.efectividad-display {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.efectividad-circle { width: 120px; height: 120px; }

.circular-chart { display: block; }
.circle-bg { fill: none; stroke: #e8f1f8; stroke-width: 3; }
.circle { fill: none; stroke: #10b981; stroke-width: 3; stroke-linecap: round; animation: progress 1s ease-out forwards; }
.percentage { fill: #1a315e; font-size: 8px; font-weight: 700; text-anchor: middle; }

@keyframes progress { 0% { stroke-dasharray: 0 100; } }

.efectividad-details { flex: 1; }
.detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e8f1f8; }
.detail-row:last-child { border: none; }
.detail-label { font-size: 13px; color: #9bc3e3; }
.detail-value { font-size: 14px; font-weight: 700; color: #1a315e; }
.detail-value.success { color: #10b981; }
.detail-value.danger { color: #f16b4e; }

/* Comunicaciones */
.comunicaciones-stats {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid #e8f1f8;
}

.com-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #e8f1f8;
    border-radius: 10px;
}

.com-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.com-icon.whatsapp { background: #25d366; color: white; }
.com-icon.sms { background: #3988c8; color: white; }
.com-icon.total { background: #1a315e; color: white; }
.com-icon svg { width: 20px; height: 20px; }

.com-value { display: block; font-size: 22px; font-weight: 800; color: #1a315e; }
.com-label { font-size: 11px; color: #9bc3e3; }

.comunicaciones-response { padding: 20px; }
.response-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.response-header span { font-size: 13px; color: #9bc3e3; }
.response-value { font-weight: 700; color: #1a315e; }

.response-bar { height: 8px; background: #e8f1f8; border-radius: 4px; overflow: hidden; }
.response-fill { height: 100%; background: linear-gradient(90deg, #3988c8, #10b981); border-radius: 4px; transition: width 1s; }

.response-details { display: flex; gap: 20px; margin-top: 12px; }
.resp-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #1a315e; }
.resp-item svg { width: 14px; height: 14px; color: #3988c8; }

/* Estados List */
.estados-list { padding: 20px; }
.estado-item { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.estado-color { width: 12px; height: 12px; border-radius: 3px; }
.estado-nombre { font-size: 13px; color: #1a315e; width: 100px; }
.estado-total { font-size: 13px; font-weight: 700; color: #1a315e; width: 30px; }
.estado-bar { flex: 1; height: 8px; background: #e8f1f8; border-radius: 4px; overflow: hidden; }
.estado-fill { height: 100%; border-radius: 4px; transition: width 1s; }

/* Top Confeccionistas */
.top-list { padding: 16px; }
.top-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; margin-bottom: 8px; transition: all 0.2s; }
.top-item:hover { background: #e8f1f8; }
.top-rank { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: #e8f1f8; color: #9bc3e3; }
.top-rank.rank-1 { background: #fef3c7; color: #f59e0b; }
.top-rank.rank-2 { background: #e8f1f8; color: #9bc3e3; }
.top-rank.rank-3 { background: #fce7f3; color: #f16b4e; }
.top-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; }
.top-avatar img { width: 100%; height: 100%; object-fit: cover; }
.top-info { flex: 1; }
.top-name { display: block; font-size: 13px; font-weight: 600; color: #1a315e; }
.top-stats { font-size: 11px; color: #9bc3e3; }
.top-badge svg { width: 18px; height: 18px; color: #f59e0b; }

/* Meses Chart */
.meses-chart { display: flex; align-items: flex-end; justify-content: space-around; height: 180px; padding: 20px; }
.mes-bar { display: flex; flex-direction: column; align-items: center; width: 60px; }
.bar-fill { width: 40px; background: linear-gradient(180deg, #3988c8, #1a315e); border-radius: 6px 6px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; min-height: 20px; transition: height 1s; }
.bar-value { font-size: 11px; font-weight: 700; color: white; }
.bar-label { font-size: 10px; color: #9bc3e3; margin-top: 8px; text-align: center; }

/* Tabla Resumen */
.tabla-resumen { width: 100%; border-collapse: collapse; }
.tabla-resumen th, .tabla-resumen td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #e8f1f8; }
.tabla-resumen th { font-size: 11px; font-weight: 700; color: #9bc3e3; text-transform: uppercase; background: #f8fafc; }
.tabla-resumen td { font-size: 13px; color: #1a315e; }
.tabla-resumen td svg { width: 16px; height: 16px; margin-right: 8px; color: #3988c8; vertical-align: middle; }
.var-up { color: #10b981; font-weight: 600; }
.var-down { color: #f16b4e; font-weight: 600; }
.var-neutral { color: #9bc3e3; }
.status-badge { font-size: 10px; padding: 4px 10px; border-radius: 20px; font-weight: 600; }
.status-badge.success { background: #d1fae5; color: #10b981; }
.status-badge.warning { background: #fef3c7; color: #f59e0b; }
.status-badge.danger { background: #fee2e2; color: #f16b4e; }

/* =====================================================
   BASE DE DATOS
   ===================================================== */
.page-header-bd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header-bd h1 { font-size: 22px; font-weight: 800; color: #1a315e; display: flex; align-items: center; gap: 10px; }
.page-header-bd h1 svg { width: 26px; height: 26px; color: #3988c8; }
.page-header-bd p { font-size: 12px; color: #9bc3e3; margin-top: 2px; }

.header-actions-bd { display: flex; gap: 10px; }
.btn-action-bd { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-action-bd svg { width: 16px; height: 16px; }
.btn-action-bd.btn-import { background: #e8f1f8; color: #1a315e; }
.btn-action-bd.btn-import:hover { background: #9bc3e3; }
.btn-action-bd.btn-export { background: #10b981; color: white; }
.btn-action-bd.btn-export:hover { background: #059669; }

.stats-bar { display: flex; gap: 16px; margin-bottom: 20px; }
.stat-item-bd { flex: 1; background: white; border-radius: 10px; padding: 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.stat-item-bd svg { width: 24px; height: 24px; color: #3988c8; }
.stat-value-bd { display: block; font-size: 20px; font-weight: 800; color: #1a315e; }
.stat-label-bd { font-size: 11px; color: #9bc3e3; }

.filtros-bar { display: flex; gap: 12px; margin-bottom: 16px; padding: 16px; background: white; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,0.04); flex-wrap: wrap; }
.filtro-group { display: flex; flex-direction: column; gap: 4px; }
.filtro-group label { font-size: 10px; font-weight: 600; color: #9bc3e3; text-transform: uppercase; }
.filtro-group input, .filtro-group select { height: 36px; padding: 0 12px; border: 1px solid #9bc3e3; border-radius: 6px; font-size: 12px; color: #1a315e; min-width: 140px; }
.btn-limpiar { display: flex; align-items: center; gap: 6px; padding: 0 14px; background: #fee2e2; color: #f16b4e; border: none; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; align-self: flex-end; height: 36px; }

.tabla-container { background: white; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden; }
.tabla-header { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 1px solid #e8f1f8; background: #f8fafc; }
.seleccionar-todos { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9bc3e3; }
#contadorSeleccionados { font-size: 12px; color: #1a315e; font-weight: 600; }
.btn-eliminar-multiple { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: #fee2e2; color: #f16b4e; border: none; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; margin-left: auto; }
.btn-eliminar-multiple:disabled { opacity: 0.5; cursor: not-allowed; }

.tabla-bd { width: 100%; border-collapse: collapse; }
.tabla-bd th, .tabla-bd td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #e8f1f8; font-size: 12px; }
.tabla-bd th { font-weight: 700; color: #9bc3e3; text-transform: uppercase; font-size: 10px; background: #f8fafc; }
.tabla-bd td { color: #1a315e; }
.id-badge { background: #e8f1f8; color: #3988c8; padding: 3px 8px; border-radius: 4px; font-weight: 600; font-size: 11px; }
.conf-cell { display: flex; align-items: center; gap: 8px; }
.conf-cell img { width: 28px; height: 28px; border-radius: 50%; }
.cantidad-badge { background: #d1fae5; color: #10b981; padding: 3px 8px; border-radius: 4px; font-weight: 600; }
.estado-badge { font-size: 9px; padding: 4px 8px; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.estado-pendiente { background: #e8f1f8; color: #1a315e; }
.estado-en_corte { background: #fef3c7; color: #f59e0b; }
.estado-bordado { background: #dbeafe; color: #3988c8; }
.estado-estampado { background: #f3e8ff; color: #8b5cf6; }
.estado-tintoreria { background: #fce7f3; color: #ec4899; }
.estado-piedras { background: #d1fae5; color: #10b981; }
.estado-entregado { background: #10b981; color: white; }

.acciones-cell { display: flex; gap: 6px; }
.btn-acc { width: 28px; height: 28px; border: none; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.btn-acc svg { width: 14px; height: 14px; }
.btn-acc.btn-ver { background: #1a315e; color: white; }
.btn-acc.btn-editar { background: #3988c8; color: white; }
.btn-acc.btn-eliminar { background: #fee2e2; color: #f16b4e; }
.btn-acc.btn-eliminar:hover { background: #f16b4e; color: white; }

.paginacion { padding: 16px; display: flex; justify-content: center; }

/* Modal Importar */
.modal-importar { background: white; border-radius: 16px; width: 480px; max-width: 95vw; overflow: hidden; animation: modalSlideIn 0.3s; }
.modal-header-imp { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: #3988c8; color: white; }
.modal-header-imp h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modal-header-imp h3 svg { width: 20px; height: 20px; }
.modal-header-imp .btn-cerrar { background: none; border: none; color: white; cursor: pointer; }
.modal-body-imp { padding: 24px; }
.drop-zone { border: 2px dashed #9bc3e3; border-radius: 12px; padding: 40px; text-align: center; transition: all 0.2s; }
.drop-zone:hover { border-color: #3988c8; background: #e8f1f8; }
.drop-zone svg { width: 48px; height: 48px; color: #9bc3e3; margin-bottom: 12px; }
.drop-zone p { font-size: 14px; color: #1a315e; margin-bottom: 8px; }
.drop-zone span { font-size: 12px; color: #9bc3e3; }
.drop-zone .btn-seleccionar { display: inline-block; margin-top: 12px; padding: 10px 20px; background: #3988c8; color: white; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.drop-zone .btn-seleccionar input { display: none; }
.drop-zone .formato { font-size: 11px; color: #9bc3e3; margin-top: 12px; }
.archivo-info { display: flex; align-items: center; gap: 12px; padding: 16px; background: #d1fae5; border-radius: 10px; margin-top: 16px; }
.archivo-info svg { width: 24px; height: 24px; color: #10b981; }
.archivo-info span { display: block; font-size: 13px; color: #1a315e; }
.archivo-info button { margin-left: auto; background: none; border: none; color: #f16b4e; cursor: pointer; }
.plantilla-descarga { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 12px; color: #3988c8; }
.plantilla-descarga a { color: #3988c8; text-decoration: underline; }
.modal-footer-imp { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; background: #f8fafc; border-top: 1px solid #e8f1f8; }
.btn-importar { display: flex; align-items: center; gap: 8px; padding: 10px 20px; background: #10b981; color: white; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-importar:disabled { opacity: 0.5; cursor: not-allowed; }

/* =====================================================
   CONFIGURACIÓN
   ===================================================== */
.page-header-config { margin-bottom: 24px; }
.page-header-config h1 { font-size: 24px; font-weight: 800; color: #1a315e; display: flex; align-items: center; gap: 12px; }
.page-header-config h1 svg { width: 28px; height: 28px; color: #3988c8; }
.page-header-config p { font-size: 13px; color: #9bc3e3; margin-top: 4px; }

.config-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.config-card { background: white; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden; }
.config-card.card-full { grid-column: span 2; }
.config-header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; background: #f8fafc; border-bottom: 1px solid #e8f1f8; }
.config-header svg { width: 20px; height: 20px; color: #3988c8; }
.config-header h3 { font-size: 14px; font-weight: 700; color: #1a315e; flex: 1; }
.btn-add-conf { width: 28px; height: 28px; background: #3988c8; color: white; border: none; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.btn-add-conf svg { width: 16px; height: 16px; }
.config-body { padding: 20px; }

.form-group-cfg { margin-bottom: 16px; }
.form-group-cfg label { display: block; font-size: 11px; font-weight: 600; color: #9bc3e3; text-transform: uppercase; margin-bottom: 6px; }
.form-group-cfg input, .form-group-cfg select, .form-group-cfg textarea { width: 100%; padding: 10px 14px; border: 1px solid #9bc3e3; border-radius: 8px; font-size: 13px; color: #1a315e; transition: all 0.2s; }
.form-group-cfg input:focus, .form-group-cfg select:focus, .form-group-cfg textarea:focus { outline: none; border-color: #3988c8; box-shadow: 0 0 0 3px rgba(57,136,200,0.1); }
.form-group-cfg textarea { resize: vertical; min-height: 80px; }
.form-group-cfg .hint { font-size: 10px; color: #9bc3e3; margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.toggle-group { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #e8f1f8; }
.toggle-group label:first-child { font-size: 13px; color: #1a315e; }

.switch { position: relative; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #e8f1f8; border-radius: 24px; transition: 0.3s; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
input:checked + .slider { background: #10b981; }
input:checked + .slider:before { transform: translateX(20px); }

.dias-check { display: flex; gap: 8px; flex-wrap: wrap; }
.dia-check { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dia-check input { display: none; }
.dia-check span { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: #e8f1f8; border-radius: 8px; font-size: 11px; font-weight: 600; color: #9bc3e3; cursor: pointer; transition: all 0.2s; }
.dia-check input:checked + span { background: #3988c8; color: white; }

.btn-guardar-cfg { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; background: #3988c8; color: white; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 16px; }
.btn-guardar-cfg:hover { background: #1a315e; }

.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-probar { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: #e8f1f8; color: #1a315e; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-row .btn-guardar-cfg { flex: 1; margin-top: 0; }

.conf-list { max-height: 300px; overflow-y: auto; }
.conf-item-cfg { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid #e8f1f8; }
.conf-item-cfg img { width: 40px; height: 40px; border-radius: 50%; }
.conf-info-cfg { flex: 1; }
.conf-info-cfg strong { display: block; font-size: 13px; color: #1a315e; }
.conf-info-cfg span { font-size: 11px; color: #9bc3e3; }
.conf-actions { display: flex; gap: 6px; }
.conf-actions button { width: 28px; height: 28px; border: none; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.conf-actions button:first-child { background: #e8f1f8; color: #3988c8; }
.conf-actions button:last-child { background: #fee2e2; color: #f16b4e; }
.conf-actions button svg { width: 14px; height: 14px; }

/* Modal Confeccionista */
.modal-conf-form { background: white; border-radius: 16px; width: 400px; max-width: 95vw; overflow: hidden; animation: modalSlideIn 0.3s; }
.modal-header-conf { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: #3988c8; color: white; }
.modal-header-conf h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modal-header-conf button { background: none; border: none; color: white; cursor: pointer; }
.modal-body-conf { padding: 20px; }
.modal-footer-conf { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; background: #f8fafc; border-top: 1px solid #e8f1f8; }

/* =====================================================
   HISTORIAL - CHAT
   ===================================================== */
.historial-layout { padding: 0 !important; }
.historial-container { display: flex; height: calc(100vh - 0px); }

.chat-sidebar { width: 320px; background: white; border-right: 1px solid #e8f1f8; display: flex; flex-direction: column; }
.chat-sidebar-header { padding: 16px; border-bottom: 1px solid #e8f1f8; }
.chat-sidebar-header h2 { font-size: 16px; font-weight: 700; color: #1a315e; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.chat-sidebar-header h2 svg { width: 20px; height: 20px; color: #3988c8; }
.chat-search { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #e8f1f8; border-radius: 8px; }
.chat-search svg { width: 16px; height: 16px; color: #9bc3e3; }
.chat-search input { flex: 1; border: none; background: none; font-size: 13px; color: #1a315e; outline: none; }

.chat-list { flex: 1; overflow-y: auto; }
.chat-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; transition: all 0.2s; border-left: 3px solid transparent; }
.chat-item:hover { background: #e8f1f8; }
.chat-item.active { background: #e8f1f8; border-left-color: #3988c8; }
.chat-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; }
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-info { flex: 1; min-width: 0; }
.chat-name { display: block; font-size: 13px; font-weight: 600; color: #1a315e; }
.chat-preview { font-size: 11px; color: #9bc3e3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-meta { text-align: right; }
.chat-time { font-size: 10px; color: #9bc3e3; display: block; }
.chat-badge { display: inline-block; min-width: 18px; height: 18px; background: #f16b4e; color: white; font-size: 10px; font-weight: 700; border-radius: 10px; text-align: center; line-height: 18px; margin-top: 4px; }

.chat-main { flex: 1; display: flex; flex-direction: column; background: #f0f4f8; }

.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9bc3e3; }
.empty-icon { width: 80px; height: 80px; background: #e8f1f8; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.empty-icon svg { width: 40px; height: 40px; }
.chat-empty h3 { font-size: 18px; color: #1a315e; margin-bottom: 8px; }
.chat-empty p { font-size: 13px; }

.chat-content { flex: 1; display: flex; flex-direction: column; }
.chat-header-main { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: white; border-bottom: 1px solid #e8f1f8; }
.chat-user { display: flex; align-items: center; gap: 12px; }
.chat-user img { width: 40px; height: 40px; border-radius: 50%; }
.chat-user strong { display: block; font-size: 14px; color: #1a315e; }
.chat-user span { font-size: 11px; color: #10b981; }

.chat-actions { display: flex; gap: 6px; }
.btn-canal { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: #e8f1f8; border: none; border-radius: 6px; font-size: 11px; font-weight: 600; color: #9bc3e3; cursor: pointer; transition: all 0.2s; }
.btn-canal svg { width: 14px; height: 14px; }
.btn-canal.active { background: #3988c8; color: white; }
.btn-canal:hover:not(.active) { background: #9bc3e3; color: white; }

.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }

.chat-date-divider { text-align: center; margin: 16px 0; }
.chat-date-divider span { background: #e8f1f8; padding: 6px 16px; border-radius: 20px; font-size: 11px; color: #9bc3e3; font-weight: 600; }

.chat-message { display: flex; max-width: 75%; }
.chat-message.msg-enviado { margin-left: auto; }
.chat-message.msg-recibido { margin-right: auto; }

.msg-bubble { background: white; padding: 10px 14px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.msg-enviado .msg-bubble { background: #3988c8; color: white; border-bottom-right-radius: 4px; }
.msg-recibido .msg-bubble { background: white; border-bottom-left-radius: 4px; }

.msg-canal { font-size: 9px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.msg-canal svg { width: 12px; height: 12px; }
.msg-enviado .msg-canal { color: rgba(255,255,255,0.7); }
.msg-recibido .msg-canal.canal-whatsapp { color: #25d366; }
.msg-recibido .msg-canal.canal-sms { color: #3988c8; }

.msg-text { font-size: 13px; line-height: 1.5; }
.msg-recibido .msg-text { color: #1a315e; }

.msg-time { font-size: 10px; margin-top: 6px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.msg-enviado .msg-time { color: rgba(255,255,255,0.7); }
.msg-recibido .msg-time { color: #9bc3e3; }
.msg-status { width: 14px; height: 14px; }
.msg-status.read { color: #10b981; }

.chat-footer { padding: 12px 20px; background: white; border-top: 1px solid #e8f1f8; }
.chat-notice { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #9bc3e3; }
.chat-notice svg { width: 14px; height: 14px; }
/* =====================================================
   NUEVO PEDIDO - MEJORADO
   ===================================================== */
.nuevo-pedido-main { padding: 20px 30px; }
.nuevo-pedido-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.nuevo-pedido-header h1 { font-size: 24px; font-weight: 800; color: #1a315e; display: flex; align-items: center; gap: 12px; }
.nuevo-pedido-header h1 svg { width: 28px; height: 28px; color: #3988c8; }
.nuevo-pedido-header p { font-size: 13px; color: #9bc3e3; margin-top: 4px; }
.btn-ver-todos { display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: #3988c8; color: white; border-radius: 8px; text-decoration: none; font-size: 13px; font-weight: 600; transition: all 0.2s; }
.btn-ver-todos:hover { background: #1a315e; }
.btn-ver-todos svg { width: 16px; height: 16px; }

.nuevo-pedido-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.form-section { }
.info-section { display: flex; flex-direction: column; gap: 16px; }

.form-card-nuevo { background: white; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); overflow: hidden; }
.form-card-header { display: flex; align-items: center; gap: 12px; padding: 18px 24px; background: linear-gradient(135deg, #1a315e 0%, #3988c8 100%); color: white; }
.form-card-header svg { width: 24px; height: 24px; }
.form-card-header h2 { font-size: 16px; font-weight: 700; }

.form-nuevo { padding: 24px; }
.form-section-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #3988c8; text-transform: uppercase; margin: 20px 0 12px 0; padding-bottom: 8px; border-bottom: 1px solid #e8f1f8; }
.form-section-title:first-child { margin-top: 0; }
.form-section-title svg { width: 16px; height: 16px; }

.form-row-nuevo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row-nuevo.three { grid-template-columns: 1fr 1fr 1fr; }
.form-group-nuevo { display: flex; flex-direction: column; }
.form-group-nuevo.flex-2 { grid-column: span 1; flex: 2; }
.form-group-nuevo.full { grid-column: span 2; }
.form-row-nuevo.three .form-group-nuevo.full { grid-column: span 3; }
.form-group-nuevo label { font-size: 11px; font-weight: 600; color: #1a315e; margin-bottom: 6px; text-transform: uppercase; }
.form-group-nuevo input, .form-group-nuevo select, .form-group-nuevo textarea { padding: 12px 14px; border: 2px solid #e8f1f8; border-radius: 10px; font-size: 14px; color: #1a315e; transition: all 0.2s; }
.form-group-nuevo input:focus, .form-group-nuevo select:focus, .form-group-nuevo textarea:focus { outline: none; border-color: #3988c8; box-shadow: 0 0 0 4px rgba(57, 136, 200, 0.1); }
.form-group-nuevo input::placeholder, .form-group-nuevo textarea::placeholder { color: #9bc3e3; }
.form-group-nuevo textarea { resize: vertical; min-height: 80px; }

.form-actions-nuevo { display: flex; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 2px solid #e8f1f8; }
.btn-limpiar-nuevo { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; background: #e8f1f8; color: #1a315e; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-limpiar-nuevo:hover { background: #9bc3e3; }
.btn-guardar-nuevo { flex: 2; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; background: linear-gradient(135deg, #3988c8 0%, #1a315e 100%); color: white; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-guardar-nuevo:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(57, 136, 200, 0.4); }
.btn-guardar-nuevo:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.info-card-nuevo { background: white; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); overflow: hidden; }
.info-card-header { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: #f8fafc; border-bottom: 1px solid #e8f1f8; font-size: 13px; font-weight: 700; color: #1a315e; }
.info-card-header svg { width: 18px; height: 18px; color: #3988c8; }
.info-card-body { padding: 16px; }

.info-step { display: flex; gap: 12px; margin-bottom: 14px; }
.info-step:last-child { margin-bottom: 0; }
.step-num { width: 28px; height: 28px; background: linear-gradient(135deg, #3988c8, #1a315e); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.info-step strong { font-size: 13px; color: #1a315e; display: block; }
.info-step p { font-size: 11px; color: #9bc3e3; margin-top: 2px; }

.estado-info { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #e8f1f8; font-size: 13px; color: #1a315e; }
.estado-info:last-child { border: none; }
.estado-dot { width: 12px; height: 12px; border-radius: 4px; }

.card-tips p { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #1a315e; margin-bottom: 10px; line-height: 1.4; }
.card-tips p:last-child { margin-bottom: 0; }
.card-tips p svg { width: 16px; height: 16px; color: #10b981; flex-shrink: 0; margin-top: 1px; }

/* =====================================================
   HISTORIAL - CHAT MEJORADO
   ===================================================== */
.historial-main { padding: 0 !important; height: calc(100vh - 0px); }
.historial-wrapper { display: flex; height: 100%; }

.chat-panel-left { width: 300px; background: white; border-right: 1px solid #e8f1f8; display: flex; flex-direction: column; flex-shrink: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid #e8f1f8; }
.panel-header h2 { font-size: 15px; font-weight: 700; color: #1a315e; display: flex; align-items: center; gap: 8px; }
.panel-header h2 svg { width: 20px; height: 20px; color: #3988c8; }
.badge-count { background: #3988c8; color: white; font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; }

.chat-search-box { display: flex; align-items: center; gap: 10px; margin: 12px 16px; padding: 10px 14px; background: #e8f1f8; border-radius: 10px; }
.chat-search-box svg { width: 18px; height: 18px; color: #9bc3e3; }
.chat-search-box input { flex: 1; border: none; background: none; font-size: 13px; color: #1a315e; outline: none; }

.chat-contacts { flex: 1; overflow-y: auto; }
.contact-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; border-left: 3px solid transparent; transition: all 0.2s; }
.contact-item:hover { background: #f8fafc; }
.contact-item.active { background: #e8f1f8; border-left-color: #3988c8; }
.contact-avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
.contact-info { flex: 1; min-width: 0; }
.contact-name { display: block; font-size: 14px; font-weight: 600; color: #1a315e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-phone { font-size: 11px; color: #9bc3e3; }
.contact-status { width: 10px; height: 10px; border-radius: 50%; background: #10b981; flex-shrink: 0; }
.contact-status.offline { background: #9bc3e3; }

.chat-panel-right { flex: 1; display: flex; flex-direction: column; background: #f0f4f8; }

.chat-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; }
.placeholder-icon { width: 100px; height: 100px; background: #e8f1f8; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.placeholder-icon svg { width: 50px; height: 50px; color: #9bc3e3; }
.chat-placeholder h3 { font-size: 20px; color: #1a315e; margin-bottom: 8px; }
.chat-placeholder p { font-size: 14px; color: #9bc3e3; text-align: center; max-width: 400px; }
.placeholder-features { display: flex; gap: 24px; margin-top: 30px; }
.placeholder-features .feature { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #1a315e; background: white; padding: 10px 16px; border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.placeholder-features .feature svg { width: 18px; height: 18px; color: #3988c8; }

.chat-active { flex: 1; display: flex; flex-direction: column; }
.chat-top-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: white; border-bottom: 1px solid #e8f1f8; }
.chat-user-info { display: flex; align-items: center; gap: 12px; }
.chat-user-info img { width: 40px; height: 40px; border-radius: 50%; }
.chat-user-info strong { display: block; font-size: 14px; color: #1a315e; }
.chat-user-info span { font-size: 11px; color: #9bc3e3; }
.chat-filters { display: flex; gap: 8px; }
.filter-btn { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: #e8f1f8; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; color: #9bc3e3; cursor: pointer; transition: all 0.2s; }
.filter-btn svg { width: 14px; height: 14px; }
.filter-btn.active { background: #3988c8; color: white; }
.filter-btn:hover:not(.active) { background: #9bc3e3; color: white; }

.chat-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 180px); }
.loading-messages { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; color: #9bc3e3; }
.spinner-small { width: 24px; height: 24px; border: 3px solid #e8f1f8; border-top-color: #3988c8; border-radius: 50%; animation: spin 1s linear infinite; }
.no-messages { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px; color: #9bc3e3; }
.no-messages svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.5; }

.date-separator { text-align: center; margin: 20px 0; }
.date-separator span { background: #e8f1f8; color: #9bc3e3; font-size: 11px; font-weight: 600; padding: 6px 16px; border-radius: 20px; }

.message-item { display: flex; max-width: 70%; }
.message-item.sent { margin-left: auto; }
.message-item.received { margin-right: auto; }
.message-bubble { padding: 12px 16px; border-radius: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.message-item.sent .message-bubble { background: linear-gradient(135deg, #3988c8, #1a315e); color: white; border-bottom-right-radius: 4px; }
.message-item.received .message-bubble { background: white; border-bottom-left-radius: 4px; }

.message-header { margin-bottom: 6px; }
.channel-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.channel-tag svg { width: 12px; height: 12px; }
.message-item.sent .channel-tag { color: rgba(255,255,255,0.7); }
.channel-tag.whatsapp { color: #25d366; }
.channel-tag.sms { color: #3988c8; }

.message-content { font-size: 14px; line-height: 1.5; }
.message-item.received .message-content { color: #1a315e; }

.message-footer { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.msg-time { font-size: 10px; }
.message-item.sent .msg-time { color: rgba(255,255,255,0.7); }
.message-item.received .msg-time { color: #9bc3e3; }
.check-sent { width: 14px; height: 14px; color: rgba(255,255,255,0.5); }
.check-read { width: 14px; height: 14px; color: #10b981; }

.chat-bottom-bar { padding: 14px 20px; background: white; border-top: 1px solid #e8f1f8; }
.chat-info-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9bc3e3; }
.chat-info-bar svg { width: 16px; height: 16px; }
.chat-info-bar strong { color: #3988c8; }

/* =====================================================
   INFORMES - MEJORADO
   ===================================================== */
.informe-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding: 0 10px; }
.informe-header h1 { font-size: 24px; font-weight: 800; color: #1a315e; display: flex; align-items: center; gap: 12px; }
.informe-header h1 svg { width: 28px; height: 28px; color: #3988c8; }
.informe-header p { font-size: 13px; color: #9bc3e3; margin-top: 4px; }
.export-btns { display: flex; gap: 10px; }
.btn-exp { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-exp svg { width: 16px; height: 16px; }
.btn-exp.pdf { background: #1a315e; color: white; }
.btn-exp.excel { background: #10b981; color: white; }
.btn-exp:hover { transform: translateY(-2px); }

.kpis-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-box { background: white; border-radius: 12px; padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); border-left: 4px solid; }
.kpi-box.blue { border-color: #3988c8; }
.kpi-box.green { border-color: #10b981; }
.kpi-box.orange { border-color: #f59e0b; }
.kpi-box.red { border-color: #f16b4e; }
.kpi-box.purple { border-color: #8b5cf6; }
.kpi-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.kpi-box.blue .kpi-icon { background: #e8f1f8; color: #3988c8; }
.kpi-box.green .kpi-icon { background: #d1fae5; color: #10b981; }
.kpi-box.orange .kpi-icon { background: #fef3c7; color: #f59e0b; }
.kpi-box.red .kpi-icon { background: #fee2e2; color: #f16b4e; }
.kpi-box.purple .kpi-icon { background: #ede9fe; color: #8b5cf6; }
.kpi-icon svg { width: 22px; height: 22px; }
.kpi-num { display: block; font-size: 26px; font-weight: 800; color: #1a315e; line-height: 1; }
.kpi-txt { font-size: 11px; color: #9bc3e3; margin-top: 2px; }

.informe-sections { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.section-card { background: white; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); overflow: hidden; }
.section-card.full-width { grid-column: span 2; }
.section-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #e8f1f8; }
.section-header h3 { font-size: 14px; font-weight: 700; color: #1a315e; display: flex; align-items: center; gap: 8px; }
.section-header h3 svg { width: 18px; height: 18px; color: #3988c8; }
.badge-brevo { font-size: 9px; padding: 4px 10px; background: #3988c8; color: white; border-radius: 4px; font-weight: 600; }

/* Comunicaciones */
.com-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px 20px; }
.com-box { display: flex; align-items: center; gap: 12px; padding: 14px; background: #f8fafc; border-radius: 10px; }
.com-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.com-icon.wa { background: #25d366; color: white; }
.com-icon.sms { background: #3988c8; color: white; }
.com-icon.total { background: #1a315e; color: white; }
.com-icon.resp { background: #10b981; color: white; }
.com-icon svg { width: 20px; height: 20px; }
.com-num { display: block; font-size: 20px; font-weight: 800; color: #1a315e; }
.com-label { font-size: 10px; color: #9bc3e3; }

.response-section { padding: 0 20px 16px; }
.response-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: #9bc3e3; }
.response-pct { font-weight: 700; color: #1a315e; }
.response-bar-bg { height: 10px; background: #e8f1f8; border-radius: 5px; overflow: hidden; }
.response-bar-fill { height: 100%; background: linear-gradient(90deg, #3988c8, #10b981); border-radius: 5px; }

.com-details { display: flex; gap: 16px; padding: 16px 20px; background: #f8fafc; border-top: 1px solid #e8f1f8; }
.detail-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #1a315e; }
.detail-item svg { width: 16px; height: 16px; color: #3988c8; }
.detail-item strong { color: #3988c8; }

/* Estados */
.estados-grid { padding: 16px 20px; }
.estado-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.estado-row:last-child { margin-bottom: 0; }
.estado-left { display: flex; align-items: center; gap: 10px; width: 100px; }
.estado-dot { width: 12px; height: 12px; border-radius: 4px; }
.estado-name { font-size: 12px; color: #1a315e; }
.estado-bar-wrap { flex: 1; }
.estado-bar-bg { height: 8px; background: #e8f1f8; border-radius: 4px; overflow: hidden; }
.estado-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.estado-right { display: flex; gap: 8px; width: 80px; justify-content: flex-end; }
.estado-count { font-size: 13px; font-weight: 700; color: #1a315e; }
.estado-pct { font-size: 11px; color: #9bc3e3; }

/* Tiempos */
.tiempos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px 20px; }
.tiempo-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: #f8fafc; border-radius: 10px; }
.tiempo-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.tiempo-icon.green { background: #d1fae5; color: #10b981; }
.tiempo-icon.red { background: #fee2e2; color: #f16b4e; }
.tiempo-icon.blue { background: #e8f1f8; color: #3988c8; }
.tiempo-icon.orange { background: #fef3c7; color: #f59e0b; }
.tiempo-icon svg { width: 20px; height: 20px; }
.tiempo-info { flex: 1; }
.tiempo-num { display: block; font-size: 18px; font-weight: 800; color: #1a315e; }
.tiempo-label { font-size: 10px; color: #9bc3e3; }
.tiempo-pct { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.tiempo-pct.green { background: #d1fae5; color: #10b981; }
.tiempo-pct.red { background: #fee2e2; color: #f16b4e; }
.tiempo-pct.blue { background: #e8f1f8; color: #3988c8; }
.tiempo-pct.orange { background: #fef3c7; color: #f59e0b; }

.tiempos-detail { padding: 16px 20px; border-top: 1px solid #e8f1f8; }
.tiempos-detail h4 { font-size: 12px; color: #9bc3e3; margin-bottom: 12px; }
.estado-tiempo-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e8f1f8; font-size: 13px; }
.estado-tiempo-row:last-child { border: none; }
.estado-tiempo-row span:first-child { color: #1a315e; }
.tiempo-val { font-weight: 600; color: #3988c8; }

/* Respuestas */
.respuestas-table { padding: 0 20px 20px; }
.resp-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e8f1f8; align-items: center; font-size: 13px; }
.resp-row.header { font-size: 10px; font-weight: 700; color: #9bc3e3; text-transform: uppercase; }
.resp-conf { display: flex; align-items: center; gap: 10px; }
.resp-conf img { width: 32px; height: 32px; border-radius: 50%; }
.resp-conf span { color: #1a315e; font-weight: 500; }
.tasa { font-weight: 700; padding: 4px 10px; border-radius: 20px; text-align: center; }
.tasa.good { background: #d1fae5; color: #10b981; }
.tasa.medium { background: #fef3c7; color: #f59e0b; }
.tasa.low { background: #fee2e2; color: #f16b4e; }

/* Top */
.top-list { padding: 16px 20px; }
.top-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; margin-bottom: 8px; transition: all 0.2s; }
.top-row:hover { background: #f8fafc; }
.top-rank { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: #e8f1f8; color: #9bc3e3; }
.top-rank.r1 { background: #fef3c7; color: #f59e0b; }
.top-rank.r2 { background: #e8f1f8; color: #9bc3e3; }
.top-rank.r3 { background: #fce7f3; color: #f16b4e; }
.top-row img { width: 36px; height: 36px; border-radius: 50%; }
.top-info { flex: 1; }
.top-info strong { display: block; font-size: 13px; color: #1a315e; }
.top-info span { font-size: 11px; color: #9bc3e3; }
.crown { width: 20px; height: 20px; color: #f59e0b; }

/* Chart */
.chart-bars { display: flex; align-items: flex-end; justify-content: space-around; height: 160px; padding: 20px; }
.chart-bar-item { display: flex; flex-direction: column; align-items: center; }
.chart-bar-item .bar { width: 50px; background: linear-gradient(180deg, #3988c8, #1a315e); border-radius: 6px 6px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; min-height: 20px; }
.chart-bar-item .bar span { font-size: 11px; font-weight: 700; color: white; }
.bar-label { font-size: 10px; color: #9bc3e3; margin-top: 8px; text-align: center; }

/* Tabla Resumen */
.resumen-table { width: 100%; border-collapse: collapse; }
.resumen-table th, .resumen-table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid #e8f1f8; }
.resumen-table th { font-size: 10px; font-weight: 700; color: #9bc3e3; text-transform: uppercase; background: #f8fafc; }
.resumen-table td { font-size: 13px; color: #1a315e; }
.resumen-table td svg { width: 16px; height: 16px; margin-right: 8px; color: #3988c8; vertical-align: middle; }
.resumen-table td.up { color: #10b981; font-weight: 600; }
.resumen-table td.down { color: #f16b4e; font-weight: 600; }
.trend { font-size: 10px; padding: 4px 12px; border-radius: 20px; font-weight: 600; }
.trend.good { background: #d1fae5; color: #10b981; }
.trend.medium { background: #fef3c7; color: #f59e0b; }
.trend.bad { background: #fee2e2; color: #f16b4e; }
/* =====================================================
   HISTORIAL V2 - ESTILOS MEJORADOS
   ===================================================== */
.main-content-historial {
    flex: 1;
    padding: 0;
    overflow: hidden;
    display: flex;
}

.historial-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Panel de chats (izquierda) */
.chats-panel {
    width: 300px;
    background: white;
    border-right: 1px solid #e8f1f8;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chats-header {
    padding: 16px;
    border-bottom: 1px solid #e8f1f8;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chats-header h2 {
    font-size: 15px;
    font-weight: 700;
    color: #1a315e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chats-header h2 svg { width: 18px; height: 18px; color: #3988c8; }
.chat-count { background: #3988c8; color: white; font-size: 11px; padding: 2px 8px; border-radius: 10px; }

.chats-search {
    padding: 12px 16px;
    border-bottom: 1px solid #e8f1f8;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
}

.chats-search svg { width: 16px; height: 16px; color: #9bc3e3; }
.chats-search input { flex: 1; border: none; background: none; font-size: 13px; outline: none; }

.chats-list {
    flex: 1;
    overflow-y: auto;
}

.chat-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.chat-contact:hover { background: #e8f1f8; }
.chat-contact.active { background: #e8f1f8; border-left-color: #3988c8; }

.contact-avatar {
    position: relative;
    width: 42px;
    height: 42px;
}

.contact-avatar img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
}

.contact-info { flex: 1; min-width: 0; }
.contact-name { display: block; font-size: 13px; font-weight: 600; color: #1a315e; }
.contact-preview { font-size: 11px; color: #9bc3e3; }

/* Panel de chat (derecha) */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0f4f8;
    overflow: hidden;
}

.chat-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: #e8f1f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-icon svg { width: 36px; height: 36px; color: #9bc3e3; }
.chat-empty-state h3 { font-size: 18px; color: #1a315e; margin-bottom: 8px; }
.chat-empty-state p { font-size: 13px; color: #9bc3e3; max-width: 300px; text-align: center; }

.chat-active {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-active-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #e8f1f8;
    flex-shrink: 0;
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.chat-user-info strong { display: block; font-size: 14px; color: #1a315e; }
.chat-user-info span { font-size: 11px; color: #10b981; }

.chat-filters { display: flex; gap: 6px; }

.filter-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: #e8f1f8;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #9bc3e3;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn svg { width: 14px; height: 14px; }
.filter-btn.active { background: #3988c8; color: white; }
.filter-btn:hover:not(.active) { background: #9bc3e3; color: white; }

/* Área de mensajes - ALTURA FIJA */
.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading-msgs, .no-msgs, .error-msgs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9bc3e3;
    gap: 8px;
}

.loading-msgs svg, .no-msgs svg, .error-msgs svg { width: 32px; height: 32px; }

.msg-date-sep {
    text-align: center;
    margin: 12px 0;
}

.msg-date-sep span {
    background: #e8f1f8;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    color: #9bc3e3;
}

.msg-row {
    display: flex;
    max-width: 70%;
}

.msg-row.sent { margin-left: auto; }
.msg-row.received { margin-right: auto; }

.msg-bubble-v2 {
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.msg-row.sent .msg-bubble-v2 {
    background: #3988c8;
    color: white;
    border-bottom-right-radius: 4px;
}

.msg-row.received .msg-bubble-v2 {
    background: white;
    border-bottom-left-radius: 4px;
}

.msg-canal-tag {
    font-size: 9px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.msg-canal-tag svg { width: 10px; height: 10px; }
.msg-canal-tag.whatsapp { color: #25d366; }
.msg-canal-tag.sms { color: #3988c8; }
.msg-row.sent .msg-canal-tag { color: rgba(255,255,255,0.7); }

.msg-text-v2 {
    font-size: 13px;
    line-height: 1.4;
}

.msg-row.received .msg-text-v2 { color: #1a315e; }

.msg-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    font-size: 10px;
}

.msg-row.sent .msg-meta { color: rgba(255,255,255,0.7); }
.msg-row.received .msg-meta { color: #9bc3e3; }

.msg-meta svg { width: 14px; height: 14px; }
.msg-meta svg.read { color: #10b981; }
.msg-row.sent .msg-meta svg.read { color: #a7f3d0; }

.chat-info-footer {
    padding: 10px 20px;
    background: white;
    border-top: 1px solid #e8f1f8;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #9bc3e3;
    flex-shrink: 0;
}

.chat-info-footer svg { width: 14px; height: 14px; }
.chat-info-footer strong { color: #3988c8; }

/* =====================================================
   INFORMES V2 - ESTILOS MEJORADOS
   ===================================================== */
.informe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.informe-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: #1a315e;
    display: flex;
    align-items: center;
    gap: 12px;
}

.informe-header h1 svg { width: 28px; height: 28px; color: #3988c8; }
.informe-header p { font-size: 13px; color: #9bc3e3; margin-top: 4px; }

/* KPIs Row */
.kpi-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-box {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-left: 4px solid;
}

.kpi-box.kpi-blue { border-color: #3988c8; }
.kpi-box.kpi-green { border-color: #10b981; }
.kpi-box.kpi-orange { border-color: #f59e0b; }
.kpi-box.kpi-red { border-color: #f16b4e; }
.kpi-box.kpi-purple { border-color: #8b5cf6; }

.kpi-box .kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-blue .kpi-icon { background: #e8f1f8; color: #3988c8; }
.kpi-green .kpi-icon { background: #d1fae5; color: #10b981; }
.kpi-orange .kpi-icon { background: #fef3c7; color: #f59e0b; }
.kpi-red .kpi-icon { background: #fee2e2; color: #f16b4e; }
.kpi-purple .kpi-icon { background: #ede9fe; color: #8b5cf6; }

.kpi-box .kpi-icon svg { width: 22px; height: 22px; }
.kpi-num { display: block; font-size: 24px; font-weight: 800; color: #1a315e; }
.kpi-txt { font-size: 11px; color: #9bc3e3; }

/* Informe Grid */
.informe-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.inf-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
}

.inf-card.card-lg { grid-column: span 2; }
.inf-card.card-full { grid-column: span 2; }

.inf-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid #e8f1f8;
    background: #f8fafc;
}

.inf-card-header svg { width: 18px; height: 18px; color: #3988c8; }
.inf-card-header h3 { font-size: 13px; font-weight: 700; color: #1a315e; flex: 1; }
.badge-brevo { background: #3988c8; color: white; font-size: 9px; padding: 3px 8px; border-radius: 4px; }

/* Comunicaciones Grid */
.comunicaciones-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
}

.com-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
}

.com-box.whatsapp { background: #dcfce7; }
.com-box.sms { background: #e8f1f8; }
.com-box.total { background: #f3f4f6; }
.com-box.respuestas { background: #fef3c7; }

.com-box .com-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.com-box.whatsapp .com-icon { background: #25d366; color: white; }
.com-box.sms .com-icon { background: #3988c8; color: white; }
.com-box.total .com-icon { background: #1a315e; color: white; }
.com-box.respuestas .com-icon { background: #f59e0b; color: white; }

.com-box .com-icon svg { width: 18px; height: 18px; }
.com-num { display: block; font-size: 20px; font-weight: 800; color: #1a315e; }
.com-label { font-size: 10px; color: #9bc3e3; }

/* Response Section */
.response-section { padding: 16px; border-top: 1px solid #e8f1f8; }
.response-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.response-header span { font-size: 12px; color: #9bc3e3; }
.response-pct { font-weight: 700; color: #1a315e; }
.response-bar-bg { height: 8px; background: #e8f1f8; border-radius: 4px; overflow: hidden; }
.response-bar-fill { height: 100%; background: linear-gradient(90deg, #3988c8, #10b981); border-radius: 4px; }
.response-stats { display: flex; gap: 20px; margin-top: 12px; flex-wrap: wrap; }
.resp-stat { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #1a315e; }
.resp-stat svg { width: 14px; height: 14px; color: #3988c8; }

/* Tiempos List */
.tiempos-list { padding: 16px; }
.tiempo-item { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tiempo-estado { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #1a315e; width: 160px; }
.estado-dot { width: 10px; height: 10px; border-radius: 3px; }
.tiempo-valor { font-size: 12px; font-weight: 700; color: #1a315e; width: 60px; }
.tiempo-bar { flex: 1; height: 6px; background: #e8f1f8; border-radius: 3px; overflow: hidden; }
.tiempo-fill { height: 100%; border-radius: 3px; }
.tiempo-total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid #e8f1f8; font-size: 13px; }
.tiempo-total strong { color: #3988c8; }

/* Puntualidad */
.puntualidad-display { padding: 20px; display: flex; align-items: center; gap: 30px; }
.punt-circle { width: 100px; height: 100px; }
.circular-chart { display: block; }
.circle-bg { fill: none; stroke: #e8f1f8; stroke-width: 3; }
.circle { fill: none; stroke-width: 3; stroke-linecap: round; }
.circle.green { stroke: #10b981; }
.percentage { fill: #1a315e; font-size: 8px; font-weight: 700; text-anchor: middle; }
.punt-details { flex: 1; }
.punt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.punt-dot { width: 12px; height: 12px; border-radius: 3px; }
.punt-dot.green { background: #10b981; }
.punt-dot.red { background: #f16b4e; }
.punt-dot.gray { background: #9bc3e3; }
.punt-row strong { margin-left: auto; color: #1a315e; }

/* Estados Chart */
.estados-chart { padding: 16px; }
.estado-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.estado-color { width: 12px; height: 12px; border-radius: 3px; }
.estado-name { font-size: 12px; color: #1a315e; width: 80px; }
.estado-count { font-size: 12px; font-weight: 700; color: #1a315e; width: 30px; }
.estado-bar-bg { flex: 1; height: 6px; background: #e8f1f8; border-radius: 3px; overflow: hidden; }
.estado-bar-fill { height: 100%; border-radius: 3px; }

/* Top Confeccionistas */
.top-conf-list { padding: 12px; }
.top-conf-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; margin-bottom: 6px; }
.top-conf-item:hover { background: #e8f1f8; }
.top-rank { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: #e8f1f8; color: #9bc3e3; }
.top-rank.gold { background: #fef3c7; color: #f59e0b; }
.top-rank.silver { background: #e8f1f8; color: #6b7280; }
.top-rank.bronze { background: #fce7f3; color: #ec4899; }
.top-conf-item img { width: 36px; height: 36px; border-radius: 50%; }
.top-conf-item .top-info { flex: 1; }
.top-conf-item .top-info strong { display: block; font-size: 13px; color: #1a315e; }
.top-conf-item .top-info span { font-size: 11px; color: #9bc3e3; }
.crown { width: 18px; height: 18px; color: #f59e0b; }

/* Tabla Respuestas */
.tabla-respuestas { width: 100%; border-collapse: collapse; }
.tabla-respuestas th, .tabla-respuestas td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #e8f1f8; font-size: 12px; }
.tabla-respuestas th { font-weight: 600; color: #9bc3e3; text-transform: uppercase; font-size: 10px; background: #f8fafc; }
.tabla-respuestas td { color: #1a315e; }
.tabla-respuestas .conf-cell { display: flex; align-items: center; gap: 10px; }
.tabla-respuestas .conf-cell img { width: 28px; height: 28px; border-radius: 50%; }
.rate-good { color: #10b981; font-weight: 700; }
.rate-medium { color: #f59e0b; font-weight: 700; }
.rate-bad { color: #f16b4e; font-weight: 700; }
.st-badge { font-size: 9px; padding: 3px 8px; border-radius: 4px; font-weight: 600; }
.st-excellent { background: #d1fae5; color: #10b981; }
.st-good { background: #dbeafe; color: #3988c8; }
.st-regular { background: #fef3c7; color: #f59e0b; }
.st-bad { background: #fee2e2; color: #f16b4e; }

/* Chart Meses */
.chart-meses { display: flex; align-items: flex-end; justify-content: space-around; height: 160px; padding: 20px; }
.mes-col { display: flex; flex-direction: column; align-items: center; }
.mes-bar { width: 36px; background: linear-gradient(180deg, #3988c8, #1a315e); border-radius: 6px 6px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; min-height: 20px; }
.mes-bar span { font-size: 10px; font-weight: 700; color: white; }
.mes-label { font-size: 9px; color: #9bc3e3; margin-top: 6px; }

/* Tabla Resumen */
.tabla-resumen { width: 100%; border-collapse: collapse; }
.tabla-resumen th, .tabla-resumen td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #e8f1f8; }
.tabla-resumen th { font-size: 10px; font-weight: 600; color: #9bc3e3; text-transform: uppercase; background: #f8fafc; }
.tabla-resumen td { font-size: 13px; color: #1a315e; }
.tabla-resumen td svg { width: 16px; height: 16px; margin-right: 8px; color: #3988c8; vertical-align: middle; }
.var-up { color: #10b981; font-weight: 600; }
.var-down { color: #f16b4e; font-weight: 600; }
.status-badge { font-size: 10px; padding: 4px 10px; border-radius: 20px; font-weight: 600; }
.status-badge.success { background: #d1fae5; color: #10b981; }
.status-badge.warning { background: #fef3c7; color: #f59e0b; }
/* =====================================================
   PANEL DE EXPORTACIÓN - INFORMES
   ===================================================== */
.export-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 2px solid #3988c8;
}

.export-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a315e;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-title svg {
    width: 20px;
    height: 20px;
    color: #3988c8;
}

.export-form {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.date-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-group label {
    font-size: 11px;
    font-weight: 600;
    color: #9bc3e3;
    text-transform: uppercase;
}

.date-group input {
    height: 42px;
    padding: 0 14px;
    border: 2px solid #e8f1f8;
    border-radius: 8px;
    font-size: 13px;
    color: #1a315e;
    min-width: 160px;
    transition: all 0.2s;
}

.date-group input:focus {
    outline: none;
    border-color: #3988c8;
    box-shadow: 0 0 0 3px rgba(57,136,200,0.15);
}

.export-buttons {
    display: flex;
    gap: 10px;
}

.btn-export-main {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-export-main svg {
    width: 18px;
    height: 18px;
}

.btn-export-main.btn-pdf {
    background: #f16b4e;
    color: white;
}

.btn-export-main.btn-pdf:hover {
    background: #e55a3e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(241,107,78,0.3);
}

.btn-export-main.btn-excel {
    background: #10b981;
    color: white;
}

.btn-export-main.btn-excel:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.export-hint {
    margin-top: 12px;
    font-size: 11px;
    color: #9bc3e3;
    display: flex;
    align-items: center;
    gap: 6px;
}

.export-hint svg {
    width: 14px;
    height: 14px;
}

/* =====================================================
   BASE DE DATOS - MEJORAS
   ===================================================== */
.btn-filtrar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 36px;
    background: #3988c8;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-end;
}

.btn-filtrar:hover {
    background: #1a315e;
}

.btn-filtrar svg {
    width: 14px;
    height: 14px;
}

.btn-exportar-bd {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 36px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    align-self: flex-end;
    margin-left: auto;
}

.btn-exportar-bd:hover {
    background: #059669;
}

.btn-exportar-bd svg {
    width: 14px;
    height: 14px;
}

.btn-limpiar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fee2e2;
    color: #f16b4e;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    align-self: flex-end;
}

.btn-limpiar:hover {
    background: #f16b4e;
    color: white;
}

.btn-limpiar svg {
    width: 16px;
    height: 16px;
}








/* =====================================================
   CSS ADICIONAL - DIA ACTUAL EN CALENDARIO Y CRONOGRAMA
   Agregar al final de public/css/app.css
   ===================================================== */

/* CALENDARIO - Dia actual destacado */
.cal-day.cal-today {
    background: linear-gradient(135deg, #3988c8, #1a315e) !important;
    color: white !important;
    font-weight: 700 !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(57, 136, 200, 0.4);
    position: relative;
}

.cal-day.cal-today::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: #f16b4e;
    border-radius: 50%;
}

/* CRONOGRAMA - Dia actual (HOY) destacado */
.day-header.day-today {
    background: linear-gradient(135deg, #3988c8, #1a315e) !important;
    border-radius: 8px;
    position: relative;
}

.day-header.day-today .day-num {
    color: white !important;
}

.day-header.day-today .day-name {
    color: rgba(255,255,255,0.8) !important;
}

.day-header.day-today::before {
    content: 'HOY';
    position: absolute;
    top: 3px;
    right: 3px;
    background: #f16b4e;
    color: white;
    font-size: 7px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

/* Columna del dia actual en cronograma */
.schedule-day.day-today-col {
    background: rgba(57, 136, 200, 0.05);
}

/* Gestion de usuarios */
.usuarios-section { margin-top: 20px; }
.usuarios-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.usuarios-header h3 { font-size: 16px; font-weight: 700; color: #1a315e; display: flex; align-items: center; gap: 8px; }
.usuarios-header h3 svg { width: 20px; height: 20px; color: #3988c8; }
.btn-nuevo-usuario { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: #3988c8; color: white; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-nuevo-usuario:hover { background: #1a315e; }
.usuarios-lista { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.usuario-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #e8f1f8; }
.usuario-item:last-child { border-bottom: none; }
.usuario-item:hover { background: #f8fafc; }
.usuario-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, #3988c8, #1a315e); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; font-weight: 700; }
.usuario-info { flex: 1; }
.usuario-nombre { font-size: 14px; font-weight: 600; color: #1a315e; }
.usuario-email { font-size: 11px; color: #9bc3e3; }
.usuario-rol { font-size: 9px; padding: 3px 8px; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.usuario-rol.admin { background: #fee2e2; color: #f16b4e; }
.usuario-rol.usuario { background: #e8f1f8; color: #3988c8; }
.usuario-estado { width: 10px; height: 10px; border-radius: 50%; }
.usuario-estado.activo { background: #10b981; }
.usuario-estado.inactivo { background: #9bc3e3; }
.usuario-acciones { display: flex; gap: 6px; }
.usuario-acciones button { width: 32px; height: 32px; border: none; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.usuario-acciones button svg { width: 14px; height: 14px; }
.btn-editar-usuario { background: #e8f1f8; color: #3988c8; }
.btn-editar-usuario:hover { background: #3988c8; color: white; }
.btn-toggle-usuario { background: #fef3c7; color: #f59e0b; }
.btn-toggle-usuario:hover { background: #f59e0b; color: white; }
.btn-eliminar-usuario { background: #fee2e2; color: #f16b4e; }
.btn-eliminar-usuario:hover { background: #f16b4e; color: white; }
.usuario-protegido { background: #f8fafc; border-left: 3px solid #f16b4e; }
.modal-usuario { background: white; border-radius: 16px; width: 420px; max-width: 95vw; overflow: hidden; }
.modal-usuario-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: linear-gradient(135deg, #3988c8, #1a315e); color: white; }
.modal-usuario-header h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.modal-usuario-body { padding: 20px; }
.modal-usuario-footer { display: flex; gap: 10px; padding: 16px 20px; background: #f8fafc; border-top: 1px solid #e8f1f8; }






/* =====================================================
   ESTILOS ADICIONALES PRODEXA
   - Día actual en calendario
   - Día actual en cronograma (HOY)
   - Gestión de usuarios
   ===================================================== */

/* =====================================================
   CALENDARIO - DÍA ACTUAL DESTACADO
   ===================================================== */
.cal-day.cal-today {
    background: linear-gradient(135deg, #3988c8, #1a315e) !important;
    color: white !important;
    font-weight: 700 !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(57, 136, 200, 0.4);
    position: relative;
    transform: scale(1.1);
    z-index: 2;
}

.cal-day.cal-today::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: #f16b4e;
    border-radius: 50%;
}

/* =====================================================
   CRONOGRAMA - DÍA ACTUAL (HOY) DESTACADO
   ===================================================== */
.day-header.day-today {
    background: linear-gradient(135deg, #3988c8, #1a315e) !important;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 12px rgba(57, 136, 200, 0.3);
}

.day-header.day-today .day-num,
.day-header.day-today .day-name {
    color: white !important;
}

.day-header.day-today::before {
    content: 'HOY';
    position: absolute;
    top: 3px;
    right: 3px;
    background: #f16b4e;
    color: white;
    font-size: 7px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* =====================================================
   GESTIÓN DE USUARIOS - ESTILOS
   ===================================================== */

/* Lista de usuarios */
.usuarios-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.usuario-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(155, 195, 227, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(155, 195, 227, 0.2);
    transition: all 0.2s ease;
}

.usuario-item:hover {
    background: rgba(155, 195, 227, 0.15);
    border-color: rgba(155, 195, 227, 0.3);
}

.usuario-item.usuario-protegido {
    background: rgba(241, 107, 78, 0.08);
    border-color: rgba(241, 107, 78, 0.2);
}

/* Avatar usuario */
.usuario-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3988c8, #1a315e);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

/* Info usuario */
.usuario-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.usuario-nombre {
    font-weight: 600;
    color: #1a315e;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.usuario-email {
    font-size: 11px;
    color: #9bc3e3;
}

/* Rol badge */
.usuario-rol {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usuario-rol.admin {
    background: linear-gradient(135deg, #f16b4e, #e55a3c);
    color: white;
}

.usuario-rol.usuario {
    background: rgba(57, 136, 200, 0.15);
    color: #3988c8;
}

/* Estado (punto) */
.usuario-estado {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.usuario-estado.activo {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.usuario-estado.inactivo {
    background: #9ca3af;
}

/* Acciones */
.usuario-acciones {
    display: flex;
    gap: 6px;
}

.btn-editar-usuario,
.btn-toggle-usuario,
.btn-eliminar-usuario {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-editar-usuario {
    background: rgba(57, 136, 200, 0.15);
    color: #3988c8;
}

.btn-editar-usuario:hover {
    background: #3988c8;
    color: white;
}

.btn-toggle-usuario {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.btn-toggle-usuario:hover {
    background: #f59e0b;
    color: white;
}

.btn-eliminar-usuario {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.btn-eliminar-usuario:hover {
    background: #ef4444;
    color: white;
}

.btn-editar-usuario svg,
.btn-toggle-usuario svg,
.btn-eliminar-usuario svg {
    width: 14px;
    height: 14px;
}

/* =====================================================
   MODAL USUARIO
   ===================================================== */
.modal-usuario {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-usuario-header {
    background: linear-gradient(135deg, #1a315e, #3988c8);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-usuario-header h3 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.modal-usuario-header h3 svg {
    width: 20px;
    height: 20px;
}

.modal-usuario-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-usuario-header button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-usuario-body {
    padding: 20px;
}

.modal-usuario-footer {
    padding: 15px 20px;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-usuario-footer .btn-cancelar {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-usuario-footer .btn-cancelar:hover {
    background: #f1f5f9;
}

.modal-usuario-footer .btn-guardar {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #3988c8, #1a315e);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.modal-usuario-footer .btn-guardar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 136, 200, 0.3);
}

.modal-usuario-footer .btn-guardar svg {
    width: 16px;
    height: 16px;
}

/* Botón agregar usuario */
.btn-add-conf {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-add-conf:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.btn-add-conf svg {
    width: 18px;
    height: 18px;
}

/* Spinner de carga */
.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(57, 136, 200, 0.2);
    border-top-color: #3988c8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .usuario-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .usuario-acciones {
        width: 100%;
        justify-content: flex-end;
        margin-top: 5px;
    }
    
    .usuario-rol {
        font-size: 9px;
        padding: 3px 8px;
    }
}




/* =====================================================
   ESTILOS PARA INPUT DE HORA CON MINUTOS
   Agregar al final de app.css
   ===================================================== */

/* Input de hora en modal nuevo pedido */
.hora-editable {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hora-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 6px 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    width: 100px;
    cursor: pointer;
}

.hora-input:focus {
    outline: none;
    border-color: #3988c8;
    background: rgba(57, 136, 200, 0.2);
}

/* Para que el input time se vea bien en todos los navegadores */
.hora-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* Input time en modal editar */
#editHora {
    width: 100%;
}




/* =====================================================
   AGREGAR AL FINAL DE public/css/app.css
   ===================================================== */

/* Input de hora con minutos */
.hora-input {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    width: 120px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hora-input:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

.hora-input:focus {
    outline: none;
    border-color: #3988c8;
    background: rgba(57, 136, 200, 0.3);
    box-shadow: 0 0 0 3px rgba(57, 136, 200, 0.2);
}

/* Para navegadores WebKit (Chrome, Safari, Edge) */
.hora-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.8;
}

.hora-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}





/* =====================================================
   AGREGAR AL FINAL DE public/css/app.css
   ESTILOS PARA INPUT DE HORA CON MINUTOS
   ===================================================== */

/* Input de hora - TEXTO NEGRO VISIBLE */
.hora-input {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    color: #333333;
    font-size: 15px;
    font-weight: 600;
    width: 130px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hora-input:hover {
    border-color: #3988c8;
    background: #f8f9fa;
}

.hora-input:focus {
    outline: none;
    border-color: #3988c8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(57, 136, 200, 0.2);
}

/* Icono del reloj en el input */
.hora-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    filter: none;
}

.hora-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}














/* =====================================================
   TOAST NOTIFICATIONS - AGREGAR AL FINAL DE app.css
   ===================================================== */

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: white;
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-left: 4px solid #3988c8;
    animation: toastIn 0.3s ease;
    position: relative;
}

.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #f16b4e; }
.toast.warning { border-left-color: #f59e0b; }
.toast.info { border-left-color: #3988c8; }

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-icon svg { width: 24px; height: 24px; }

.toast.success .toast-icon { color: #10b981; }
.toast.error .toast-icon { color: #f16b4e; }
.toast.warning .toast-icon { color: #f59e0b; }
.toast.info .toast-icon { color: #3988c8; }

.toast-content { flex: 1; }
.toast-title { font-size: 14px; font-weight: 700; color: #1a315e; margin-bottom: 2px; }
.toast-message { font-size: 12px; color: #9bc3e3; line-height: 1.4; }

.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9bc3e3;
    padding: 4px;
}

.toast-close:hover { color: #1a315e; }
.toast-close svg { width: 14px; height: 14px; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}