body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #1e293b, #0f766e);
    color: #f8fafc;
}

/* Navbar principal */
.app-navbar {
    backdrop-filter: blur(12px);
}

.nav-actions .btn {
    border-radius: 10px;
    font-weight: 500;
}

/* Contenedor principal */
.main-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
}

/* Tarjeta principal */
.main-card {
    width: 100%;
    max-width: 560px;
    margin: auto;
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

/* Hora principal */
.clock-box {
    font-size: clamp(2.35rem, 8vw, 4.4rem);
    font-weight: 850;
    letter-spacing: 0.035em;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    color: #1f2937;
    max-width: 100%;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}

/* Fecha */
.date-box {
    color: #64748b;
    font-size: clamp(0.95rem, 3.2vw, 1.1rem);
    text-align: center;
    margin-top: 0.85rem;
}

/* Etiqueta superior */
.brand-badge {
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
    border: 1px solid rgba(20, 184, 166, 0.25);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Botones */
.action-button {
    border-radius: 16px;
    padding: 14px 18px;
    font-weight: 600;
}

.hidden {
    display: none;
}

/* Modal de marcación remota */
#modalRemota .modal-content {
    background-color: #ffffff;
    color: #212529;
    border: none;
    border-radius: 18px;
}

#modalRemota .modal-title {
    color: #212529 !important;
    font-weight: 700;
}

#modalRemota .modal-body p {
    color: #212529 !important;
    font-weight: 500;
}

#modalRemota .modal-header,
#modalRemota .modal-footer {
    background-color: #ffffff;
    border: none;
}

#modalRemota .btn-close {
    opacity: 1;
}

#modalRemota .alert-info {
    background-color: #d9f3fb;
    color: #0f4c5c;
    border: 1px solid #9edff0;
}

/* Clases métricas reutilizables.
   Nota: el panel admin de marcaciones actualmente usa estilos internos en public/admin/index.php.
   Estas clases quedan listas si luego se decide mover esos estilos a este archivo. */
.metric-row {
    align-items: stretch;
}

.metric-card {
    min-height: 112px;
}

.metric-card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-label {
    font-size: 0.86rem;
    line-height: 1.2;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.85rem;
    line-height: 1;
    font-weight: 800;
}

.metric-small {
    font-size: 0.82rem;
    margin-top: 8px;
    line-height: 1.25;
}

/* Ajustes para celulares */
@media (max-width: 576px) {
    .app-navbar .navbar-brand {
        width: 100%;
        font-size: 1.05rem;
        white-space: normal;
    }

    .nav-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-actions .btn {
        flex: 1 1 auto;
        font-size: 0.88rem;
        padding: 0.55rem 0.7rem;
    }

    .main-wrapper {
        min-height: auto;
        align-items: flex-start;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .main-card {
        max-width: 100%;
        border-radius: 22px;
    }

    .main-card .card-body {
        padding: 2rem 1.5rem !important;
    }

    .clock-box {
        font-size: clamp(2.15rem, 11vw, 3rem);
        font-weight: 850;
        letter-spacing: 0.015em;
        line-height: 1;
        white-space: nowrap;
    }

    .date-box {
        font-size: 0.95rem;
    }

    .brand-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .action-button {
        padding: 13px 16px;
        border-radius: 15px;
    }

    #codigoTrabajador {
        font-size: 1.1rem;
    }
}

/* Ajuste extra para celulares muy angostos */
@media (max-width: 390px) {
    .clock-box {
        font-size: 2.05rem;
        letter-spacing: 0;
    }

    .nav-actions .btn {
        font-size: 0.82rem;
    }
}
