/* Fase 3 (2026-10-02) — estilos propios de las pantallas del área "admin". */

/* ── Utilidades compartidas del admin ───────────────────────────────────── */
.admin-th--center, .admin-td--center { text-align: center; }
.admin-th--right,  .admin-td--right  { text-align: right; }
.admin-td--strong { font-weight: 600; }
.admin-td--muted  { color: var(--lt-text-muted); font-size: .85rem; }
.admin-status__dot { font-size: 6px; }
.admin-table__actions--center { justify-content: center; }
.admin-alert--spaced        { margin: 16px 0; }
.admin-alert--spaced-bottom { margin-bottom: 14px; }
.admin-alert--inset         { margin: 16px 24px 0; }
.admin-kpi-grid--spaced     { margin-bottom: 28px; }
.admin-kpi-grid--spaced-sm  { margin-bottom: 20px; }
.lt-label__hint { font-weight: 400; color: var(--lt-text-muted); }
.admin-empty--compact { padding: 32px 20px; }
.admin-empty--roomy   { padding: 40px 20px; }
.admin-card--spaced   { margin-bottom: 20px; }
.admin-card__note { font-size: .85rem; color: var(--lt-text-muted); margin: 0 0 12px; }
.admin-card__note--flush { margin: 0; }
.admin-card__note--small { font-size: .8rem; margin: 10px 0 0; }
.admin-card__note-icon { margin-right: 4px; }

/* Cargando un filtro sin tapar la tabla con el spinner */
.admin-table-wrap--busy { opacity: .55; transition: opacity .15s; pointer-events: none; }
.admin-table-wrap--flush { border: none; border-radius: 0; border-top: 1px solid var(--lt-border); }

/* Etiquetas reales (label) con el aspecto de las antiguas <span> */
label.plan-field__label, label.pkg-tile__field-label { display: block; }
.admin-page__title .ph-crown { color: var(--lt-secondary); }

/* ── Vendedores ─────────────────────────────────────────────────────────── */
.seller-edit-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--lt-surface); border: 1px solid var(--lt-border);
    border-radius: 12px; padding: 14px 16px;
}
.seller-edit-card__name { font-weight: 700; font-size: .95rem; }
.seller-edit-card__sub  { font-size: .85rem; color: var(--lt-text-muted); }
.seller-textarea { resize: vertical; }
.seller-row__phone-icon { font-size: 12px; }
.seller-toggle-icon { font-size: 18px; }
.seller-toggle-icon--on  { color: var(--lt-success); }
.seller-toggle-icon--off { color: var(--lt-text-muted); }
.seller-confirm {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 6px 10px; border-radius: 10px;
    background: var(--lt-danger-light); color: var(--lt-danger);
}
.seller-confirm__text { font-size: .85rem; font-weight: 600; }
.seller-hero__join--spaced { margin-top: 10px; }
.seller-hero__join-icon { margin-right: 4px; }
.seller-empty--roomy { padding: 48px 20px; }
.seller-empty__action { margin-top: 4px; }
.seller-tenant-email { margin-top: 2px; }
.seller-tenant-email__icon { font-size: 12px; margin-right: 3px; }
.seller-chip__link { font-size: .85rem; color: var(--lt-primary); text-decoration: none; }
.seller-chip__link i { font-size: .75rem; }

/* ── Planes y paquetes ──────────────────────────────────────────────────── */
.plan-dirty-tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .75rem; font-weight: 700;
    color: var(--lt-warning); background: var(--lt-warning-light);
    padding: 3px 8px; border-radius: 100px;
}
.plan-edit-card--dirty, .pkg-tile--dirty { box-shadow: 0 0 0 2px var(--lt-warning); }
.plan-confirm {
    padding: 12px 22px; border-top: 1px solid var(--lt-border);
    background: var(--lt-warning-light); color: var(--lt-text);
    display: flex; flex-direction: column; gap: 8px;
}
.plan-confirm__text { font-size: .85rem; font-weight: 600; }
.plan-confirm__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-confirm--tile { padding: 8px; border: 1px solid var(--lt-border); border-radius: 8px; margin-top: 6px; }
.pkg-tile__input { width: 100%; }
.pkg-tile__actions { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.pkg-tile__check { display: flex; align-items: center; gap: 6px; font-size: .85rem; cursor: pointer; }
.pkg-tile__check input { accent-color: var(--lt-primary); }
.pkg-tile__new-icon { font-size: 1.8rem; margin-bottom: 8px; color: var(--lt-primary); }
.pkg-tile__fields--full { width: 100%; }

/* ── Ventas / Servicios ─────────────────────────────────────────────────── */
.admin-no-reverse { background: var(--lt-warning-light); color: var(--lt-warning); }
.admin-services__header { flex-wrap: wrap; gap: 12px; }
.admin-services__title-icon { color: var(--lt-primary); }
.admin-services__select { min-width: 180px; }
.admin-services__badge-icon { font-size: 12px; }
.admin-readonly-note { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: .85rem; color: var(--lt-text-muted); }

/* ── Detalle del cliente ────────────────────────────────────────────────── */
.tenant-anchors { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.tenant-anchors__link {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 44px; padding: 0 14px;
    border: 1px solid var(--lt-border); border-radius: var(--lt-radius-full);
    background: var(--lt-surface); color: var(--lt-primary-dark);
    font-size: .85rem; font-weight: 600; text-decoration: none;
}
.tenant-anchors__link:hover { background: var(--lt-primary-light); }
.admin-card[id] { scroll-margin-top: calc(var(--lt-topbar-height) + 16px); }
.admin-badge-renew {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .75rem; font-weight: 600;
    color: var(--lt-primary-dark); background: var(--lt-primary-light);
    padding: 3px 8px; border-radius: 100px;
}
.admin-plan-badge__icon { margin-right: 3px; font-size: .75rem; }
.admin-kpi__value--success { color: var(--lt-success); }
.admin-kpi__value--sm { font-size: 1rem; }
.admin-kpi__unit { font-size: .75rem; font-weight: 500; color: var(--lt-text-muted); }
.admin-info-rows--spaced { margin-top: 16px; }
.admin-info-row__value--strong { font-weight: 700; }
.admin-override { color: var(--lt-primary-dark); font-weight: 600; }
.admin-inline-form__hint { font-weight: 400; text-transform: none; }
.admin-inline-form__field--grow { flex: 1; min-width: 180px; }
.admin-input--narrow { width: 140px; }
.admin-subsection { margin-top: 20px; }
.admin-subsection__title {
    font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--lt-text-muted); margin: 0 0 8px;
}
.admin-subsection__title--spaced { margin: 16px 0 8px; }
.admin-plus { color: var(--lt-success); font-weight: 700; }
.admin-env-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-env-row__text { font-size: .85rem; color: var(--lt-text-muted); }
.admin-env-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-env-form__select { max-width: 280px; }
.admin-flag-row {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    font-size: .88rem; margin-bottom: 16px; padding: 12px 16px; min-height: 44px;
    background: var(--lt-surface); border: 1px solid var(--lt-border); border-radius: 10px;
}
.admin-flag-row__check { width: 18px; height: 18px; accent-color: var(--lt-primary); }
.admin-flag-row__title { font-weight: 600; }
.admin-flag-row__sub { font-size: .8rem; color: var(--lt-text-muted); margin-top: 2px; }
.admin-card__lead { font-size: .85rem; color: var(--lt-text-muted); margin: 0 0 16px; }
.admin-card__tag {
    display: flex; align-items: center; gap: 6px; width: fit-content;
    font-size: .8rem; font-weight: 700; padding: 3px 10px; margin-bottom: 8px;
    border-radius: 100px;
}
.admin-card__tag--add     { background: var(--lt-success-light); color: var(--lt-success); }
.admin-card__tag--replace { background: var(--lt-warning-light); color: var(--lt-warning); }

/* ── Reportes del cliente ───────────────────────────────────────────────── */
.rpt-title-icon { color: var(--lt-primary); font-size: 22px; vertical-align: middle; }
.rpt-subtitle { font-size: 13px; color: var(--lt-text-muted); }
.rpt-group { margin-bottom: 0; }
.rpt-label { font-size: 12px; }
.rpt-select { min-width: 180px; }
.rpt-export { border: none; cursor: pointer; }
.rpt-empty { padding: 40px 24px; }
.rpt-filter-tabs { border: none; padding: 0; }
.rpt-count { font-size: 12px; color: var(--lt-text-muted); white-space: nowrap; }
.rpt-stack { display: flex; flex-direction: column; gap: 1px; }
.rpt-date-main { font-weight: 600; font-size: 13px; }
.rpt-note { font-size: 12px; color: var(--lt-text-muted); }
.rpt-client { font-weight: 500; }
.rpt-small { font-size: 12.5px; }
.rpt-muted { color: var(--lt-text-muted); }
.rpt-strong { font-weight: 600; }
.rpt-collected { color: var(--lt-success); font-weight: 600; }
.rpt-owed { color: var(--lt-danger); }
.rpt-balance { font-weight: 500; }
.rpt-balance--owed { font-weight: 700; color: var(--lt-danger); }
.rpt-balance--ok { color: var(--lt-success); }
.rpt-total-row { font-weight: 800; background: var(--lt-bg); }
.rpt-total-row td { padding: 12px 14px; border-top: 2px solid var(--lt-border); }
.rpt-daily-table th:nth-child(n+2), .rpt-daily-table td:nth-child(n+2) { text-align: right; min-width: 110px; }
.rpt-orders-table th:nth-child(7), .rpt-orders-table td:nth-child(7),
.rpt-orders-table th:nth-child(8), .rpt-orders-table td:nth-child(8),
.rpt-orders-table th:nth-child(9), .rpt-orders-table td:nth-child(9) { text-align: right; }
.rpt-orders-table th:nth-child(1) { min-width: 110px; }
.rpt-orders-table th:nth-child(2) { min-width: 130px; }
.rpt-orders-table th:nth-child(3), .rpt-orders-table th:nth-child(5), .rpt-orders-table th:nth-child(13) { min-width: 160px; }
.rpt-orders-table th:nth-child(4), .rpt-orders-table th:nth-child(12) { min-width: 130px; }
.rpt-orders-table th:nth-child(6), .rpt-orders-table th:nth-child(10), .rpt-orders-table th:nth-child(11),
.rpt-orders-table th:nth-child(7), .rpt-orders-table th:nth-child(9) { min-width: 110px; }
.rpt-orders-table th:nth-child(8) { min-width: 100px; }

@media (max-width: 768px) {
    .admin-alert--inset { margin: 12px 12px 0; }
    .admin-input--narrow { width: 100%; }
}

/* Restos de la medición (admin.css usa rem: .72rem = 11.5px y verde #16a34a = 3.3:1). */
.admin-plan-badge, .admin-payment-status, .admin-kpi__sub, .plan-field__label,
.pkg-tile__unit, .pkg-tile__per, .pkg-tile__per strong, .admin-filters .lt-label { font-size: 12px; }
.pkg-tile__per, .pkg-tile__per strong { color: #15803d; }
.admin-payment-status--cancelled { color: #475569; }
.seller-summary__chip-label, .admin-tab__count { font-size: 12px; }
