/* ===== MODERN INDEX STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Animación de fondo con burbujas suaves */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rise 20s infinite ease-in-out;
    backdrop-filter: blur(2px);
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-duration: 18s;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 30%;
    animation-duration: 22s;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 50%;
    animation-duration: 25s;
    animation-delay: 4s;
}

.bubble:nth-child(4) {
    width: 70px;
    height: 70px;
    left: 70%;
    animation-duration: 20s;
    animation-delay: 1s;
}

.bubble:nth-child(5) {
    width: 90px;
    height: 90px;
    left: 90%;
    animation-duration: 23s;
    animation-delay: 3s;
}

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        bottom: 110vh;
        transform: translateX(50px) scale(1.1);
        opacity: 0;
    }
}

.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.main-header h1 {
    color: white;
    font-size: 1.6em;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    margin: 0;
    letter-spacing: -0.02em;
}

.current-time {
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-variant-numeric: tabular-nums;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.clientes-list {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* ===== CLIENT ROW ===== */
.cliente-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 24px;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.3s ease, transform 0.2s ease;
    align-items: center;
    position: relative;
}

.cliente-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
}

.cliente-row.normal {
    background: linear-gradient(90deg, rgba(79, 172, 254, 0.04) 0%, transparent 100%);
}

.cliente-row.normal::before {
    background: linear-gradient(180deg, #4facfe, #00f2fe);
}

.cliente-row.warning {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.08) 0%, transparent 100%);
    animation: pulse-glow 2s infinite;
}

.cliente-row.warning::before {
    background: linear-gradient(180deg, #ff9800, #ff6f00);
}

.cliente-row.danger {
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.1) 0%, transparent 100%);
    animation: attention-pulse 1s infinite;
}

.cliente-row.danger::before {
    background: linear-gradient(180deg, #ff6b6b, #ee5a6f);
}

.cliente-row.libre {
    background: linear-gradient(90deg, rgba(67, 233, 123, 0.04) 0%, transparent 100%);
}

.cliente-row.libre::before {
    background: linear-gradient(180deg, #43e97b, #38f9d7);
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: inset 0 0 0 rgba(255, 152, 0, 0);
    }

    50% {
        box-shadow: inset 0 0 30px rgba(255, 152, 0, 0.1);
    }
}

@keyframes attention-pulse {

    0%,
    100% {
        background: linear-gradient(90deg, rgba(255, 107, 107, 0.1) 0%, transparent 100%);
    }

    50% {
        background: linear-gradient(90deg, rgba(255, 107, 107, 0.18) 0%, transparent 100%);
    }
}

.cliente-row:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%);
    transform: translateX(4px);
}

.cliente-row:last-child {
    border-bottom: none;
}

/* ===== CLIENT NAME ===== */
.cliente-nombre {
    font-size: 1.25em;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: -0.01em;
}

.cliente-icono {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    flex-shrink: 0;
}

.cliente-row.normal .cliente-icono {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.15) 0%, rgba(0, 242, 254, 0.15) 100%);
    color: #0288d1;
}

.cliente-row.warning .cliente-icono {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15) 0%, rgba(255, 111, 0, 0.15) 100%);
    color: #f57c00;
}

.cliente-row.danger .cliente-icono {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(238, 90, 111, 0.15) 100%);
    color: #e53935;
}

.cliente-row.libre .cliente-icono {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.15) 0%, rgba(56, 249, 215, 0.15) 100%);
    color: #00c853;
}

/* ===== ENTRADA / SALIDA ===== */
.cliente-entrada,
.cliente-salida {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cliente-entrada strong,
.cliente-salida strong {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
    font-size: 0.65em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.04);
    padding: 4px 10px;
    border-radius: 6px;
}

.cliente-entrada .hora,
.cliente-salida .hora {
    font-size: 1.5em;
    font-weight: 700;
    color: #1a1a2e;
    font-variant-numeric: tabular-nums;
}

.cliente-salida strong {
    color: #e65100;
    background: rgba(230, 81, 0, 0.08);
}

.cliente-salida .hora {
    color: #e65100;
}

.cliente-row.libre .cliente-salida .hora {
    color: #9ca3af;
}

.cliente-row.libre .cliente-salida strong {
    color: #9ca3af;
    background: rgba(0, 0, 0, 0.04);
}

/* ===== TIME DISPLAY ===== */
.cliente-tiempo {
    text-align: center;
}

.tiempo-restante {
    font-size: 2.2em;
    font-weight: 800;
    color: #667eea;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}

.cliente-row.warning .tiempo-restante {
    color: #f57c00;
}

.cliente-row.danger .tiempo-restante {
    color: #e53935;
}

.cliente-row.libre .tiempo-restante {
    color: #00c853;
}

.tiempo-label {
    font-size: 0.75em;
    color: #9ca3af;
    margin-top: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tiempo-extra-info {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    margin-top: 10px;
    font-size: 1em;
    color: #856404;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
    line-height: 1;
}

.empty-state h2 {
    color: #667eea;
    font-size: 1.5em;
    margin: 0;
    font-weight: 700;
}

/* ===== FOOTER ===== */
.main-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px;
    text-align: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.main-footer p {
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
    }

    .logo {
        height: 40px;
    }

    .main-header h1 {
        font-size: 1.3em;
    }

    .current-time {
        font-size: 1em;
    }

    .container {
        width: 95%;
        padding: 16px;
    }

    .cliente-row {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 20px;
    }

    .cliente-nombre {
        grid-column: 1 / -1;
        font-size: 1.1em;
    }

    .cliente-icono {
        width: 38px;
        height: 38px;
    }

    .tiempo-restante {
        font-size: 1.8em;
    }

    .cliente-tiempo {
        grid-column: 1 / -1;
    }

    .cliente-entrada,
    .cliente-salida {
        text-align: left;
    }
}

.hidden {
    display: none;
}