/* BOTWA CRM Design System 2026 — Panel principal + CRM comercial */
:root {
  --primary:#35d6a0;--primary-dark:#20b985;--primary-soft:rgba(53,214,160,.12);
  --bg:#071019;--bg-raised:#0b1621;--card-bg:#101d2a;--panel-2:#152433;--panel-3:#1b2c3d;
  --border:#223649;--border-soft:rgba(141,161,183,.16);--text-main:#f4f8fc;--text:#f4f8fc;
  --text-dim:#91a5ba;--muted:#91a5ba;--accent-blue:#65aefc;--accent-purple:#ad91ff;
  --yellow:#f5c968;--red:#ff7b8b;--green:#35d6a0;--glass:rgba(255,255,255,.045);
  --radius-sm:10px;--radius-md:14px;--radius-lg:18px;--sidebar-width:252px;--shadow-sm:0 8px 24px rgba(0,0,0,.16);--shadow-lg:0 24px 70px rgba(0,0,0,.38)
}
html{background:var(--bg)}
body{color:var(--text-main);background:radial-gradient(circle at 78% -18%,rgba(44,111,154,.18),transparent 35%),radial-gradient(circle at 8% 95%,rgba(53,214,160,.06),transparent 30%),var(--bg);font-family:Inter,"Segoe UI Variable","Segoe UI",system-ui,sans-serif;letter-spacing:-.005em}
button,input,textarea,select{font:inherit}button,a,input,textarea,select{transition:border-color .16s ease,background-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid rgba(101,174,252,.3);outline-offset:2px}
button:disabled{opacity:.48;cursor:not-allowed;transform:none!important}
::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background:#31475b;background-clip:padding-box}::-webkit-scrollbar-thumb:hover{background:#496277;background-clip:padding-box}

/* Panel principal */
body>aside:not(.sidebar){width:252px;padding:22px 16px 16px;border-color:var(--border-soft);background:rgba(10,21,31,.97);box-shadow:12px 0 40px rgba(0,0,0,.08)}
body>aside:not(.sidebar) .logo{min-height:52px;margin:0 4px 24px;padding:6px 8px;color:var(--primary);font-size:18px;letter-spacing:-.3px}
body>aside:not(.sidebar) .logo img{width:38px!important;height:38px!important;border:1px solid rgba(53,214,160,.28);border-radius:11px!important;box-shadow:0 8px 24px rgba(53,214,160,.13)}
body>aside:not(.sidebar) nav{gap:4px}
body>aside:not(.sidebar) .nav-item{min-height:44px;padding:10px 12px;border:1px solid transparent;border-radius:11px;color:#a8bacb;font-size:13px;font-weight:600}
body>aside:not(.sidebar) .nav-item:hover{border-color:var(--border-soft);color:#fff;background:rgba(255,255,255,.04)}
body>aside:not(.sidebar) .nav-item.active{border-color:rgba(53,214,160,.18);color:#fff;background:var(--primary-soft);box-shadow:inset 3px 0 var(--primary)}
#btnLogout{min-height:40px;border:1px solid var(--border)!important;border-radius:11px!important;color:var(--text-dim)!important;background:rgba(255,255,255,.025)!important;font-weight:600}
#btnLogout:hover{border-color:rgba(255,123,139,.5)!important;color:var(--red)!important;background:rgba(255,123,139,.07)!important}
body>main{width:calc(100% - 252px);max-width:none;margin-left:252px;padding:26px clamp(24px,3vw,46px) 48px}
body>main>header{min-height:80px;margin:-26px calc(clamp(24px,3vw,46px)*-1) 28px;padding:16px clamp(24px,3vw,46px);border-bottom:1px solid var(--border-soft);background:rgba(7,16,25,.8);backdrop-filter:blur(16px);position:sticky;top:0;z-index:50}
.welcome h1{font-size:clamp(22px,2.3vw,30px);letter-spacing:-.7px}.welcome p:not(.eyebrow){margin:3px 0 0;font-size:12px}
.eyebrow{color:#71879c;letter-spacing:1.2px;font-size:9px;font-weight:800}.eyebrow span{color:var(--primary)}
.status-badge{min-height:36px;padding:7px 12px;border:1px solid rgba(53,214,160,.23);border-radius:999px;color:var(--primary);background:rgba(53,214,160,.08);font-size:11px}
.status-dot{width:7px;height:7px;box-shadow:0 0 0 4px rgba(53,214,160,.1)}
.grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px;margin-bottom:18px}
.card{padding:20px;border:1px solid var(--border-soft);border-radius:var(--radius-lg);background:linear-gradient(145deg,rgba(18,33,47,.98),rgba(12,24,35,.98));box-shadow:var(--shadow-sm)}
.card::before{height:1px;opacity:.26}.card:hover{border-color:rgba(101,174,252,.26)}.card h3{margin-bottom:16px;font-size:14px;letter-spacing:-.15px}
.stat-label{color:var(--text-dim);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.7px}.stat-val{margin-top:6px;font-size:30px;letter-spacing:-1px}
input,textarea,select{min-height:42px;padding:10px 13px;border:1px solid var(--border)!important;border-radius:11px!important;color:var(--text-main)!important;background:#0a1520!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.02)}
input::placeholder,textarea::placeholder{color:#61768b}input:focus,textarea:focus,select:focus{border-color:var(--accent-blue)!important;box-shadow:0 0 0 3px rgba(101,174,252,.12)!important}
label{margin-bottom:7px;color:#a9b9c9;font-size:12px;font-weight:600}textarea{min-height:240px}
.btn,.button{min-height:40px;justify-content:center;padding:9px 15px;border:1px solid transparent;border-radius:11px;color:#06140f;background:var(--primary);box-shadow:0 6px 18px rgba(53,214,160,.11);font-size:12px;font-weight:800}
.btn:hover,.button.primary:hover{border-color:#6ee7bd;background:#45dfa9;transform:translateY(-1px)}
.btn-secondary,.button:not(.primary):not(.danger){border-color:var(--border);color:#dbe6ef;background:var(--panel-2);box-shadow:none}.btn-secondary:hover,.button:not(.primary):not(.danger):hover{border-color:#43627e;color:#fff;background:#1a2c3d}
.btn-skip{min-height:36px;color:var(--text-dim)!important}
table{overflow:hidden;border:1px solid var(--border-soft);border-radius:13px;background:rgba(10,21,32,.54)}th{padding:11px 13px;color:#8297aa;background:rgba(255,255,255,.025);font-size:9px;letter-spacing:.8px}td{padding:13px;border-color:var(--border-soft);font-size:12px}tr:hover{background:rgba(101,174,252,.045)}
.log-container{height:320px;padding:17px;border:1px solid #203346;border-radius:13px;color:#8ce8bd;background:#050b11;font-family:"Cascadia Code",Consolas,monospace;font-size:11px}.log-time{color:#61768b}
#wizardOverlay,#loginOverlay,#crmLoginOverlay{background:rgba(3,9,14,.88)!important;backdrop-filter:blur(12px)}
.wizard-card,#loginOverlay>div,#crmLoginOverlay>div{width:min(460px,calc(100vw - 30px))!important;padding:30px!important;border:1px solid var(--border)!important;border-radius:20px!important;background:linear-gradient(145deg,#142536,#0d1925)!important;box-shadow:var(--shadow-lg)!important}
.wizard-card{max-width:520px}.wizard-card img{border-radius:18px!important;box-shadow:0 12px 30px rgba(53,214,160,.18)}
.wizard-title,#loginOverlay h2,#crmLoginOverlay h2{color:var(--text-main)!important;font-size:23px!important;letter-spacing:-.5px}
.step-num{display:inline-flex;padding:5px 9px;border:1px solid rgba(53,214,160,.25);border-radius:999px;color:var(--primary);background:var(--primary-soft);font-size:9px}
.progress-dot{width:22px;height:4px;border-radius:99px;background:#263a4c}.progress-dot.active{background:var(--primary);box-shadow:0 0 12px rgba(53,214,160,.35)}
#driveAuthSection{border-color:var(--border)!important;border-radius:16px!important;background:#10202e!important;box-shadow:var(--shadow-lg)!important}

/* CRM comercial */
.sidebar{width:252px;padding:22px 16px 16px;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;border-color:var(--border-soft);background:rgba(10,21,31,.97);box-shadow:12px 0 40px rgba(0,0,0,.08)}
.sidebar::-webkit-scrollbar{width:7px}.sidebar::-webkit-scrollbar-thumb{background:#31475b;background-clip:padding-box}
.sidebar .brand{min-height:52px;margin:0 4px 24px;padding:6px 8px;gap:10px}.sidebar .brand strong{font-size:18px;letter-spacing:-.3px}.sidebar .brand span{font-size:11px}
.brand-mark{border-radius:12px;background:linear-gradient(145deg,var(--primary),#62e7bb);box-shadow:0 8px 24px rgba(53,214,160,.16)}
.workspace-card,.account-button,.icon-button,.global-search{border-color:var(--border-soft);background:rgba(15,29,42,.82)}
.workspace-card:hover,.account-button:hover,.icon-button:hover{border-color:rgba(53,214,160,.38);background:#142536}.workspace-menu{border-color:var(--border);border-radius:14px;background:#0e1c29;box-shadow:var(--shadow-lg)}
.sidebar .nav-item{min-height:44px;padding:10px 12px;border:1px solid transparent;border-radius:11px;font-size:13px;font-weight:600;line-height:normal;gap:12px}.sidebar .nav-item>span:first-child{width:20px;font-size:16px}.sidebar .nav-item:hover{border-color:var(--border-soft)}.sidebar .nav-item.active{border-color:rgba(53,214,160,.16);background:var(--primary-soft)}
.sidebar .workspace-switcher{margin-bottom:14px}.sidebar .workspace-card{min-height:58px}.sidebar .nav-label{margin:18px 12px 7px;font-size:9px}
.sidebar-bottom{flex:0 0 auto}.panel-return{border-color:rgba(101,174,252,.28);border-radius:12px;background:rgba(101,174,252,.07)}.panel-return:hover{border-color:rgba(101,174,252,.52);background:rgba(101,174,252,.12)}.system-state{background:rgba(53,214,160,.055)}
.appbar{border-color:var(--border-soft);background:rgba(7,16,25,.8);backdrop-filter:blur(16px)}.appbar h1{font-size:clamp(22px,2.2vw,29px)}#viewRoot{padding:24px clamp(20px,2.5vw,36px) 34px}
.stat-card,.panel-card,.module-card,.inbox{border-color:var(--border-soft);border-radius:var(--radius-lg);background:linear-gradient(145deg,rgba(18,33,47,.98),rgba(12,24,35,.98));box-shadow:var(--shadow-sm)}
.stat-card:hover,.panel-card:hover,.module-card:hover{border-color:rgba(101,174,252,.25)}.pill{min-height:24px;padding:4px 9px;border-radius:999px;font-weight:700;letter-spacing:.15px}.input,.select{min-height:40px}
.chat-row.active{background:rgba(53,214,160,.095);box-shadow:inset 3px 0 var(--primary)}.message.incoming{border-color:#263d52;background:#122233}.message.outgoing{border-color:rgba(53,214,160,.3);background:rgba(27,78,62,.58)}
.reply-option{border-radius:14px;background:rgba(9,21,31,.75)}.drawer,.account-dialog{border-color:var(--border);border-radius:20px;background:#10202e;box-shadow:var(--shadow-lg)}.toast{border-radius:12px;background:#10271f;box-shadow:var(--shadow-lg)}

@media(max-width:820px){body>aside:not(.sidebar){position:static;width:100%;height:auto;padding:14px}body>aside:not(.sidebar) .logo{margin-bottom:10px}body>aside:not(.sidebar) nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#btnLogout{margin-top:10px!important}body>main{width:100%;margin-left:0;padding:18px}body>main>header{position:static;margin:-18px -18px 20px;padding:16px 18px}body>main>header>div:last-child{flex-wrap:wrap}.status-badge{flex:1 1 auto;justify-content:center}.sidebar .sidebar-bottom{display:block}}
@media(max-width:560px){body>aside:not(.sidebar) nav{grid-template-columns:1fr}.wizard-card,#loginOverlay>div,#crmLoginOverlay>div{padding:22px!important}.account-actions{flex-direction:column}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
