/* 02-base.css
   Extracted from the approved La Laguna commercial demo. Keep order in index.html. */

:root{--bg:#f7f6f2;--card:#ffffff;--text:#111827;--muted:#6b7280;--line:#e8e5dc;--accent:#c8a96a;--side:#09090b}
    .dark{--bg:#111113;--card:#18181b;--text:#f4f4f5;--muted:#a1a1aa;--line:#2a2a2e;--accent:#d8bc80;--side:#050505}
    body{background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow-x:hidden}.shadow-premium{box-shadow:0 18px 50px rgba(15,23,42,.08)}
    .glass{background:rgba(255,255,255,.82);backdrop-filter:blur(16px)}
    .dark .glass{background:rgba(24,24,27,.82)}
    .card{background:var(--card);border:1px solid var(--line);box-shadow:0 16px 45px rgba(15,23,42,.05)}
    .thin-scroll::-webkit-scrollbar{width:7px;height:7px}.thin-scroll::-webkit-scrollbar-thumb{background:#c7c2b7;border-radius:999px}.thin-scroll::-webkit-scrollbar-track{background:transparent}
    .map-grid{background-image:linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px);background-size:36px 36px;background-color:var(--card)}
    .phone{width:310px;max-width:100%;border:10px solid #111;border-radius:34px;background:#111;padding:8px;box-shadow:0 25px 70px rgba(0,0,0,.22)}
    .phone-screen{border-radius:24px;overflow:hidden;background:#f8fafc;min-height:620px}
    .toast{animation:toastIn .25s ease-out}@keyframes toastIn{from{transform:translateY(10px);opacity:0}to{transform:translateY(0);opacity:1}}
    .kanban{min-width:260px}.hide{display:none!important}

    .phone-pro{width:340px;max-width:100%;border:10px solid #0b0b0c;border-radius:38px;background:#0b0b0c;padding:8px;box-shadow:0 30px 90px rgba(0,0,0,.28)}
    .phone-pro-screen{border-radius:28px;overflow:hidden;background:#f8fafc;min-height:690px;position:relative}
    .mobile-dot{height:8px;width:8px;border-radius:999px;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.12)}
    .soft-grid{background-image:radial-gradient(circle at 1px 1px,rgba(200,169,106,.24) 1px,transparent 0);background-size:22px 22px}
    .route-line{height:2px;background:linear-gradient(90deg,#0b0b0c,#c8a96a,#0b0b0c);opacity:.72}


    /* Fase capacitación interactiva: no cambia el diseño base, solo agrega guía/semáforos */
    .guided-training{position:fixed;right:22px;top:92px;width:min(470px,calc(100vw - 32px));max-height:calc(100vh - 124px);z-index:55;transform:translateX(120%);transition:transform .25s ease;overflow:hidden}
    .guided-training.open{transform:translateX(0)}
    .guide-progress{height:7px;border-radius:999px;background:var(--line);overflow:hidden}.guide-progress>span{display:block;height:100%;background:linear-gradient(90deg,#0B0B0C,#C8A96A)}
    .training-highlight{outline:3px solid #C8A96A!important;outline-offset:4px!important;box-shadow:0 0 0 8px rgba(200,169,106,.18)!important;border-radius:18px!important;position:relative;z-index:2}
    .seller-ribbon{background:linear-gradient(135deg,#0B0B0C,#2b2418);color:white;border:1px solid rgba(200,169,106,.45)}
    .new-user-ribbon{background:#FFF8E6;color:#72551B;border:1px solid #E7D19A}
    .guide-chip{border:1px solid var(--line);background:var(--card);border-radius:999px;padding:.45rem .75rem;font-size:.78rem;font-weight:700;display:inline-flex;gap:.35rem;align-items:center}
    .semaforo-pill{display:inline-flex;align-items:center;gap:.42rem;border-radius:999px;border:1px solid;padding:.32rem .68rem;font-size:.72rem;font-weight:800;white-space:nowrap}.semaforo-dot{width:.55rem;height:.55rem;border-radius:999px;display:inline-block}.semaforo-low{background:#ECFDF5;color:#166534;border-color:#BBF7D0}.semaforo-mid{background:#FEF3C7;color:#92400E;border-color:#FCD34D}.semaforo-high{background:#0B0B0C;color:white;border-color:#0B0B0C}.client-clean .seller-only{display:none!important}
    .guide-impact{border:1px solid #E7D19A;background:#FFF8E6;color:#72551B}.guide-soft{border:1px solid var(--line);background:#FBFAF7}.dark .guide-soft{background:#18181b}


    /* Seguimiento visual por áreas estilo Fase 2-2 */
    .tour-backdrop{position:fixed;inset:0;background:rgba(9,15,24,.62);backdrop-filter:blur(5px);z-index:70;opacity:0;pointer-events:none;transition:opacity .22s ease}
    .tour-backdrop.open{opacity:1;pointer-events:auto}
    .tour-spotlight{position:fixed;z-index:72;border:3px solid #C8A96A;border-radius:24px;box-shadow:0 0 0 9999px rgba(9,15,24,.46),0 0 0 8px rgba(200,169,106,.26);pointer-events:none;opacity:0;transition:all .24s ease}
    .tour-spotlight.open{opacity:1}
    .tour-coach{position:fixed;z-index:75;width:min(560px,calc(100vw - 32px));background:var(--card);border:1px solid #E7D19A;border-radius:28px;box-shadow:0 28px 80px rgba(2,6,23,.28);overflow:hidden;opacity:0;transform:translateY(12px) scale(.98);pointer-events:none;transition:opacity .22s ease,transform .22s ease}
    .tour-coach.open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}
    .tour-coach-header{padding:22px 24px 16px;border-bottom:1px solid var(--line);background:linear-gradient(135deg,var(--card),#FFF8E6)}
    .tour-mini-label{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:#B98500;font-weight:800;display:flex;align-items:center;gap:8px}
    .tour-mini-label:after{content:'';height:4px;width:26px;border-radius:999px;background:#0B2D5C;display:inline-block}
    .tour-coach-body{padding:22px 24px;max-height:calc(100vh - 320px);overflow-y:auto}.tour-coach-title{font-size:22px;font-weight:800;letter-spacing:-.04em;color:var(--text);line-height:1.1}.tour-coach-text{margin-top:12px;color:var(--muted);line-height:1.55;font-size:15px}
    .tour-example{margin-top:16px;border:1px dashed #D8BE78;background:#FBFAF7;border-radius:18px;padding:13px 14px;color:#334155;font-size:13px;line-height:1.45}.dark .tour-example{background:#171717;color:#d4d4d8}
    .tour-action-box{margin-top:14px;border:1px solid #BDEAD8;background:#ECFDF5;color:#166534;border-radius:16px;padding:12px 14px;font-size:13px;font-weight:700;display:flex;gap:10px;align-items:flex-start}
    .tour-progress-track{height:7px;background:var(--line);border-radius:999px;overflow:hidden;margin-top:16px}.tour-progress-fill{height:100%;background:linear-gradient(90deg,#0B0B0C,#C8A96A);border-radius:999px;transition:width .2s ease}
    .tour-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 24px 22px}.tour-footer-left,.tour-footer-right{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
    .tour-btn{border-radius:14px;padding:10px 14px;font-size:13px;font-weight:800;border:1px solid var(--line);background:var(--card);color:var(--text);transition:.15s}.tour-btn:hover{transform:translateY(-1px)}
    .tour-btn-primary{background:#0B2D5C;color:white;border-color:#0B2D5C}.tour-btn-gold{background:#C8A96A;color:#0B0B0C;border-color:#C8A96A}.tour-btn-ghost{background:transparent;border-color:transparent;color:var(--muted)}
    .tour-simulating{outline:3px solid #0B2D5C!important;box-shadow:0 0 0 8px rgba(11,45,92,.16)!important;border-radius:14px!important;transition:.16s}
    .tour-done-pulse{animation:tourDonePulse .9s ease both}@keyframes tourDonePulse{0%{box-shadow:0 0 0 0 rgba(16,185,129,.45)}100%{box-shadow:0 0 0 16px rgba(16,185,129,0)}}
    .tour-frozen-scroll{overflow:hidden}
    .tour-deep-card{margin-top:14px;border:1px solid var(--line);background:var(--card);border-radius:18px;padding:14px 15px;font-size:13px;line-height:1.48;color:var(--muted)}
    .tour-deep-card b{color:var(--text)}
    .tour-impact-card{margin-top:14px;border:1px solid #E7D19A;background:#FFF8E6;border-radius:18px;padding:14px 15px;font-size:13px;line-height:1.48;color:#72551B}
    .tour-impact-card b{color:#4C3A12}
    .priority-pill{display:inline-flex;align-items:center;gap:.42rem;border-radius:999px;border:1px solid;padding:.32rem .68rem;font-size:.72rem;font-weight:900;white-space:nowrap}.priority-dot{width:.55rem;height:.55rem;border-radius:999px;display:inline-block}.priority-low{background:#ECFDF5;color:#166534;border-color:#BBF7D0}.priority-mid{background:#FEF3C7;color:#92400E;border-color:#FCD34D}.priority-high{background:#FEF2F2;color:#B42318;border-color:#FCA5A5}

    /* Compatibilidad iPad / Koder + refinamiento responsive standalone */
    [data-lucide]{display:inline-block;vertical-align:middle}
    html,body{max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;touch-action:manipulation;scroll-behavior:smooth}
    body.mobile-nav-open{overflow:hidden}
    button,select,input,textarea{touch-action:manipulation}
    #sidebar{transition:transform .28s ease, box-shadow .28s ease;will-change:transform}
    #content{width:100%;min-width:0}
    #drawer{max-width:100vw}
    #sidebarBackdrop{position:fixed;inset:0;background:rgba(2,6,23,.55);backdrop-filter:blur(3px);z-index:85;opacity:0;pointer-events:none;transition:opacity .22s ease}
    #sidebarBackdrop.open{opacity:1;pointer-events:auto}
    .topbar-actions{overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.topbar-actions::-webkit-scrollbar{display:none}
    @supports (height:100dvh){#appView,.min-h-screen{min-height:100dvh}.guided-training{max-height:calc(100dvh - 124px)}.tour-coach-body{max-height:calc(100dvh - 320px)}}
    @media (hover:none) and (pointer:coarse){.hover\:scale-\[1\.02\]:hover{transform:none!important}.hover\:bg-white\/8:hover{background:inherit!important} tbody tr:hover{transform:none!important;box-shadow:none!important;background:inherit!important}}
    @media (max-width:1180px){
      aside#sidebar{width:min(86vw,330px)!important;transform:translateX(-104%);z-index:90;box-shadow:0 24px 90px rgba(0,0,0,.38)}
      aside#sidebar.mobile-open,aside#sidebar.sidebar-open{transform:translateX(0)!important}
      .lg\:pl-72{padding-left:0!important}
      #header{z-index:70}
      #header>div{flex-wrap:wrap;align-items:flex-start!important;padding:10px 14px!important}
      #header button[onclick="toggleSidebarMobile()"]{display:inline-flex!important;align-items:center;justify-content:center}
      #header .max-w-2xl{max-width:none!important;flex:1 1 100%;order:3}
      #header .topbar-actions{flex-wrap:nowrap;justify-content:flex-start;gap:8px!important;width:100%;padding-bottom:2px}
      #header select,#header button{min-height:42px}
      #content{padding:16px!important;max-width:100vw!important}
      .card{min-width:0}
      .xl\:grid-cols-\[1fr_430px\],.xl\:grid-cols-\[1fr_380px\],.xl\:grid-cols-\[1fr_420px\],.xl\:grid-cols-\[1fr_460px\]{grid-template-columns:minmax(0,1fr)!important}
      .xl\:grid-cols-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
      .lg\:grid-cols-3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
      .lg\:grid-cols-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
      .md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
      .phone-pro,.phone{margin-left:auto;margin-right:auto;transform:scale(.92);transform-origin:top center}
      table{font-size:13px} th,td{padding-left:12px!important;padding-right:12px!important}
      #drawer{width:min(92vw,520px)!important}
      .guided-training{right:14px;top:auto;bottom:14px;width:calc(100vw - 28px);max-height:62dvh;border-radius:24px!important}
      .tour-coach{width:calc(100vw - 28px)!important;left:14px!important;right:auto!important;top:auto!important;bottom:14px!important;max-height:64dvh;border-radius:24px!important}
      .tour-coach-body{max-height:34dvh!important;overflow-y:auto!important;padding:16px 18px!important}
      .tour-coach-header{padding:16px 18px 12px!important}.tour-footer{padding:12px 18px 16px!important;align-items:flex-start;flex-direction:column}.tour-footer-right,.tour-footer-left{width:100%;justify-content:flex-end}.tour-btn{min-height:40px}
      .tour-spotlight{display:none!important}
      .tour-backdrop{background:rgba(9,15,24,.38)!important;backdrop-filter:blur(2px)!important}
      .fixed.right-5.bottom-5{right:14px!important;bottom:14px!important}
    }
    @media (min-width:1181px){#sidebar{transform:translateX(0)!important}#sidebarBackdrop{display:none!important}}
    @media (max-width:820px){
      #header .topbar-actions{max-width:100%;justify-content:flex-start}
      #header select,#header button{font-size:12px;padding-left:10px!important;padding-right:10px!important}
      #content{padding:12px!important}
      .md\:grid-cols-2,.lg\:grid-cols-3,.lg\:grid-cols-4,.xl\:grid-cols-4{grid-template-columns:minmax(0,1fr)!important}
      h1{font-size:clamp(2rem,8vw,3.25rem)!important;line-height:.98!important}
      .text-5xl{font-size:2.25rem!important}.lg\:text-5xl{font-size:2.35rem!important}.text-3xl{font-size:1.65rem!important}.text-2xl{font-size:1.35rem!important}
      .phone-pro,.phone{transform:scale(.84);margin-bottom:-90px}
      #drawer{width:100vw!important}
      .guided-training{left:12px;right:12px;width:auto;max-height:72dvh}.tour-coach{max-height:74dvh}.tour-coach-body{max-height:43dvh!important}
      .grid-cols-2{grid-template-columns:minmax(0,1fr)!important}
      .toast{max-width:calc(100vw - 24px)!important}
      .phone-screen,.phone-pro-screen{min-height:auto}.tour-btn{flex:1}.tour-footer-right{display:grid;grid-template-columns:1fr;gap:8px}.tour-footer-left{display:grid;grid-template-columns:1fr}
    }
