/* Hola Control - Global Design System */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.1);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Desktop: Top alignment */
    padding: 1rem;
    padding-top: 12vh; /* Position higher up on desktop */
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 0.2) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 0.1) 0, transparent 50%);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    /* Increased blur */
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 32px; /* Smoother radius */
    padding: 3.5rem;
    /* Larger desktop padding */
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 520px;
    /* Larger desktop width */
    text-align: center;
    margin: 0 auto;
    /* Centering */
}

h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    font-weight: 800;
}

p.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.status-in {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.status-break {
    background: var(--warning-light);
    color: var(--warning);
}

.status-out {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.time-info {
    font-size: 0.875rem;
    color: var(--text-white);
}

.actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 360px) {
    .actions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.btn-info {
    background: var(--info);
    color: white;
}

/* Form inputs for login */
.form-group {
    text-align: left;
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

input,
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 14px;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    border-color: var(--primary);
}

select option {
    background: #0f172a;
    /* Solid dark background for options */
    color: white;
}

/* Shared Styles for Desktop and Mobile */
/* ----- MODERNA SAAS NAVBAR (EMPLOYEE) ----- */
/* ----- MODERNA SAAS NAVBAR (EMPLOYEE) ----- */
.navbar-saas {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    z-index: 2000;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.6rem 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

body {
    padding-top: 5rem;
    /* Fallback for when JS is loading */
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    /* Allow wrapping for mobile */
    gap: 0.5rem;
}

.notification-area {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    transition: transform 0.2s;
}

.notification-bell:hover {
    transform: scale(1.1);
}

.nav-main {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE/Edge */
}

.nav-main::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 1rem;
}

.nav-exit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-exit:hover {
    background: var(--danger);
    color: white;
}

.nav-icon svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
}

/* Notifications Specifics */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1e293b;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.notif-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    margin-top: 1rem;
    display: none;
    overflow: hidden;
    z-index: 2001;
}

.notif-dropdown.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-header {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.notif-body {
    max-height: 350px;
    overflow-y: auto;
}

.notif-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.notif-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-white);
}

.notif-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.notif-footer {
    padding: 0.8rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

.notif-footer a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
}

.notif-clear {
    font-size: 0.7rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s;
}

.notif-clear:hover {
    opacity: 0.8;
}

.notif-empty {
    padding: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notif-read-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 0.3rem;
    padding: 0;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .navbar-saas {
        position: fixed;
        top: 0.5rem;
        width: calc(100% - 1rem);
        margin: 0;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 12px;
    }

    .nav-content {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-main {
        width: auto;
        justify-content: center;
        gap: 0.25rem;
        border-bottom: none;
        padding-bottom: 0;
    }

    .nav-right {
        width: auto;
        justify-content: center;
        padding-left: 0;
        gap: 0.5rem;
    }

    .nav-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .nav-item .nav-icon svg {
        width: 1rem;
        height: 1rem;
    }

    body {
        padding: 1rem;
        padding-top: 8vh; /* Higher top for mobile */
        justify-content: flex-start;
    }

    .glass-card h1 {
        font-size: 1.5rem;
    }

    .glass-card p.subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    input, select, .btn {
        padding: 1rem;
        font-size: 1rem;
    }

    .glass-card {
        padding: 1.25rem;
        max-width: 100%;
        width: 100% !important;
        border-radius: 20px;
        margin: 0 auto !important;
    }

    /* Resumen Vertical */
    .summary-card>div {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .summary-card>div>div {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 0.5rem;
    }

    .summary-card>div>div:last-child {
        border-bottom: none;
    }

    .actions-grid {
        grid-template-columns: 1fr !important;
    }

    .btn {
        width: 100% !important;
    }

    /* Tabla a Tarjetas (Cards) */
    .table-container {
        border: none;
        background: none;
        padding: 0;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
        width: 100%;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--glass-border);
        border-radius: 16px;
        margin-bottom: 1rem;
        padding: 0.5rem;
    }

    td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        text-align: right !important;
        min-height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.75rem;
        text-transform: uppercase;
    }

    .notif-dropdown {
        width: calc(100vw - 2rem);
        right: auto;
        left: 0;
        position: fixed;
        top: 8rem;
    }
}

@media (max-width: 600px) {
    .nav-label {
        display: none;
    }
}

/* ----- PREMIUM EMPLOYEE CARDS ----- */
.employee-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.employee-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.employee-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.employee-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.2rem;
}

.employee-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.employee-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-block {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.info-value {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
}

.employee-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-premium {
    height: 3.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 14px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100% !important;
}

@media (max-width: 768px) {
    .employee-header {
        flex-direction: column;
        gap: 1rem;
    }

    .status-badge-area {
        align-self: flex-start;
    }

    .employee-actions {
        grid-template-columns: 1fr;
    }

    .btn-premium {
        height: 4rem;
    }
}

/* --- 📶 IP Blocked Wifi Modal --- */
.wifi-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.wifi-modal-content {
    background: linear-gradient(135deg, #1f2937, #111827);
    border: 2px solid #ef4444;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    max-width: 420px;
    width: 90%;
    color: white;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.3);
    animation: wifiFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wifi-modal-content h2 {
    color: #ef4444;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 800;
}

.wifi-modal-content p {
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.wifi-modal-content button {
    margin-top: 1.8rem;
    padding: 0.8rem 2.5rem;
    background: #ef4444;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.wifi-modal-content button:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

@keyframes wifiFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}