/* /cpanel sobre la identidad del panel de establecimientos (experiencia.css).
   Solo componentes de administración que ese panel no tiene: cabecera de
   página, tarjeta de tabla, barra de filtros y acciones por fila. */

.sg-panel.sg-admin .sg-header-label span { text-transform: uppercase; letter-spacing: .6px; font-size: 11px; }

.cp-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.cp-page-head h1 { font-size: clamp(26px, 2.4vw, 36px); margin: 0; }
.cp-page-head p { margin: 6px 0 0; color: var(--sg-muted); max-width: 720px; }
.cp-page-head .cp-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.cp-card {
    background: #fff;
    border: 1px solid var(--sg-line);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(25, 59, 72, .05);
    margin-bottom: 20px;
}
.cp-card > .cp-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sg-line);
}
.cp-card > .cp-card-head h2, .cp-card > .cp-card-head h3 { font-size: 18px; margin: 0; letter-spacing: -.2px; }
.cp-card > .cp-card-body { padding: 18px 20px; }

.cp-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cp-toolbar .form-control, .cp-toolbar .form-select { min-width: 200px; width: auto; }

.cp-table { width: 100%; margin: 0; }
.cp-table thead th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--sg-muted);
    font-weight: 600;
    background: #fbfaf7;
    border-bottom: 1px solid var(--sg-line);
    padding: 10px 14px;
    white-space: nowrap;
}
.cp-table td { padding: 12px 14px; vertical-align: middle; border-bottom: 1px solid #eef1ee; }
.cp-table tr:last-child td { border-bottom: 0; }
.cp-table tbody tr:hover { background: #fbfaf7; }
.cp-table .cp-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; background: #eef1ee; }
.cp-table .cp-row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }

.cp-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--sg-line);
    background: #fff;
    color: var(--sg-ink);
    font-size: 14px;
    cursor: pointer;
}
.cp-icon-btn:hover { border-color: var(--sg-blue); color: var(--sg-blue); }
.cp-icon-btn--danger:hover { border-color: #b42318; color: #b42318; }
.cp-icon-btn:disabled { opacity: .6; cursor: progress; }

.cp-empty {
    text-align: center;
    padding: 36px 16px;
    color: var(--sg-muted);
}
.cp-empty i { font-size: 34px; display: block; margin-bottom: 8px; color: #9db0b6; }

.cp-grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.cp-grid-form .cp-span-all { grid-column: 1 / -1; }

.cp-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.cp-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cp-status--ok { color: var(--sg-green); }
.cp-status--off { color: #8a6d1f; }
.cp-status--bad { color: #b42318; }

@media (max-width: 720px) {
    .cp-table thead { display: none; }
    .cp-table, .cp-table tbody, .cp-table tr, .cp-table td { display: block; width: 100%; }
    .cp-table tr { border-bottom: 1px solid var(--sg-line); padding: 8px 0; }
    .cp-table td { border: 0; padding: 6px 14px; }
    .cp-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--sg-muted); text-transform: uppercase; }
    .cp-table .cp-row-actions { justify-content: flex-start; }
}
