/* ============================================
   Livendi - Sistema de Ventas en Vivo
   Estilos principales
   ============================================ */

:root {
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --secondary: #004E89;
    --secondary-light: #0066B3;
    --accent: #00C49A;
    --accent-dark: #00A882;
    --danger: #E74C3C;
    --warning: #F39C12;
    --dark: #1A1A2E;
    --dark-card: #16213E;
    --dark-input: #0F3460;
    --light: #F5F7FA;
    --light-card: #FFFFFF;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #888888;
    --border: #E1E8ED;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
    padding-bottom: 80px;
}

/* ============================================
   HEADER Y LOGO
   ============================================ */

header {
    background: var(--secondary);
    color: white;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0,78,137,0.3);
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-placeholder {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 2px dashed rgba(255,255,255,0.4);
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 12px;
}

.brand-text {
    text-align: left;
}

.brand-text h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0;
    line-height: 1.2;
}

.brand-text .tagline {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
}

/* ============================================
   BADGES DE PLAN
   ============================================ */

.plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.plan-badge.free {
    background: rgba(255,255,255,0.25);
    color: white;
}

.plan-badge.basic {
    background: var(--secondary);
    color: white;
}

.plan-badge.premium {
    background: var(--warning);
    color: #1a1a2e;
}

/* ============================================
   SYNC STATUS
   ============================================ */

.sync-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 8px;
}

.sync-status.connected {
    background: rgba(0,196,154,0.3);
}

.sync-status.disconnected {
    background: rgba(231,76,60,0.3);
}

.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse 2s infinite;
}

.sync-status.connected .sync-dot {
    background: var(--accent);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   CONTAINER Y CARDS
   ============================================ */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: var(--light-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.card h2 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   FEATURES BLOQUEADAS (PLAN GRATIS)
   ============================================ */

.locked-feature {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(0.3);
}

.locked-feature::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.03) 10px,
        rgba(0,0,0,0.03) 20px
    );
    border-radius: inherit;
    pointer-events: none;
}

.locked-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.upgrade-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 8px;
    transition: var(--transition);
}

.upgrade-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(255,107,53,0.4);
}

/* ============================================
   PUBLICIDAD (PLAN GRATIS)
   ============================================ */

.ad-banner {
    background: var(--secondary);
    color: white;
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ad-banner::before {
    content: 'PUBLICIDAD';
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.6rem;
    opacity: 0.5;
    letter-spacing: 1px;
}

.ad-banner h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.ad-banner p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.ad-banner .ad-cta {
    display: inline-block;
    background: white;
    color: var(--secondary);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.ad-banner .ad-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.ad-sidebar {
    background: var(--light-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-muted);
}

.ad-sidebar .ad-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: var(--text-muted);
}

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

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

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background: white;
    color: var(--text);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

input:disabled, select:disabled, textarea:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.6;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 5px;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

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

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,107,53,0.4);
}

.btn-secondary {
    background: var(--border);
    color: var(--text-light);
}

.btn-secondary:hover:not(:disabled) {
    background: #d0d7dd;
}

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

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,196,154,0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
    padding: 8px 16px;
    font-size: 0.85rem;
    width: auto;
}

.btn-warning {
    background: #F5576C;
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    width: auto;
    margin-top: 0;
}

.btn-premium {
    background: var(--warning);
    color: #1a1a2e;
    font-weight: 700;
}

.btn-premium:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(247,151,30,0.4);
}

/* ============================================
   TABS
   ============================================ */

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: var(--light-card);
    padding: 5px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    background: transparent;
    color: var(--text-light);
    white-space: nowrap;
    min-width: 80px;
}

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

.tab:hover:not(.active) {
    background: rgba(255,107,53,0.1);
    color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   ESTADÍSTICAS
   ============================================ */

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--light-card);
    border-radius: var(--radius-sm);
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   VENTAS
   ============================================ */

.sale-item {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
    transition: var(--transition);
}

.sale-item:hover {
    background: #f0f2ff;
    transform: translateX(3px);
}

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

.sale-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

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

.client-list-item {
    background: #f8f9ff;
    border-radius: var(--radius-sm);
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.client-list-item:hover {
    background: #eef0ff;
    transform: translateX(5px);
}

.client-list-info h4 {
    color: var(--text);
    margin-bottom: 4px;
}

.client-list-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.total-badge {
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ============================================
   AUTOCOMPLETADO
   ============================================ */

.autocomplete-container {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    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: 1000;
    display: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.autocomplete-item:hover {
    background: #f8f9ff;
}

.autocomplete-item .client-name {
    font-weight: 600;
}

.autocomplete-item .client-phone {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   MODALES
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

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

.modal-header h3 {
    color: var(--text);
    font-size: 1.2rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    width: auto;
    padding: 0;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

/* Modal de upgrade */
.upgrade-modal .plan-options {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.plan-option {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.plan-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.plan-option.recommended {
    border-color: var(--primary);
    background: #FFF8F5;
}

.plan-option.recommended::before {
    content: 'RECOMENDADO';
    position: absolute;
    top: -10px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
}

.plan-option h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.plan-option .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.plan-option .price span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.plan-features {
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-light);
}

.plan-features li {
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
}

/* ============================================
   NOTIFICACIONES
   ============================================ */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent);
    color: white;
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    font-weight: 600;
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: var(--danger);
}

.notification.warning {
    background: var(--warning);
}

/* ============================================
   BOTÓN FLOTANTE
   ============================================ */

.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,107,53,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: var(--transition);
}

.floating-btn:hover {
    transform: scale(1.1) rotate(90deg);
}

/* ============================================
   CONFIGURACIÓN INICIAL / LOGIN
   ============================================ */

.setup-section {
    background: #FFF8E1;
    border: 2px solid var(--warning);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
}

.setup-section h3 {
    color: #856404;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setup-section p {
    color: #856404;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.licence-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.licence-input input {
    flex: 1;
    text-align: center;
    letter-spacing: 4px;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
}

.licence-status {
    padding: 10px;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: none;
}

.licence-status.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.licence-status.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

/* ============================================
   EMPTY STATES
   ============================================ */

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

.empty-state svg {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* ============================================
   VARIANTES DE PRODUCTO
   ============================================ */

.variant-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.variant-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid #bbdefb;
    transition: var(--transition);
}

.variant-tag:hover {
    background: #1976d2;
    color: white;
}

.variant-tag.active {
    background: #1976d2;
    color: white;
}

/* ============================================
   CHECKBOXES
   ============================================ */

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: auto;
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.checkbox-wrapper label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* ============================================
   EXPORTACIONES
   ============================================ */

.export-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

/* ============================================
   DARK MODE
   ============================================ */

.dark-mode {
    background: var(--dark);
    color: #eee;
}

.dark-mode .card,
.dark-mode .stat-card,
.dark-mode .client-list-item {
    background: var(--dark-card);
    color: #eee;
}

.dark-mode input,
.dark-mode select,
.dark-mode textarea {
    background: var(--dark-input);
    border-color: var(--dark);
    color: #eee;
}

.dark-mode .sale-item {
    background: var(--dark-input);
}

.dark-mode .autocomplete-list {
    background: var(--dark-card);
    border-color: var(--primary);
}

.dark-mode .autocomplete-item:hover {
    background: var(--dark-input);
}

.dark-mode .tabs {
    background: var(--dark-card);
}

.dark-mode .client-list-info h4 {
    color: #eee;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 100;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(20deg);
}

/* ============================================
   LIVE INDICATOR
   ============================================ */

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================
   SESSION INFO
   ============================================ */

.session-info {
    background: #e8f5e9;
    border-radius: var(--radius-sm);
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #c8e6c9;
}

.session-info h3 {
    color: #2e7d32;
    margin-bottom: 5px;
    font-size: 1rem;
}

.session-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.session-code {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    color: var(--secondary);
    letter-spacing: 8px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    background: rgba(0,78,137,0.1);
    padding: 10px;
    border-radius: var(--radius-sm);
}

/* ============================================
   BANNER DESCONECTADO
   ============================================ */

.disconnected-banner {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
    display: none;
    border: 1px solid #ef9a9a;
}

.disconnected-banner.show {
    display: block;
}

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

@media (max-width: 600px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .sale-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .export-options {
        grid-template-columns: 1fr;
    }

    .tabs {
        gap: 5px;
    }

    .tab {
        font-size: 0.8rem;
        padding: 8px;
        min-width: 70px;
    }

    .logo-container {
        flex-direction: column;
        gap: 10px;
    }

    .brand-text {
        text-align: center;
    }

    .plan-options {
        grid-template-columns: 1fr !important;
    }
}

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

.hidden {
    display: none !important;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }






/* ============================================
   CLIENT TAG SELECTOR
   ============================================ */

.client-tag-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-option {
    flex: 1;
    min-width: 100px;
    cursor: pointer;
    position: relative;
}

.tag-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tag-option span {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid transparent;
    transition: var(--transition);
}

.tag-option.green span {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}

.tag-option.orange span {
    background: #fff3e0;
    color: #ef6c00;
    border-color: #ffcc80;
}

.tag-option.red span {
    background: #ffebee;
    color: #c62828;
    border-color: #ef9a9a;
}

.tag-option input[type="radio"]:checked + span {
    box-shadow: 0 0 0 3px;
    transform: scale(1.02);
}

.tag-option.green input[type="radio"]:checked + span {
    background: #2e7d32;
    color: white;
    box-shadow: 0 0 0 3px rgba(46,125,50,0.3);
}

.tag-option.orange input[type="radio"]:checked + span {
    background: #ef6c00;
    color: white;
    box-shadow: 0 0 0 3px rgba(239,108,0,0.3);
}

.tag-option.red input[type="radio"]:checked + span {
    background: #c62828;
    color: white;
    box-shadow: 0 0 0 3px rgba(198,40,40,0.3);
}

/* Tag badges in client list */
.client-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
}

.client-tag-badge.green {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.client-tag-badge.orange {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc80;
}

.client-tag-badge.red {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ============================================
   CLIENT LIMIT BANNER
   ============================================ */

.client-limit-banner {
    background: #FFF3E0;
    border: 2px solid var(--warning);
    border-radius: var(--radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.client-limit-banner.full {
    background: #FFEBEE;
    border-color: var(--danger);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.client-limit-banner span {
    font-weight: 700;
    color: #856404;
    font-size: 0.9rem;
}

.client-limit-bar {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.client-limit-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.client-limit-fill.warning {
    background: var(--warning);
}

.client-limit-fill.danger {
    background: var(--danger);
}

.limit-reached-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid #ef9a9a;
}

/* ============================================
   HELP / FAQ STYLES
   ============================================ */

.help-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.help-section h3 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-guide {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: #f8f9ff;
    padding: 15px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
}

.guide-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.guide-text {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.5;
}

.guide-text kbd {
    background: var(--dark);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: monospace;
}

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

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    width: 100%;
    background: white;
    border: none;
    padding: 15px;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: #f8f9ff;
}

.faq-icon {
    transition: transform 0.3s ease;
    color: var(--primary);
    font-size: 0.8rem;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #fafafa;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 15px 15px;
}

.faq-answer p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.contact-info {
    background: #f8f9ff;
    padding: 15px;
    border-radius: var(--radius-sm);
}

.contact-info p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.contact-info a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    text-decoration: underline;
}

.kofi-section {
    background: #FFF3E0;
    border-radius: var(--radius);
    padding: 20px;
    border: 2px dashed var(--warning);
    text-align: center;
}

.kofi-section p {
    font-size: 0.95rem;
    color: #856404;
    margin-bottom: 15px;
}

.kofi-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #FF5E5B;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255,94,91,0.3);
}

.kofi-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,94,91,0.4);
}

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

/* ============================================
   FOOTER
   ============================================ */

.livendi-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 30px 20px;
    margin-top: 40px;
    border-radius: 20px 20px 0 0;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copy {
    font-size: 0.8rem;
    opacity: 0.6;
}

.dark-mode .livendi-footer {
    background: #0a0a1a;
}

/* ============================================
   HELP FLOATING BUTTON
   ============================================ */

.help-floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    border: none;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,78,137,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: var(--transition);
}

.help-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,78,137,0.5);
}

/* ============================================
   EXPORT NOTICE
   ============================================ */

.export-notice {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: var(--radius-sm);
    padding: 12px 15px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #1565c0;
}

.export-notice strong {
    color: #0d47a1;
}

/* ============================================
   DARK MODE ADDITIONS
   ============================================ */

.dark-mode .client-limit-banner {
    background: #3E2723;
    border-color: var(--warning);
}

.dark-mode .client-limit-banner span {
    color: #ffe0b2;
}

.dark-mode .guide-step {
    background: var(--dark-input);
}

.dark-mode .faq-item {
    border-color: var(--dark-input);
}

.dark-mode .faq-question {
    background: var(--dark-card);
    color: #eee;
}

.dark-mode .faq-question:hover {
    background: var(--dark-input);
}

.dark-mode .faq-answer {
    background: var(--dark-input);
}

.dark-mode .faq-answer p {
    color: #bbb;
}

.dark-mode .contact-info {
    background: var(--dark-input);
}

.dark-mode .kofi-section {
    background: #3E2723;
    border-color: var(--warning);
}

.dark-mode .kofi-section p {
    color: #ffe0b2;
}

.dark-mode .export-notice {
    background: #1a237e;
    border-color: #3949ab;
    color: #90caf9;
}

.dark-mode .export-notice strong {
    color: #bbdefb;
}

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

@media (max-width: 600px) {
    .client-tag-selector {
        flex-direction: column;
    }

    .tag-option {
        min-width: auto;
    }

    .guide-step {
        flex-direction: column;
        gap: 10px;
    }

    .footer-links {
        gap: 15px;
    }

    .help-floating-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}


/* ============================================
   MOBILE INPUT IMPROVEMENTS
   Aumenta altura, tama\u00f1o de texto y espaciado
   en pantallas peque\u00f1as para mejor legibilidad
   ============================================ */

@media (max-width: 600px) {
    /* Inputs m\u00e1s altos y texto m\u00e1s grande */
    input, select, textarea {
        padding: 14px 16px;
        font-size: 1.05rem;
        min-height: 48px;
    }

    /* Placeholder m\u00e1s visible */
    input::placeholder, textarea::placeholder {
        font-size: 0.95rem;
        opacity: 0.7;
    }

    /* Grid de producto/precio/cantidad en columna para m\u00e1s espacio */
    .card > div[style*="grid-template-columns: 2fr 1fr 1fr auto"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .card > div[style*="grid-template-columns: 2fr 1fr 1fr auto"] .form-group {
        margin-bottom: 0;
    }

    .card > div[style*="grid-template-columns: 2fr 1fr 1fr auto"] .btn {
        margin-top: 5px !important;
        margin-bottom: 0 !important;
        min-height: 48px;
    }

    /* Etiquetas m\u00e1s grandes */
    label {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    /* Autocomplete items m\u00e1s altos */
    .autocomplete-item {
        padding: 14px 15px;
        font-size: 1rem;
    }

    /* Selector de etiquetas en columna */
    .client-tag-selector {
        flex-direction: column;
    }

    .tag-option span {
        padding: 14px 12px;
        font-size: 0.95rem;
    }

    /* Tabs m\u00e1s altos y texto m\u00e1s grande */
    .tab {
        padding: 12px 8px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    /* Cards con m\u00e1s padding */
    .card {
        padding: 18px 15px;
    }

    /* Sale items m\u00e1s espaciados */
    .sale-item {
        padding: 18px 15px;
        gap: 12px;
    }

    .sale-info h4 {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .sale-info p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Client list items m\u00e1s altos */
    .client-list-item {
        padding: 18px 15px;
    }

    .client-list-info h4 {
        font-size: 1rem;
    }

    .client-list-info p {
        font-size: 0.9rem;
    }

    /* Botones m\u00e1s altos */
    .btn {
        min-height: 48px;
        font-size: 1rem;
        padding: 14px 24px;
    }

    .btn-small {
        min-height: 40px;
        padding: 10px 16px;
    }

    /* Modal content m\u00e1s espacio */
    .modal-content {
        padding: 20px 15px;
    }

    /* Licencia input m\u00e1s grande */
    .licence-input input {
        font-size: 1.1rem;
        padding: 14px;
        min-height: 48px;
    }

    /* Session code m\u00e1s grande */
    .session-code {
        font-size: 1.5rem;
        padding: 12px;
    }

    /* Stats cards m\u00e1s altos */
    .stat-card {
        padding: 18px 12px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    /* Checkbox wrapper m\u00e1s espacio */
    .checkbox-wrapper {
        margin: 15px 0;
    }

    .checkbox-wrapper input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    /* Export options botones m\u00e1s altos */
    .export-options .btn {
        min-height: 48px;
        font-size: 0.95rem;
    }

    /* Guide steps m\u00e1s espaciados */
    .guide-step {
        padding: 18px 15px;
    }

    .guide-text {
        font-size: 0.95rem;
    }

    /* FAQ questions m\u00e1s altos */
    .faq-question {
        padding: 18px 15px;
        font-size: 0.95rem;
    }

    /* Contact info m\u00e1s espaciado */
    .contact-info p {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    /* Ko-fi button m\u00e1s grande */
    .kofi-button {
        padding: 14px 28px;
        font-size: 1.05rem;
    }

    /* Footer links m\u00e1s espaciados */
    .footer-links {
        gap: 20px;
    }

    .footer-links a {
        font-size: 0.95rem;
    }

    /* Floating buttons m\u00e1s grandes para touch */
    .floating-btn {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
    }

    .help-floating-btn {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }

    /* Theme toggle m\u00e1s grande */
    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    /* Limit banner m\u00e1s espaciado */
    .client-limit-banner {
        padding: 18px 15px;
    }

    /* Ad banner m\u00e1s espaciado */
    .ad-banner {
        padding: 20px 15px;
    }

    .ad-banner h3 {
        font-size: 1.05rem;
    }

    .ad-banner p {
        font-size: 0.95rem;
    }

    /* Setup section m\u00e1s espaciado */
    .setup-section {
        padding: 22px 15px;
    }

    .setup-section h3 {
        font-size: 1.1rem;
    }

    .setup-section p {
        font-size: 0.95rem;
    }
}

/* Extra: inputs siempre con texto legible (evita zoom en iOS) */
input, select, textarea {
    font-size: 16px; /* Previene zoom en iOS Safari */
}

@media (max-width: 600px) {
    input, select, textarea {
        font-size: 16px; /* Mantiene 16px en mobile para evitar zoom iOS */
    }
}

/* ============================================
   SEMÁFORO CLIENTE - INDICADOR EN AUTOCOMPLETADO
   ============================================ */

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.autocomplete-item:hover {
    background: #f8f9ff;
}

.autocomplete-item .client-name {
    font-weight: 600;
}

.autocomplete-item .client-phone {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Indicador semáforo en autocomplete */
.semaforo-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 8px;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.semaforo-indicator.verde {
    background: #2e7d32;
}

.semaforo-indicator.naranja {
    background: #ef6c00;
}

.semaforo-indicator.rojo {
    background: #c62828;
}

/* Info del cliente en autocomplete con semáforo */
.autocomplete-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* ============================================
   SEMÁFORO EN DETALLE DE CLIENTE (modal)
   ============================================ */

.semaforo-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 8px;
}

.semaforo-display.verde {
    background: #e8f5e9;
    color: #2e7d32;
}

.semaforo-display.naranja {
    background: #fff3e0;
    color: #ef6c00;
}

.semaforo-display.rojo {
    background: #ffebee;
    color: #c62828;
}

/* Selector de semáforo en edición de cliente */
.semaforo-selector {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.semaforo-option {
    flex: 1;
    cursor: pointer;
    position: relative;
}

.semaforo-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.semaforo-option .semaforo-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    transition: var(--transition);
    background: #f5f5f5;
}

.semaforo-option .semaforo-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.semaforo-option.verde .semaforo-dot {
    background: #2e7d32;
}

.semaforo-option.naranja .semaforo-dot {
    background: #ef6c00;
}

.semaforo-option.rojo .semaforo-dot {
    background: #c62828;
}

.semaforo-option .semaforo-label-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
}

.semaforo-option input[type="radio"]:checked + .semaforo-circle {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: scale(1.05);
}

/* ============================================
   MOBILE: Producto/Precio/Cantidad/Botón en una fila
   ============================================ */

@media (max-width: 600px) {
    /* Grid de venta: producto arriba, precio+cantidad+boton abajo */
    .sale-input-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sale-input-grid .product-col {
        grid-column: 1 / -1;
    }

    .sale-input-grid .product-col label,
    .sale-input-grid .price-col label,
    .sale-input-grid .qty-col label {
        display: block;
        margin-bottom: 6px;
    }

    /* En mobile: precio, cantidad y botón en una fila */
    .sale-input-grid {
        grid-template-columns: 1fr 1fr auto;
        gap: 10px;
        align-items: start;
    }

    .sale-input-grid .product-col {
        grid-column: 1 / -1;
    }

    .sale-input-grid .price-col,
    .sale-input-grid .qty-col {
        margin-bottom: 0;
    }

    .sale-input-grid .price-col label,
    .sale-input-grid .qty-col label {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .sale-input-grid .btn-add-col {
        margin: 0;
        min-height: 48px;
        width: 48px;
        padding: 0;
        font-size: 1.3rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 26px;
        line-height: 1;
    }
}

/* Desktop: producto ancho, resto compacto */
@media (min-width: 601px) {
    .sale-input-grid {
        display: grid;
        grid-template-columns: 3fr 100px 80px 50px;
        gap: 10px;
        align-items: end;
    }

    .sale-input-grid .product-col {
        grid-column: auto;
    }

    .sale-input-grid .price-col,
    .sale-input-grid .qty-col,
    .sale-input-grid .btn-add-col {
        display: block;
    }

    .sale-input-grid .form-group {
        margin-bottom: 15px;
    }

    .sale-input-grid .btn-add-col {
        margin-bottom: 15px;
        width: 50px;
        padding: 0;
        min-height: 48px;
    }
}


/* ============================================
   SESSION TOGGLE BUTTON (header)
   ============================================ */

.session-toggle {
    position: fixed;
    top: 20px;
    right: 70px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    z-index: 100;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.session-toggle:hover {
    background: rgba(231,76,60,0.5);
    transform: rotate(180deg);
}

/* ============================================
   SESSION OPTIONS MODAL
   ============================================ */

#sessionOptionsModal .modal-content {
    animation: modalSlide 0.3s ease;
}

#sessionOptionsModal .btn-block {
    width: 100%;
    margin-top: 0;
}

/* ============================================
   SESSION INFO - BOTÓN CERRAR
   ============================================ */

.session-info .btn-small {
    margin-top: 0;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .session-info > div {
        flex-direction: column;
    }

    .session-info .btn-small {
        width: 100%;
        margin-top: 10px;
    }

    .session-toggle {
        right: 65px;
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}


/* ============================================
   BARRA DE ORDENAMIENTO DE VENTAS
   ============================================ */

.sales-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9ff;
    border: 1px solid #e1e8ed;
    border-radius: var(--radius-sm);
    padding: 10px 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.sales-count {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
}

.btn-sort-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-sort-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(255,107,53,0.15);
}

.btn-sort-toggle i {
    color: var(--primary);
}

.btn-sort-toggle strong {
    color: var(--primary);
    font-weight: 700;
}

.sort-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ============================================
   HORA SUTIL EN VENTAS
   ============================================ */

.sale-time {
    display: inline-block;
    font-size: 0.75rem;
    color: #bbb;
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.sale-time::before {
    content: '\f017';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    margin-right: 4px;
    font-size: 0.7rem;
}

.dark-mode .sale-time {
    color: #666;
}

.dark-mode .sales-sort-bar {
    background: var(--dark-input);
    border-color: var(--dark);
}

.dark-mode .btn-sort-toggle {
    background: var(--dark-card);
    border-color: var(--dark-input);
    color: #aaa;
}

.dark-mode .btn-sort-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}


/* ============================================
   AVISO DE SESION ACTIVA (anti-trampa)
   ============================================ */

.licence-session-warning {
    margin-top: 15px;
    animation: slideDown 0.3s ease;
}

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

.session-warning-box {
    background: #FFF3E0;
    border: 2px solid #FF9800;
    border-radius: var(--radius-sm);
    padding: 15px;
    text-align: center;
}

.session-warning-box p {
    margin: 0 0 8px 0;
    color: #E65100;
    font-size: 0.95rem;
}

.session-warning-box code {
    background: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--secondary);
    border: 1px solid #FFCC80;
}

.session-warning-box .btn {
    margin-top: 0;
    font-size: 0.85rem;
    padding: 8px 16px;
}

.dark-mode .session-warning-box {
    background: #3E2723;
    border-color: #FF9800;
}

.dark-mode .session-warning-box p {
    color: #FFE0B2;
}

.dark-mode .session-warning-box code {
    background: var(--dark-card);
    color: var(--primary);
    border-color: #5D4037;
}
