/* assets/css/clinic.css */

/* 1. Contenedores Principales */

.nav-logo {
    margin-bottom: 20px;
}
.btn-back {
    display: inline-block;
}
.arrow {
    font-size: 20px;
    margin-right: 4px;
    line-height: 0;
    position: relative;
    top: -1px;
}
.btn-global {
    width: auto;
    margin: auto;
}

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

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

/* 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: 10px;
}

.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-group {
    margin-bottom: 0;
}

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

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

.restricted-module h4 {
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 10px;
}

.text-restricted {
    margin: 20px 0 20px 0;
    text-align: center;
}

/* 8. Fila de Acciones (Botones lado a lado) */
.action-row {
    text-align: center;
    margin: 20px auto 0 auto;
}

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

.tab-btn {
    background: transparent;
}

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

/* FILTROS TIPO SELECT */
.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--three-bg-color);
    border-radius: var(--one-border-radius);
}

.filter-label {
    font-weight: 500;
}

.countdown-text {
    color: var(--three-font-color);
}

.filter-select {
    padding: 8px 12px;
    border-radius: var(--one-border-radius);
    border: 1px solid var(--two-border-color);
    background: #ffffff;
    color: var(--three-font-color);
    font-size: var(--font-size-general);
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--one-border-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-top: 20px;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-min);
    color: var(--three-font-color);
}

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

.card-details {
    margin: 8px 0;
    font-size: var(--font-size-min);
    color: var(--three-font-color);
}

/* Fila 2: Metadatos (Reportado por y Se elimina en) */
.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    color: var(--five-font-color);
}

/* 11. Acciones Internas de la Tarjeta (Fila 3) */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.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;
}

/* 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) {
    .card-header-row {
        align-items: flex-start;
        gap: 4px;
    }
    .card-date {
        margin-left: 0;
    }
    .card-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .countdown-text {
        text-align: left;
    }
    .card-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .btn-mini-location {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
    .action-row {
        flex-direction: column;
    }
}