/* ═══════════════════════════════════════════════════════════════════════════
   LavanTec Admin Panel — admin.css
   Estilos para el módulo de administración: clientes, pagos, reversos, ventas
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Sidebar admin links ────────────────────────────────────────────────── */
.lt-sidebar__admin-divider {
    margin: 12px 12px 4px;
    padding: 6px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--lt-text-muted, #94a3b8);
    border-top: 1px solid var(--lt-border, #e2e8f0);
}

.lt-nav-link--admin {
    color: var(--lt-primary, #6366f1) !important;
}
.lt-nav-link--admin:hover,
.lt-nav-link--admin.active {
    background: color-mix(in srgb, var(--lt-primary, #6366f1) 10%, transparent) !important;
}

/* ── Admin page shell ───────────────────────────────────────────────────── */
.admin-page {
    max-width: 1280px;
    margin: 0 auto;
}

.admin-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-page__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lt-text, #1e293b);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 4px;
}
.admin-page__title i { color: var(--lt-primary, #6366f1); }

.admin-page__subtitle {
    color: var(--lt-text-muted, #64748b);
    font-size: .9rem;
    margin: 0;
}

.admin-page__back { margin-bottom: 16px; }

/* ── Filtros ────────────────────────────────────────────────────────────── */
.admin-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: var(--lt-surface, #f8fafc);
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.admin-filters__search {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 8px;
    padding: 0 10px;
}
.admin-filters__search i { color: var(--lt-text-muted, #94a3b8); flex-shrink: 0; }
.admin-filters__search .lt-input {
    border: none !important;
    padding: 8px 0 !important;
    box-shadow: none !important;
}

.admin-filters__select { min-width: 150px; }

.admin-filters__date-range {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-filters__date-range .lt-label { font-size: 11px; margin: 0; }

/* ── KPI Grid ────────────────────────────────────────────────────────────── */
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.admin-kpi-grid--5 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.admin-kpi {
    background: white;
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.admin-kpi--highlight { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.admin-kpi--net { border-color: var(--lt-success, #22c55e); }

.admin-kpi__icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.admin-kpi__icon--blue   { background: #eff6ff; color: #3b82f6; }
.admin-kpi__icon--green  { background: #f0fdf4; color: #22c55e; }
.admin-kpi__icon--red    { background: #fff1f2; color: #f43f5e; }
.admin-kpi__icon--gray   { background: #f1f5f9; color: #94a3b8; }

.admin-kpi__label  { font-size: .78rem; color: var(--lt-text-muted, #64748b); margin-bottom: 2px; }
.admin-kpi__value  { font-size: 1.25rem; font-weight: 700; color: var(--lt-text, #1e293b); }
.admin-kpi__value--big { font-size: 1.5rem; color: var(--lt-success, #16a34a); }
.admin-kpi__sub    { font-size: .72rem; color: var(--lt-text-muted, #94a3b8); margin-top: 2px; }

/* ── Tabla ───────────────────────────────────────────────────────────────── */
.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 12px;
    background: white;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.admin-table--dense { font-size: .82rem; }

.admin-table thead th {
    background: var(--lt-surface, #f8fafc);
    padding: 11px 14px;
    text-align: left;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--lt-text-muted, #64748b);
    border-bottom: 1px solid var(--lt-border, #e2e8f0);
    white-space: nowrap;
}

.admin-table__row td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--lt-border, #f1f5f9);
    vertical-align: middle;
}
.admin-table__row:last-child td { border-bottom: none; }
.admin-table__row:hover { background: var(--lt-surface, #f8fafc); }
.admin-table__row--reversed { background: #fff7f7; }
.admin-table__row--reversed:hover { background: #fff0f0; }

.admin-tenant-name  { font-weight: 600; color: var(--lt-text, #1e293b); }
.admin-tenant-owner { font-size: .78rem; color: var(--lt-text-muted, #64748b); margin-top: 2px; }
.admin-tenant-link  { color: var(--lt-primary, #6366f1); font-weight: 600; text-decoration: none; }
.admin-tenant-link:hover { text-decoration: underline; }

.admin-table__email  { color: var(--lt-text-muted, #64748b); font-size: .82rem; }
.admin-table__date   { color: var(--lt-text-muted, #64748b); white-space: nowrap; font-size: .82rem; }
.admin-table__amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.admin-table__source { font-size: .78rem; color: var(--lt-text-muted, #94a3b8); }
.admin-table__txid   {
    font-family: monospace;
    font-size: .78rem;
    color: var(--lt-text-muted, #64748b);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-table__expires { font-size: .82rem; }
.admin-table__actions {
    white-space: nowrap;
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ── Badges de plan ──────────────────────────────────────────────────────── */
.admin-plan-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 100px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
}
.admin-plan-badge--free    { background: #dcfce7; color: #166534; }
.admin-plan-badge--starter { background: #e0f2fe; color: #0369a1; }
.admin-plan-badge--basic   { background: #ede9fe; color: #5b21b6; }
.admin-plan-badge--plus    { background: #fef3c7; color: #92400e; }

/* ── Status badges ───────────────────────────────────────────────────────── */
.admin-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 600;
}
.admin-status--active   { background: #dcfce7; color: #166534; }
.admin-status--pending  { background: #fef9c3; color: #854d0e; }
.admin-status--pastdue  { background: #fee2e2; color: #991b1b; }
.admin-status--canceled { background: #f1f5f9; color: #64748b; }
.admin-status--unknown  { background: #f1f5f9; color: #64748b; }

/* ── Payment status ──────────────────────────────────────────────────────── */
.admin-payment-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: .72rem;
    font-weight: 600;
}
.admin-payment-status--approved  { background: #dcfce7; color: #166534; }
.admin-payment-status--declined  { background: #fee2e2; color: #991b1b; }
.admin-payment-status--cancelled { background: #f1f5f9; color: #64748b; }
.admin-payment-status--reversed  { background: #fff1f2; color: #be123c; }

/* ── Reversed badge ──────────────────────────────────────────────────────── */
.admin-reversed-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    color: #be123c;
    font-weight: 600;
}

/* ── Sección ─────────────────────────────────────────────────────────────── */
.admin-section {
    margin-top: 28px;
}
.admin-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--lt-text, #1e293b);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}
.admin-section__title i { color: var(--lt-primary, #6366f1); }
.admin-section__count {
    margin-left: auto;
    font-size: .82rem;
    font-weight: 500;
    background: var(--lt-surface, #f1f5f9);
    border-radius: 100px;
    padding: 2px 10px;
    color: var(--lt-text-muted, #64748b);
}

/* ── Detail header (legacy) ──────────────────────────────────────────────── */
.admin-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--lt-border, #e2e8f0);
}
.admin-detail-header__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

/* ── Tenant Hero Card ────────────────────────────────────────────────────── */
.tenant-hero {
    background: white;
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 20px;
    padding: 28px 32px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 24px;
    box-shadow: var(--lt-shadow-sm);
    position: relative;
    overflow: hidden;
}
.tenant-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--lt-gradient-primary);
}
.tenant-hero__avatar {
    width: 72px; height: 72px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    flex-shrink: 0;
    background: var(--lt-primary-light, #cffafe);
    color: var(--lt-primary-dark, #0891b2);
}
.tenant-hero__body { flex: 1; min-width: 220px; }
.tenant-hero__name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--lt-text, #0f172a);
    margin: 0 0 10px;
    line-height: 1.15;
}
.tenant-hero__meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.tenant-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .84rem;
    color: var(--lt-text-muted, #64748b);
}
.tenant-hero__meta-item i {
    font-size: 15px;
    color: var(--lt-primary, #06b6d4);
    width: 16px;
    flex-shrink: 0;
}
.tenant-hero__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
.tenant-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}
.tenant-hero__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ── Admin Card (section wrapper) ────────────────────────────────────────── */
.admin-card {
    background: white;
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: var(--lt-shadow-sm);
    overflow: hidden;
}
.admin-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--lt-border, #e2e8f0);
    background: var(--lt-surface, #f8fafc);
}
.admin-card__head-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--lt-text, #0f172a);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex: 1;
}
.admin-card__head-title i { color: var(--lt-primary, #06b6d4); font-size: 1.1rem; }
.admin-card__body { padding: 20px 24px; }
.admin-card__body--nopx { padding: 0; }
.admin-card__foot {
    padding: 14px 24px;
    border-top: 1px solid var(--lt-border, #e2e8f0);
    background: var(--lt-surface, #f8fafc);
}

/* ── Info rows (key-value display) ───────────────────────────────────────── */
.admin-info-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.admin-info-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--lt-border, #f1f5f9);
    font-size: .88rem;
}
.admin-info-row:last-child { border-bottom: none; }
.admin-info-row__label {
    min-width: 150px;
    color: var(--lt-text-muted, #64748b);
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    flex-shrink: 0;
}
.admin-info-row__value { color: var(--lt-text, #0f172a); font-weight: 500; }
.admin-info-row__action { margin-left: auto; }

/* ── Usage bar ───────────────────────────────────────────────────────────── */
.usage-bar-wrap { margin: 16px 0 4px; }
.usage-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-size: .82rem;
}
.usage-bar-label__text { color: var(--lt-text-muted, #64748b); }
.usage-bar-label__value { font-weight: 700; color: var(--lt-text, #0f172a); font-size: .9rem; }
.usage-bar-track {
    height: 8px;
    background: var(--lt-border, #e2e8f0);
    border-radius: 100px;
    overflow: hidden;
}
.usage-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width .5s cubic-bezier(.4,0,.2,1);
}
.usage-bar-fill--ok      { background: var(--lt-success, #10b981); }
.usage-bar-fill--warning { background: var(--lt-warning, #f59e0b); }
.usage-bar-fill--danger  { background: var(--lt-danger, #ef4444); }
.usage-bar-fill--unlimited { background: var(--lt-primary, #06b6d4); width: 100% !important; opacity: .3; }

/* ── Inline form row ─────────────────────────────────────────────────────── */
.admin-inline-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--lt-surface, #f8fafc);
    border-radius: 12px;
    border: 1px solid var(--lt-border, #e2e8f0);
    margin-top: 12px;
}
.admin-inline-form__field { display: flex; flex-direction: column; gap: 4px; }
.admin-inline-form__label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--lt-text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Balance chip ────────────────────────────────────────────────────────── */
.balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--lt-primary-light, #cffafe);
    border: 1px solid var(--lt-primary, #06b6d4);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 12px;
}
.balance-chip__num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--lt-primary-dark, #0891b2);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.balance-chip__label {
    font-size: .8rem;
    color: var(--lt-primary-dark, #0891b2);
    font-weight: 600;
    line-height: 1.3;
}

/* ── Seller chip inline ──────────────────────────────────────────────────── */
.seller-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--lt-surface, #f8fafc);
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 10px;
    padding: 10px 16px;
}
.seller-chip__name { font-weight: 700; font-size: .9rem; color: var(--lt-text, #0f172a); }

@media (max-width: 640px) {
    .tenant-hero { padding: 20px 18px; }
    .tenant-hero__avatar { width: 56px; height: 56px; font-size: 22px; border-radius: 14px; }
    .tenant-hero__name { font-size: 1.2rem; }
    .tenant-hero__right { align-items: flex-start; }
    .admin-card__body { padding: 16px; }
    .admin-card__head { padding: 14px 16px; }
    .admin-info-row__label { min-width: 110px; }
}

/* ── Plan edit cards (AdminPlansPage) ───────────────────────────────────── */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.plan-edit-card {
    background: white;
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
.plan-edit-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.plan-edit-card__head {
    padding: 20px 22px 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.plan-edit-card__head::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
}
.plan-edit-card--free .plan-edit-card__head::before    { background: #94a3b8; }
.plan-edit-card--starter .plan-edit-card__head::before { background: var(--lt-primary, #06b6d4); }
.plan-edit-card--basic .plan-edit-card__head::before   { background: var(--lt-secondary, #3b82f6); }
.plan-edit-card--plus .plan-edit-card__head::before    { background: #8b5cf6; }

.plan-edit-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plan-edit-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.plan-edit-card--free    .plan-edit-card__badge { background: #f1f5f9; color: #475569; }
.plan-edit-card--starter .plan-edit-card__badge { background: #cffafe; color: #0891b2; }
.plan-edit-card--basic   .plan-edit-card__badge { background: #dbeafe; color: #1d4ed8; }
.plan-edit-card--plus    .plan-edit-card__badge { background: #ede9fe; color: #6d28d9; }

.plan-edit-card__active-dot {
    width: 8px; height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

.plan-edit-card__price-row {
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.plan-edit-card__price-sign {
    font-size: 1rem;
    font-weight: 700;
    color: var(--lt-text-muted, #64748b);
}
.plan-edit-card__price-num {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
    color: var(--lt-text, #0f172a);
}
.plan-edit-card--plus .plan-edit-card__price-num { color: #7c3aed; }
.plan-edit-card__price-unit {
    font-size: .82rem;
    color: var(--lt-text-muted, #64748b);
    margin-left: 3px;
}

.plan-edit-card__summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.plan-edit-card__chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .76rem;
    color: var(--lt-text-muted, #64748b);
    background: var(--lt-surface, #f8fafc);
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 8px;
    padding: 3px 8px;
}
.plan-edit-card__chip i { font-size: 13px; }

.plan-edit-card__body {
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    border-top: 1px solid var(--lt-border, #e2e8f0);
}

.plan-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.plan-field__label {
    font-size: .74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--lt-text-muted, #94a3b8);
}

.plan-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}
.plan-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .85rem;
    color: var(--lt-text, #1e293b);
    cursor: pointer;
    user-select: none;
}
.plan-feature input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--lt-primary, #06b6d4);
    cursor: pointer;
    flex-shrink: 0;
}
.plan-feature__icon {
    font-size: 15px;
    color: var(--lt-text-muted, #94a3b8);
    width: 18px;
    text-align: center;
}
.plan-feature--on .plan-feature__icon { color: var(--lt-primary, #06b6d4); }

.plan-edit-card__foot {
    padding: 14px 22px;
    border-top: 1px solid var(--lt-border, #e2e8f0);
    background: var(--lt-surface, #f8fafc);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.plan-edit-card__save-hint {
    font-size: .76rem;
    color: var(--lt-text-muted, #94a3b8);
}

/* ── Package tiles ─────────────────────────────────────────────────────── */
.pkg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
}

.pkg-tile {
    background: white;
    border: 1.5px solid var(--lt-border, #e2e8f0);
    border-radius: 14px;
    padding: 18px 16px 14px;
    width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: border-color .15s, box-shadow .15s;
    position: relative;
}
.pkg-tile:hover { border-color: var(--lt-primary, #06b6d4); box-shadow: 0 3px 12px rgba(6,182,212,.1); }
.pkg-tile--inactive { opacity: .55; background: var(--lt-surface, #f8fafc); }

.pkg-tile__qty {
    font-size: 2rem;
    font-weight: 800;
    color: var(--lt-primary, #06b6d4);
    line-height: 1;
    letter-spacing: -1px;
}
.pkg-tile__unit {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--lt-text-muted, #94a3b8);
    font-weight: 600;
    margin-bottom: 6px;
}
.pkg-tile__price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lt-text, #0f172a);
}
.pkg-tile__per {
    font-size: .7rem;
    color: var(--lt-text-muted, #94a3b8);
}
.pkg-tile__per strong {
    color: #16a34a;
    font-weight: 700;
}

.pkg-tile__divider {
    width: 100%;
    height: 1px;
    background: var(--lt-border, #e2e8f0);
    margin: 10px 0 6px;
}

.pkg-tile__fields {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pkg-tile__field-label {
    font-size: .67rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--lt-text-muted, #94a3b8);
    margin-bottom: 2px;
}

.pkg-tile--new {
    border-style: dashed;
    cursor: default;
    color: var(--lt-text-muted, #94a3b8);
    justify-content: center;
    min-height: 200px;
}
.pkg-tile--new:hover { border-color: var(--lt-primary, #06b6d4); }

.pkg-tile__inactive-badge {
    position: absolute;
    top: 8px; right: 8px;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px 6px;
}

@media (max-width: 640px) {
    .plans-grid { grid-template-columns: 1fr; }
    .plan-fields-row { grid-template-columns: 1fr 1fr; }
    .pkg-tile { width: 140px; }
}

/* ── Plan bars (charts) ──────────────────────────────────────────────────── */
.admin-plan-bars {
    background: white;
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.admin-plan-bar {
    display: grid;
    grid-template-columns: 160px 1fr 100px;
    align-items: center;
    gap: 12px;
}
.admin-plan-bar__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .83rem;
}
.admin-plan-bar__count { color: var(--lt-text-muted, #64748b); font-size: .78rem; }
.admin-plan-bar__track {
    height: 10px;
    background: var(--lt-surface, #f1f5f9);
    border-radius: 100px;
    overflow: hidden;
}
.admin-plan-bar__fill {
    height: 100%;
    border-radius: 100px;
    transition: width .4s ease;
}
.admin-plan-bar__fill--Free    { background: #22c55e; }
.admin-plan-bar__fill--Starter { background: #3b82f6; }
.admin-plan-bar__fill--Basic   { background: #8b5cf6; }
.admin-plan-bar__fill--Plus    { background: #f59e0b; }
.admin-plan-bar__value { font-weight: 700; text-align: right; font-size: .88rem; }

/* ── Paginación ──────────────────────────────────────────────────────────── */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding: 12px;
}
.admin-pagination__info {
    font-size: .85rem;
    color: var(--lt-text, #1e293b);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Loading / Empty ─────────────────────────────────────────────────────── */
.admin-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--lt-text-muted, #64748b);
}
.admin-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--lt-text-muted, #94a3b8);
}
.admin-empty i { font-size: 3rem; display: block; margin-bottom: 10px; }

/* ── Modal de confirmación ───────────────────────────────────────────────── */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    backdrop-filter: blur(2px);
}
.admin-modal {
    background: white;
    border-radius: 16px;
    padding: 32px 28px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    text-align: center;
}
.admin-modal__icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}
.admin-modal__icon--warning { background: #fef3c7; color: #d97706; }
.admin-modal__icon--danger  { background: #fff1f2; color: #f43f5e; }

.admin-modal__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--lt-text, #1e293b);
    margin: 0 0 12px;
}
.admin-modal__body {
    color: var(--lt-text-muted, #64748b);
    font-size: .9rem;
    line-height: 1.6;
    margin-bottom: 24px;
}
.admin-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Spinner pequeño ─────────────────────────────────────────────────────── */
.lt-spinner--sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .admin-plan-bar {
        grid-template-columns: 120px 1fr 80px;
    }
    .admin-kpi-grid { grid-template-columns: 1fr 1fr; }
    .admin-table { font-size: .78rem; }
    .admin-table thead th,
    .admin-table__row td { padding: 8px 10px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SELLERS MODULE — Vendedores
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Summary bar ─────────────────────────────────────────────────────────── */
.seller-summary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.seller-summary__chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 12px;
    padding: 12px 18px;
    flex: 1;
    min-width: 160px;
}
.seller-summary__chip-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.seller-summary__chip-icon--total   { background: #eff6ff; color: #3b82f6; }
.seller-summary__chip-icon--active  { background: #f0fdf4; color: #16a34a; }
.seller-summary__chip-icon--revenue { background: #fefce8; color: #ca8a04; }
.seller-summary__chip-label { font-size: .72rem; color: var(--lt-text-muted, #64748b); font-weight: 500; }
.seller-summary__chip-value { font-size: 1.1rem; font-weight: 800; color: var(--lt-text, #1e293b); line-height: 1.1; }

/* ── Tab filter bar ──────────────────────────────────────────────────────── */
.admin-tab-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--lt-surface, #f8fafc);
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 10px;
    padding: 4px;
}
.admin-tab {
    padding: 7px 18px;
    border-radius: 7px;
    border: none;
    background: none;
    font-size: .85rem;
    font-weight: 600;
    color: var(--lt-text-muted, #64748b);
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.admin-tab:hover { color: var(--lt-text, #1e293b); background: white; }
.admin-tab--active {
    background: white;
    color: var(--lt-primary, #06b6d4);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.admin-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    border-radius: 100px;
    font-size: .68rem;
    font-weight: 700;
    padding: 0 5px;
    margin-left: 5px;
    background: var(--lt-primary-light, #cffafe);
    color: var(--lt-primary-dark, #0891b2);
}
.admin-tab--active .admin-tab__count {
    background: var(--lt-primary, #06b6d4);
    color: white;
}

/* ── Filter row ──────────────────────────────────────────────────────────── */
.seller-filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.seller-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 10px;
    padding: 0 12px;
    flex: 1;
    min-width: 200px;
    transition: border-color .15s;
}
.seller-search-wrap:focus-within {
    border-color: var(--lt-primary, #06b6d4);
    box-shadow: 0 0 0 3px var(--lt-primary-light, #cffafe);
}
.seller-search-wrap i { color: var(--lt-text-muted, #94a3b8); font-size: 17px; flex-shrink: 0; }
.seller-search-wrap .lt-input {
    border: none !important;
    box-shadow: none !important;
    padding: 9px 0 !important;
    background: transparent !important;
    flex: 1;
}

/* ── Seller Avatar ───────────────────────────────────────────────────────── */
.seller-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: -.5px;
}
.seller-avatar--lg {
    width: 72px; height: 72px;
    font-size: 26px;
    border-radius: 50%;
}
.seller-avatar--cyan   { background: #cffafe; color: #0e7490; }
.seller-avatar--purple { background: #ede9fe; color: #6d28d9; }
.seller-avatar--green  { background: #dcfce7; color: #166534; }
.seller-avatar--orange { background: #ffedd5; color: #c2410c; }
.seller-avatar--rose   { background: #ffe4e6; color: #be123c; }
.seller-avatar--blue   { background: #dbeafe; color: #1d4ed8; }
.seller-avatar--teal   { background: #ccfbf1; color: #0f766e; }
.seller-avatar--amber  { background: #fef3c7; color: #b45309; }

/* ── Seller table row ────────────────────────────────────────────────────── */
.seller-row td { vertical-align: middle; }
.seller-row__name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.seller-row__name { font-weight: 700; font-size: .92rem; color: var(--lt-text, #1e293b); }
.seller-row__notes {
    font-size: .75rem;
    color: var(--lt-text-muted, #94a3b8);
    margin-top: 2px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.seller-row__email { font-size: .83rem; color: var(--lt-text, #1e293b); }
.seller-row__phone { font-size: .77rem; color: var(--lt-text-muted, #64748b); margin-top: 2px; }
.seller-row__revenue {
    font-size: .95rem;
    font-weight: 800;
    color: #16a34a;
    font-variant-numeric: tabular-nums;
}
.seller-row__count {
    font-size: 1rem;
    font-weight: 700;
    color: var(--lt-primary, #06b6d4);
    text-decoration: none;
}
.seller-row__count:hover { text-decoration: underline; }
.seller-row:hover { background: #f8fafc; }

/* ── Slide-over drawer ───────────────────────────────────────────────────── */
.sdrawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(3px);
    z-index: 300;
    animation: sdrawer-fade-in .2s ease;
}
@keyframes sdrawer-fade-in { from { opacity: 0; } to { opacity: 1; } }

.sdrawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 440px;
    max-width: 100vw;
    background: white;
    box-shadow: -12px 0 48px rgba(0,0,0,.18);
    z-index: 301;
    display: flex;
    flex-direction: column;
    animation: sdrawer-slide-in .28s cubic-bezier(.4,0,.2,1);
}
@keyframes sdrawer-slide-in {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.sdrawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--lt-border, #e2e8f0);
    flex-shrink: 0;
}
.sdrawer__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--lt-text, #1e293b);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}
.sdrawer__title i { color: var(--lt-primary, #06b6d4); font-size: 1.2rem; }
.sdrawer__close {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid var(--lt-border, #e2e8f0);
    background: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--lt-text-muted, #64748b);
    transition: all .15s;
}
.sdrawer__close:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

.sdrawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sdrawer__field-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--lt-text-muted, #94a3b8);
    font-size: 17px;
    pointer-events: none;
}
.sdrawer__field-wrap {
    position: relative;
}
.sdrawer__field-wrap .lt-input {
    padding-left: 38px !important;
}
.sdrawer__field-wrap--textarea .lt-input {
    padding-top: 10px !important;
}
.sdrawer__field-wrap--textarea .sdrawer__field-icon {
    top: 14px;
    transform: none;
}

.sdrawer__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--lt-border, #e2e8f0);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
    background: var(--lt-surface, #f8fafc);
}

/* ── Seller hero card (detail page) ─────────────────────────────────────── */
.seller-hero {
    background: white;
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 16px;
    padding: 28px 32px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.seller-hero__left {
    display: flex;
    gap: 20px;
    flex: 1;
    min-width: 260px;
    align-items: flex-start;
}
.seller-hero__info { flex: 1; }
.seller-hero__name {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--lt-text, #1e293b);
    margin: 0 0 8px;
    line-height: 1.2;
}
.seller-hero__meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.seller-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .85rem;
    color: var(--lt-text-muted, #64748b);
}
.seller-hero__meta-item i { font-size: 15px; color: var(--lt-primary, #06b6d4); }
.seller-hero__notes {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--lt-surface, #f8fafc);
    border: 1px solid var(--lt-border, #e2e8f0);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: .82rem;
    color: var(--lt-text-muted, #64748b);
    font-style: italic;
}
.seller-hero__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.seller-hero__join {
    font-size: .78rem;
    color: var(--lt-text-muted, #94a3b8);
    margin-top: 4px;
}

/* ── KPI cards ───────────────────────────────────────────────────────────── */
.admin-kpi__icon--amber  { background: #fef3c7; color: #b45309; }
.admin-kpi__icon--cyan   { background: #cffafe; color: #0e7490; }

/* ── Tenant table in seller detail ──────────────────────────────────────── */
.seller-detail-table .tenant-name {
    font-weight: 700;
    font-size: .9rem;
    color: var(--lt-text, #1e293b);
}
.seller-detail-table .tenant-owner {
    font-size: .77rem;
    color: var(--lt-text-muted, #64748b);
    margin-top: 2px;
}
.seller-detail-table .tenant-revenue {
    font-weight: 800;
    color: #16a34a;
    font-variant-numeric: tabular-nums;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.seller-empty {
    text-align: center;
    padding: 72px 20px;
    color: var(--lt-text-muted, #94a3b8);
}
.seller-empty__icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 12px;
    opacity: .5;
}
.seller-empty__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--lt-text, #1e293b);
    margin: 0 0 6px;
}
.seller-empty__sub {
    font-size: .85rem;
    margin: 0 0 20px;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
.seller-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 400;
    background: #1e293b;
    color: white;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .88rem;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    animation: toast-in .3s cubic-bezier(.34,1.56,.64,1);
    max-width: 340px;
}
.seller-toast i { color: #4ade80; font-size: 1.2rem; }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(16px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Responsive sellers ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .seller-summary__chip { min-width: 130px; }
    .seller-filter-row { flex-direction: column; align-items: stretch; }
    .sdrawer { width: 100vw; }
    .seller-hero { padding: 20px; }
    .seller-hero__name { font-size: 1.2rem; }
    .admin-tab { padding: 6px 12px; font-size: .78rem; }
}
