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

:root {
    --primary-color: #7c3aed;
    --primary-light: #a78bfa;
    --success-color: #4ade80;
    --success-dark: #22c55e;
    --danger-color: #ef4444;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-gray: #475569;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.logo-container {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-container:active {
    transform: scale(0.95);
}

.logo-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--success-color);
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: none;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    z-index: 1000;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s, transform 0.2s;
}

.dropdown-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.dropdown-header {
    padding: 1rem;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--success-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.dropdown-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.dropdown-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.dropdown-email {
    font-size: 0.875rem;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-gray);
}

.dropdown-item svg {
    width: 20px;
    height: 20px;
    color: var(--text-gray);
}

.dropdown-item:hover svg {
    color: var(--text-dark);
}

.numia-logo {
    width: 110px;
    height: 40px;
}

.header-info h1 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    margin-bottom: 0.25rem;
}

.status-text {
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--success-color);
    border-radius: 50%;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    cursor: pointer;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-gray);
}

.icon-btn svg {
    width: 24px;
    height: 24px;
}

/* Main Content */
main {
    flex: 1;
    padding: 1.5rem 0;
    padding-bottom: 180px;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* Buscador */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-light);
    pointer-events: none;
}

#search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: all 0.2s;
}

#search-input::placeholder {
    color: var(--text-light);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Sección de atención */
.atencion-section {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

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

.atencion-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.person-icon {
    width: 24px;
    height: 24px;
    color: var(--text-gray);
}

.atencion-badge {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

/* Estado vacío */
.estado-vacio {
    padding: 4rem 2rem;
    text-align: center;
}

.headset-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    opacity: 0.5;
}

.estado-text {
    font-size: 1rem;
    color: var(--text-light);
}

/* Estado atendiendo */
.estado-atendiendo {
    padding: 2rem 1.5rem;
}

.estado-atendiendo.hidden {
    display: none;
}

.turno-actual {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 1rem;
    padding: 2rem;
    color: white;
}

.turno-numero-grande {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.label-turno {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.numero-turno {
    display: inline-block;
    font-size: 3rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 2rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
}

.cliente-detalle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detalle-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
}

.detalle-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.detalle-item span {
    font-size: 1rem;
    font-weight: 500;
}

/* Configuración del box */
.config-box {
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.config-box span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
}

.config-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.config-btn:hover {
    background: var(--primary-light);
    color: white;
}

.config-btn svg {
    width: 24px;
    height: 24px;
}

/* Footer */
footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* Botón de turno */
#btn-turno {
    width: 100%;
    min-width: 250px;
    padding: 1.6rem 1.6rem;
    font-size: 1.3rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.btn-llamar {
    background: var(--success-color);
    color: white;
}

.btn-llamar:hover {
    background: #29c089;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-finalizar {
    background: var(--danger-color);
    color: white;
}

.btn-finalizar:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .header-info h1 {
        font-size: 0.9rem;
    }

    .status-text {
        font-size: 0.75rem;
    }

    .logo-icon {
        width: 45px;
        height: 45px;
    }

    .numia-logo {
        width: 90px;
        height: 35px;
    }

    .main-container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .cliente-detalle {
        grid-template-columns: 1fr;
    }

    .numero-turno {
        font-size: 2.5rem;
    }

    main {
        padding-bottom: 200px;
    }
}

@media (max-width: 480px) {
    .header-left {
        gap: 0.75rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .numia-logo {
        width: 120px;
        height: auto;
    }

    .header-info h1 {
        font-size: 0.85rem;
    }

    .header-actions {
        gap: 0.25rem;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
    }

    .icon-btn svg {
        width: 20px;
        height: 20px;
    }

    .section-title {
        font-size: 1.125rem;
    }

    .atencion-header {
        padding: 0.875rem 1rem;
    }

    .estado-vacio {
        padding: 3rem 1rem;
    }

    .headset-icon {
        width: 100px;
        height: 100px;
    }

    .turno-actual {
        padding: 1.5rem;
    }

    .numero-turno {
        font-size: 2rem;
        padding: 0.5rem 1.5rem;
    }

    .footer-container {
        padding: 0 1rem;
    }
}


