:root { --bg: #f0f2f5; --card-bg: #ffffff; --text: #222f3e; --text-muted: #8395a7; --input-bg: #ffffff; --input-border: #eee; --primary: #FF6B6B; --primary-dark: #EE5253; --secondary: #48DBFB; --personal: #5f27cd; --green: #10ac84; --pending: #feca57; --edit-mode: #ff9f43; --btn-gray: #f1f2f6; --danger: #ff6b6b; --blue-btn: #54a0ff; --glass-bg: rgba(255, 255, 255, 0.90); --nav-bg: #ffffff; --nav-shadow: rgba(0,0,0,0.05); --whatsapp-color: #25D366; --instagram-color: #E1306C; --facebook-color: #1877F2; --other-color: #7f8c8d; --mxn-color: #f39c12; --chart-color: #9b59b6; --quote-color: #00cec9; --logistics-color: #fdcb6e; }
body.dark-mode { --bg: #1e1e1e; --card-bg: #2d2d2d; --text: #ffffff; --text-muted: #b2bec3; --input-bg: #3d3d3d; --input-border: #555; --btn-gray: #444; --nav-bg: #2d2d2d; --nav-shadow: rgba(0,0,0,0.3); }
body.no-scroll { overflow: hidden; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Poppins', sans-serif; background-color: var(--bg); color: var(--text); margin: 0; padding: 0; transition: background-color 0.3s; }
.hidden { display: none !important; }

/* LOGIN & GLOBAL */
.login-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(-45deg, #FF6B6B, #ff9f43, #5f27cd, #48DBFB); background-size: 400% 400%; animation: gradientBG 15s ease infinite; position: relative; overflow-x: hidden; }
.auth-container { width: 100%; max-width: 420px; padding: 20px; z-index: 10; position: relative; }
.auth-content.glass-card { background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.8); padding: 40px 30px; border-radius: 24px; text-align: center; box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
.background-shapes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 1; pointer-events: none; margin:0; padding:0; }
.background-shapes li { position: absolute; display: block; list-style: none; width: 20px; height: 20px; font-size: 2rem; animation: animate 25s linear infinite; bottom: -150px; opacity: 0.3; }
.background-shapes li:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; content: '🛍️'; }
.background-shapes li:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; font-size: 3rem; content: '👠'; }
.background-shapes li:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; font-size: 2.5rem; content: '👜'; }
.background-shapes li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; font-size: 1.5rem; content: '💄'; }
@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes animate { 0% { transform: translateY(0) rotate(0deg); opacity: 0; } 20% { opacity: 0.4; } 100% { transform: translateY(-1000px) rotate(720deg); opacity: 0; } }
.app-logo-container { margin-bottom: 20px; }
.auth-content h1 { margin: 0; color: var(--text); font-size: 1.8rem; font-weight: 700; }
.auth-subtitle { color: var(--text-muted); margin: 5px 0 25px 0; font-size: 0.95rem; }
.btn-main-action { width: 100%; background: var(--primary); color: white; padding: 14px; border-radius: 12px; font-size: 1rem; font-weight: bold; border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3); transition: transform 0.1s; }
.btn-main-action:active { transform: scale(0.98); }
.btn-google { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #ddd; background: white; color: #555; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; transition: 0.2s; margin-top: 15px; }
.btn-google:hover { background: #f9f9f9; border-color: #ccc; }
.btn-google.hidden { display: none; }
.input-group-auth { text-align: left; margin-bottom: 12px; }
.input-group-auth label { display: block; font-size: 0.8rem; color: #666; font-weight: 600; margin-bottom: 4px; }
.auth-input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 10px; font-size: 0.95rem; outline: none; background: rgba(255,255,255,0.8); }
.auth-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1); }
.divider { display: flex; align-items: center; text-align: center; margin: 15px 0; color: #888; font-size: 0.85rem; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #ddd; }
.divider span { padding: 0 10px; }

/* APP GENERAL */
.app-container { max-width: 500px; margin: 0 auto; padding: 20px; min-height: 100vh; padding-bottom: 40px; }
.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.header-top h1 { margin: 0; font-size: 1.4rem; color: var(--primary); }
.icon-btn { background: var(--card-bg); border: 1px solid var(--input-border); font-size: 1.3rem; cursor: pointer; color: var(--text); width: 42px; height: 42px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 3px 6px rgba(0,0,0,0.05); transition: 0.3s; }
.icon-btn:hover { box-shadow: 0 5px 10px rgba(0,0,0,0.1); border-color: var(--primary); color: var(--primary); }
header p { margin: 5px 0 15px 0; color: var(--text-muted); font-size: 0.9rem; text-align: center; }

/* NAV BAR Y MENÚ */
.user-bar { position: sticky; top: 0; left: 0; width: 100%; background-color: var(--nav-bg); padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px var(--nav-shadow); z-index: 1000; }
.user-welcome { font-weight: 600; color: var(--text); font-size: 0.95rem; }
.user-menu-btn { background: none; border: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px; }
.user-avatar-small { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); pointer-events: none;}
.btn-plan-status { padding: 6px 15px; border-radius: 20px; font-weight: bold; font-size: 0.8rem; cursor: pointer; transition: 0.3s; border: none; }
.btn-plan-status.free { background: #ecf0f1; color: #7f8c8d; }
.btn-plan-status.free::after { content: "PLAN GRATIS"; }
.btn-plan-status.free:hover { background: #f39c12; color: white; box-shadow: 0 4px 10px rgba(243,156,18,0.4); }
.btn-plan-status.free:hover::after { content: "MEJORAR A PRO"; }
.btn-plan-status.pro { background: linear-gradient(45deg, #f1c40f, #f39c12); color: white; box-shadow: 0 4px 10px rgba(243, 156, 18, 0.4); animation: pulseCrown 2s infinite; }
.btn-plan-status.pro::after { content: "👑 PRO"; }

.user-dropdown { position: absolute; top: 110%; right: 0; background: var(--card-bg); border: 1px solid var(--input-border); border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); display: flex; flex-direction: column; min-width: 200px; overflow: hidden; z-index: 3000; transform-origin: top right; transition: opacity 0.2s, transform 0.2s; }
.user-dropdown.hidden { opacity: 0; transform: scale(0.95); pointer-events: none; }
.ud-item { background: none; border: none; padding: 15px 20px; text-align: left; font-size: 0.9rem; color: var(--text); cursor: pointer; border-bottom: 1px solid var(--input-border); transition: 0.2s; }
.ud-item:last-child { border-bottom: none; }
.ud-item:hover { background: var(--btn-gray); }
.ud-item.logout { color: var(--danger); font-weight: 600; }
.ud-item.admin { color: var(--primary); font-weight: bold; }

.goal-wrapper { background: var(--card-bg); padding: 15px; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.goal-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
.progress-bar-bg { width: 100%; height: 12px; background-color: var(--input-border); border-radius: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ff9f43, #ff6b6b); border-radius: 10px; transition: width 0.5s ease-out; }
.progress-bar-fill.completed { background: linear-gradient(90deg, #10ac84, #0be881); }

/* TABS NAVEGACIÓN */
.tabs-3d-container { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; grid-template-rows: auto auto !important; gap: 12px 10px !important; margin-bottom: 25px; }
.tab-3d { background: var(--card-bg); border: none; border-radius: 14px; padding: 12px 5px; cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 8px 10px rgba(0,0,0,0.1), inset 0 -4px 0 rgba(0,0,0,0.1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; position: relative; top: 0; width: 100%; }
.tab-3d span { font-weight: 600; font-size: 0.75rem; color: var(--text-muted); text-align: center; line-height: 1.1; word-wrap: break-word; }
.tab-icon { font-size: 1.4rem; transition: transform 0.2s; }
.tab-3d:active { top: 6px; box-shadow: 0 2px 0 rgba(0,0,0,0.05); }
.tab-3d.active { background: white; top: 6px; box-shadow: inset 0 3px 6px rgba(0,0,0,0.05); }
.tab-3d.active .tab-icon { transform: scale(1.1); }
#tab-business.active span { color: var(--primary); }
#tab-clients.active span { color: var(--blue-btn); }
#tab-personal.active span { color: var(--personal); }
#tab-dashboard.active span { color: var(--chart-color); }
#tab-quotes.active span { color: var(--quote-color); }
#tab-logistics.active span { color: var(--logistics-color); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s; }

/* INPUTS Y TARJETAS */
.section-title-usd { color: var(--personal); font-size: 1rem; margin: 25px 0 10px 0; border-bottom: 2px solid var(--personal); padding-bottom: 5px; }
.section-title-mxn { color: var(--mxn-color); font-size: 1rem; margin: 25px 0 10px 0; border-bottom: 2px solid var(--mxn-color); padding-bottom: 5px; }
.card { background: var(--card-bg); padding: 20px; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); margin-bottom: 20px; transition: border 0.3s; }
.row { margin-bottom: 15px; }
.row-flex { display: flex; gap: 10px; margin-bottom: 15px; }
.row-chips { display: flex; gap: 10px; margin-bottom: 15px; }
.input-wrapper { display: flex; flex-direction: column; }
.input-wrapper.small { width: 70px; }
.input-wrapper.large { flex: 1; }
.input-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 5px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 14px; border: 1px solid var(--input-border); border-radius: 12px; font-size: 1rem; outline: none; background-color: var(--input-bg); color: var(--text); transition: 0.2s; font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1); }
.center-text { text-align: center; }

button { border: none; border-radius: 12px; cursor: pointer; transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background-color 0.2s; user-select: none; }
button:active { transform: scale(0.95) translateY(2px) !important; box-shadow: none !important; opacity: 0.9; }
.chip-btn { flex: 1; padding: 12px 15px; background: var(--card-bg); border: 1px solid transparent; border-radius: 20px; color: var(--text); font-weight: 600; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }

/* CATEGORY BADGE Y SELECTOR */
.category-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: bold; color: white; background: #8e44ad; }
.category-badge.none { background: linear-gradient(135deg, #bdc3c7, #95a5a6); color: white; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-bottom: 15px; max-height:300px; overflow-y:auto; padding:5px;}
.cat-item { background: var(--btn-gray); border: 2px solid transparent; padding: 10px; border-radius: 12px; text-align: center; cursor: pointer; transition: 0.2s; display:flex; flex-direction:column; align-items:center; gap:5px; }
.cat-item.selected { border-color: var(--primary); background: var(--card-bg); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.cat-icon { font-size: 1.8rem; }
.cat-name { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100%;}
.cat-color-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 2px; }

.client-selector-card { display: flex; align-items: center; gap: 12px; background: var(--btn-gray); padding: 12px 15px; border-radius: 16px; margin-bottom: 20px; cursor: pointer; border: 1px solid transparent; transition: 0.2s; box-shadow: inset 0 2px 4px rgba(0,0,0,0.03); }
.client-selector-card:hover { border-color: var(--input-border); background: var(--input-bg); }
.csc-icon { width: 40px; height: 40px; background: var(--blue-btn); color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; box-shadow: 0 3px 6px rgba(0,0,0,0.1); }
.csc-text { flex: 1; display: flex; flex-direction: column; }
.csc-text label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.csc-text span { font-size: 1rem; color: var(--text); font-weight: 500; }

.btn-main-gradient { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; border-radius: 16px; font-size: 1.1rem; font-weight: bold; cursor: pointer; box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3), 0 4px 0 #c23616; margin-bottom: 5px; }
.btn-main-gradient:active { transform: translateY(4px) !important; box-shadow: 0 2px 0 #c23616 !important; }
.btn-main { background: var(--primary); color: white; padding: 15px; font-size: 1rem; font-weight: bold; width: 100%; border:none; border-radius: 14px; }
.btn-secondary { background: var(--personal); color: white; padding: 15px; font-weight: bold; width: 100%; border:none; border-radius: 14px; }
.btn-cancel { background: #e0e0e0; color: #555; padding: 12px; width: 100%; border:none; border-radius: 14px; font-weight: 600; cursor: pointer; margin-top: 10px;}
.btn-danger { background: var(--danger); color: white; padding: 12px; font-size: 0.9rem; margin-top: 10px; width: 100%; border:none; border-radius: 14px; }
.btn-whatsapp { background: #25D366; color: white; padding: 12px; width: 100%; margin-bottom: 10px; font-weight: 600; border:none; border-radius: 14px; }
.btn-download-dark { background: #2e86de; color: white; padding: 12px; width: 100%; margin-bottom: 10px; font-weight: 600; border:none; border-radius: 12px;}

.clients-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; flex-wrap: nowrap; width: 100%; }
.clients-header .search-bar-container { flex: 1; margin-bottom: 0; }
.btn-add-client-floating { flex-shrink: 0; width: 50px; height: 50px; border-radius: 50%; background: var(--blue-btn); color: white; font-size: 1.5rem; border: none; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2); display: flex; justify-content: center; align-items: center; }

.clients-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
.client-card { background: var(--card-bg); padding: 15px; border-radius: 16px; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border: 1px solid var(--input-border); cursor: pointer; transition: transform 0.2s; position: relative; }
.cc-avatar { font-size: 2rem; margin-bottom: 5px; }
.cc-name { font-weight: 600; font-size: 0.9rem; color: var(--text); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stats-container { display: flex; gap: 15px; margin-bottom: 20px; }
.stat-box { flex: 1; background: var(--card-bg); padding: 15px; border-radius: 12px; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.stat-box small { display: block; color: var(--text-muted); font-size: 0.8rem; }
.stat-box span { display: block; font-size: 1.2rem; font-weight: bold; color: var(--text); }
.stat-box.profit span { color: var(--green); }

.history-list { max-height: 400px; overflow-y: auto; margin-bottom: 20px; }
.history-item { background: var(--card-bg); padding: 15px; border-radius: 12px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; border-left: 5px solid #ddd; }
.item-details h4 { margin: 0; font-size: 0.95rem; color: var(--text); }
.item-details p { margin: 2px 0 0; font-size: 0.8rem; color: var(--text-muted); }

.search-bar-container { position: relative; margin-bottom: 15px; }
.search-bar-container input { padding-left: 40px; border-radius: 25px; }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); opacity: 0.5; }
.text-center { text-align: center; }
.mini-search { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--input-border); margin-bottom: 15px; background: var(--input-bg); color: var(--text); }

/* ESTILOS PARA MODALES */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 9999; display: flex; justify-content: center; align-items: center; }
.modal-content { background: var(--card-bg); padding: 25px; border-radius: 20px; width: 90%; max-width: 420px; max-height: 85vh; overflow-y: auto; color: var(--text); position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.3); text-align: center; }
.modal-content h3 { margin-top: 0; color: var(--text); }
.modal-content p { color: #555; margin-bottom: 20px; }
.modal-content.large-unified { max-width: 700px; display:flex; flex-direction: column; padding:0; overflow:hidden; text-align:left;}

.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); color: white; padding: 10px 20px; border-radius: 20px; font-size: 0.9rem; z-index: 9999; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.contact-list-container { max-height: 300px; overflow-y: auto; margin-bottom: 15px; display: flex; flex-direction: column; gap: 10px; padding: 5px; }
.contact-row { display: flex !important; flex-flow: row nowrap !important; align-items: center !important; justify-content: flex-start !important; gap: 15px !important; padding: 12px 15px !important; background: var(--card-bg) !important; border: 1px solid var(--input-border) !important; border-radius: 12px !important; cursor: pointer; transition: 0.2s; text-align: left !important; width: auto !important; margin: 0 !important; }
.contact-row:hover { background: var(--btn-gray) !important; }
.contact-icon { flex-shrink: 0 !important; width: 40px !important; height: 40px !important; border-radius: 50% !important; background: var(--blue-btn) !important; color: white !important; display: flex !important; justify-content: center !important; align-items: center !important; font-size: 1.2rem !important; margin: 0 !important; }
.contact-info { flex: 1 !important; display: flex !important; flex-direction: column !important; justify-content: center !important; margin: 0 !important; overflow: hidden !important; }
.contact-name { display: block !important; font-weight: 600 !important; color: var(--text) !important; font-size: 1rem !important; margin: 0 !important; padding: 0 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }

/* DASHBOARD */
.dash-header { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.date-filters { display: flex; flex-direction: column; gap: 10px; background: var(--card-bg); padding: 15px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.date-filters select, .date-filters input { padding: 10px; border-radius: 8px; border: 1px solid var(--input-border); outline: none; background: var(--input-bg); color: var(--text); }
#customDateRange { display: flex; gap: 5px; align-items: center; }
#customDateRange input { flex: 1; }

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.kpi-card { background: var(--card-bg); padding: 15px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--input-border); }
.kpi-card.highlight { background: linear-gradient(135deg, var(--blue-btn), #0984e3); color: white; border: none; box-shadow: 0 6px 15px rgba(9, 132, 227, 0.3); }
.kpi-card.highlight .kpi-title, .kpi-card.highlight .kpi-value { color: white !important; }
.kpi-title { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-bottom: 5px; }
.kpi-value { font-size: 1.2rem; font-weight: bold; color: var(--text); }

.chart-container { width: 100%; box-sizing: border-box; background: var(--card-bg); padding: 15px; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 20px; }
.chart-title { font-size: 1rem; color: var(--text); font-weight: bold; margin-bottom: 15px; text-align: center; }
.canvas-wrapper { position: relative; height: 250px; width: 100%; max-width: 100%; }

.cat-summary-table { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 0.8rem; }
.cat-summary-table th { text-align: left; padding: 8px; border-bottom: 2px solid var(--input-border); color: var(--text-muted); }
.cat-summary-table td { padding: 8px; border-bottom: 1px solid var(--input-border); color: var(--text); }
.cat-summary-table tr:last-child td { border-bottom: none; }

.leaderboard-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.lb-item { display: flex; align-items: center; background: var(--btn-gray); padding: 12px 15px; border-radius: 12px; cursor:pointer; transition: 0.2s;}
.lb-item:hover { transform: scale(1.02); }
.lb-rank { font-size: 1.5rem; font-weight: bold; width: 40px; text-align: center; }
.lb-details { flex: 1; overflow: hidden; }
.lb-name { font-weight: 600; color: var(--text); font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-profit { font-weight: bold; color: var(--green); font-size: 1rem; margin-left: 10px; }

/* EXTRAS */
.star-btn { font-size: 1.4rem; color: #ccc; z-index: 20; position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,0.9); border-radius: 50%; width: 32px; height: 32px; display: flex; justify-content: center; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); border: 1px solid #eee; transition: 0.2s; padding:0; cursor: pointer; }
.star-btn.active { color: #f1c40f; border-color: #f1c40f; background: #fffdf0; box-shadow: 0 0 8px rgba(241, 196, 15, 0.4); }
.modern-toggle-btn { display: flex; align-items: center; gap: 8px; background: #fff3cd; color: #d35400; padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; cursor: pointer; border: 1px solid #ffeaa7; transition: 0.3s; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.modern-toggle-btn.paid { background: #d1fae5; color: #059669; border-color: #a7f3d0; }
.toggle-dot { width: 10px; height: 10px; border-radius: 50%; background: #e67e22; transition: 0.3s; }
.modern-toggle-btn.paid .toggle-dot { background: #10ac84; }
.clickable-camera { cursor: pointer; color: var(--primary); font-size: 1.2rem; margin-right: 5px; transition: transform 0.2s; display: inline-block; }
.currency-tabs { display: flex; background: var(--btn-gray); border-radius: 12px; padding: 5px; margin-bottom: 15px; }
.c-tab { flex: 1; text-align: center; padding: 10px; font-weight: bold; color: var(--text-muted); cursor: pointer; border-radius: 10px; transition: 0.2s; }
.c-tab.active { background: var(--card-bg); color: var(--primary); font-weight: 800; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.action-btn-small { background: var(--card-bg); border: 1px solid var(--input-border); border-radius: 8px; width: 35px; height: 35px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.2s; }
.action-btn-small:hover { background: var(--btn-gray); }

/* MENÚ UNIFICADO DE CONFIGURACIÓN */
.unified-layout { display: flex; flex-direction: row; height: 75vh; background: var(--bg); }
.unified-nav { display: flex; flex-direction: column; width: 120px; min-width: 120px; background: var(--card-bg); border-right: 1px solid var(--input-border); overflow-y: auto; padding: 10px 5px; gap: 5px; }
.un-tab { padding: 12px 10px; border-radius: 10px; font-size: 0.75rem; font-weight: bold; color: var(--text-muted); cursor: pointer; white-space: normal; text-align: left; transition: 0.2s; border: 1px solid transparent; display: flex; align-items: center; gap: 5px; }
.un-tab.active { background: var(--btn-gray); color: var(--primary); border-color: var(--input-border); }
.unified-content { flex: 1; overflow-y: auto; padding: 20px; background: var(--bg); }
.unified-section { display: none; animation: fadeIn 0.2s; }
.unified-section.active { display: block; }
@media (min-width: 600px) { .unified-nav { width: 180px; min-width: 180px; padding: 15px 10px; gap: 8px; } .un-tab { font-size: 0.9rem; padding: 12px 15px; } }

.csv-preview-container { background: var(--card-bg); border: 1px solid var(--input-border); border-radius: 10px; overflow: hidden; margin-top: 15px; }
.csv-preview-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; text-align: left; }
.csv-preview-table th, .csv-preview-table td { padding: 8px; border-bottom: 1px solid var(--input-border); }
.csv-preview-table th { background: var(--btn-gray); font-weight: bold; color: var(--text-muted); }
.csv-progress-bar { width: 100%; height: 8px; background: var(--btn-gray); border-radius: 10px; overflow: hidden; margin-top: 10px; }
.csv-progress-fill { height: 100%; width: 0%; background: var(--success); transition: width 0.3s; }

/* PIE DE PÁGINA (FOOTER) */
.app-footer { text-align: center; margin-top: 40px; padding-top: 20px; border-bottom: 1px solid var(--input-border); color: var(--text-muted); font-size: 0.8rem; }
.app-footer p { margin-bottom: 5px; }
.footer-links { display: flex; justify-content: center; gap: 10px; margin-top: 5px; }
.footer-links a { color: var(--primary); text-decoration: none; font-weight: 600; cursor: pointer; transition: 0.2s; }
.footer-links a:hover { text-decoration: underline; color: var(--primary-dark); }
.legal-box { background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 10px; padding: 15px; font-size: 0.85rem; color: var(--text); text-align: left; margin-bottom: 15px; }
.legal-box h4 { margin-top: 15px; margin-bottom: 5px; color: var(--text); font-size: 0.95rem; font-weight:bold; }
.legal-box h4:first-child { margin-top: 0; }
.legal-box p { margin-bottom: 10px; color: #555; line-height: 1.5; }

/* LOGÍSTICA */
.wizard-step { display: none; animation: fadeIn 0.3s; }
.wizard-step.active { display: block; }
.wizard-header { display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 2px solid var(--input-border); padding-bottom: 10px; }
.wizard-step-indicator { flex: 1; text-align: center; font-size: 0.8rem; font-weight: bold; color: #ccc; }
.wizard-step-indicator.active { color: var(--logistics-color); }
.product-check-list { max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin-bottom: 15px; padding: 5px;}
.product-check-item { display: flex; align-items: center; gap: 15px; background: var(--btn-gray); padding: 12px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; transition: 0.2s; }
.product-check-item:hover { border-color: var(--logistics-color); }
.product-check-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--logistics-color); pointer-events: none;}
.pci-details { flex: 1; }
.pci-name { font-weight: bold; font-size: 0.95rem; color: var(--text); }
.pci-price { font-size: 0.8rem; color: var(--text-muted); }
.status-badge { padding: 4px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: bold; color: white; display: inline-block; }
.status-pending { background: #feca57; }
.status-transit { background: #54a0ff; }
.status-delivered { background: #10ac84; }
.status-problem { background: #ff6b6b; }

/* 🔥 NUEVO: SISTEMA DE GAMIFICACIÓN E INSIGNIAS 🔥 */
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; margin-top: 15px; }
.badge-item { background: var(--btn-gray); padding: 15px; border-radius: 16px; text-align: center; position: relative; transition: transform 0.2s; }
.badge-item.locked { filter: grayscale(100%); opacity: 0.5; }
.badge-item:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.badge-icon { font-size: 3rem; margin-bottom: 10px; filter: drop-shadow(0 4px 4px rgba(0,0,0,0.1)); }
.badge-title { font-weight: bold; font-size: 0.85rem; color: var(--text); margin-bottom: 5px; line-height: 1.1; }
.badge-desc { font-size: 0.7rem; color: var(--text-muted); }

/* Animación de Celebración Pop-up */
.celebration-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 10000; display: flex; justify-content: center; align-items: center; flex-direction: column; animation: fadeIn 0.3s ease-out; }
.celebration-card { background: linear-gradient(135deg, #f1c40f, #f39c12); padding: 40px 20px; border-radius: 24px; text-align: center; width: 90%; max-width: 350px; box-shadow: 0 20px 50px rgba(243, 156, 18, 0.4); animation: popBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; border: 4px solid #fffdf0; }
.celeb-icon { font-size: 5rem; margin-bottom: 15px; filter: drop-shadow(0 10px 10px rgba(0,0,0,0.2)); animation: pulseCrown 2s infinite; }
.celeb-title { color: white; font-size: 1.5rem; font-weight: 900; margin: 0 0 10px 0; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.celeb-desc { color: #fffdf0; font-size: 0.95rem; margin-bottom: 25px; font-weight: 600; }
.btn-celeb { background: white; color: #d35400; border: none; padding: 12px 30px; border-radius: 12px; font-weight: bold; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: 0.2s; }
.btn-celeb:active { transform: scale(0.95); }

@keyframes popBounce { 0% { transform: scale(0.5); opacity: 0; } 70% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); } }