/**
 * Archivo: assets/css/patch_v6.css
 * Módulo: Componentes V6
 * Proyecto: GestorTech / ClínicaSonrisas
 * Versión: 8.2 Limpieza y estructura completa
 *
 * Descripción:
 * Tarjetas, entidades, pestañas y componentes reutilizados.
 */

/*
 * patch_v6.css
 * ------------
 * Ajustes de módulo y diseño.
 */

.top-menu a.disabled {
    opacity: .45;
    pointer-events: none;
}

.action-menu-cell {
    min-width: 115px;
}

.catalog-card-grid,
.entity-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 16px;
}

.entity-card {
    background: #fff;
    border: 1px solid #e5ebf5;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(15,23,42,.06);
    position: relative;
    border-top: 5px solid #0757d8;
}

.entity-card .entity-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.entity-card .entity-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #0757d8;
    font-size: 25px;
    font-weight: 900;
}

.entity-card h3 {
    margin: 0;
    font-size: 20px;
}

.entity-card p {
    margin: 8px 0 0;
    color: #667085;
    line-height: 1.4;
}

.entity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.row-menu-wrap {
    position: relative;
    display: inline-block;
}

.dots-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #dbe7fb;
    border-radius: 11px;
    background: #fff;
    color: #071847;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.row-menu {
    position: absolute;
    right: 0;
    top: 42px;
    width: 220px;
    background: #fff;
    border: 1px solid #e5ebf5;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15,23,42,.18);
    z-index: 80;
    display: none;
    overflow: hidden;
}

.row-menu.open {
    display: block;
}

.row-menu button,
.row-menu a {
    display: block;
    width: 100%;
    border: 0;
    background: #fff;
    color: #071847;
    text-decoration: none;
    padding: 12px 14px;
    text-align: left;
    font-weight: 800;
    cursor: pointer;
}

.row-menu button:hover,
.row-menu a:hover {
    background: #eff6ff;
}

.row-menu .danger {
    color: #b91c1c;
}

.tabs.clean-tabs {
    padding: 0 34px 18px;
}

.tabs.clean-tabs .tab-btn {
    border: 1px solid #dbe7fb;
    background: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    color: #0757d8;
    margin-right: 8px;
}

.tabs.clean-tabs .tab-btn.active {
    background: #0757d8;
    color: #fff;
}

.hidden {
    display: none !important;
}

.permissions-table {
    width: 100%;
    border-collapse: collapse;
}

.permissions-table th,
.permissions-table td {
    border-bottom: 1px solid #e5ebf5;
    padding: 12px;
    text-align: left;
}

.permissions-table th {
    background: #f8fbff;
}

.permissions-table input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-row {
    background: #fff;
    border: 1px solid #e5ebf5;
    border-left: 5px solid #0757d8;
    border-radius: 12px;
    padding: 12px 14px;
}

.timeline-row small {
    color: #667085;
}

.form-grid textarea,
.content-drawer textarea,
.modal-grid textarea {
    min-height: 125px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
}

.wide-field {
    grid-column: 1 / -1;
}

.content-header .count-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #0757d8;
    font-weight: 900;
}

.configuration-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    padding: 0 34px 42px;
}

.config-section {
    padding: 20px 0;
    border-bottom: 1px solid #e5ebf5;
}

.config-section h3 {
    margin: 0 0 12px;
}

@media(max-width:1200px) {
    .catalog-card-grid,
    .entity-card-grid,
    .configuration-grid {
        grid-template-columns: 1fr;
    }
}
