*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#f4f5f7;color:#071137;font-size:14px}button,input,select,textarea{font:inherit}button{cursor:pointer}svg{display:block;width:100%;height:100%}[hidden]{display:none!important}[data-icon]{display:inline-grid;place-items:center}input,select,textarea{outline:none}.boot-loader{position:fixed;inset:0;z-index:9999;background:#f5f8ff;display:flex;align-items:center;justify-content:center;gap:10px}.boot-loader.hide{opacity:0;pointer-events:none;transition:.25s}.boot-loader span{width:18px;height:18px;border-radius:50%;background:#1455ff;animation:pulse 1s ease-in-out infinite alternate}.boot-loader span:nth-child(2){animation-delay:.15s}.boot-loader span:nth-child(3){animation-delay:.3s}@keyframes pulse{from{opacity:.45;transform:scale(.78)}to{opacity:1;transform:scale(1.25)}}@keyframes fade{from{opacity:.55;transform:translateY(5px)}to{opacity:1;transform:none}}

[data-icon] svg *{fill:none!important;stroke:currentColor!important;stroke-width:1.75!important;stroke-linecap:round!important;stroke-linejoin:round!important;vector-effect:non-scaling-stroke}.logo-mark svg *{stroke:#fff!important}

.crm-shell{min-height:100vh}.sidebar{position:fixed;left:0;top:0;bottom:0;width:112px;background:#fff;border-right:1px solid #e5ebf4;box-shadow:5px 0 18px rgba(6,18,62,.04);z-index:50}.side-top{height:76px;display:flex;align-items:center;justify-content:center;position:relative}.logo-mark{width:38px;height:38px;border-radius:11px;background:#1455ff;color:#fff;padding:8px}.quick-add{position:absolute;right:-19px;top:25px;width:36px;height:36px;border-radius:50%;border:1px solid #cbd5e1;background:#fff;color:#52617a;padding:8px;box-shadow:0 8px 20px rgba(6,18,62,.12);z-index:80}.quick-pop{position:absolute;left:104px;top:60px;width:195px;background:#fff;border:1px solid #dfe7f2;border-radius:12px;box-shadow:0 20px 45px rgba(6,18,62,.14);padding:8px;z-index:120}.quick-pop button{width:100%;height:42px;border:0;background:#fff;border-radius:8px;display:flex;align-items:center;gap:10px;text-align:left;color:#52617a}.quick-pop button:hover{background:#f4f8ff;color:#1455ff}.quick-pop [data-icon]{width:20px;height:20px}.side-nav{height:calc(100vh - 76px);overflow:auto;padding-bottom:30px}.side-nav button{width:100%;min-height:74px;border:0;border-top:1px solid #eef2f7;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:#071137;position:relative;padding:8px 6px}.side-nav button [data-icon]{width:28px;height:28px}.side-nav button em{font-style:normal;text-align:center;font-size:12px;line-height:1.15}.side-nav button:hover,.side-nav button.active{background:#f4f8ff;color:#1455ff}.side-nav button.active:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#1455ff;border-radius:0 8px 8px 0}

.main{margin-left:112px;min-height:100vh;padding-bottom:86px}.topbar{height:76px;background:#fff;box-shadow:0 4px 18px rgba(6,18,62,.06);display:grid;grid-template-columns:260px 1fr 430px;gap:18px;align-items:center;padding:0 32px;position:sticky;top:0;z-index:40}.brand{display:grid}.brand strong{font-weight:950;font-size:17px;letter-spacing:-.03em}.brand small{color:#69768d;font-weight:700}.search{justify-self:center;width:330px;height:38px;border-radius:22px;background:#f4f5f7;display:flex;align-items:center;gap:10px;padding:0 15px;color:#8a94a6}.search [data-icon]{width:18px;height:18px}.search input{width:100%;border:0;background:transparent;color:#52617a}.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;position:relative}.top-actions button{height:36px;min-width:36px;border:0;background:#fff;color:#64748b;border-radius:9px;padding:8px}.top-actions button:not(.profile):hover{background:#f4f8ff;color:#1455ff}.top-actions button [data-icon],.top-actions>button[data-icon]{width:18px;height:18px}.top-actions .lang{border:1px solid #cbd5e1;font-weight:900;color:#1455ff;padding:0}.profile{display:flex!important;align-items:center;gap:8px;color:#071137!important;font-weight:900;padding:4px 8px!important}.avatar{width:30px;height:30px;border-radius:50%;background:#eaf1ff;border:1px solid #dce7f8}.menu-pop{position:absolute;top:58px;right:32px;background:#fff;border:1px solid #dfe7f2;border-radius:10px;box-shadow:0 18px 40px rgba(6,18,62,.14);padding:8px;z-index:150}.menu-pop button{display:block;width:160px;height:38px;border:0;background:#fff;text-align:left;color:#52617a;border-radius:7px;padding:0 12px}.menu-pop button:hover{background:#f4f8ff;color:#1455ff}.lang-pop{right:245px}

.license{min-height:52px;margin:26px 28px 14px;background:#fff;border:1px solid #e1e9f5;display:flex;align-items:center;gap:8px;padding:0 18px;font-size:13px}.license [data-icon]{width:17px;height:17px;color:#1455ff}.license strong,.license em{color:#1455ff;font-style:normal}.license button{margin-left:auto;height:30px;border:0;border-radius:18px;background:#8b94a1;color:#fff;padding:0 18px;font-weight:800}.license button.primary{margin-left:0;background:#1455ff}.content{padding:0 28px 28px;animation:fade .18s ease}.footer{position:fixed;left:112px;right:0;bottom:0;height:70px;background:#fff;border-top:1px solid #e5ebf4;display:flex;align-items:center;gap:28px;padding:0 48px;z-index:35}.footer span{display:inline-flex;align-items:center;gap:6px;color:#475569}.footer [data-icon]{width:16px;height:16px}.footer strong{margin-left:auto;font-size:26px;letter-spacing:-.04em}.floating-calendar{position:fixed;right:0;top:50%;z-index:60;width:46px;height:54px;border:0;background:#fff;color:#1455ff;box-shadow:0 8px 20px rgba(6,18,62,.12);padding:13px}

h1{font-size:28px;line-height:1.15;margin:10px 0 20px;letter-spacing:-.04em}h1 small{font-size:14px;margin-left:16px;color:#64748b}.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.page-head h1{margin:0}.btn{height:42px;border:0;border-radius:12px;background:#1455ff;color:#fff;padding:0 20px;font-weight:800;display:inline-flex;align-items:center;gap:8px}.btn [data-icon]{width:18px;height:18px}.btn.orange{background:#f97316}.btn.gray{background:#8b94a1}.btn.outline{background:#fff;color:#1455ff;border:1px solid #1455ff}.btn.soft{background:#f4f8ff;color:#1455ff}

.stats-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:10px}.stat-card{height:145px;background:#fff;border:1px solid #e9eef6;box-shadow:0 4px 16px rgba(6,18,62,.04);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#66748e}.stat-card [data-icon]{width:40px;height:40px;color:#1455ff}.stat-card p{margin:10px 0 8px}.stat-card b{font-size:28px;color:#1455ff;font-weight:600}.empty-panel{min-height:280px;background:#fff;border:1px solid #e9eef6;box-shadow:0 3px 12px rgba(6,18,62,.03);display:grid;place-items:center;color:#8a94a6;margin-top:12px}.schedule{height:118px;background:#fff;border:1px solid #e9eef6;box-shadow:0 3px 12px rgba(6,18,62,.03);margin-top:14px;padding:18px}.tabs{display:flex;align-items:center;gap:16px}.tabs button{height:30px;border:0;background:#fff;color:#52617a}.tabs button.active{color:#1455ff;border-bottom:2px solid #1455ff}.tabs h3{flex:1;text-align:center;margin:0;font-size:18px;font-weight:500}.tabs span i{display:inline-block;width:20px;height:20px;border-radius:50%;background:linear-gradient(90deg,#34d399 50%,#ff6b6b 50%);vertical-align:middle}.schedule-line{height:28px;background:#f1f3f6;margin-top:16px}

.layout-with-sub{display:grid;grid-template-columns:235px 1fr;gap:26px}.sub-menu{background:#fff;border:1px solid #e2e8f0;min-height:600px;padding:22px 0}.sub-menu button{width:100%;height:50px;background:#fff;border:0;display:flex;align-items:center;gap:12px;text-align:left;padding:0 30px;color:#52617a;font-weight:700}.sub-menu button [data-icon]{width:20px;height:20px}.sub-menu button:hover,.sub-menu button.active{background:#f4f8ff;color:#1455ff}.sub-title{font-size:12px;text-transform:uppercase;font-weight:900;color:#9aa5b5;padding:0 30px 10px}.module{background:#fff;border:1px solid #e9eef6;border-radius:8px;box-shadow:0 3px 14px rgba(6,18,62,.04);padding:22px}.metric-row{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-bottom:24px}.metric-card{min-height:88px;background:#fff;border-left:5px solid #1455ff;border-radius:8px;box-shadow:0 6px 22px rgba(6,18,62,.06);display:flex;align-items:center;justify-content:space-between;padding:18px 20px}.metric-card h2{margin:0;font-size:23px;font-weight:600}.metric-card p{margin:9px 0 0;color:#64748b}.metric-card [data-icon]{width:32px;height:32px;color:#1455ff}

.filters{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 22px}.filters input,.filters select{height:36px;border:1px solid #d7e0ec;border-radius:5px;background:#fff;color:#64748b;padding:0 12px;min-width:165px}.filters button{height:36px;border:1px solid #d7e0ec;background:#fff;border-radius:5px;color:#52617a;padding:0 14px}.filters button.primary{background:#1455ff;color:#fff;border:0}.table-wrap{background:#fff;border:1px solid #e9eef6;overflow:auto}.table{width:100%;border-collapse:collapse;min-width:850px}.table th,.table td{height:48px;border-bottom:1px solid #edf1f7;text-align:left;padding:0 14px}.table th{color:#071137;font-weight:900}.table td{color:#52617a}.empty-row{text-align:center!important;color:#8a94a6!important;height:90px!important}.badge{display:inline-flex;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:800}.badge.green{background:#e8fbef;color:#119b53}.badge.orange{background:#fff1dc;color:#f97316}.badge.red{background:#ffecec;color:#ef4444}

.kanban{display:grid;grid-template-columns:repeat(3,minmax(290px,1fr));gap:14px;min-height:610px}.kanban-col{background:#fff;border-left:6px solid #e8edf6;border-radius:8px;padding:14px}.kanban-col h3{margin:0 0 14px}.lead-card{height:42px;border-radius:8px;background:#1455ff;color:#fff;display:grid;place-items:center;margin:10px 0}.lead-card [data-icon]{width:17px;height:17px}.notice{min-height:56px;background:#effce9;color:#3c9f24;display:flex;align-items:center;gap:12px;padding:0 20px;margin-bottom:20px}.notice [data-icon]{width:24px;height:24px}

.two-col{display:grid;grid-template-columns:1fr 370px;gap:28px}.two-col.equal{grid-template-columns:1fr 1fr}.chart-box{height:330px;background:repeating-linear-gradient(to bottom,transparent 0 39px,#dfe4ec 40px),#fff;border-left:1px solid #cfd7e3;border-bottom:1px solid #cfd7e3;position:relative}.chart-box:before{content:attr(data-name);position:absolute;top:-30px;left:50%;color:#52617a}.form-grid{display:grid;gap:16px}.form-grid.two{grid-template-columns:1fr 1fr}.form-grid.three{grid-template-columns:repeat(3,1fr)}.form-grid label{display:grid;gap:8px;color:#34405a;font-size:13px;font-weight:700}.form-grid input,.form-grid select,.form-grid textarea{width:100%;min-height:40px;border:1px solid #d7e0ec;border-radius:5px;background:#fff;padding:0 12px;color:#52617a}.form-grid textarea{min-height:120px;padding-top:12px}.radio-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.radio-grid label{display:flex;align-items:center;gap:8px;font-weight:500}.switch{width:44px;height:24px;border-radius:999px;background:#d9dee7;position:relative;display:inline-block}.switch.on{background:#4da3ff}.switch:after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:.18s}.switch.on:after{left:23px}.soft-table{width:100%;border-collapse:collapse;background:#fff}.soft-table td,.soft-table th{height:46px;border:1px solid #e9eef6;padding:0 14px}.soft-table th{background:#fbfcff;text-align:left}.report-tabs{display:flex;gap:50px;border-bottom:1px solid #e6ebf3;padding-bottom:12px;margin-bottom:14px}.report-tabs button{height:36px;min-width:90px;border:1px solid #1455ff;background:#fff;color:#1455ff;border-radius:4px}.report-tabs button.active{background:#1455ff;color:#fff}.funnel-row{display:grid;grid-template-columns:70px 1fr 60px;align-items:center;gap:12px;min-height:64px;border-bottom:1px solid #e5eaf2}.funnel-row b{font-size:26px;color:#1455ff;font-weight:500}.funnel-row .bar{height:3px;background:#d9dee7}.settings-shell{display:grid;grid-template-columns:190px 1fr;background:#fff;border:1px solid #dfe7f2;box-shadow:0 3px 14px rgba(6,18,62,.04);min-height:600px}.settings-tabs{background:#f2f5fa;border-right:1px solid #dfe7f2;padding:20px 0}.settings-tabs button{width:100%;height:43px;border:0;background:transparent;color:#7a8596;text-align:right;padding:0 26px;font-weight:600}.settings-tabs button:hover,.settings-tabs button.active{background:#fff;color:#1455ff}.settings-content{padding:32px}.upload-box{height:170px;border:1px dashed #cbd5e1;border-radius:6px;display:grid;place-items:center;color:#1455ff;background:#fff}.editor-box{border:1px solid #d7e0ec;min-height:120px}.editor-toolbar{height:42px;border-bottom:1px solid #d7e0ec;display:flex;align-items:center;gap:16px;padding:0 16px;color:#334155}.editor-area{padding:16px}.color-dots{display:flex;gap:36px}.color-dots span{width:24px;height:24px;border-radius:50%;display:inline-block}.color-dots span:nth-child(1){background:#9b2aa0}.color-dots span:nth-child(2){background:#0ea5e9}.color-dots span:nth-child(3){background:#647c45}.color-dots span:nth-child(4){border:3px solid #f97316}.color-dots span:nth-child(5){background:#9f1239}.integration-row{min-height:72px;border:1px solid #e9eef6;border-radius:999px;display:grid;grid-template-columns:52px 1fr 140px 90px;align-items:center;gap:16px;padding:10px 16px;margin-bottom:16px}.app-icon{width:46px;height:46px;border-radius:12px;background:#1455ff;color:#fff;display:grid;place-items:center}.app-icon [data-icon]{width:24px;height:24px}.integration-row button{height:38px;border:0;border-radius:7px;background:#071137;color:#fff;font-weight:800}.sms-layout{display:grid;grid-template-columns:360px 1fr 400px;gap:24px}.sms-type{height:62px;background:#fff;border:1px solid #e9eef6;border-radius:8px;box-shadow:0 6px 18px rgba(6,18,62,.04);display:flex;align-items:center;justify-content:space-between;padding:0 18px;margin-bottom:12px}.sms-type.active{border-color:#1455ff;box-shadow:0 0 0 2px rgba(20,85,255,.08)}.receipt{width:260px;min-height:460px;background:#fff;margin:auto;padding:28px;box-shadow:0 20px 70px rgba(6,18,62,.12)}

.drawer-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:200}.drawer{position:fixed;right:0;top:0;bottom:0;width:390px;background:#fff;z-index:210;box-shadow:-12px 0 30px rgba(6,18,62,.2);padding:22px;overflow:auto}.drawer-close{position:absolute;right:16px;top:12px;background:#fff;border:0;font-size:28px;color:#8a94a6}.drawer h2{margin:0 0 24px}.drawer .form-grid button{width:110px;height:42px;border:0;border-radius:22px;background:#1455ff;color:#fff;font-weight:800}

@media(max-width:1250px){.stats-grid{grid-template-columns:repeat(4,1fr)}.topbar{grid-template-columns:200px 1fr 240px}.top-actions button:not(.lang):not(.profile){display:none}.layout-with-sub{grid-template-columns:1fr}.sub-menu{min-height:auto}.two-col,.two-col.equal,.sms-layout{grid-template-columns:1fr}.metric-row{grid-template-columns:1fr}.kanban{grid-template-columns:repeat(3,300px);overflow:auto}}@media(max-width:800px){.sidebar{width:88px}.main{margin-left:88px}.footer{left:88px}.topbar{grid-template-columns:1fr;height:auto;padding:14px}.search,.top-actions{display:none}.stats-grid{grid-template-columns:1fr}.settings-shell{grid-template-columns:1fr}.settings-tabs{display:flex;overflow:auto}.settings-tabs button{text-align:center;min-width:160px}.drawer{width:min(390px,100%)}}
/* ===== REAL CRM ENGINE PHASE 1 UI ===== */
.toast-success{background:#071137;color:#fff}
.drawer form button:disabled{opacity:.6;cursor:not-allowed}
.real-action-bar{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px}


/* ===== EDUKA REAL CRM ENGINE PHASE 2 ===== */
.toast{position:fixed;right:24px;top:92px;z-index:9999;padding:15px 18px;border-radius:12px;box-shadow:0 18px 45px rgba(6,18,62,.16);font-weight:900}
.toast.ok{background:#fff;color:#071137;border-left:6px solid #22c55e}
.toast.bad{background:#fff;color:#ef4444;border-left:6px solid #ef4444}
.icon-btn{width:34px;height:34px;border:0;background:#fff;color:#1455ff;display:inline-grid;place-items:center;border-radius:8px}
.icon-btn:hover{background:#f4f8ff}
.icon-btn [data-icon]{width:18px;height:18px}
.icon-btn.danger{color:#ef4444}
.click-row{cursor:pointer}
.click-row:hover{background:#f8fbff}
.settings-page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
.course-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,360px));gap:22px}
.course-card{background:#fff;border:1px solid #e9eef6;box-shadow:0 8px 26px rgba(6,18,62,.05);cursor:pointer;transition:.18s}
.course-card:hover{transform:translateY(-3px);box-shadow:0 16px 42px rgba(6,18,62,.1)}
.course-hero{height:210px;background:#3bd6ae;display:grid;place-items:center;color:#fff;position:relative;overflow:hidden}
.course-hero h3{position:absolute;top:48px;margin:0;font-size:22px}
.course-hero [data-icon]{width:110px;height:110px;opacity:.95;transform:translateY(40px)}
.course-body{padding:22px}
.course-body b{font-size:16px}
.course-body p{color:#8a94a6;margin:24px 0 12px}
.course-body small{color:#52617a}
.group-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
.group-title h1{font-weight:500;margin:0;letter-spacing:.02em}
.group-detail-grid{display:grid;grid-template-columns:430px 1fr;gap:28px}
.group-info{position:relative;min-height:360px;padding:28px}
.group-info p{margin:8px 0;line-height:1.35}
.circle-actions{position:absolute;right:18px;top:22px;display:grid;gap:10px}
.circle-actions button{width:38px;height:38px;border-radius:50%;border:1px solid #f97316;color:#f97316;background:#fff;display:grid;place-items:center}
.circle-actions button.danger{border-color:#ef4444;color:#ef4444}
.circle-actions [data-icon]{width:18px;height:18px}
.group-note{margin-top:24px;min-height:54px;border-left:5px solid #0ea5e9;color:#8a94a6;display:flex;align-items:center;justify-content:space-between}
.detail-tabs{display:flex;gap:0;border-bottom:1px solid #e8eef7;margin:-22px -22px 22px;overflow:auto}
.detail-tabs button{height:54px;border:0;background:#fff;padding:0 18px;color:#071137;white-space:nowrap}
.detail-tabs button.active{color:#f97316;border-top:4px solid #f97316;background:#fff8f1}
.menu-dots{font-size:24px;color:#f97316}
@media(max-width:1100px){.group-detail-grid{grid-template-columns:1fr}.course-grid{grid-template-columns:1fr}}


/* ===== EDUKA PHASE 3.2 TENANT LOGIN UI ===== */
.tenant-login-screen{position:fixed;inset:0;z-index:10000;background:linear-gradient(135deg,#f7fbff,#eef4ff);display:grid;place-items:center;padding:24px}
.tenant-login-card{width:min(460px,100%);background:#fff;border:1px solid #e4ebf6;border-radius:28px;box-shadow:0 32px 80px rgba(6,18,62,.12);padding:34px}
.login-logo{display:flex;align-items:center;gap:12px;font-size:26px;font-weight:950;color:#071137;margin-bottom:22px}
.login-logo span{width:36px;height:36px;background:#1455ff;color:#fff;border-radius:10px;padding:8px}
.login-badge{display:inline-flex;background:#eef4ff;color:#1455ff;border-radius:999px;padding:8px 14px;font-weight:900;margin-bottom:18px}
.tenant-login-card h1{font-size:34px;line-height:1.05;margin:0 0 12px;color:#071137}
.tenant-login-card p{color:#5c6a86;margin:0 0 24px;line-height:1.6}
.tenant-login-card form{display:grid;gap:14px}
.tenant-login-card label{display:grid;gap:8px;color:#071137;font-weight:800}
.tenant-login-card input{height:52px;border:1px solid #d9e3f3;border-radius:12px;padding:0 14px;font:inherit}
.tenant-login-card button{height:54px;border:0;border-radius:14px;background:linear-gradient(135deg,#07145c,#1455ff);color:#fff;font-weight:950;font-size:16px;cursor:pointer}
.tenant-login-card small{display:block;color:#7b89a3;text-align:center;margin-top:14px}
body.tenant-locked .app-shell, body.tenant-locked #app, body.tenant-locked main{filter:blur(2px);pointer-events:none}


/* ===== EDUKA PHASE 3.3 TENANT NOT FOUND UI ===== */
.tenant-notfound-screen{position:fixed;inset:0;z-index:10001;background:linear-gradient(135deg,#f8fbff,#eef4ff);display:grid;place-items:center;padding:24px}
.tenant-notfound-card{width:min(560px,100%);background:#fff;border:1px solid #e4ebf6;border-radius:28px;box-shadow:0 32px 80px rgba(6,18,62,.14);padding:38px;text-align:left}
.login-badge.error{background:#fff1f2;color:#e11d48}
.tenant-notfound-card h1{font-size:36px;line-height:1.05;margin:0 0 14px;color:#071137}
.tenant-notfound-card p{font-size:16px;line-height:1.7;color:#5c6a86;margin:0 0 24px}
.support-actions{display:flex;gap:12px;flex-wrap:wrap}
.support-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 18px;border-radius:14px;text-decoration:none;font-weight:900}
.support-actions a:first-child{background:#1455ff;color:#fff}
.support-actions a:last-child{background:#eef4ff;color:#1455ff}


/* ===== EDUKA PHASE 3.5 HIDE CRM UNTIL TENANT VERIFIED ===== */
html.tenant-pending body{visibility:hidden!important}
