/* ============================================================
   TopoAPP — Estilos principales
   Mobile-first | Bootstrap 5 base
   ============================================================ */

/* ---- Variables de marca — Paleta Topo -------------------- */
:root {
    /* Naranja principal (cabeza del topo) */
    --brand-primary:   #D96A2B;
    /* Naranja claro (cuerpo) */
    --brand-secondary: #F5A05A;
    /* Degradado cálido */
    --brand-gradient:  linear-gradient(135deg, #D96A2B 0%, #F5A05A 100%);
    /* Beige cálido para fondos sutiles */
    --brand-warm:      #FDF0E6;

    --success:  #10b981;
    --warning:  #f59e0b;
    --danger:   #ef4444;
    --info:     #3b82f6;

    /* Fondo general ligeramente cálido */
    --bg-body:   #FAF5F0;
    --bg-card:   #ffffff;
    --bg-input:  #FDF8F4;

    --text-primary:   #2C1A0E;
    --text-secondary: #6B4F3A;
    --text-muted:     #A0866E;

    --border:    #EAD9CC;
    --shadow-sm: 0 1px 3px rgba(180,100,40,.09);
    --shadow-md: 0 4px 12px rgba(180,100,40,.12);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --topbar-h:    56px;
    --bottomnav-h: 64px;
}

/* ---- Reset base ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
}

/* Sobreescribir color primario de Bootstrap */
.btn-primary, .bg-primary { background-color: var(--brand-primary) !important; border-color: var(--brand-primary) !important; }
.btn-primary:hover         { background-color: #BF5A1F !important; border-color: #BF5A1F !important; }
.text-primary              { color: var(--brand-primary) !important; }
.border-primary            { border-color: var(--brand-primary) !important; }


/* ============================================================
   LAYOUT — AUTH
   ============================================================ */
.auth-body {
    background: var(--brand-gradient);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px 40px;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
}

/* Logo / Brand en auth */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
    color: #fff;
}

.brand-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255,255,255,.15);
    padding: 4px;
}

/* Topbar logo */
.topbar-brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    margin-right: 6px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.brand-name {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Tarjeta auth */
.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-md);
}

.auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
}

/* Inputs en auth */
.form-control, .form-select {
    background: var(--bg-input);
    border-color: var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: border-color .2s, box-shadow .2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.15);
    background: #fff;
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

/* ---- Onboarding pasos ------------------------------------ */
.onboarding-card { max-width: 440px; }

.onboarding-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 4px;
}

.onboarding-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    font-size: 0.72rem;
    color: var(--text-muted);
    gap: 4px;
}

.onboarding-step.active { color: var(--brand-primary); }
.onboarding-step.active .step-dot { background: var(--brand-primary); color: #fff; }

.step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin-top: -18px;
    max-width: 40px;
}

/* Logo upload */
.logo-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s;
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-upload-area:hover { border-color: var(--brand-primary); }

.logo-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.logo-preview {
    max-height: 80px;
    max-width: 100%;
    border-radius: var(--radius-sm);
    object-fit: contain;
}


/* ============================================================
   LAYOUT — APP (autenticado)
   ============================================================ */
.app-body {
    background: var(--bg-body);
}

/* TOP BAR */
.app-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    z-index: 900;
    box-shadow: var(--shadow-sm);
}

.topbar-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: background .15s;
}

.topbar-btn:hover { background: var(--bg-body); }

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-primary);
    text-decoration: none;
    flex: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.topbar-negocio {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* SIDEBAR */
.app-sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: -260px;
    width: 260px;
    bottom: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    z-index: 800;
    transition: left .25s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.app-sidebar.open { left: 0; }

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-negocio {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    background: var(--brand-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-negocio-nombre {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.sidebar-user {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.sidebar-nav {
    padding: 8px 0;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .15s, color .15s;
}

.sidebar-link:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(79,70,229,.08);
    color: var(--brand-primary);
    border-left-color: var(--brand-primary);
}

.sidebar-divider {
    margin: 8px 16px;
    border-color: var(--border);
}

/* Overlay detrás del sidebar en móvil */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 799;
}

.sidebar-overlay.show { display: block; }

/* MAIN CONTENT */
.app-main {
    padding-top: var(--topbar-h);
    padding-bottom: calc(var(--bottomnav-h) + 16px);
    min-height: 100vh;
}

/* En desktop: sidebar siempre visible */
@media (min-width: 992px) {
    .app-sidebar {
        left: 0;
    }

    .app-main {
        margin-left: 260px;
        padding-bottom: 24px;
    }

    #sidebarToggle { display: none; }
}

/* BOTTOM NAV */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottomnav-h);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 850;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: color .15s;
    flex: 1;
}

.bottom-nav-item i { font-size: 20px; }
.bottom-nav-item.active { color: var(--brand-primary); }
.bottom-nav-item:hover  { color: var(--brand-primary); }

/* FAB central del bottom nav */
.bottom-nav-fab {
    width: 52px;
    height: 52px;
    background: var(--brand-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(79,70,229,.4);
    margin-bottom: 8px;
    flex-shrink: 0;
    transition: transform .15s, box-shadow .15s;
}

.bottom-nav-fab:hover {
    color: #fff;
    transform: scale(1.07);
    box-shadow: 0 6px 16px rgba(79,70,229,.5);
}


/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
    padding: 20px 16px;
    max-width: 720px;
    margin: 0 auto;
}

/* Dashboard header */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dashboard-greeting {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.dashboard-date {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
    text-transform: capitalize;
}

/* Stats grid: 2 columnas */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.bg-primary-soft { background: rgba(79,70,229,.10); }
.bg-warning-soft { background: rgba(245,158,11,.10); }
.bg-info-soft    { background: rgba(59,130,246,.10); }
.bg-success-soft { background: rgba(16,185,129,.10); }

.stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Secciones */
.section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-link {
    font-size: 0.82rem;
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 500;
    text-align: center;
    transition: background .15s, color .15s, border-color .15s, transform .1s;
    box-shadow: var(--shadow-sm);
}

.quick-action-btn i { font-size: 22px; }

.quick-action-btn:hover {
    background: rgba(79,70,229,.06);
    color: var(--brand-primary);
    border-color: rgba(79,70,229,.3);
}

.quick-action-btn:active { transform: scale(.97); }

.btn-action-primary {
    background: var(--brand-gradient);
    color: #fff !important;
    border-color: transparent !important;
}

.btn-action-primary:hover {
    opacity: .9;
    background: var(--brand-gradient);
    color: #fff !important;
}

/* Orders list */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: background .15s;
}

.order-card:hover {
    background: rgba(79,70,229,.04);
    color: var(--text-primary);
}

.order-card-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-number {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--brand-primary);
}

.order-client {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.order-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.order-total {
    font-weight: 700;
    font-size: 0.9rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}


/* ============================================================
   BADGES DE ESTADO
   ============================================================ */
[class^="badge-"] {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pendiente   { background: #fef3c7; color: #92400e; }
.badge-confirmado  { background: #dbeafe; color: #1e40af; }
.badge-preparado   { background: #e0e7ff; color: #3730a3; }
.badge-enviado     { background: #ede9fe; color: #5b21b6; }
.badge-en_ruta     { background: #cffafe; color: #155e75; }
.badge-entregado   { background: #d1fae5; color: #065f46; }
.badge-liquidado   { background: #dcfce7; color: #166534; }
.badge-anulado     { background: #fee2e2; color: #991b1b; }
.badge-devolucion  { background: #fef9c3; color: #854d0e; }
.badge-no_recibido { background: #f1f5f9; color: #475569; }


/* ============================================================
   UTILIDADES
   ============================================================ */
.text-brand { color: var(--brand-primary); }
.fw-600     { font-weight: 600; }

/* Formularios generales en app */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}


/* ============================================================
   PÁGINA GENÉRICA
   ============================================================ */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.page-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.back-link {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.back-link:hover { color: var(--brand-primary); }

.form-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}


/* ============================================================
   FILTROS
   ============================================================ */
.filtros-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

.filtro-search {
    position: relative;
    flex: 1;
    min-width: 160px;
}

.filtro-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 14px;
}

.filtro-search .form-control {
    padding-left: 32px;
}

.filtro-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 130px;
    font-size: 0.85rem;
}


/* ============================================================
   PRODUCTOS — GRID
   ============================================================ */
.productos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

@media (min-width: 600px) {
    .productos-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
    .productos-grid { grid-template-columns: repeat(4, 1fr); }
}

.producto-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}

.producto-card:hover { box-shadow: var(--shadow-md); }
.producto-inactivo   { opacity: .55; }

/* Foto */
.producto-foto-link {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-body);
}

.producto-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
}

.producto-card:hover .producto-foto { transform: scale(1.04); }

.producto-foto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Badge de estado sobre la foto */
.producto-estado-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.badge-activo   { background: #d1fae5; color: #065f46; }
.badge-agotado  { background: #fee2e2; color: #991b1b; }
.badge-inactivo { background: #f1f5f9; color: #475569; }

/* Info bajo la foto */
.producto-info {
    padding: 10px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.producto-categoria {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0;
}

.producto-nombre {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.producto-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.producto-precio {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--brand-primary);
}

/* Badge de stock */
.stock-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stock-ok   { background: #d1fae5; color: #065f46; }
.stock-bajo { background: #fef3c7; color: #92400e; }
.stock-cero { background: #fee2e2; color: #991b1b; }

/* Acciones de la tarjeta */
.producto-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}


/* ============================================================
   PRODUCTOS — FORMULARIO
   ============================================================ */
.foto-upload-area {
    position: relative;
    aspect-ratio: 4 / 3;
    max-height: 220px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    transition: border-color .2s;
}

.foto-upload-area:hover { border-color: var(--brand-primary); }

/* Input oculto — el <label for="foto"> lo activa sin listener adicional */
.foto-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    /* Sin z-index alto: el label maneja el click nativamente */
}

.foto-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.foto-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.82rem;
    gap: 6px;
    pointer-events: none;
    transition: opacity .2s;
}

.foto-upload-area:hover .foto-overlay { opacity: 1 !important; }

/* Ganancia preview */
.ganancia-preview {
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
}

.ganancia-label { color: var(--text-secondary); }
.ganancia-valor { font-weight: 700; font-size: 1rem; }


/* ============================================================
   CATEGORÍAS
   ============================================================ */
.categorias-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.categoria-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.categoria-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.categoria-nombre {
    font-weight: 600;
    font-size: 0.9rem;
}

.categoria-count {
    font-size: 0.78rem;
    color: var(--text-secondary);
}


/* ============================================================
   INVENTARIO
   ============================================================ */
.alert-inventario {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
}

.alert-danger-soft  { background: #fee2e2; color: #991b1b; }
.alert-warning-soft { background: #fef3c7; color: #92400e; }

/* Lista de productos en inventario */
.inv-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.inv-foto {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-body);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.inv-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inv-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inv-nombre {
    font-weight: 600;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inv-cat {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.inv-stock-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.inv-stock {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
}

.inv-stock.stock-ok   { color: #10b981; }
.inv-stock.stock-bajo { color: #f59e0b; }
.inv-stock.stock-cero { color: #ef4444; }

.inv-stock-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Historial de movimientos */
.movimientos-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.movimiento-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.movimiento-tipo-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.tipo-entrada { background: #d1fae5; color: #065f46; }
.tipo-salida  { background: #fee2e2; color: #991b1b; }

.movimiento-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.movimiento-producto {
    font-weight: 600;
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movimiento-detalle {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.movimiento-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    flex-shrink: 0;
}

.movimiento-cantidad {
    font-weight: 700;
    font-size: 0.9rem;
}

.movimiento-fecha {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* ============================================================
   PEDIDOS
   ============================================================ */

/* Pestañas de filtro (tab-nav) */
.tab-nav {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 4px;
    box-shadow: var(--shadow-sm);
}

.tab-link {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background .15s, color .15s;
}

.tab-link.active {
    background: var(--brand-primary);
    color: #fff;
}

/* Lista de pedidos */
.pedidos-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pedido-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s;
}

.pedido-card:hover { box-shadow: var(--shadow-md); }

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pedido-numero {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.pedido-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pedido-cliente {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.pedido-tel {
    font-size: 0.78rem;
}

.pedido-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.pedido-total {
    font-weight: 700;
    font-size: 1rem;
    color: var(--brand-primary);
}

.pedido-fecha {
    font-size: 0.75rem;
}

/* Detalle del pedido */
.detalles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detalle-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.detalle-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.detalle-item-nombre {
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detalle-item-subtotal {
    font-weight: 700;
    white-space: nowrap;
    font-size: 0.9rem;
}

.detalle-total-row {
    display: flex;
    justify-content: space-between;
    border-top: 2px solid var(--border);
    padding-top: 10px;
    font-size: 1rem;
}

/* Fila info en detalle */
.detalle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detalle-info-row {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.88rem;
}

.link-small {
    font-size: 0.8rem;
    color: var(--brand-primary);
    text-decoration: none;
    display: inline-block;
}

/* Estados en botones radio */
.estados-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.estado-btn-label {
    border-radius: var(--radius-sm) !important;
    font-size: 0.82rem;
    padding: 6px 14px;
}

/* Bitacora */
.bitacora-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bitacora-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.bitacora-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.bitacora-positivo { background: #d1fae5; color: #059669; }
.bitacora-negativo { background: #fee2e2; color: #dc2626; }

.bitacora-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bitacora-estado {
    font-size: 0.88rem;
    font-weight: 500;
}

.bitacora-nota {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.bitacora-meta {
    font-size: 0.72rem;
}

/* Total preview en nuevo pedido */
.pedido-total-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f0fdf4;
    border-radius: var(--radius-sm);
    border: 1px solid #bbf7d0;
    font-size: 0.9rem;
    color: #166534;
}

/* Autocomplete dropdown */
.search-autocomplete {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover      { background: #f1f5f9; }

/* Cliente seleccionado badge */
.cliente-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ede9fe;
    color: var(--brand-primary);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 6px;
}

.btn-clear-cliente {
    background: none;
    border: none;
    padding: 0;
    color: var(--brand-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Divisor "o agregar nueva" */
.divider-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 12px 0 10px;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Items en el formulario de pedido */
.item-pedido {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.item-pedido-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.item-nombre {
    font-weight: 600;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-precio {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.precio-edit {
    width: 72px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.82rem;
    background: #fff;
}

.item-pedido-controles {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-qty {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.qty-input {
    width: 46px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 4px;
    font-size: 0.88rem;
}

.item-pedido-subtotal {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-remove-item {
    background: none;
    border: none;
    padding: 0;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

/* Badges de stock en autocomplete */
.badge-stock-ok {
    background: #d1fae5;
    color: #065f46;
    border-radius: 99px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-stock-zero {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 99px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* ============================================================
   CLIENTES
   ============================================================ */

.clientes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cliente-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s;
}

.cliente-card:hover { box-shadow: var(--shadow-md); }

.cliente-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.cliente-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.cliente-nombre {
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cliente-tel {
    font-size: 0.78rem;
}

.cliente-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.cliente-pedidos {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Stats mini (para detalle de cliente) */
.stats-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    gap: 4px;
}

.stat-mini-valor {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-primary);
}

.stat-mini-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ============================================================
   Configuración — lista genérica (empresas de envío, cargos)
   ============================================================ */

.config-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--brand-primary);
}

.config-item-inactive {
    border-left-color: var(--border-color);
    opacity: .65;
}

.config-item-info {
    flex: 1;
    min-width: 0;
}

.config-item-nombre {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-item-detalle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.config-item-acciones {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ============================================================
   Badges empresa de envío (tipo interna / externa)
   ============================================================ */

.badge-interna {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-externa {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

/* ============================================================
   Badges método de pago
   ============================================================ */

.badge-metodo {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-efectivo {
    background: #dcfce7;
    color: #15803d;
}

.badge-transferencia {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-sin-cobro {
    background: #f1f5f9;
    color: #64748b;
}

/* ============================================================
   Tabla de cargos / resumen de cobro (detalle pedido)
   ============================================================ */

.cargo-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.cargo-tabla td {
    padding: 6px 4px;
    vertical-align: middle;
}

.cargo-tabla td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cargo-row {
    color: var(--text-secondary);
}

.cargo-descuento td {
    color: #ef4444;
}

.cargo-deduccion td {
    color: #f97316;
}

.base-neta-row {
    border-top: 2px solid var(--text-primary);
    margin-top: 4px;
}

.base-neta-row td {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    padding-top: 10px;
}

/* ============================================================
   Sidebar — label de sección
   ============================================================ */

.sidebar-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    padding: 8px 16px 4px;
    opacity: .7;
}

/* ============================================================
   Tienda publica - layout base
   ============================================================ */

.tienda-body {
    background: var(--bg-body);
    min-height: 100vh;
    padding-bottom: 100px;
}

.tienda-topbar {
    background: var(--brand-gradient);
    color: #fff;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.tienda-topbar-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
}

.tienda-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.tienda-nombre {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.tienda-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px;
}

.tienda-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 24px 0 40px;
}

.tienda-bienvenida {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    border-left: 3px solid var(--brand-primary);
}

.tienda-filtros {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    scrollbar-width: none;
}

.tienda-filtros::-webkit-scrollbar { display: none; }

.tienda-filtro-btn {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    white-space: nowrap;
    text-decoration: none;
    transition: all .15s;
}

.tienda-filtro-btn.active,
.tienda-filtro-btn:hover {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

/* ============================================================
   Tienda - grid de productos
   ============================================================ */

.tienda-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    .tienda-grid { grid-template-columns: repeat(3, 1fr); }
}

.producto-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.producto-card-agotado { opacity: .6; }

.producto-foto {
    position: relative;
    aspect-ratio: 1;
    background: #f1f5f9;
    overflow: hidden;
}

.producto-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.producto-foto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
}

.producto-badge-agotado {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
}

.producto-badge-carrito {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
}

.producto-info {
    padding: 10px;
    flex: 1;
}

.producto-nombre {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
}

.producto-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.producto-precio {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--brand-primary);
}

.btn-agregar {
    display: block;
    width: 100%;
    padding: 9px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background .15s;
    text-align: center;
}

.btn-agregar:hover { background: #3730a3; }

.btn-agregar-disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

/* ============================================================
   Tienda - barra flotante del carrito
   ============================================================ */

.carrito-flotante {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 608px;
    background: var(--brand-primary);
    color: #fff;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(79,70,229,.35);
    z-index: 200;
}

.carrito-flotante-info {
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.carrito-flotante-total {
    flex: 1;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

.carrito-flotante-btn {
    background: #fff;
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 7px 16px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   Tienda - checkout
   ============================================================ */

.tienda-checkout { padding-bottom: 24px; }

.tienda-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.checkout-resumen {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-sm);
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.checkout-item:last-of-type { border-bottom: none; }

.checkout-item-foto {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.checkout-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.checkout-item-nombre {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-item-precio {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.checkout-item-subtotal {
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.btn-quitar {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 2px 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-quitar:hover { color: #ef4444; }

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    margin-top: 8px;
    border-top: 2px solid var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

/* ============================================================
   Tienda - confirmacion
   ============================================================ */

.confirmacion-hero {
    text-align: center;
    padding: 32px 0 24px;
}

.confirmacion-icono {
    font-size: 3.5rem;
    color: #10b981;
    margin-bottom: 12px;
}

.confirmacion-numero {
    display: inline-block;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    padding: 8px 24px;
    border-radius: var(--radius-md);
    letter-spacing: 2px;
    margin: 12px 0 4px;
}

.tienda-inactivo {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-secondary);
}

.tienda-inactivo i {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.tienda-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
}

.tienda-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

/* ============================================================
   Tienda - selector de método de pago
   ============================================================ */

.metodo-pago-opciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.metodo-pago-opcion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    transition: all .15s;
}

.metodo-pago-opcion input[type="radio"] {
    display: none;
}

.metodo-pago-opcion i {
    font-size: 1.5rem;
}

.metodo-pago-opcion.selected,
.metodo-pago-opcion:has(input:checked) {
    border-color: var(--brand-primary);
    background: #ede9fe;
    color: var(--brand-primary);
}

/* ============================================================
   Badges — Estado de comisión
   ============================================================ */
.badge-comision-liberada  { background: #d1fae5; color: #065f46; }
.badge-comision-pagada    { background: #f1f5f9; color: #475569; }
.badge-comision-anulada   { background: #fee2e2; color: #991b1b; }
.badge-comision-pendiente { background: #fef3c7; color: #92400e; }

/* ============================================================
   Badge — Lista negra de clientes
   ============================================================ */
.badge-lista-negra {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    background: #fee2e2;
    color: #991b1b;
    vertical-align: middle;
}
