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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.company-logo {
    height: 60px;
    width: auto;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 5px;
    background: white;
}

header h1 {
    color: #1a1a1a;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.header-info {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.date, .total-orders {
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #333;
}

/* Filtros */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #1a1a1a;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-color: #1a1a1a;
}

.filter-btn.active {
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    color: white;
    border-color: #1a1a1a;
}

/* Tabla */
.table-container {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.orders-table th {
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 3px solid #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

.orders-table th:first-child {
    border-top-left-radius: 10px;
}

.orders-table th:last-child {
    border-top-right-radius: 10px;
}

.orders-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: middle;
}

.orders-table tr {
    transition: all 0.3s ease;
    background: white;
}

.orders-table tr:hover {
    background: linear-gradient(90deg, rgba(26, 26, 26, 0.05), rgba(45, 45, 45, 0.05));
    transform: scale(1.01);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Celdas específicas */
.id-cell {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1rem;
}

.photo-cell {
    text-align: center;
}

.shoe-photo {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e8e8e8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shoe-photo:hover {
    transform: scale(1.2);
    border-color: #1a1a1a;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
    position: relative;
}

.placeholder-photo {
    opacity: 0.7;
    filter: grayscale(100%);
}

.placeholder-photo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.brand-cell {
    font-weight: 600;
    color: #1a1a1a;
}

.color-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.service-cell {
    font-weight: 500;
    color: #2d2d2d;
}

.client-cell {
    font-weight: 600;
    color: #1a1a1a;
}

.number-cell {
    font-family: 'Courier New', monospace;
    color: #666;
}

/* Status badges - mantenemos colores para señalización */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 100px;
    text-align: center;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.status-badge.recien-llegado {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border-color: #c0392b;
}

.status-badge.fotos {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    border-color: #e67e22;
}

.status-badge.limpieza {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border-color: #2980b9;
}

.status-badge.secado {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    border-color: #8e44ad;
}

.status-badge.limpio {
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
    border-color: #229954;
}

.status-badge.entregado {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
    border-color: #7f8c8d;
}

/* Botones de acción - mantenemos colores para señalización */
.btn-action {
    padding: 8px 16px;
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-next {
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    color: white;
    border-color: #1a1a1a;
}

.btn-deliver {
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
    border-color: #229954;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-camera {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    border-color: #8e44ad;
    font-size: 0.85rem;
    padding: 8px 12px;
}

.btn-camera:hover {
    background: linear-gradient(45deg, #8e44ad, #7d3c98);
}

.btn-delivered {
    background: #95a5a6;
    color: white;
    border-color: #7f8c8d;
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-delivered:hover {
    transform: none;
    box-shadow: none;
}

/* =================================
   CALENDARIO DE CONTROL DIARIO
   ================================= */

.calendar-main-section {
    margin: 30px 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.calendar-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #f8f9fa;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f2f6;
}

.calendar-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.calendar-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    min-width: 200px;
    text-align: center;
}

.calendar-nav-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: #333;
    transform: scale(1.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    background: #f8f9fa;
    color: #1a1a1a;
    text-align: center;
    padding: 12px 8px;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.calendar-day:hover {
    border-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.calendar-day.today {
    background: linear-gradient(135deg, #1a1a1a, #333);
    color: white;
    border-color: #1a1a1a;
    font-weight: bold;
}

.calendar-day.other-month {
    opacity: 0.3;
    pointer-events: none;
}

.calendar-day.has-orders {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-color: #27ae60;
}

.calendar-day.has-orders.today {
    background: linear-gradient(135deg, #1a1a1a, #27ae60);
}

.day-number {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.day-count {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 600;
    margin-top: auto;
}

.calendar-day.has-orders .day-count {
    background: rgba(255, 255, 255, 0.3);
}

.calendar-day.today .day-count {
    background: rgba(255, 255, 255, 0.2);
}

.day-count.high-volume {
    background: #e74c3c;
    color: white;
    animation: pulse 2s infinite;
}

.day-count.critical-volume {
    background: #c0392b;
    color: white;
    animation: urgentPulse 1.5s infinite;
    border: 2px solid #e74c3c;
    font-weight: 700;
}

.calendar-day.critical-volume {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
    border-color: #c0392b;
    animation: criticalBlink 3s infinite;
}

.calendar-day.critical-volume.today {
    background: linear-gradient(135deg, #1a1a1a, #c0392b);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes urgentPulse {
    0% { transform: scale(1); opacity: 1; }
    30% { transform: scale(1.15); opacity: 0.8; }
    60% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes criticalBlink {
    0%, 80% { opacity: 1; }
    85%, 95% { opacity: 0.7; }
    100% { opacity: 1; }
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.today {
    background: #1a1a1a;
}

.legend-color.has-orders {
    background: #27ae60;
}

.legend-color.high-volume {
    background: #e74c3c;
}

.legend-color.critical-volume {
    background: #c0392b;
    border: 1px solid #e74c3c;
}

/* Responsive para calendario */
@media (max-width: 768px) {
    .calendar-main-section {
        margin: 20px 0;
        padding: 20px;
    }
    
    .calendar-section {
        padding: 15px;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .calendar-header h2 {
        font-size: 1.3rem;
    }
    
    .calendar-nav {
        justify-content: center;
    }
    
    .calendar-title {
        font-size: 1.2rem;
        min-width: auto;
    }
    
    .calendar-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .calendar-day {
        min-height: 50px;
        padding: 8px 4px;
    }
    
    .day-number {
        font-size: 1rem;
    }
    
    .day-count {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
    
    .calendar-day-header {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
    
    .calendar-legend {
        flex-wrap: wrap;
        gap: 15px;
    }
}

/* Tarjetas de resumen */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
    border-color: #1a1a1a;
}

.summary-card h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.summary-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sección de Estadísticas Básicas */
.statistics-section {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    color: #1a1a1a;
    font-size: 1.8rem;
    font-weight: 700;
}

.period-selector {
    display: flex;
    gap: 10px;
}

.period-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a1a1a;
    transition: all 0.3s ease;
}

.period-btn:hover {
    border-color: #1a1a1a;
    background: white;
}

.period-btn.active {
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    color: white;
    border-color: #1a1a1a;
}

.basic-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.stat-card {
    background: rgba(248, 248, 248, 0.8);
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 8px;
}

/* Estadísticas Generales */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1rem;
}

.stat-value.success {
    color: #27ae60;
}

/* Estadísticas de Marcas */
.brand-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.brand-name {
    min-width: 80px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.brand-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.brand-fill {
    height: 100%;
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.brand-count {
    min-width: 30px;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.9rem;
}

/* Estadísticas de Colores */
.color-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.color-indicator-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-dot-stat {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.color-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.color-percentage {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.9rem;
}

/* Estadísticas de Servicios */
.service-item {
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.service-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.service-name {
    font-weight: 600;
    color: #1a1a1a;
}

.service-price {
    font-weight: 700;
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.service-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.service-count {
    color: #666;
}

.service-revenue {
    font-weight: 700;
    color: #1a1a1a;
}

.total-revenue {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
    color: #27ae60;
    font-size: 1.1rem;
}

/* Estadísticas de Tiempo */
.time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.time-label {
    color: #666;
    font-size: 0.9rem;
}

.time-value {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1rem;
}

.time-goal {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goal-label {
    color: #666;
    font-weight: 600;
    font-size: 0.9rem;
}

.goal-value {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1rem;
}

.goal-value.success {
    color: #27ae60;
    font-weight: 700;
}

/* Estadísticas de Clientes */
.client-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
}

.client-label {
    color: #666;
    font-size: 0.9rem;
}

.client-value {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.client-value.success {
    color: #27ae60;
}

/* Sección de Estadísticas Avanzadas */
.advanced-statistics-section {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.advanced-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.chart-selector {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-selector:hover,
.chart-selector:focus {
    border-color: #1a1a1a;
    outline: none;
}

.export-btn {
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.advanced-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Tarjetas de Gráficos */
.chart-card {
    background: rgba(248, 248, 248, 0.8);
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    min-height: 400px;
}

.chart-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-header h3 {
    color: #1a1a1a;
    font-size: 1.1rem;
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 5px;
}

.chart-period-btn,
.chart-toggle-btn,
.time-btn,
.analysis-tab {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.chart-period-btn:hover,
.chart-toggle-btn:hover,
.time-btn:hover,
.analysis-tab:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.chart-period-btn.active,
.time-btn.active,
.analysis-tab.active {
    background: linear-gradient(45deg, #1a1a1a, #2d2d2d);
    color: white;
    border-color: #1a1a1a;
}

.chart-container {
    height: 250px;
    margin-bottom: 15px;
    position: relative;
}

.chart-container canvas {
    max-height: 100%;
    width: 100% !important;
    height: 100% !important;
}

/* Insights de Gráficos */
.chart-insights {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e8e8e8;
}

.insight-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.insight-label {
    font-size: 0.8rem;
    color: #666;
}

.insight-value {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.insight-value.positive {
    color: #27ae60;
}

.insight-value.negative {
    color: #e74c3c;
}

/* Leyenda de Gráficos */
.chart-legend {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Métricas de Rendimiento */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.metric-item {
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.metric-item:hover {
    transform: scale(1.02);
}

.metric-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 26, 26, 0.1);
    border-radius: 50%;
}

.metric-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.metric-label {
    font-size: 0.8rem;
    color: #666;
}

.metric-trend {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
}

.metric-trend.positive {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.metric-trend.negative {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* Análisis de Clientes */
.analysis-tabs {
    display: flex;
    gap: 5px;
}

.customer-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 15px;
    border-top: 1px solid #e8e8e8;
}

.customer-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.stat-description {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

/* Predicciones */
.prediction-confidence {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
}

.confidence-label {
    color: #666;
}

.confidence-value {
    font-weight: 700;
    color: #27ae60;
}

.predictions-insights {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e8e8e8;
}

.prediction-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 8px;
}

.prediction-icon {
    font-size: 1.2rem;
}

.prediction-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.prediction-title {
    font-size: 0.8rem;
    color: #666;
}

.prediction-value {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.9rem;
}

/* Alertas Inteligentes */
.smart-alerts {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e8e8e8;
}

.smart-alerts h3 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.alerts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid;
}

.alert-item.warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.alert-item.info {
    background: rgba(52, 152, 219, 0.1);
    border-left-color: #3498db;
}

.alert-item.success {
    background: rgba(39, 174, 96, 0.1);
    border-left-color: #27ae60;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.alert-title {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.alert-message {
    font-size: 0.8rem;
    color: #666;
}

.alert-action {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.alert-action:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

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

.orders-table tr {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-left {
        justify-content: center;
    }
    
    .company-logo {
        height: 50px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .header-info {
        justify-content: center;
    }
    
    .filters {
        justify-content: center;
    }
    
    .table-container {
        padding: 15px;
        overflow-x: auto;
    }
    
    .orders-table {
        min-width: 800px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }

    /* Estadísticas responsivas */
    .statistics-section {
        padding: 20px;
    }

    .section-header {
        flex-direction: column;
        text-align: center;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .basic-stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-card {
        padding: 15px;
    }

    .brand-item {
        flex-wrap: wrap;
        gap: 5px;
    }

    .brand-name {
        min-width: 60px;
    }

    .service-info {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }

    .service-stats {
        flex-direction: column;
        gap: 5px;
    }

    /* Estadísticas avanzadas responsivas */
    .advanced-statistics-section {
        padding: 20px;
    }

    .advanced-controls {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .advanced-charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-card {
        min-height: 350px;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .chart-controls,
    .analysis-tabs {
        flex-wrap: wrap;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .customer-stats {
        flex-direction: column;
        gap: 15px;
    }

    .predictions-insights {
        gap: 8px;
    }

    .alerts-container {
        grid-template-columns: 1fr;
    }

    .alert-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .alert-content {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .filter-btn {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
    
    .shoe-photo {
        width: 50px;
        height: 35px;
    }
    
    .status-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
        min-width: 80px;
    }
    
    .btn-action {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    /* Estadísticas avanzadas móvil */
    .advanced-statistics-section {
        padding: 15px;
    }

    .chart-card {
        padding: 15px;
        min-height: 300px;
    }

    .chart-container {
        height: 200px;
    }

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

    .metric-item {
        padding: 12px;
    }

    .chart-period-btn,
    .time-btn,
    .analysis-tab {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .chart-legend {
        justify-content: center;
    }

    .predictions-insights {
        align-items: center;
    }

    .prediction-item {
        justify-content: center;
    }
}

/* Estados ocultos para filtros */
.orders-table tr.hidden {
    display: none;
}

/* Efectos especiales */
.orders-table tr.priority {
    border-left: 4px solid #e74c3c;
}

.orders-table tr.urgent {
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.1), transparent);
}

/* Tooltips para información adicional */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}

/* =================================
   SECCIÓN DE REGISTRO DE CALZADO
   ================================= */

.registration-section {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}

.registration-header {
    background: linear-gradient(135deg, #434343, #000000);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.registration-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.toggle-registration-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toggle-registration-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.registration-form-container {
    padding: 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.registration-form-container.active {
    max-height: 1000px;
}

.registration-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

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

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.photo-upload-group {
    grid-column: 1 / -1;
}

.photo-upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
}

.photo-upload-area:hover {
    border-color: #3498db;
    background: #e3f2fd;
}

.photo-upload-area.dragover {
    border-color: #2ecc71;
    background: #e8f5e8;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.upload-subtext {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.photo-preview {
    position: relative;
    display: inline-block;
}

.photo-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.remove-photo-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-photo-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-primary,
.btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-add-another {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-add-another:hover {
    background: linear-gradient(45deg, #2980b9, #1f5582);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.btn-add-another:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
    border: 2px solid #bdc3c7;
}

.btn-secondary:hover {
    background: #d5dbdb;
    transform: translateY(-1px);
}

/* Estilos del Carrito */
.cart-section {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.cart-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.2rem;
}

.cart-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-count {
    background: #1a1a1a;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-clear-cart {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear-cart:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-item-info {
    flex: 1;
}

.cart-item-brand {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.cart-item-details {
    font-size: 0.85rem;
    color: #666;
}

.cart-item-remove {
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Estilos del Tracker de Pedidos */
.order-tracker-section {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.tracker-header h2 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.5rem;
}

.tracker-subtitle {
    color: #666;
    margin: 5px 0 0 0;
    font-size: 0.9rem;
}

.toggle-tracker-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.toggle-tracker-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.tracker-form-container {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.tracker-form-container.active {
    max-height: 800px;
    opacity: 1;
    margin-top: 20px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    max-width: 400px;
}

#orderIdSearch {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#orderIdSearch:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-search {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.order-status-display {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
}

.order-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.order-id {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
}

.order-client {
    color: #666;
    font-size: 1rem;
}

.estimated-completion {
    text-align: right;
}

.completion-label {
    font-size: 0.85rem;
    color: #666;
    display: block;
}

.completion-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #27ae60;
}

.status-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    position: relative;
}

.status-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e9ecef;
    transform: translateY(-50%);
    z-index: 1;
}

.status-timeline::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    transform: translateY(-50%);
    z-index: 2;
    width: var(--progress, 0%);
    transition: width 0.8s ease;
}

.status-step {
    background: white;
    border: 4px solid #e9ecef;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.status-step.completed {
    border-color: #27ae60;
    background: #27ae60;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.status-step.current {
    border-color: #3498db;
    background: #3498db;
    color: white;
    transform: scale(1.2);
    animation: pulse 2s infinite;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
}

.status-step.current {
    border-color: #3498db;
    background: #3498db;
    color: white;
    animation: pulse 2s infinite;
    transform: scale(1.2);
}

.status-step.pending {
    border-color: #e9ecef;
    background: white;
    color: #bdc3c7;
}

.step-label {
    display: none; /* Ocultar las etiquetas de texto */
}

.status-step.completed + .step-label,
.status-step.current + .step-label {
    display: none; /* Ocultar todas las etiquetas de texto */
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.detail-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.detail-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.error-message {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 10px;
    padding: 15px;
    color: #c0392b;
    text-align: center;
    font-weight: 600;
}

/* Responsive para tracker */
@media (max-width: 768px) {
    .tracker-header {
        flex-direction: column;
        text-align: center;
    }
    
    .search-input-group {
        flex-direction: column;
        max-width: 100%;
    }
    
    .order-info-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .status-timeline {
        flex-direction: column;
        gap: 20px;
    }
    
    .status-timeline::before,
    .status-timeline::after {
        top: 0;
        bottom: 0;
        left: 50%;
        width: 4px;
        height: auto;
        transform: translateX(-50%);
    }
    
    .step-label {
        top: auto;
        left: 80px;
        transform: none;
    }
    
    .order-details {
        grid-template-columns: 1fr;
    }
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.quick-stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* Responsive para la sección de registro */
@media (max-width: 768px) {
    .registration-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .quick-stats {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

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

.registration-form-container.active {
    animation: slideIn 0.4s ease;
}

/* Estados de validación */
.form-group input.valid,
.form-group select.valid {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.form-group input.invalid,
.form-group select.invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* =================================
   CALCULADORA DE TIEMPO DE LIMPIEZA
   ================================= */

.cleaning-calculator-section {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}

.calculator-header {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    padding: 25px;
    text-align: center;
}

.calculator-header h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.calculator-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0 0 20px 0;
}

.toggle-calculator-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.toggle-calculator-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.calculator-form-container {
    padding: 30px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.calculator-form-container.active {
    max-height: 2000px;
}

.calculator-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.input-group select {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.input-group select:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
    transform: translateY(-1px);
}

.input-group select:hover {
    border-color: #1a1a1a;
}

.calculator-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.btn-calculate,
.btn-reset {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-calculate {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
}

.btn-calculate:hover {
    background: linear-gradient(135deg, #2d2d2d, #434343);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 26, 26, 0.3);
}

.btn-reset {
    background: #ecf0f1;
    color: #2c3e50;
    border: 2px solid #bdc3c7;
}

.btn-reset:hover {
    background: #d5dbdb;
    transform: translateY(-1px);
}

.calculation-result {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
}

.result-header h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin: 0;
}

.main-result {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.estimated-time {
    margin-bottom: 15px;
}

.time-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
}

.time-unit {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 600;
}

.delivery-date {
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.delivery-label {
    display: block;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.delivery-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #27ae60;
}

.result-breakdown {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.result-breakdown h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.breakdown-item.total {
    border-top: 2px solid #1a1a1a;
    border-bottom: none;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 700;
}

.breakdown-label {
    color: #2c3e50;
    font-size: 0.9rem;
}

.breakdown-value {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.9rem;
}

.breakdown-item.total .breakdown-value {
    color: #27ae60;
    font-size: 1.1rem;
}

.queue-info {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.queue-info h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 1.1rem;
}

.queue-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.queue-stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.queue-stat .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.queue-stat .stat-label {
    font-size: 0.8rem;
    color: #7f8c8d;
    font-weight: 500;
}

.result-notes {
    background: rgba(26, 26, 26, 0.05);
    border: 1px solid rgba(26, 26, 26, 0.1);
    border-radius: 10px;
    padding: 20px;
}

.note-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.note-text {
    font-size: 0.9rem;
    color: #2c3e50;
    line-height: 1.4;
}

/* Estados de validación para calculadora */
.input-group select.selected {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.input-group select.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Animaciones para la calculadora */
@keyframes slideInCalc {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-form-container.active {
    animation: slideInCalc 0.5s ease;
}

@keyframes resultAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.calculation-result {
    animation: resultAppear 0.4s ease;
}

/* Responsive para calculadora */
@media (max-width: 768px) {
    .calculator-inputs {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .calculator-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-calculate,
    .btn-reset {
        width: 100%;
        justify-content: center;
    }
    
    .queue-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .main-result {
        padding: 20px;
    }
    
    .time-value {
        font-size: 2.5rem;
    }
    
    .breakdown-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .calculator-header {
        padding: 20px 15px;
    }
    
    .calculator-header h2 {
        font-size: 1.4rem;
    }
    
    .calculator-subtitle {
        font-size: 0.9rem;
    }
    
    .calculator-form-container {
        padding: 20px 15px;
    }
    
    .calculation-result {
        padding: 20px 15px;
    }
    
    .time-value {
        font-size: 2rem;
    }
    
    .delivery-value {
        font-size: 1.1rem;
    }
}

/* =================================
   MODAL DE SIMULACIÓN DE CÁMARA
   ================================= */

.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.camera-modal.active {
    opacity: 1;
    visibility: visible;
}

.camera-interface {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    color: white;
    position: relative;
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.camera-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.camera-close {
    background: #e74c3c;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.camera-close:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.camera-viewfinder {
    background: #000;
    border-radius: 15px;
    height: 300px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border: 3px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewfinder-content {
    text-align: center;
    color: #666;
}

.viewfinder-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    display: block;
}

.viewfinder-text {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.viewfinder-subtext {
    font-size: 0.9rem;
    opacity: 0.7;
}

.camera-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.camera-btn {
    background: #2d2d2d;
    border: 2px solid #444;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-btn:hover {
    background: #3d3d3d;
    border-color: #555;
    transform: translateY(-2px);
}

.capture-btn {
    background: #27ae60;
    border-color: #229954;
    font-size: 1.1rem;
    padding: 15px 30px;
}

.capture-btn:hover {
    background: #229954;
    border-color: #1e8449;
}

.camera-status {
    background: #2d2d2d;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.status-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.status-label {
    color: #bbb;
    font-size: 0.9rem;
}

.status-value {
    color: white;
    font-weight: 600;
}

.photos-taken {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.photo-thumbnail {
    width: 60px;
    height: 40px;
    background: #444;
    border-radius: 5px;
    border: 2px solid #666;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}

.photo-thumbnail.taken {
    background: linear-gradient(45deg, #27ae60, #229954);
    color: white;
    border-color: #27ae60;
}

.camera-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.btn-cancel {
    background: #6c757d;
    border: 2px solid #5a6268;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-finish {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border: 2px solid #1a1a1a;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-finish:hover {
    background: linear-gradient(135deg, #2d2d2d, #434343);
    transform: translateY(-1px);
}

.btn-finish:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Efectos de captura */
.capture-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.capture-flash.active {
    opacity: 0.8;
}

/* Responsive para modal de cámara */
@media (max-width: 768px) {
    .camera-interface {
        padding: 20px;
        width: 95%;
    }
    
    .camera-viewfinder {
        height: 250px;
    }
    
    .camera-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .camera-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-finish {
        width: 100%;
        text-align: center;
    }
    
    .photos-taken {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .camera-interface {
        padding: 15px;
    }
    
    .camera-viewfinder {
        height: 200px;
    }
    
    .viewfinder-icon {
        font-size: 3rem;
    }
    
    .camera-title {
        font-size: 1.2rem;
    }
    
    .capture-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Estilos expandidos para la vista del tracker */

/* Expanded Order Info Header */
.client-badge {
    margin-bottom: 20px;
}

.loyalty-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.order-main-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.order-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.order-details-main {
    text-align: left;
}

.order-details-main h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.order-details-main p {
    margin: 8px 0;
    color: #555;
    font-size: 1rem;
}

/* Timeline Container */
.status-timeline-container {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 15px;
    border: 2px solid #333;
}

.status-timeline-container h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.4rem;
}

/* Enhanced Status Timeline */
.status-timeline .step-content {
    text-align: center;
    max-width: 120px;
}

.status-timeline .step-content h4 {
    display: none; /* Ocultar el texto del título */
}

.step-description {
    display: none; /* Ocultar la descripción */
}

/* Client Profile Section */
.client-profile-section {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 15px;
    border: 2px solid #333;
}

.client-profile-section h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.4rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.profile-stats .stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #eee;
    transition: all 0.3s ease;
}

.profile-stats .stat-card:hover {
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.profile-stats .stat-icon {
    font-size: 2rem;
    margin-right: 15px;
}

.profile-stats .stat-content {
    display: flex;
    flex-direction: column;
}

.profile-stats .stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.profile-stats .stat-label {
    font-size: 0.9rem;
    color: #666;
}

.preference-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.preference-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #eee;
}

.pref-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.pref-label {
    color: #666;
    margin-right: 10px;
    font-weight: 500;
}

.pref-value {
    color: #333;
    font-weight: bold;
}

/* Order History Section */
.order-history-section {
    margin: 30px 0;
    padding: 25px;
    background: white;
    border-radius: 15px;
    border: 2px solid #333;
}

.order-history-section h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.4rem;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.order-history-card {
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #eee;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-history-card.completed {
    border-color: #27ae60;
    background: linear-gradient(135deg, #f8fff9, #e8f5e8);
}

.order-history-card.in-progress {
    border-color: #f39c12;
    background: linear-gradient(135deg, #fffbf0, #fef5e7);
}

.order-history-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.history-photo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #333;
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
}

.history-content h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: bold;
}

.history-brand {
    color: #555;
    margin: 5px 0;
    font-weight: 500;
}

.history-service {
    color: #666;
    margin: 5px 0;
    font-size: 0.9rem;
}

.history-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 10px;
    clear: both;
}

.status-recien-llegado, .status-fotos, .status-limpieza, .status-secado {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-limpio {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Action Buttons */
.action-buttons {
    margin-top: 30px;
    text-align: center;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.action-btn.primary {
    background: #333;
    color: white;
}

.action-btn.primary:hover {
    background: #555;
    transform: translateY(-2px);
}

.action-btn.secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #333;
}

.action-btn.secondary:hover {
    background: #333;
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design for Expanded Tracker */
@media (max-width: 768px) {
    .order-main-info {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .preference-stats {
        grid-template-columns: 1fr;
    }
    
    .orders-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 200px;
    }
}
