/* ============================================================
   OKLIOO - Estilos CSS
   Paleta: Fondo #F8F9FA, Primario #0D9488, Verde #10B981,
           Naranja #F59E0B, Rojo #EF4444
   ============================================================ */

:root {
    --bg: #F8F9FA;
    --bg-card: #FFFFFF;
    --primary: #0D9488;
    --primary-light: #14B8A6;
    --primary-dark: #0F766E;
    --green: #10B981;
    --green-light: #34D399;
    --orange: #F59E0B;
    --orange-light: #FBBF24;
    --red: #EF4444;
    --red-light: #F87171;
    --text: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #6B7280;
    --border: #E5E7EB;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Modo oscuro automatico */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111827;
        --bg-card: #1F2937;
        --text: #F9FAFB;
        --text-secondary: #9CA3AF;
        --text-light: #6B7280;
        --border: #374151;
        --shadow: 0 1px 3px rgba(0,0,0,0.3);
        --shadow-lg: 0 4px 12px rgba(0,0,0,0.4);
    }
}

/* ============================================================
   RESET & BASE
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* WCAG: Focus visible for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* WCAG: Skip to content */
.skip-to-content:focus {
    top: 0;
}

/* WCAG: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

html, body {
    height: 100%;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

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

/* ============================================================
   SCREENS (Sistema de navegacion)
   ============================================================ */

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    background: var(--bg);
    z-index: 1;
}

.screen.active {
    display: flex;
}

.hidden {
    display: none !important;
}

/* ============================================================
   HEADER
   ============================================================ */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 56px;
}

.header-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.btn-menu, .btn-back, .btn-add, .btn-delete {
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.btn-menu:hover, .btn-back:hover, .btn-add:hover {
    background: rgba(255,255,255,0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-icon-btn {
    background: none;
    border: none;
    color: white;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.header-icon-btn:active {
    background: rgba(255,255,255,0.2);
}

.header-sync {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    opacity: 0.9;
    cursor: pointer;
    padding: 6px;
}

.sync-icon {
    font-size: 1rem;
    color: white;
    transition: color 0.3s;
}

.sync-icon.syncing {
    animation: spin 1s linear infinite;
    color: var(--orange);
}

.sync-icon.error {
    color: var(--red);
}

.sync-icon.ok {
    color: #4ade80;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================
   SIDEBAR (Menu lateral)
   ============================================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
}

.sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.sidebar-header {
    padding: 24px 20px;
    background: var(--primary);
    color: white;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar-username {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 4px;
}

.sidebar-menu {
    list-style: none;
    padding: 8px 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-item {
    padding: 14px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-item.active .sidebar-icon,
.sidebar-item:hover .sidebar-icon {
    opacity: 1;
}

.sidebar-item:hover {
    background: var(--bg);
}

.sidebar-item.active {
    background: rgba(13,148,136,0.1);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar-logout {
    color: var(--red);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 100px;
}

/* ============================================================
   AUTH SCREENS
   ============================================================ */

.auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 32px 24px;
    text-align: center;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.auth-logo {
    margin-bottom: 24px;
}

.auth-logo-img {
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.3);
    object-fit: contain;
}

.auth-brand {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1.5px;
    margin: 0;
    line-height: 1;
}

.auth-tagline {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 6px;
    line-height: 1.4;
}

/* Password field with toggle */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    flex: 1;
    padding-right: 44px;
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s;
}

.btn-toggle-password:active {
    background: var(--bg);
}

.btn-toggle-password svg {
    width: 20px;
    height: 20px;
}

/* Password match hint */
.password-match-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    transition: color 0.2s;
}

.password-match-hint.match {
    color: var(--green);
}

.password-match-hint.no-match {
    color: var(--red);
}

.auth-form {
    text-align: left;
}

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

/* Step Indicator para registro multi-paso */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

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

.step.active {
    background: var(--primary);
    color: white;
}

.step.completed {
    background: var(--green);
    color: white;
}

.step-line {
    width: 40px;
    height: 3px;
    background: var(--border);
    margin: 0 8px;
}

.step-line.active {
    background: var(--primary);
}

.step-line.completed {
    background: var(--green);
}

.form-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

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

.code-phone-display {
    text-align: center;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--primary);
}

.auth-benefits {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.benefit-item {
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================================
   FORMULARIOS
   ============================================================ */

.btn-expand-options {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 16px;
    font-family: var(--font);
}

.btn-expand-options:hover {
    text-decoration: underline;
}

.more-options {
    animation: slideDown 0.2s ease;
    overflow: hidden;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 400px; }
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    transition: border-color 0.2s;
    font-family: var(--font);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-group-half {
    flex: 1;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
}

.qty-control input {
    text-align: center;
    width: 60px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    -moz-appearance: textfield;
}

.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.btn-qty {
    width: 44px;
    height: 48px;
    border: 2px solid var(--border);
    background: var(--bg);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
}

.btn-qty:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.btn-qty:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ============================================================
   BOTONES
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--red);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-full {
    width: 100%;
}

.btn-xl {
    padding: 18px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Loading spinner for buttons */
.btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

.btn.loading .btn-text { opacity: 0.5; }
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading { pointer-events: none; opacity: 0.8; }

/* Dashboard greeting */
.dashboard-greeting {
    margin-bottom: 16px;
}

.dashboard-greeting h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.greeting-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

/* ============================================================
   QUICK SUMMARY (Pantalla principal simplificada)
   ============================================================ */

.quick-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.qs-sep {
    color: var(--text-light);
}

/* ============================================================
   GREETING (Pantalla principal)
   ============================================================ */

.greeting {
    margin-bottom: 20px;
}

.greeting h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.greeting p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 2px;
}

/* ============================================================
   STATUS GRID (Tarjetas de estado)
   ============================================================ */

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.status-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.status-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-count {
    font-size: 1.8rem;
    font-weight: 800;
    margin-top: 4px;
}

.status-nuevos { border-color: var(--orange); }
.status-nuevos .status-count { color: var(--orange); }

.status-pagados { border-color: var(--green); }
.status-pagados .status-count { color: var(--green); }

.status-preparando { border-color: var(--primary); }
.status-preparando .status-count { color: var(--primary); }

.status-enviados { border-color: var(--purple, #8B5CF6); }
.status-enviados .status-count { color: var(--purple, #8B5CF6); }

/* ============================================================
   DAILY SUMMARY
   ============================================================ */

.daily-summary {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.daily-summary h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.summary-value {
    font-weight: 700;
    font-size: 1rem;
}

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

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

.pedido-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
}

.pedido-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

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

.pedido-cliente {
    font-weight: 700;
    font-size: 1rem;
}

.pedido-estado {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.estado-nuevo { background: #FEF3C7; color: #92400E; }
.estado-pagado { background: #D1FAE5; color: #065F46; }
.estado-preparando { background: #CCFBF1; color: #115E59; }
.estado-enviado { background: #EDE9FE; color: #5B21B6; }
.estado-entregado { background: #D1FAE5; color: #065F46; }
.estado-cancelado { background: #FEE2E2; color: #991B1B; }

.pedido-producto {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pedido-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.pedido-precio {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
}

.pedido-fecha {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ============================================================
   DETALLE DE PEDIDO
   ============================================================ */

.detalle-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.detalle-section h3 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detalle-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.detalle-label {
    color: var(--text-secondary);
}

.detalle-value {
    font-weight: 600;
}

.detalle-estado {
    text-align: center;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.detalle-estado-text {
    font-size: 1.5rem;
    font-weight: 800;
}

.estado-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */

.search-bar {
    margin-bottom: 16px;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

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

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

.cliente-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
}

.cliente-card:hover {
    border-color: var(--primary);
}

.cliente-nombre {
    font-weight: 700;
    font-size: 1rem;
}

.cliente-telefono {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2px;
}

.cliente-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ============================================================
   PRODUCTOS LIST
   ============================================================ */

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

.producto-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.producto-nombre {
    font-weight: 600;
}

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

.producto-veces {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ============================================================
   RESUMEN
   ============================================================ */

.resumen-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text);
}

.tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.resumen-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resumen-stat {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resumen-stat-label {
    color: var(--text-secondary);
}

.resumen-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
}

.resumen-top {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
}

.resumen-top h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.resumen-top-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.resumen-top-item:last-child {
    border-bottom: none;
}

/* ============================================================
   MI CUENTA
   ============================================================ */

.cuenta-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.cuenta-section h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.cuenta-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.cuenta-row:last-child {
    border-bottom: none;
}

.cuenta-section .btn {
    margin-top: 8px;
}

/* ============================================================
   SUSCRIPCION VENCIDA
   ============================================================ */

.expired-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 24px;
    text-align: center;
}

.expired-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.expired-container h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.expired-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.nequi-box {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.nequi-box h3 {
    color: var(--primary);
    margin-bottom: 12px;
}

.nequi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.nequi-label {
    color: var(--text-secondary);
}

.nequi-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-copy {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.pago-form {
    text-align: left;
    margin-bottom: 16px;
}

.comprobante-preview {
    position: relative;
    margin-top: 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    max-height: 200px;
}

.comprobante-preview img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    display: block;
}

.btn-remove-comprobante {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-text {
    display: block;
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 4px;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: var(--primary);
}

.expired-note {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 16px 0;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ============================================================
   BUTTON LOADING SPINNER
   ============================================================ */

.btn-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

.btn.loading .btn-text { opacity: 0.5; }
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading { pointer-events: none; opacity: 0.8; }

/* ============================================================
   DASHBOARD GREETING
   ============================================================ */

.dashboard-greeting {
    margin-bottom: 16px;
}

.dashboard-greeting h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.greeting-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

/* ============================================================
   PAGO SUSCRIPCION SCREEN
   ============================================================ */

.pago-status-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.pago-status-icon {
    margin-bottom: 12px;
}

.pago-status-icon svg {
    color: var(--primary);
}

.pago-status-card.expired .pago-status-icon svg {
    color: var(--red);
}

.pago-status-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 4px 0 12px;
}

.pago-fecha-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.token-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.token-section h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.token-input-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.token-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    background: var(--bg);
    color: var(--text);
}

.token-status {
    margin-top: 12px;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.token-status.success {
    background: rgba(16,185,129,0.1);
    color: var(--green);
}

.token-status.error {
    background: rgba(239,68,68,0.1);
    color: var(--red);
}

.pago-history-section {
    margin-top: 16px;
}

.pago-history-section h3 {
    margin-bottom: 12px;
}

.pago-history-item {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pago-h-info {
    font-size: 0.85rem;
}

.pago-h-monto {
    font-weight: 700;
    color: var(--primary);
}

.pago-h-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pago-h-badge.pendiente { background: rgba(245,158,11,0.15); color: var(--orange); }
.pago-h-badge.aprobado { background: rgba(16,185,129,0.15); color: var(--green); }
.pago-h-badge.rechazado { background: rgba(239,68,68,0.15); color: var(--red); }

/* ============================================================
   RESUMEN CHARTS & KPIs
   ============================================================ */

.resumen-chart {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.resumen-chart h3 {
    font-size: 0.9rem;
    margin-bottom: 12px;
    color: var(--text);
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    padding-top: 8px;
}

.chart-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    max-width: 32px;
    border-radius: 4px 4px 0 0;
    background: var(--primary);
    min-height: 2px;
    transition: height 0.5s ease;
}

.chart-bar-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

.chart-bar-value {
    font-size: 0.65rem;
    color: var(--text);
    font-weight: 600;
}

.resumen-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.resumen-kpi {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
    border: 1px solid var(--border);
}

.resumen-kpi-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.resumen-kpi-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.resumen-kpi.green .resumen-kpi-value { color: var(--green); }
.resumen-kpi.orange .resumen-kpi-value { color: var(--orange); }
.resumen-kpi.red .resumen-kpi-value { color: var(--red); }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 90%;
    max-width: 400px;
}

.toast {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.toast-success {
    background: var(--green);
    color: white;
}

.toast-error {
    background: var(--red);
    color: white;
}

.toast-info {
    background: var(--primary);
    color: white;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ============================================================
   MODAL
   ============================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    flex: 1;
}

/* ============================================================
   UTILIDADES
   ============================================================ */

.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* ============================================================
   SCROLLBAR PERSONALIZADO
   ============================================================ */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 600px) {
    .main-content {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .auth-container {
        padding-top: 80px;
    }
    
    .status-grid {
        gap: 16px;
    }
}

/* ============================================================
   CATALOGO INTELIGENTE - Product Search
   ============================================================ */

.product-search-container {
    position: relative;
}

.product-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: var(--shadow-lg);
}

.product-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s;
}

.product-suggestion-item:hover {
    background: var(--bg);
}

.product-suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-name {
    font-weight: 600;
    color: var(--text);
}

.suggestion-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.suggestion-times {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-left: 8px;
}

.product-suggestion-new {
    padding: 12px 16px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.product-suggestion-new:hover {
    background: rgba(13,148,136,0.1);
}

/* Banner de producto frecuente */
.frequent-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    font-size: 0.8rem;
}

.frequent-banner span {
    color: #92400E;
}

.btn-save-frequent {
    background: #F59E0B;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-save-frequent:hover {
    background: #D97706;
}

/* Indicador de producto en catalogo */
.product-in-catalog {
    position: relative;
}

.product-in-catalog::after {
    content: '★';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #F59E0B;
    font-size: 0.9rem;
    pointer-events: none;
}

/* Banner de frecuentes en pantalla principal */
.frequent-banner-main {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 1px solid #F59E0B;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: #92400E;
}

.frequent-banner-main a {
    color: #92400E;
    font-weight: 700;
    text-decoration: underline;
}

/* Seccion de frecuentes en lista de productos */
.frequent-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px dashed var(--border);
}

/* ============================================================
   RESPUESTAS RAPIDAS
   ============================================================ */

.respuestas-categorias {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 16px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.cat-btn {
    padding: 8px 14px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    color: var(--text);
    transition: all 0.15s;
    font-family: var(--font);
}

.cat-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.cat-btn:hover:not(.active) {
    border-color: var(--primary);
}

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

.respuesta-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
}

.respuesta-card:active {
    transform: scale(0.98);
    border-color: var(--primary);
}

.respuesta-titulo {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.respuesta-preview {
    color: var(--text-secondary);
    font-size: 0.8rem;
    white-space: pre-line;
    max-height: 60px;
    overflow: hidden;
    line-height: 1.4;
}

.respuesta-acciones {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

/* Botones de respuesta en detalle de pedido */
.respuestas-rapidas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-respuesta {
    padding: 12px 10px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.15s;
    font-family: var(--font);
    color: var(--text);
    text-align: center;
}

.btn-respuesta:hover {
    border-color: var(--primary);
    background: rgba(13,148,136,0.05);
    transform: translateY(-1px);
}

.btn-respuesta:active {
    transform: scale(0.97);
}

.rapida-general { border-color: var(--text-light); }
.rapida-producto { border-color: var(--orange); }
.rapida-pago { border-color: var(--green); }
.rapida-envio { border-color: #8B5CF6; }
.rapida-agradecimiento { border-color: var(--red); }

/* Variable hints */
.variable-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.hint-tag {
    padding: 5px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--primary);
    font-weight: 600;
    transition: all 0.15s;
}

.hint-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Select styling */
select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================================
   HISTORIAL DEL CLIENTE
   ============================================================ */

.cliente-hist-header {
    text-align: center;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.cliente-hist-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.cliente-hist-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.cliente-hist-phone, .cliente-hist-addr {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-green .stat-number { color: var(--green); }
.stat-orange .stat-number { color: var(--orange); }
.stat-red .stat-number { color: var(--red); }

.cliente-notas-text {
    background: #FEF3C7;
    color: #92400E;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.4;
}

.cliente-notas-badge {
    background: #FEF3C7;
    color: #92400E;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-top: -8px;
    margin-bottom: 16px;
    border: 1px solid #F59E0B;
}

/* ============================================================
   CUENTAS DE PAGO
   ============================================================ */

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

.cuenta-pago-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cuenta-pago-card.cuenta-principal {
    border-color: var(--primary);
    border-width: 2px;
}

.cuenta-pago-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cuenta-pago-tipo {
    font-size: 1.5rem;
}

.cuenta-pago-nombre {
    font-weight: 700;
    font-size: 0.95rem;
}

.cuenta-pago-numero {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.cuenta-pago-acciones {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.badge-principal {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================================
   AGENDA DE ENTREGAS
   ============================================================ */

.entregas-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.entrega-card {
    border-left: 3px solid #8B5CF6;
}

.entrega-fecha-badge {
    background: #EDE9FE;
    color: #5B21B6;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.entrega-telefono {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 4px;
}

.entrega-acciones {
    display: flex;
    gap: 6px;
}

/* ============================================================
   SEGUIMIENTO
   ============================================================ */

.seguimiento-banner {
    margin-bottom: 16px;
}

.seguimiento-content {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
    border: 1px solid #F59E0B;
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9rem;
    color: #92400E;
}

.seguimiento-content:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.seguimiento-arrow {
    font-size: 1.2rem;
    font-weight: 700;
}

/* ============================================================
   PRODUCTO - STOCK
   ============================================================ */

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

.producto-stock {
    font-size: 0.75rem;
    color: var(--green);
    font-weight: 600;
    background: #D1FAE5;
    padding: 2px 8px;
    border-radius: 10px;
}

.producto-stock.stock-low {
    color: var(--red);
    background: #FEE2E2;
}

/* ============================================================
   UTILIDADES ADICIONALES
   ============================================================ */

.text-orange { color: var(--orange); font-weight: 600; }

/* ============================================================
   BOTTOM NAVBAR
   ============================================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 500;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.65rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.nav-item:active {
    transform: scale(0.92);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}

.nav-icon {
    font-size: 1.3rem;
}

.nav-icon-svg {
    width: 22px;
    height: 22px;
    opacity: 0.7;
}

.nav-item.active .nav-icon-svg {
    opacity: 1;
}

.nav-label {
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* FAB Button */
.nav-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    margin-top: -22px;
    box-shadow: 0 4px 16px rgba(13,148,136,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}

.nav-fab:active {
    transform: scale(0.9);
    box-shadow: 0 2px 8px rgba(13,148,136,0.3);
}

.nav-fab.active::after {
    display: none;
}

.nav-icon-fab {
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1;
}

/* ============================================================
   FAB MENU
   ============================================================ */

.fab-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 600;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 80px;
}

.fab-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    animation: fadeIn 0.2s ease;
}

.fab-options {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    align-items: center;
    animation: fabSlideUp 0.25s ease;
}

.fab-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: none;
    border-radius: 28px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    transition: all 0.15s;
    min-width: 180px;
}

.fab-option:active {
    transform: scale(0.95);
    background: var(--bg);
}

.fab-option-icon {
    font-size: 1.2rem;
}

.fab-option-label {
    flex: 1;
    text-align: left;
}

@keyframes fabSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================
   FAVORITOS
   ============================================================ */

.favoritos-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 16px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

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

.fav-star {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.fav-star:active {
    transform: scale(1.3);
}

.fav-star.active {
    animation: favPop 0.3s ease;
}

@keyframes favPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

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

.clientes-frios-section {
    margin-top: 16px;
    background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
    border: 1px solid #F97316;
    border-radius: var(--radius);
    padding: 16px;
}

.clientes-frios-section h3 {
    font-size: 0.9rem;
    color: #9A3412;
    margin-bottom: 12px;
}

.clientes-frios-section a {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #9A3412;
    font-weight: 700;
}

.cliente-frio-card {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.cliente-frio-card:active {
    border-color: var(--primary);
}

.cliente-frio-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F97316;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.cliente-frio-info {
    flex: 1;
    min-width: 0;
}

.cliente-frio-nombre {
    font-weight: 700;
    font-size: 0.9rem;
}

.cliente-frio-stats {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.cliente-frio-dias {
    background: #F97316;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.clientes-frios-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: center;
}

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

/* ============================================================
   PADDING ADJUSTMENTS PARA BOTTOM NAVBAR
   ============================================================ */

.main-content {
    padding-bottom: 80px;
}

.navbar-visible .main-content {
    padding-bottom: 80px;
}


/* ============================================================
   PWA INSTALL BAR
   ============================================================ */

.pwa-install-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary, #ffffff);
    border-top: 2px solid var(--accent, #6366f1);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.pwa-install-bar.hidden {
    display: none;
}

.pwa-install-bar span {
    flex: 1;
    color: var(--text-primary, #1f2937);
}

.pwa-install-bar .btn {
    flex-shrink: 0;
}

.pwa-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary, #6b7280);
    padding: 0 4px;
    line-height: 1;
}

.pwa-close-btn:hover {
    color: var(--text-primary, #1f2937);
}
EOF
echo done
