/* assets/css/clinic.css */

/* 1. Contenedores Principales */
.clinic-host {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--three-bg-color); 
    min-height: 100vh;
    padding: 40px 16px;
}

.clinic-container {
    width: 100%;
    max-width: 500px;
    background: var(--one-bg-color);
    box-shadow: 0 1px 2px rgb(0 0 0 / 10%);
    border-radius: var(--two-border-radius);
    padding: 36px 24px;
    text-align: left;
    box-sizing: border-box;
}

.arrow {
    font-size: 20px;
    margin-right: 4px;
    line-height: 0;
    position: relative;
    top: -1px;
}

/* 3. Encabezados y Títulos */
.clinic-head {
    text-align: center;
    margin-bottom: 10px;
}

.clinic-head h3 {
    line-height: var(--line-height-primary);
}

.text-muted {
    font-size: var(--font-size-min);
    font-weight: 500;
}

/* 4. Alertas / Toasts */
.alert {
    padding: 12px;
    border-radius: var(--one-border-radius);
    font-size: var(--font-size-min);
    text-align: center;
    margin-bottom: 16px;
    font-weight: 600;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* 5. Formularios e Inputs */
.clinic-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

.input-group {
    margin-bottom: 10px;
}

.input-group label {
    font-size: var(--font-size-min);
    color: var(--three-font-color);
    font-weight: 500;
    display: block;
}

.input-hint {
    font-size: 10px;
    color: var(--one-font-color);
    margin-bottom: 5px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--two-border-color);
    border-radius: var(--one-border-radius);
    font-size: var(--font-size-general);
    outline: none;
    color: var(--three-font-color);
    transition: 0.3s;
    box-sizing: border-box;
}

.input-field:focus {
    border-color: var(--one-border-color);
    color: var(--one-font-color);
}

.monospace {
    font-family: monospace;
}

/* 7. Módulo Restringido */
.restricted-module {
    text-align: center;
    padding: 20px 10px;
}

.lock-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.restricted-module h3 {
    font-size: var(--font-size-h4);
    font-weight: 700;
    margin-bottom: 8px;
}

.restricted-module p {
    line-height: var(--line-height-secundary);
    margin-bottom: 24px;
}

/* 8. Fila de Acciones (Botones lado a lado) */
.action-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.flex-btn {
    margin: 0 auto;
    font-size: var(--font-size-min);
}

/* 9. Pestañas / Filtros */
.clinic-tabs {
    display: flex;
    background: var(--three-bg-color);
    padding: 3px;
    border-radius: var(--one-border-radius);
    margin: 15px 0;
}

.filter-sub-tabs {
    margin-top: -5px; 
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px;
    font-size: var(--font-size-min);
    font-weight: 500;
    color: var( --three-font-color);
    cursor: pointer;
    border-radius: var(--one-border-radius);
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--one-bg-color);
}

/* 10. Listado de Registros (Tarjetas) */
.records-wrapper {
    margin-top: 10px;
}

.clinic-card {
    background: var(--three-bg-color);
    padding: 16px;
    border-radius: var(--two-border-radius);
    margin-bottom: 12px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-weight: 700;
    color: var(--one-font-color);
}

.card-date {
    font-size: var(--font-size-min);
    color: var(--five-font-color);
    margin-left: auto;
}

.card-details {
    margin: 8px 0;
    font-size: 13px;
    color: var(--three-font-color);
    line-height: 1.4;
}

/* 11. Acciones Internas de la Tarjeta */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.card-buttons-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.countdown-row {
    width: 100%;
}

.btn-mini-location {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--four-bg-color);
    color: var(--two-font-color);
    border: 0;
    padding: 6px 12px;
    border-radius: var(--one-border-radius);
    font-size: var(--font-size-min);
    font-weight: 700;
    text-decoration: none;
    gap: 4px;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.countdown-text {
    font-size: var(--font-size-min);
    color: var(--one-font-color);
    font-weight: 500;
    text-align: left;
}

.countdown-text strong {
    color: #ef4444; /* Rojo para urgencia de borrado */
}

/* 12. Formularios de Archivo/Restauración */
.archive-form {
    margin-top: 0;
    width: 100%;
}

.btn-archive {
    background: var(--one-bg-color);
    border: 0;
    color: var(--one-font-color);
    padding: 7px 12px;
    font-size: var( --font-size-min);
    border-radius: var(--one-border-radius);
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

.btn-archive:hover {
    background: #e5e5e5;
}

.btn-unarchive {
    background: var(--one-bg-color);
    border: 1px solid var(--one-border-color);
    color: var(--one-font-color);
    padding: 7px 12px;
    font-size: 11px;
    border-radius: var(--one-border-radius);
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

.btn-unarchive:hover {
    background: var(--three-bg-color);
}

/* 13. Ajustes Responsivos Adicionales */
@media (max-width: 400px) {
    .clinic-host {padding: 10px;}
    .card-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .card-date {
        margin-left: 0;
    }
    .card-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .btn-mini-location {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
    .countdown-text {
        text-align: left;
        width: 100%;
    }
    .action-row {
        flex-direction: column;
    }
}