
:root{
  --bg:#f5f1ea;--paper:#fffdf9;--paper2:#fbf8f3;--ink:#1c1621;--muted:#746b79;
  --p950:#16091f;--p900:#21102e;--p850:#2a123a;--p800:#35164b;--p700:#4c1f6f;--p600:#642991;
  --gold:#c79a42;--gold2:#e2c174;--line:#e4d9ce;--danger:#a43e4c;--shadow:0 16px 40px rgba(38,18,49,.08);
}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--ink)}
body{background:radial-gradient(circle at 84% 2%,rgba(199,154,66,.09),transparent 25%),radial-gradient(circle at 15% 0%,rgba(100,41,145,.07),transparent 25%),var(--bg)}
button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.app{display:grid;grid-template-columns:255px minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;padding:0 14px 17px;color:#fff;background:radial-gradient(circle at -5% 24%,rgba(121,55,168,.28),transparent 30%),linear-gradient(180deg,#2a123a,#16091f 75%);display:flex;flex-direction:column;box-shadow:14px 0 32px rgba(22,9,31,.14);z-index:20;overflow:hidden}
.brand{margin:0 -14px 0;background:linear-gradient(180deg,#fffdf9,#f6f0e8);padding:15px 16px 12px;border-radius:0;box-shadow:none;border-bottom:1px solid rgba(199,154,66,.42);position:relative}
.brand:after{content:"";position:absolute;left:28px;right:28px;bottom:-1px;height:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent)}
.brand img{display:block;width:100%;height:92px;object-fit:contain;object-position:center}
.brand-name{text-align:center;color:var(--gold2);font-size:9px;font-weight:850;letter-spacing:.22em;text-transform:uppercase;margin:14px 0 15px}
.nav-label{font-size:9px;letter-spacing:.17em;color:var(--gold2);font-weight:900;text-transform:uppercase;margin:4px 9px 7px}
.nav{display:grid;gap:5px}.nav button{width:100%;border:1px solid transparent;background:transparent;color:#f7f2f8;border-radius:13px;display:flex;align-items:center;gap:11px;padding:10px 11px;text-align:left;transition:.18s}
.nav button:hover{background:rgba(199,154,66,.10);border-color:rgba(199,154,66,.25);transform:translateX(2px)}
.nav button.active{background:linear-gradient(90deg,rgba(100,41,145,.58),rgba(53,22,75,.25));border-color:rgba(199,154,66,.42);box-shadow:inset 3px 0 0 var(--gold)}
.nav .ico{width:29px;height:29px;display:grid;place-items:center;border-radius:9px;background:rgba(255,255,255,.065);color:var(--gold2);font-weight:900}.nav .txt{font-size:13px;font-weight:700}
.nav button[data-view="alidax"]{margin-top:7px;border-color:rgba(199,154,66,.22);background:linear-gradient(90deg,rgba(199,154,66,.10),rgba(100,41,145,.12))}
.side-spacer{flex:1}.stage{border:1px solid rgba(199,154,66,.5);border-radius:15px;padding:13px;background:rgba(33,14,47,.55)}.stage strong{display:flex;align-items:center;gap:8px;font-size:11px}.dot{width:8px;height:8px;border-radius:50%;background:var(--gold);box-shadow:0 0 10px rgba(199,154,66,.7)}.stage p{margin:7px 0 0;color:#eadff0;font-size:10px;line-height:1.45}.version{text-align:center;margin-top:12px;font-size:9px;color:#aa9bb0;letter-spacing:.14em}
.main{min-width:0}.topbar{height:74px;position:sticky;top:0;z-index:15;display:flex;align-items:center;gap:15px;padding:0 23px;background:rgba(250,247,242,.92);backdrop-filter:blur(14px);border-bottom:1px solid rgba(53,22,75,.07)}
.menu{width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--p800);font-size:18px}.top-title strong{display:block;font-size:17px}.top-title span{font-size:11px;color:var(--muted)}
.search{margin-left:auto;width:min(430px,37vw);height:40px;border:1px solid var(--line);border-radius:12px;background:var(--paper);display:flex;align-items:center;gap:9px;padding:0 12px}.search input{border:0;outline:0;background:transparent;width:100%;font-size:12px}
.server{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:11px;background:linear-gradient(180deg,var(--p700),var(--p850));color:#fff;font-size:11px;font-weight:850;box-shadow:0 8px 18px rgba(53,22,75,.15)}.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:12px;font-weight:900;background:linear-gradient(145deg,var(--gold),#805918)}
.content{max-width:1650px;margin:0 auto;padding:22px 26px 40px}.view{display:none}.view.active{display:block}
.hero{min-height:112px;display:flex;align-items:center;justify-content:space-between;gap:22px;padding:21px 25px;border-radius:20px;background:linear-gradient(115deg,rgba(255,253,249,.98),rgba(248,244,238,.95));border:1px solid rgba(53,22,75,.08);box-shadow:var(--shadow)}
.hero h1{margin:0;font-size:29px;letter-spacing:-.035em}.hero h1 b{color:var(--p700)}.hero p{margin:7px 0 0;color:var(--muted);font-size:12px}.motto{text-align:right;font-size:9px;text-transform:uppercase;letter-spacing:.32em;color:var(--p700)}
.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin:22px 3px 13px}.section-head h2{margin:0;font-size:24px}.section-head p{margin:4px 0 0;font-size:11px;color:var(--muted)}
.btn{border:0;border-radius:11px;padding:10px 14px;font-weight:850;color:#fff;background:linear-gradient(180deg,var(--p600),var(--p800));box-shadow:0 5px 0 #241032,0 9px 16px rgba(36,16,50,.13);transition:.14s}.btn:hover{transform:translateY(2px);box-shadow:0 3px 0 #241032,0 7px 13px rgba(36,16,50,.12)}.btn.gold{background:linear-gradient(180deg,#d7b15a,#a87924);box-shadow:0 5px 0 #7a5517,0 9px 16px rgba(168,121,36,.12)}.btn.ghost{background:#fff;color:var(--p700);border:1px solid var(--line);box-shadow:none}.btn.danger{background:#fff;color:var(--danger);border:1px solid #e9c7cc;box-shadow:none}.btn.small{padding:7px 10px;font-size:11px}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.workspace-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.workspace-card{background:var(--paper);border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:var(--shadow)}.ws-top{display:flex;justify-content:space-between;gap:15px}.ws-icon{width:49px;height:49px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,var(--p600),var(--p950));color:var(--gold2);font-size:22px}.pill{display:inline-flex;align-items:center;gap:6px;margin:11px 0 8px;padding:5px 9px;border-radius:999px;background:#eee6f3;color:var(--p700);font-size:9px;font-weight:900}.workspace-card h3{margin:0;font-size:20px}.workspace-card p{margin:6px 0;color:var(--muted);font-size:12px}.meta{font-size:10px;font-weight:800;color:var(--p800);margin:9px 0 15px}
.surface{background:var(--paper);border:1px solid var(--line);border-radius:19px;box-shadow:var(--shadow);padding:20px}.workspace-shell{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:17px}.module-rail{background:linear-gradient(180deg,#fffdf9,#faf6ef);border:1px solid var(--line);border-radius:17px;padding:13px;height:max-content;position:sticky;top:92px}.module-rail h3{margin:0 0 4px;font-size:17px}.module-rail .small{font-size:10px;color:var(--muted);margin-bottom:11px}.module-list{display:grid;gap:6px}.module-list button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:9px;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);text-align:left}.module-list button.active{background:#f1e9f5;color:var(--p700);border-color:#cdb8d8;box-shadow:inset 3px 0 0 var(--gold)}
.module-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:13px}.module-header h2{margin:0;font-size:24px}.module-header p{margin:3px 0 0;color:var(--muted);font-size:11px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:15px}.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.panel{background:var(--paper2);border:1px solid var(--line);border-radius:16px;padding:16px}.panel h3{margin:0 0 10px;font-size:16px}.row{display:grid;grid-template-columns:150px 1fr;gap:10px;align-items:center;padding:9px 0;border-top:1px solid #ece4da;font-size:11px}.row:first-of-type{border-top:0}.row strong{color:var(--p800)}.tag{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:850;background:#f4e7c9;color:#8a5f14}.tag.violet{background:#eee5f4;color:var(--p700)}.tag.dark{background:#ebe5ec;color:#302334}.stat{padding:14px;border:1px solid var(--line);border-radius:13px;background:#fff}.stat b{display:block;font-size:21px;color:var(--p700)}.stat span{font-size:10px;color:var(--muted)}.field label{display:block;font-size:10px;font-weight:800;color:var(--p800);margin-bottom:5px}.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px;outline:0}.field textarea{min-height:88px;resize:vertical}
.upload{border:1px dashed #c8b6d2;border-radius:13px;background:#fff;padding:12px;margin:9px 0}.preview-box{height:300px;border:1px solid var(--line);border-radius:13px;background:#fff;overflow:hidden}.preview-box iframe{width:100%;height:100%;border:0}
.list{display:grid;gap:8px}.item{display:flex;align-items:center;justify-content:space-between;gap:11px;border:1px solid var(--line);border-radius:11px;padding:10px;background:#fff}.item-main{display:flex;align-items:center;gap:10px}.item-icon{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:#efe7f4;color:var(--p700)}.item b{display:block;font-size:12px}.item span{font-size:10px;color:var(--muted)}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:9px;border-bottom:1px solid #ece4da;text-align:left;font-size:11px}.table th{color:var(--p800)}
.toggle{width:42px;height:23px;border-radius:999px;background:#d9cfdd;padding:3px;display:inline-flex;justify-content:flex-start}.toggle.on{background:var(--p600);justify-content:flex-end}.toggle i{width:17px;height:17px;border-radius:50%;background:#fff;display:block}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}

/* Gmail-like mail */
.mail-shell{display:grid;grid-template-columns:190px minmax(0,1fr);gap:12px;min-height:520px}
.mail-nav{background:#f8f4ee;border:1px solid var(--line);border-radius:16px;padding:12px}
.compose{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:12px}
.mail-folders{display:grid;gap:4px}.mail-folders button{width:100%;display:flex;justify-content:space-between;align-items:center;border:0;background:transparent;border-radius:9px;padding:9px 10px;color:var(--ink);text-align:left}.mail-folders button.active{background:#eee5f4;color:var(--p700);font-weight:800}.mail-folders button:hover{background:#f0e9e2}
.mail-main{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.mail-top{height:52px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:8px;padding:0 12px}.mail-top .mail-search{flex:1;border:1px solid var(--line);border-radius:9px;padding:8px 10px;background:#fbf8f3}
.mail-list{max-height:440px;overflow:auto}.mail-row{display:grid;grid-template-columns:28px 30px 160px minmax(0,1fr) 80px;align-items:center;gap:7px;padding:9px 12px;border-bottom:1px solid #efe8df;background:#fff;font-size:11px;cursor:pointer}.mail-row:hover{box-shadow:inset 3px 0 0 var(--gold);background:#fffdfa}.mail-row.unread{font-weight:800;background:#fdfbf7}.mail-row .subj{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.star{border:0;background:transparent;color:#b4a9b8;font-size:18px;padding:0}.star.on{color:var(--gold)}
.thread{padding:18px}.thread h3{margin:0 0 5px}.thread-meta{font-size:10px;color:var(--muted);margin-bottom:16px}.thread-body{font-size:12px;line-height:1.55;white-space:pre-wrap}.thread-actions{display:flex;gap:8px;margin-top:18px}
.account-strip{display:flex;align-items:center;gap:8px;margin-bottom:10px}.account-strip select{flex:1;border:1px solid var(--line);border-radius:9px;padding:8px;background:#fff}
.modal{position:fixed;inset:0;background:rgba(14,7,19,.42);display:none;align-items:center;justify-content:center;z-index:100}.modal.show{display:flex}.modal-card{width:min(680px,92vw);background:var(--paper);border-radius:18px;box-shadow:0 30px 80px rgba(0,0,0,.25);padding:18px}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.modal-head h3{margin:0}.modal-close{border:0;background:#f1e9f5;color:var(--p700);width:32px;height:32px;border-radius:50%}.compose-grid{display:grid;gap:9px}.compose-grid input,.compose-grid textarea{width:100%;border:1px solid var(--line);border-radius:9px;padding:10px}.compose-grid textarea{height:180px;resize:vertical}
.attachment-preview{display:flex;gap:8px;align-items:center;margin-top:8px;font-size:10px;color:var(--muted)}.attachment-preview img{width:72px;height:52px;object-fit:cover;border-radius:8px;border:1px solid var(--line)}

.alidax-wrap{display:grid;grid-template-columns:350px 1fr;gap:17px}.alidax-card{background:linear-gradient(180deg,#1d0d29,#110717);color:#fff;border:1px solid rgba(199,154,66,.44);border-radius:19px;padding:17px}.alidax-card img{display:block;width:100%;border-radius:13px}.chat{background:var(--paper);border:1px solid var(--line);border-radius:19px;padding:17px;min-height:500px;display:flex;flex-direction:column}.messages{flex:1;display:grid;align-content:start;gap:9px}.bubble{max-width:70%;padding:10px 12px;border-radius:13px;font-size:11px;line-height:1.45}.bubble.ai{background:#f0e7f5}.bubble.me{background:var(--p700);color:#fff;margin-left:auto}.chat-input{display:flex;gap:8px;margin-top:13px}.chat-input input{flex:1;border:1px solid var(--line);border-radius:10px;padding:10px}
.toast{position:fixed;right:22px;bottom:22px;z-index:150;padding:10px 13px;border-radius:10px;background:var(--p850);color:#fff;box-shadow:var(--shadow);font-size:11px;opacity:0;pointer-events:none;transition:.2s}.toast.show{opacity:1}
@media(max-width:1100px){.app{grid-template-columns:88px minmax(0,1fr)}.brand-name,.nav-label,.nav .txt,.stage,.version{display:none}.brand{margin:0 -14px 10px;padding:8px}.brand img{height:58px}.nav button{justify-content:center}.search{display:none}.workspace-grid,.grid-2,.grid-3,.form-grid,.alidax-wrap,.workspace-shell,.mail-shell{grid-template-columns:1fr}.module-rail{position:static}.mail-nav{display:none}}

.download-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--p700);font-size:10px;font-weight:800}
.file-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}


/* =========================================================
   MAG V5 · DESIGN LOCK PERFECTO
   ========================================================= */
:root{
  --bg:#f4f0e9;--paper:#fffdf9;--paper2:#fbf8f3;--ink:#20172a;--muted:#756b7c;
  --p950:#13071c;--p900:#1b0b29;--p850:#261036;--p800:#321347;--p700:#4b1f6e;--p600:#652a93;
  --gold:#c79a42;--gold2:#e1c273;--gold3:#f4e7c6;--line:#e5dbcf;--danger:#a84652;
  --shadow:0 18px 46px rgba(34,17,44,.08);--shadow2:0 8px 22px rgba(34,17,44,.06);
}
body{background:radial-gradient(circle at 82% 0%,rgba(199,154,66,.085),transparent 25%),radial-gradient(circle at 16% 0%,rgba(101,42,147,.055),transparent 25%),var(--bg)!important}
.app{grid-template-columns:255px minmax(0,1fr)!important}
.sidebar{padding:0 14px 18px!important;background:radial-gradient(circle at 15% 16%,rgba(118,54,163,.20),transparent 28%),linear-gradient(180deg,#341349 0%,#241032 43%,#14081e 100%)!important;overflow:hidden!important}
.brand{height:118px!important;margin:0!important;padding:16px 7px 2px!important;background:transparent!important;border:0!important;box-shadow:none!important;display:flex!important;align-items:center!important;justify-content:center!important}
.brand:after{display:none!important}
.brand img{width:100%!important;height:88px!important;object-fit:contain!important;object-position:center!important;filter:drop-shadow(0 8px 14px rgba(0,0,0,.20))!important}
.brand-product{text-align:center;color:#fff;font-size:8px;font-weight:650;letter-spacing:.30em;margin:-4px 0 7px;opacity:.92}
.brand-name{text-align:center;color:#efe4f2!important;font-size:8px!important;font-weight:650!important;letter-spacing:.25em!important;margin:0 -5px 18px!important;opacity:.9}
.nav-label{margin:0 9px 8px!important;color:var(--gold2)!important;font-size:9px!important;letter-spacing:.17em!important}
.nav{gap:6px!important}.nav button{min-height:52px!important;padding:10px 12px!important;border-radius:14px!important;color:#f7f3f9!important}.nav button:hover{background:rgba(199,154,66,.09)!important;border-color:rgba(199,154,66,.26)!important}.nav button.active{background:linear-gradient(90deg,rgba(101,42,147,.58),rgba(53,22,75,.24))!important;border-color:rgba(199,154,66,.44)!important;box-shadow:inset 4px 0 0 var(--gold),0 8px 20px rgba(0,0,0,.10)!important}.nav .ico{width:32px!important;height:32px!important;border-radius:10px!important;background:rgba(255,255,255,.075)!important;color:var(--gold2)!important}.nav .txt{font-size:13px!important;font-weight:700!important}.nav button[data-view="alidax"]{margin-top:8px!important;background:linear-gradient(90deg,rgba(199,154,66,.10),rgba(101,42,147,.13))!important;border-color:rgba(199,154,66,.30)!important}.side-spacer{min-height:22px}.stage{border:1px solid rgba(199,154,66,.58)!important;border-radius:15px!important;padding:13px!important;background:linear-gradient(180deg,rgba(77,31,108,.32),rgba(17,7,25,.58))!important}.stage strong{font-size:11px!important}.stage p{font-size:10px!important}.version{margin-top:12px!important;color:#b3a5b8!important;font-size:8px!important;letter-spacing:.16em!important}
.topbar{height:72px!important;padding:0 24px!important;background:rgba(252,249,244,.94)!important;border-bottom:1px solid rgba(53,22,75,.08)!important}.menu{width:40px!important;height:40px!important;border-radius:50%!important;background:#fff!important;box-shadow:var(--shadow2)!important}.top-title strong{font-size:17px!important}.top-title span{font-size:11px!important}.search{width:min(460px,38vw)!important;background:#fff!important;border-radius:13px!important}.server{border-radius:12px!important;background:linear-gradient(180deg,#5a2481,#35144b)!important}.server .dot{background:var(--gold)!important}.content{max-width:1500px!important;padding:24px 27px 42px!important}.hero{min-height:130px!important;border-radius:20px!important;background:linear-gradient(115deg,#fffdf9,#faf6ef)!important;box-shadow:var(--shadow2)!important}.hero h1{font-size:31px!important}.motto{color:#5c3370!important}
.workspace-card{border-radius:19px!important;box-shadow:var(--shadow2)!important;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.workspace-card:hover{transform:translateY(-2px);box-shadow:0 14px 32px rgba(34,17,44,.09);border-color:#d5c4de}.ws-icon{background:linear-gradient(145deg,#642a93,#241032)!important;color:var(--gold2)!important}.btn{border-radius:12px!important;background:linear-gradient(180deg,#682a96,#35144b)!important}.btn.gold{background:linear-gradient(180deg,#d8b45f,#a67723)!important}.btn.danger{background:#fff!important;color:var(--danger)!important}.module-rail{border-radius:18px!important;box-shadow:var(--shadow2)!important}.module-list button{min-height:42px!important}.module-list button.active{background:linear-gradient(90deg,#f0e7f5,#f7f1f9)!important;border-color:#cdb8d8!important;box-shadow:inset 3px 0 0 var(--gold)!important}.panel{border-radius:17px!important;background:#fcfaf6!important}
.mail-shell{grid-template-columns:205px minmax(0,1fr)!important}.mail-nav{background:#f8f4ee!important;border-radius:17px!important}.mail-main{border-radius:17px!important}.mail-top{background:#fffdf9!important}.mail-row{min-height:48px!important}.mail-row:hover{background:#fffaf2!important}.compose{min-height:42px!important}
/* ALIDAX */
.alidax-screen-v5{display:grid;gap:16px}.alidax-hero-v5{min-height:238px;display:grid;grid-template-columns:minmax(0,1fr) 360px;align-items:center;gap:28px;padding:28px 32px;border:1px solid var(--line);border-radius:22px;background:radial-gradient(circle at 82% 43%,rgba(199,154,66,.10),transparent 28%),linear-gradient(115deg,#fffdf9 0%,#fbf7f0 59%,#f3eadc 100%);box-shadow:var(--shadow);position:relative;overflow:hidden}.alidax-hero-v5:before,.alidax-hero-v5:after{content:"";position:absolute;border-radius:50%;pointer-events:none}.alidax-hero-v5:before{width:520px;height:145px;right:-100px;bottom:-74px;border:1px solid rgba(199,154,66,.22);transform:rotate(-10deg)}.alidax-hero-v5:after{width:390px;height:110px;right:45px;bottom:-45px;border:1px solid rgba(101,42,147,.08);transform:rotate(-10deg)}.alidax-hero-copy-v5{position:relative;z-index:2}.alidax-kicker-v5{font-size:10px;letter-spacing:.30em;color:#5c3270;font-weight:850;margin-bottom:12px}.alidax-hero-v5 h1{margin:0;font-size:38px;line-height:1;letter-spacing:-.035em;color:#22122f}.alidax-hero-v5 h2{margin:8px 0 0;font-size:20px;font-weight:600;color:#33213d}.alidax-hero-v5 p{max-width:660px;margin:17px 0 0;color:#665b6b;font-size:13px;line-height:1.55}.alidax-hero-right-v5{position:relative;z-index:2;display:grid;grid-template-columns:1fr 188px;align-items:center;gap:10px}.alidax-script-v5{color:#b77a20;font-family:Georgia,"Times New Roman",serif;font-style:italic;font-size:23px;line-height:1.25;text-align:center;transform:rotate(-4deg)}.alidax-script-v5:after{content:"";display:block;width:92px;height:1px;margin:8px auto 0;background:var(--gold)}.alidax-logo-hero-v5{width:188px;height:188px;object-fit:contain;filter:drop-shadow(0 10px 18px rgba(75,38,20,.08))}.alidax-grid-v5{display:grid;grid-template-columns:350px minmax(0,1fr);gap:16px}.alidax-profile-v5,.alidax-chat-v5{background:var(--paper);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow)}.alidax-profile-v5{padding:18px}.alidax-profile-logo-v5{height:178px;border-radius:16px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fbf8f2,#f4ebdf);border:1px solid #ece2d5}.alidax-profile-logo-v5 img{width:100%;height:100%;object-fit:contain}.alidax-profile-v5 h2{margin:14px 0 3px;font-size:22px;color:#2d153e}.alidax-profile-v5>p{margin:0 0 15px;font-size:11px;color:var(--muted)}.alidax-benefits-v5{display:grid;gap:10px}.alidax-benefit-v5{display:grid;grid-template-columns:38px 1fr;gap:10px;align-items:center}.benefit-icon-v5{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#f5ead1;color:#a76f14;font-weight:900}.alidax-benefit-v5 b{display:block;font-size:12px}.alidax-benefit-v5 span span{display:block;font-size:10px;color:var(--muted);margin-top:2px}.alidax-quote-v5{margin-top:16px;padding:14px 15px;border-left:3px solid var(--gold);border-radius:12px;background:#f7edd9;color:#835a18;font-family:Georgia,"Times New Roman",serif;font-style:italic;font-weight:700;line-height:1.4}.alidax-chat-v5{min-height:525px;padding:16px;display:flex;flex-direction:column}.alidax-status-v5{min-height:48px;padding:10px 13px;border-radius:13px;background:linear-gradient(90deg,#eee6f4,#f4ecf8);display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px}.status-left-v5{display:flex;align-items:center;gap:9px}.status-dot-v5{width:9px;height:9px;border-radius:50%;background:var(--gold);box-shadow:0 0 8px rgba(199,154,66,.38)}.alidax-clock-v5{font-size:10px;color:#887d8e}.alidax-thread-v5{flex:1;padding:16px 8px 10px;overflow:auto}.alidax-message-v5{display:flex;gap:11px;align-items:flex-start}.alidax-avatar-v5{width:48px;height:48px;border-radius:50%;overflow:hidden;flex:0 0 auto;background:#250d33;border:1px solid rgba(199,154,66,.52);padding:4px}.alidax-avatar-v5 img{width:100%;height:100%;object-fit:contain}.alidax-message-body-v5{max-width:76%}.alidax-message-meta-v5{margin:2px 0 7px 4px;display:flex;gap:10px;align-items:center;font-size:10px;color:#897f90}.alidax-message-meta-v5 b{font-size:12px;color:#281535}.alidax-bubble-v5{background:linear-gradient(135deg,#f5f1f6,#f1edf2);color:#34273c;border-radius:15px;padding:14px 16px;font-size:12px;line-height:1.55}.alidax-actions-v5{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:12px 0 15px}.alidax-actions-v5 button{border:1px solid var(--line);background:#fff;border-radius:13px;padding:10px;display:grid;grid-template-columns:34px 1fr;gap:8px;align-items:center;text-align:left;transition:.15s}.alidax-actions-v5 button:hover{border-color:#cab6d5;background:#fcf9fd;transform:translateY(-1px)}.qicon-v5{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#f5ead1;color:#a76f14}.alidax-actions-v5 b{display:block;font-size:10px;color:#4b1e69}.alidax-actions-v5 small{display:block;font-size:9px;color:var(--muted);margin-top:2px}.alidax-compose-v5{display:grid;grid-template-columns:40px minmax(0,1fr) 110px;gap:8px;align-items:center;border:1px solid var(--line);border-radius:13px;background:#fff;padding:7px}.attach-v5{width:38px;height:38px;border:0;border-radius:10px;background:transparent;color:var(--p700);font-size:19px}.alidax-compose-v5 textarea{min-height:40px;max-height:115px;border:0;outline:0;resize:vertical;background:transparent;padding:10px 4px;color:var(--ink)}.send-v5{min-width:110px}.alidax-helper-v5{margin-top:6px;text-align:right;color:#8d8294;font-size:9px}.alidax-file-note-v5{margin-top:6px;font-size:9px;color:#766b7b}.alidax-user-msg-v5{margin:10px 0 0 auto;max-width:72%;background:var(--p700);color:#fff;padding:11px 13px;border-radius:15px;font-size:11px}.alidax-ai-msg-v5{margin-top:8px;max-width:76%;background:#f0e8f3;color:#312437;padding:11px 13px;border-radius:15px;font-size:11px}
@media(max-width:1250px){.alidax-hero-v5{grid-template-columns:1fr 280px}.alidax-script-v5{display:none}.alidax-actions-v5{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1050px){.app{grid-template-columns:88px minmax(0,1fr)!important}.sidebar{padding:0 9px 12px!important}.brand{height:82px!important;padding:9px 0!important}.brand img{height:62px!important}.brand-product,.brand-name,.nav-label,.nav .txt,.stage,.version{display:none!important}.nav button{justify-content:center!important;padding:10px!important}.nav .ico{width:34px!important;height:34px!important}.search{display:none!important}.workspace-grid,.grid-2,.grid-3,.form-grid,.workspace-shell,.mail-shell,.alidax-grid-v5{grid-template-columns:1fr!important}.module-rail{position:static!important}.mail-nav{display:none!important}.alidax-hero-v5{grid-template-columns:1fr!important}.alidax-hero-right-v5{justify-self:start!important}}


/* V5.1 critical button hierarchy fix */
.btn.ghost{background:#fff!important;color:var(--p700)!important;border:1px solid var(--line)!important;box-shadow:none!important;text-shadow:none!important}
.btn.ghost:hover{background:#fbf7fd!important;border-color:#cbb7d5!important;transform:translateY(-1px)!important}
.btn.danger{background:#fff!important;color:var(--danger)!important;border:1px solid #e9c7cc!important;box-shadow:none!important;text-shadow:none!important}
.btn.danger:hover{background:#fff8f9!important;border-color:#ddaab2!important;transform:translateY(-1px)!important}
.btn.small{padding:7px 10px!important;font-size:11px!important;line-height:1!important;min-width:auto!important}
.mail-top .btn.ghost{min-width:40px!important}
.module-header .btn.ghost{min-width:126px!important}
.workspace-card .btn.ghost{min-width:58px!important}



/* CSP extracted inline-style attributes */
[data-mag-style="mag-style-1"]{padding:30px;text-align:center;color:var(--muted)}
[data-mag-style="mag-style-2"]{justify-content:space-between}
[data-mag-style="mag-style-3"]{margin-bottom:12px}
[data-mag-style="mag-style-4"]{margin-top:8px}
[data-mag-style="mag-style-5"]{max-width:220px;max-height:130px;border-radius:10px;border:1px solid var(--line)}
[data-mag-style="mag-style-6"]{margin-top:7px}
[data-mag-style="mag-style-7"]{margin-bottom:10px}

/* =========================================================
   MAG_COMPLETENESS_V1
   ========================================================= */

button,
.btn,
nav button,
.sidebar button,
.tag,
h1,
h2,
h3,
label {
  text-transform: none !important;
}

.mag-official-logo {
  display: block;
  width: min(190px, 100%);
  max-height: 88px;
  object-fit: contain;
  object-position: left center;
}

.mag-bot-grid,
.mag-file-grid {
  display: grid;
  gap: 18px;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(280px, 1fr)
    );
}

.mag-bot-editor {
  display: grid;
  gap: 16px;
}

.mag-panel-heading,
.mag-action-row,
.mag-file-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.mag-form-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(220px, 1fr)
    );
  gap: 14px;
}

.mag-form-grid label,
.mag-bot-editor > label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.mag-form-grid input,
.mag-form-grid select,
.mag-bot-editor textarea {
  width: 100%;
  box-sizing: border-box;
}

.mag-bot-images {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fill,
      minmax(150px, 1fr)
    );
  gap: 12px;
}

.mag-media-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border:
    1px solid
    rgba(105, 68, 145, .18);
}

.mag-media-card img,
.mag-file-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
}

.mag-file-card {
  display: grid;
  gap: 10px;
}

.mag-file-icon {
  min-height: 100px;
  display: grid;
  place-items: center;
  font-size: 38px;
}

.mag-empty {
  opacity: .7;
}

.mag-upload-label {
  cursor: pointer;
}


/* =========================================================
   MAG_COMPLETENESS_V2
   ========================================================= */

.mag-logo-oficial-v2 {
  width: 100%;
  max-width: 196px;
  max-height: 96px;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.mag-version-row {
  display: grid;
  grid-template-columns:
    minmax(0,1fr)
    auto
    auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom:
    1px solid
    rgba(130,96,160,.15);
}

.mag-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mag-marketing-media-grid {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fill,
      minmax(170px,1fr)
    );
  gap: 14px;
  margin-top: 16px;
}

.mag-marketing-media-grid img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 10px;
}

button,
.btn,
.tag,
nav,
aside {
  letter-spacing: normal;
}


/* =========================================================
   MAG_ANALYTICS_REAL_V1
   ========================================================= */

.mag-analytics-summary {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0,1fr)
    );
  gap: 14px;
  margin-bottom: 16px;
}

.mag-analytics-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 18px;
  background: #fff;
  border:
    1px solid
    rgba(72,38,83,.14);
  border-radius: 16px;
  box-shadow:
    0 8px 24px
    rgba(43,18,56,.05);
}

.mag-analytics-label {
  font-size: 13px;
  color: #675d69;
}

.mag-analytics-value {
  font-size: 30px;
  line-height: 1;
  color: #2f113e;
}

.mag-analytics-subtitle {
  font-size: 12px;
  color: #786f7b;
}

.mag-analytics-state {
  width: max-content;
  margin-top: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: #eee6f4;
  color: #562171;
}

.mag-analytics-state.pending {
  background: #fff1cf;
  color: #805b05;
}

.mag-analytics-grid {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0,1fr)
    );
  gap: 16px;
  margin-bottom: 16px;
}

.mag-metric-row,
.mag-summary-row {
  display: flex;
  justify-content:
    space-between;
  align-items: center;
  gap: 20px;
  padding: 11px 0;
  border-bottom:
    1px solid
    rgba(72,38,83,.10);
}

.mag-metric-row:last-child,
.mag-summary-row:last-child {
  border-bottom: 0;
}

.mag-metric-row strong {
  color: #4c1764;
}

.mag-analytics-note {
  margin-top: 14px;
  padding: 10px 12px;
  background: #f7f1fa;
  border-radius: 10px;
  font-size: 12px;
  color: #685d6c;
}

.mag-provider-status {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
}

.mag-provider-status.ready {
  background: #e8f6ed;
  color: #23673a;
}

.mag-provider-status.pending {
  background: #fff2d7;
  color: #7a5709;
}

@media (
  max-width: 1100px
) {
  .mag-analytics-summary {
    grid-template-columns:
      repeat(2,1fr);
  }

  .mag-analytics-grid {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   MAG_FINAL_TWO_GAPS_V1
   ========================================================= */

.mag-final-analytics-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.mag-final-analytics-head h2 {
  margin: 0 0 5px;
}

.mag-final-analytics-head p {
  margin: 0;
  opacity: .68;
}

.mag-final-kpi-grid {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0,1fr)
    );
  gap: 14px;
  margin-bottom: 16px;
}

.mag-final-kpi {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: #fff;
  border:
    1px solid
    rgba(78,37,91,.13);
  border-radius: 16px;
  box-shadow:
    0 10px 30px
    rgba(46,18,57,.045);
}

.mag-final-kpi > span {
  font-size: 12px;
  color: #756b77;
}

.mag-final-kpi > strong {
  font-size: 28px;
  line-height: 1.1;
  color: #441457;
}

.mag-final-kpi > small {
  font-size: 11px;
  color: #827884;
}

.mag-final-analytics-grid {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0,1fr)
    );
  gap: 16px;
  margin-bottom: 16px;
}

.mag-final-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 11px 0;
  border-bottom:
    1px solid
    rgba(78,37,91,.09);
}

.mag-final-metric-row:last-child {
  border-bottom: 0;
}

.mag-final-metric-row > span {
  color: #625a64;
}

.mag-final-metric-row > strong {
  text-align: right;
  color: #421452;
}

.mag-final-pending {
  color: #946600 !important;
  font-size: 12px;
}

.mag-final-note {
  margin-top: 14px;
  padding: 11px 12px;
  background:
    rgba(94,41,116,.055);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #6d6170;
}

.mag-final-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0,1fr)
    );
  column-gap: 30px;
}

.mag-final-provider-grid {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0,1fr)
    );
  gap: 12px;
}

.mag-final-provider-grid > div {
  display: flex;
  align-items: center;
  justify-content:
    space-between;
  gap: 10px;
  padding: 12px;
  border:
    1px solid
    rgba(78,37,91,.10);
  border-radius: 12px;
}

@media (
  max-width: 1200px
) {
  .mag-final-kpi-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0,1fr)
      );
  }

  .mag-final-analytics-grid {
    grid-template-columns:
      1fr;
  }
}


/* =========================================================
   MAG_FINAL_TWO_GAPS_V1
   ========================================================= */

.mag-final-analytics-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.mag-final-analytics-head h2 {
  margin: 0 0 5px;
}

.mag-final-analytics-head p {
  margin: 0;
  opacity: .68;
}

.mag-final-kpi-grid {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0,1fr)
    );
  gap: 14px;
  margin-bottom: 16px;
}

.mag-final-kpi {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: #fff;
  border:
    1px solid
    rgba(78,37,91,.13);
  border-radius: 16px;
  box-shadow:
    0 10px 30px
    rgba(46,18,57,.045);
}

.mag-final-kpi > span {
  font-size: 12px;
  color: #756b77;
}

.mag-final-kpi > strong {
  font-size: 28px;
  line-height: 1.1;
  color: #441457;
}

.mag-final-kpi > small {
  font-size: 11px;
  color: #827884;
}

.mag-final-analytics-grid {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0,1fr)
    );
  gap: 16px;
  margin-bottom: 16px;
}

.mag-final-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 11px 0;
  border-bottom:
    1px solid
    rgba(78,37,91,.09);
}

.mag-final-metric-row:last-child {
  border-bottom: 0;
}

.mag-final-metric-row > span {
  color: #625a64;
}

.mag-final-metric-row > strong {
  text-align: right;
  color: #421452;
}

.mag-final-pending {
  color: #946600 !important;
  font-size: 12px;
}

.mag-final-note {
  margin-top: 14px;
  padding: 11px 12px;
  background:
    rgba(94,41,116,.055);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #6d6170;
}

.mag-final-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0,1fr)
    );
  column-gap: 30px;
}

.mag-final-provider-grid {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0,1fr)
    );
  gap: 12px;
}

.mag-final-provider-grid > div {
  display: flex;
  align-items: center;
  justify-content:
    space-between;
  gap: 10px;
  padding: 12px;
  border:
    1px solid
    rgba(78,37,91,.10);
  border-radius: 12px;
}

@media (
  max-width: 1200px
) {
  .mag-final-kpi-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0,1fr)
      );
  }

  .mag-final-analytics-grid {
    grid-template-columns:
      1fr;
  }
}



/* =========================================================
   MAG_R2_MAIL_UI_FIX_V1
   Real Gmail visual parity
   ========================================================= */

/*
 * Real Gmail rows contain:
 * 1. sender
 * 2. subject/snippet
 * 3. time
 *
 * They must NOT inherit the legacy five-column demo layout.
 */

.mail-main {
  min-width: 0 !important;
}

.mail-list {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

.mag-real-thread.mail-row {
  display: grid !important;

  grid-template-columns:
    minmax(175px, 0.34fr)
    minmax(0, 1fr)
    82px !important;

  align-items: center !important;

  gap: 12px !important;

  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;

  min-height: 56px !important;

  margin: 0 !important;
  padding: 9px 14px !important;

  appearance: none !important;

  border-top: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom:
    1px solid #efe8df !important;

  border-radius: 0 !important;

  background: #fff !important;
  color: var(--ink) !important;

  text-align: left !important;

  box-shadow: none !important;
}

.mag-real-thread.mail-row:hover {
  background: #fffaf2 !important;

  box-shadow:
    inset 3px 0 0
    var(--gold) !important;
}

.mag-real-thread.mail-row > * {
  min-width: 0 !important;
}

.mag-real-thread.mail-row > span:first-child {
  display: block !important;

  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;

  font-size: 12px !important;
  font-weight: 700 !important;

  color: #35253e !important;
}

.mag-real-thread .mail-subject {
  display: flex !important;
  align-items: baseline !important;

  min-width: 0 !important;

  gap: 8px !important;

  overflow: hidden !important;
}

.mag-real-thread .mail-subject b {
  flex: 0 1 auto !important;

  min-width: 0 !important;

  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;

  font-size: 12px !important;

  color: #271731 !important;
}

.mag-real-thread .mail-subject small {
  flex: 1 1 auto !important;

  min-width: 0 !important;

  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;

  font-size: 11px !important;
  font-weight: 400 !important;

  color: #817587 !important;
}

.mag-real-thread .mail-time {
  justify-self: end !important;

  min-width: 72px !important;

  white-space: nowrap !important;

  text-align: right !important;

  font-size: 10px !important;
  font-weight: 700 !important;

  color: #786c7e !important;
}

/* Account selector + status */

.account-strip {
  display: flex !important;

  align-items: center !important;

  gap: 8px !important;

  flex-wrap: wrap !important;
}

.account-strip select {
  min-width: 260px !important;

  flex: 1 1 360px !important;
}

.mag-mail-status {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  min-height: 30px;

  padding: 6px 10px;

  border:
    1px solid
    rgba(101,42,147,.20);

  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      #f2eaf6,
      #faf6fc
    );

  color: var(--p700);

  font-size: 10px;

  font-weight: 850;

  white-space: nowrap;
}

.mag-mail-status::before {
  content: "";

  width: 7px;
  height: 7px;

  flex: 0 0 auto;

  border-radius: 50%;

  background: var(--gold);

  box-shadow:
    0 0 0 3px
    rgba(199,154,66,.13);
}

.mag-mail-status.pending {
  color: #786c7e;

  background: #f7f3f7;
}

/* Thread/detail readability */

.thread {
  max-width: 100% !important;
  min-width: 0 !important;
}

.thread-body {
  max-width: 100% !important;

  overflow-wrap: anywhere !important;
  word-break: normal !important;

  white-space: pre-wrap !important;

  font-size: 13px !important;
  line-height: 1.62 !important;
}

.thread-body img,
.thread img {
  max-width: 100% !important;
  height: auto !important;
}

.thread-body table,
.thread table {
  max-width: 100% !important;
}

/*
 * Narrow desktop/tablet:
 * retain usable sender column.
 */

@media (max-width: 1350px) {

  .mag-real-thread.mail-row {

    grid-template-columns:
      minmax(145px, 0.30fr)
      minmax(0, 1fr)
      72px !important;
  }

}

/*
 * Mobile/small workspace:
 * stack sender + subject without crushing text.
 */

@media (max-width: 760px) {

  .mag-real-thread.mail-row {

    grid-template-columns:
      minmax(0, 1fr)
      62px !important;

    grid-template-areas:
      "sender time"
      "subject subject" !important;

    gap:
      4px 9px !important;

    padding:
      10px 12px !important;
  }

  .mag-real-thread.mail-row
  > span:first-child {

    grid-area:
      sender !important;
  }

  .mag-real-thread
  .mail-subject {

    grid-area:
      subject !important;
  }

  .mag-real-thread
  .mail-time {

    grid-area:
      time !important;
  }

}



/* =========================================================
   MAG_R2_META_SOCIAL_UI_V1
   Real provider states
   ========================================================= */

.mag-social-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:14px;
}

.mag-social-head h3 {
  margin:0 0 4px;
}

.mag-social-head p {
  margin:0;
  color:var(--muted);
  font-size:10px;
  line-height:1.45;
}

.mag-social-status-grid {
  display:grid;
  gap:9px;
}

.mag-social-provider-card {
  display:grid;
  grid-template-columns:
    40px
    minmax(0,1fr)
    auto;
  align-items:center;
  gap:11px;

  min-width:0;

  padding:11px;

  border:1px solid var(--line);
  border-radius:13px;

  background:#fff;
}

.mag-social-provider-icon {
  width:40px;
  height:40px;

  display:grid;
  place-items:center;

  border-radius:12px;

  background:
    linear-gradient(
      145deg,
      #eee5f4,
      #f7f1f9
    );

  color:var(--p700);

  font-size:17px;
  font-weight:900;
}

.mag-social-provider-copy {
  min-width:0;
}

.mag-social-provider-copy strong {
  display:block;

  color:#2c1939;

  font-size:12px;
}

.mag-social-provider-copy span {
  display:block;

  margin-top:3px;

  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;

  color:var(--muted);

  font-size:9px;
}

.mag-social-provider-status {
  display:inline-flex;
  align-items:center;

  max-width:190px;

  padding:6px 9px;

  border-radius:999px;

  font-size:9px;
  font-weight:850;

  white-space:nowrap;
}

.mag-social-provider-status.loading {
  background:#eee8ef;
  color:#706475;
}

.mag-social-provider-status.pending {
  background:#f3edf5;
  color:#6b427f;
}

.mag-social-provider-status.partial {
  background:#f4ead3;
  color:#8a621b;
}

.mag-social-provider-status.waiting {
  background:#f4ead3;
  color:#8a621b;
}

.mag-social-provider-status.ready {
  background:#eee5f4;
  color:var(--p700);

  box-shadow:
    inset 3px 0 0
    var(--gold);
}

.mag-social-provider-status.error {
  background:#f8e9eb;
  color:var(--danger);
}

.mag-social-human-gate {
  display:grid;
  gap:3px;

  margin-top:12px;

  padding:11px 12px;

  border-left:
    3px solid
    var(--gold);

  border-radius:10px;

  background:#faf4e8;
}

.mag-social-human-gate strong {
  color:#805817;
  font-size:10px;
}

.mag-social-human-gate span {
  color:#776a58;
  font-size:9px;
  line-height:1.45;
}

.mag-social-draft-note {
  margin-bottom:12px;

  padding:8px 10px;

  border:1px solid #ded0e5;
  border-radius:10px;

  background:#f5eef8;

  color:#67427a;

  font-size:9px;
  font-weight:700;
}

@media(max-width:720px) {

  .mag-social-provider-card {
    grid-template-columns:
      40px
      minmax(0,1fr);
  }

  .mag-social-provider-status {
    grid-column:
      1 / -1;

    justify-self:start;

    margin-left:51px;
  }
}



/* =========================================================
   MAG_R2_BOTS_REAL_STATUS_V1
   ========================================================= */

.mag-bots-readiness {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;

  margin-bottom:15px;
  padding:13px 15px;

  border:1px solid var(--line);
  border-radius:15px;

  background:
    linear-gradient(
      110deg,
      #fffdf9,
      #f8f1fa
    );
}

.mag-bots-readiness strong {
  display:block;
  color:#301a3d;
  font-size:12px;
}

.mag-bots-readiness span {
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:9px;
}

.mag-bots-gate {
  flex:0 0 auto;

  padding:7px 10px;

  border-radius:999px;
  border:1px solid #e2c986;

  background:#faf2dd;

  color:#845d17;

  font-size:9px;
  font-weight:850;
}

.mag-bot-real-status {
  display:inline-flex;

  margin:-2px 0 10px;
  padding:5px 9px;

  border-radius:999px;

  font-size:9px;
  font-weight:850;
}

.mag-bot-real-status.ready {
  background:#eee5f4;
  color:var(--p700);
  box-shadow:
    inset 3px 0 0
    var(--gold);
}

.mag-bot-real-status.waiting {
  background:#f5ead3;
  color:#896119;
}

.mag-bot-real-status.error {
  background:#f8e9eb;
  color:var(--danger);
}

.mag-bot-provider-note {
  margin-top:12px;
  padding:9px 10px;

  border-left:
    3px solid
    var(--gold);

  border-radius:9px;

  background:#faf5ea;

  color:#746856;

  font-size:9px;
  line-height:1.45;
}

@media(max-width:760px) {

  .mag-bots-readiness {
    align-items:flex-start;
    flex-direction:column;
  }
}



/* =========================================================
   MAG_R2_BOTS_PROVIDER_CARDS_V2
   ========================================================= */

.mag-provider-readiness-v2 {
  margin:0 0 16px;
  padding:15px;

  border:1px solid var(--line);
  border-radius:17px;

  background:#fffdf9;
}

.mag-provider-readiness-head-v2 {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;

  margin-bottom:12px;
}

.mag-provider-readiness-head-v2 strong {
  display:block;
  color:#301a3d;
  font-size:13px;
}

.mag-provider-readiness-head-v2 span:not(.mag-provider-readiness-gate-v2) {
  display:block;
  margin-top:3px;

  color:var(--muted);
  font-size:9px;
}

.mag-provider-readiness-gate-v2 {
  flex:0 0 auto;

  padding:6px 9px;

  border:1px solid #e0c57b;
  border-radius:999px;

  background:#faf1dc;
  color:#805817;

  font-size:8px;
  font-weight:850;
}

.mag-provider-readiness-grid-v2 {
  display:grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0,1fr)
    );
  gap:10px;
}

.mag-provider-card-v2 {
  display:grid;
  grid-template-columns:
    42px
    minmax(0,1fr)
    auto;

  align-items:center;
  gap:11px;

  min-width:0;

  padding:11px;

  border:1px solid var(--line);
  border-radius:13px;

  background:#fff;
}

.mag-provider-icon-v2 {
  width:42px;
  height:42px;

  display:grid;
  place-items:center;

  border-radius:12px;

  background:
    linear-gradient(
      145deg,
      #eee5f4,
      #f8f3fa
    );

  color:var(--p700);

  font-size:17px;
  font-weight:900;
}

.mag-provider-copy-v2 {
  min-width:0;
}

.mag-provider-copy-v2 b {
  display:block;

  color:#2c1838;
  font-size:12px;
}

.mag-provider-copy-v2 span {
  display:block;

  margin-top:3px;

  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;

  color:var(--muted);
  font-size:9px;
}

.mag-provider-badge-v2 {
  display:inline-flex;

  padding:6px 9px;

  border-radius:999px;

  white-space:nowrap;

  font-size:9px;
  font-weight:850;
}

.mag-provider-badge-v2.loading {
  background:#eee8ef;
  color:#6f6474;
}

.mag-provider-badge-v2.ready {
  background:#eee5f4;
  color:var(--p700);

  box-shadow:
    inset 3px 0 0
    var(--gold);
}

.mag-provider-badge-v2.waiting {
  background:#f5ead3;
  color:#876018;
}

.mag-provider-badge-v2.error {
  background:#f8e9eb;
  color:var(--danger);
}

.mag-provider-scope-note-v2 {
  margin-top:10px;

  color:#7e7283;
  font-size:8px;
}

.mag-bot-instance-note-v2 {
  margin-top:10px;

  padding:8px 10px;

  border-left:
    3px solid
    #b79a5e;

  border-radius:8px;

  background:#faf6ec;

  color:#716654;

  font-size:8px;
  line-height:1.45;
}

@media(max-width:900px) {

  .mag-provider-readiness-grid-v2 {
    grid-template-columns:1fr;
  }

}

@media(max-width:650px) {

  .mag-provider-readiness-head-v2 {
    align-items:flex-start;
    flex-direction:column;
  }

  .mag-provider-card-v2 {
    grid-template-columns:
      42px
      minmax(0,1fr);
  }

  .mag-provider-badge-v2 {
    grid-column:1/-1;
    justify-self:start;
    margin-left:53px;
  }

}



/* =========================================================
   MAG_R2_BOTS_PROVIDER_CARDS_V3_CLEANUP
   ========================================================= */

.mag-single-bot-grid-v3 {
  grid-template-columns:
    minmax(0,1fr) !important;
}

.mag-single-bot-grid-v3 > .panel {
  grid-column:
    1 / -1 !important;

  width:
    100% !important;
}

.mag-single-bot-grid-v3
.mag-bot-instance-note-v2 {
  max-width:
    620px;
}



/* =========================================================
   MAG_R2_CONTROL_GLOBAL_READINESS_V1
   ========================================================= */

.mag-global-readiness-r2 {
  margin:18px 0;
  padding:20px;

  border:1px solid var(--line);
  border-radius:20px;

  background:
    linear-gradient(
      120deg,
      #fffdf9,
      #faf6ef
    );

  box-shadow:var(--shadow2);
}

.mag-global-head-r2 {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;

  margin-bottom:17px;
}

.mag-global-kicker-r2 {
  display:block;

  margin-bottom:6px;

  color:var(--p700);

  font-size:9px;
  font-weight:900;
  letter-spacing:.16em;
}

.mag-global-head-r2 h2 {
  margin:0;

  color:#25132f;

  font-size:23px;
}

.mag-global-head-r2 p {
  margin:5px 0 0;

  color:var(--muted);

  font-size:10px;
}

.mag-global-baseline-r2 {
  flex:0 0 auto;

  padding:9px 12px;

  border:
    1px solid
    rgba(199,154,66,.44);

  border-radius:12px;

  background:#fff;

  color:#76531a;

  font-size:8px;
  text-align:right;
}

.mag-global-baseline-r2 b {
  display:block;

  margin-top:3px;

  color:var(--p700);

  font-size:11px;
}

.mag-global-kpis-r2 {
  display:grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0,1fr)
    );

  gap:11px;

  margin-bottom:14px;
}

.mag-global-kpis-r2 article {
  padding:13px;

  border:1px solid var(--line);
  border-radius:14px;

  background:#fff;
}

.mag-global-kpis-r2 span {
  display:block;

  color:var(--muted);

  font-size:9px;
}

.mag-global-kpis-r2 b {
  display:block;

  margin:5px 0 3px;

  color:var(--p700);

  font-size:21px;
}

.mag-global-kpis-r2 small {
  color:#756a79;
  font-size:8px;
}

.mag-global-kpis-r2 small.ready {
  color:#76531a;
}

.mag-global-provider-grid-r2 {
  display:grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0,1fr)
    );

  gap:10px;
}

.mag-global-provider-r2 {
  display:grid;
  grid-template-columns:
    42px
    minmax(0,1fr)
    auto;

  align-items:center;
  gap:11px;

  min-width:0;

  padding:11px;

  border:1px solid var(--line);
  border-radius:13px;

  background:#fff;
}

.mag-global-provider-icon-r2 {
  width:42px;
  height:42px;

  display:grid;
  place-items:center;

  border-radius:12px;

  background:#f1e9f5;

  color:var(--p700);

  font-size:17px;
  font-weight:900;
}

.mag-global-provider-r2 strong {
  display:block;

  color:#2e193b;

  font-size:11px;
}

.mag-global-provider-r2 span {
  display:block;

  margin-top:3px;

  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;

  color:var(--muted);

  font-size:8px;
}

.mag-global-provider-r2 em {
  padding:5px 8px;

  border-radius:999px;

  font-size:8px;
  font-style:normal;
  font-weight:850;

  white-space:nowrap;
}

.mag-global-provider-r2 em.loading {
  background:#eee8ef;
  color:#6e6273;
}

.mag-global-provider-r2 em.ready {
  background:#eee5f4;
  color:var(--p700);

  box-shadow:
    inset 3px 0 0
    var(--gold);
}

.mag-global-provider-r2 em.waiting {
  background:#f5ead3;
  color:#865f18;
}

.mag-global-provider-r2 em.error {
  background:#f8e9eb;
  color:var(--danger);
}

.mag-global-governance-r2 {
  display:grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0,1fr)
    );

  gap:8px;

  margin-top:14px;
  padding-top:14px;

  border-top:1px solid var(--line);
}

.mag-global-governance-r2 div {
  padding:9px 10px;

  border-radius:11px;

  background:#f8f3ea;
}

.mag-global-governance-r2 strong {
  display:block;

  color:#78551b;

  font-size:8px;
}

.mag-global-governance-r2 span {
  display:block;

  margin-top:2px;

  color:#514657;

  font-size:9px;
  font-weight:800;
}

@media(max-width:1050px) {

  .mag-global-kpis-r2,
  .mag-global-governance-r2 {
    grid-template-columns:
      repeat(
        2,
        minmax(0,1fr)
      );
  }

}

@media(max-width:760px) {

  .mag-global-head-r2 {
    flex-direction:column;
  }

  .mag-global-provider-grid-r2,
  .mag-global-kpis-r2,
  .mag-global-governance-r2 {
    grid-template-columns:1fr;
  }

  .mag-global-provider-r2 {
    grid-template-columns:
      42px
      minmax(0,1fr);
  }

  .mag-global-provider-r2 em {
    grid-column:1/-1;
    justify-self:start;
    margin-left:53px;
  }

}


/* =========================================================
   MAG_R2_ALIDAX_PRIVATE_CHAT_STYLE_V2
   ========================================================= */

.mag-alidax-private-chat{
  margin-top:24px;
  padding:24px;
  border-radius:24px;
  border:1px solid rgba(212,175,55,.32);
  background:
    linear-gradient(
      145deg,
      rgba(39,18,62,.97),
      rgba(15,7,26,.98)
    );
  box-shadow:
    0 22px 60px rgba(0,0,0,.28);
}

.mag-alidax-chat-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
}

.mag-alidax-chat-head h2{
  margin:6px 0;
}

.mag-alidax-chat-head p{
  margin:0;
  opacity:.72;
}

.mag-alidax-chat-context{
  min-width:180px;
  padding:12px 15px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.05);
}

.mag-alidax-chat-context span,
.mag-alidax-chat-context strong{
  display:block;
}

.mag-alidax-chat-context span{
  font-size:12px;
  opacity:.62;
}

.mag-alidax-chat-governance{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:20px 0;
}

.mag-alidax-chat-governance span{
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(163,101,214,.22);
  background:rgba(113,57,157,.18);
}

.mag-alidax-chat-messages{
  min-height:280px;
  max-height:470px;
  overflow:auto;
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(0,0,0,.18);
}

.mag-alidax-message{
  max-width:82%;
  margin-bottom:14px;
  padding:13px 15px;
  border-radius:17px;
  line-height:1.55;
  white-space:pre-wrap;
}

.mag-alidax-message strong{
  display:block;
  margin-bottom:4px;
  font-size:12px;
}

.mag-alidax-message.assistant{
  background:rgba(106,55,151,.27);
  border:1px solid rgba(163,101,214,.18);
}

.mag-alidax-message.user{
  margin-left:auto;
  background:rgba(212,175,55,.11);
  border:1px solid rgba(212,175,55,.24);
}

.mag-alidax-chat-compose{
  margin-top:16px;
}

.mag-alidax-chat-compose textarea{
  width:100%;
  box-sizing:border-box;
  resize:vertical;
  border-radius:18px;
  padding:15px 16px;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.11);
  color:inherit;
  font:inherit;
  outline:none;
}

.mag-alidax-chat-compose textarea:focus{
  border-color:rgba(212,175,55,.6);
}

.mag-alidax-chat-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-top:12px;
}

.mag-alidax-chat-actions span{
  font-size:12px;
  opacity:.68;
}

@media (max-width:760px){

  .mag-alidax-chat-head,
  .mag-alidax-chat-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .mag-alidax-chat-context{
    min-width:0;
  }

  .mag-alidax-message{
    max-width:92%;
  }
}


/* =========================================================
   MAG_R2_ALIDAX_POINTER_GUARD_V1
   Physical click/hit-testing protection only.
   ========================================================= */

.sidebar,
.nav{
  pointer-events:auto !important;
}

.nav{
  position:relative !important;
  z-index:2147483000 !important;
}

.nav button[data-view="alidax"]{
  position:relative !important;
  z-index:2147483001 !important;
  pointer-events:auto !important;
  touch-action:manipulation !important;
  cursor:pointer !important;
}

.nav button[data-view="alidax"] *{
  pointer-events:none !important;
}


/* =========================================================
   MAG_R2_ALIDAX_INPUT_UNLOCK_STYLE_V1
   ========================================================= */

#view-alidax,
#view-alidax .alidax-screen-v5,
#view-alidax .alidax-grid-v5,
#view-alidax .alidax-chat-v5,
#view-alidax .alidax-compose-v5{
  pointer-events:auto!important;
}

#view-alidax .alidax-chat-v5{
  position:relative!important;
  z-index:20!important;
}

#view-alidax .alidax-compose-v5{
  position:relative!important;
  z-index:100!important;
  pointer-events:auto!important;
}

#chatInput{
  position:relative!important;
  z-index:101!important;

  pointer-events:auto!important;
  user-select:text!important;
  -webkit-user-select:text!important;

  cursor:text!important;

  opacity:1!important;
  visibility:visible!important;

  touch-action:auto!important;
}

#sendChat{
  position:relative!important;
  z-index:101!important;
  pointer-events:auto!important;
  cursor:pointer!important;
}

#view-alidax .alidax-compose-v5::before,
#view-alidax .alidax-compose-v5::after,
#view-alidax .alidax-chat-v5::before,
#view-alidax .alidax-chat-v5::after{
  pointer-events:none!important;
}


/* =========================================================
   MAG_R2_ALIDAX_NATIVE_INPUT_STYLE_V1
   Clean native ALIDAX input
   ========================================================= */

#view-alidax .alidax-compose-v5{
  grid-template-columns:
    40px minmax(0,1fr) 110px;
}

#chatInput.alidax-native-input-v6{
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;

  margin:0!important;
  padding:10px 6px!important;

  border:0!important;
  outline:0!important;

  position:relative!important;
  z-index:500!important;

  display:block!important;

  pointer-events:auto!important;
  touch-action:auto!important;

  user-select:text!important;
  -webkit-user-select:text!important;

  background:#fff!important;

  color:#2d2133!important;
  -webkit-text-fill-color:#2d2133!important;

  caret-color:#6f2d91!important;

  font:inherit!important;
  line-height:1.4!important;

  opacity:1!important;
  visibility:visible!important;

  cursor:text!important;
}

#chatInput.alidax-native-input-v6::placeholder{
  color:#8d8294!important;
  -webkit-text-fill-color:#8d8294!important;
  opacity:1!important;
}

#chatInput.alidax-native-input-v6:focus{
  outline:2px solid rgba(111,45,145,.28)!important;
  outline-offset:2px!important;
  border-radius:7px!important;
}

#sendChat{
  pointer-events:auto!important;
  cursor:pointer!important;
}


/* =========================================================
   MAG_R2_ALIDAX_IFRAME_STYLE_V1
   ========================================================= */

/* Parent host */

#view-alidax{
  padding:0!important;
}

#view-alidax .mag-alidax-isolated-frame{
  width:100%;
  min-height:calc(100vh - 92px);
  display:block;
  border:0;
  background:#160b1c;
}

/* Isolated iframe document */

.axiso-body{
  margin:0;
  min-height:100vh;
  box-sizing:border-box;
  padding:24px;

  background:
    radial-gradient(
      circle at 72% 0%,
      rgba(111,45,145,.25),
      transparent 36%
    ),
    #160b1c;

  color:#f7f1f8;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.axiso-body *{
  box-sizing:border-box;
}

.axiso-shell{
  width:min(1180px,100%);
  margin:0 auto;
}

.axiso-hero{
  padding:28px 30px;
  border-radius:22px;

  border:
    1px solid rgba(205,164,77,.26);

  background:
    linear-gradient(
      120deg,
      rgba(51,24,65,.98),
      rgba(103,41,131,.82)
    );
}

.axiso-kicker{
  color:#dfbb69;
  font-size:12px;
  font-weight:800;
  letter-spacing:.14em;
}

.axiso-hero h1{
  margin:10px 0 7px;
  font-size:48px;
  line-height:1;
}

.axiso-hero h1 span{
  color:#dfbb69;
  font-family:Georgia,serif;
  font-weight:400;
}

.axiso-hero p{
  margin:0;
  color:#ddd2df;
}

.axiso-badges{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:18px;
}

.axiso-badges span{
  padding:7px 10px;
  border-radius:999px;
  border:
    1px solid rgba(223,187,105,.22);
  background:rgba(0,0,0,.16);
  font-size:12px;
}

.axiso-chat{
  margin-top:17px;
  padding:18px;

  border:
    1px solid rgba(255,255,255,.09);

  border-radius:21px;

  background:
    rgba(31,16,39,.97);

  box-shadow:
    0 20px 55px rgba(0,0,0,.24);
}

.axiso-head{
  min-height:44px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;

  padding:0 3px 14px;
}

.axiso-status{
  display:flex;
  align-items:center;
  gap:8px;
}

.axiso-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#dfb958;
  box-shadow:
    0 0 15px rgba(223,185,88,.45);
}

.axiso-site{
  display:flex;
  align-items:center;
  gap:8px;
}

.axiso-site label{
  color:#b9adbb;
  font-size:12px;
}

.axiso-site select{
  padding:8px 10px;

  color:#f8f1f9;
  background:#291434;

  border:
    1px solid rgba(255,255,255,.10);

  border-radius:10px;
}

.axiso-thread{
  min-height:350px;
  max-height:52vh;
  overflow:auto;

  padding:17px;

  border:
    1px solid rgba(255,255,255,.07);

  border-radius:17px;

  background:
    rgba(0,0,0,.17);
}

.axiso-msg{
  max-width:84%;
  margin-bottom:14px;
}

.axiso-msg strong{
  display:block;
  margin-bottom:5px;
  font-size:12px;
}

.axiso-msg p{
  margin:0;
  padding:12px 14px;

  white-space:pre-wrap;
  line-height:1.55;

  border-radius:14px;

  background:
    rgba(112,54,148,.22);

  border:
    1px solid rgba(153,91,193,.19);
}

.axiso-msg.user{
  margin-left:auto;
}

.axiso-msg.user p{
  background:
    rgba(205,164,77,.11);

  border-color:
    rgba(205,164,77,.22);
}

.axiso-composer{
  margin-top:13px;
  padding:10px;

  border-radius:16px;

  border:
    1px solid rgba(205,164,77,.28);

  background:#fff;
}

.axiso-input{
  width:100%;
  min-height:90px;

  display:block;

  resize:vertical;

  padding:10px;

  border:0;
  outline:0;

  background:#fff!important;
  color:#2c2030!important;
  caret-color:#742e94!important;

  font:inherit;
  line-height:1.5;

  pointer-events:auto!important;
  user-select:text!important;
  -webkit-user-select:text!important;

  opacity:1!important;
  visibility:visible!important;

  cursor:text!important;
}

.axiso-input::placeholder{
  color:#8b7f8d;
  opacity:1;
}

.axiso-input:focus{
  outline:
    2px solid rgba(116,46,148,.25);
  outline-offset:1px;
}

.axiso-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  padding-top:8px;
}

.axiso-mode{
  color:#766c79;
  font-size:12px;
}

.axiso-send{
  min-width:115px;
  padding:10px 17px;

  border:0;
  border-radius:11px;

  background:
    linear-gradient(
      135deg,
      #652680,
      #8736aa
    );

  color:#fff;
  font-weight:800;

  cursor:pointer!important;
  pointer-events:auto!important;
}

.axiso-send:disabled{
  opacity:.55;
  cursor:wait!important;
}

@media(max-width:700px){

  .axiso-body{
    padding:12px;
  }

  .axiso-hero h1{
    font-size:37px;
  }

  .axiso-head{
    align-items:flex-start;
    flex-direction:column;
  }

}

/* MAG_AUTH_FAIL_CLOSED_V4_START */

html.mag-auth-locked body > *:not(#mag-auth-gate) {
  display: none !important;
}

html.mag-auth-locked body > #mag-auth-gate {
  display: flex !important;
}

#mag-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483647;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  padding: 24px;

  background:
    radial-gradient(
      circle at top,
      #421860 0%,
      #1b0b2a 44%,
      #0d0712 100%
    );

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

#mag-auth-gate[hidden] {
  display: none !important;
}

#mag-auth-gate .mag-auth-card {
  box-sizing: border-box;
  width: min(430px, 100%);
  padding: 38px 34px;

  text-align: center;
  color: #fff;

  background: #190d24;
  border: 1px solid rgba(214,171,78,.45);
  border-radius: 22px;

  box-shadow:
    0 28px 90px rgba(0,0,0,.50);
}

#mag-auth-gate .mag-auth-logo {
  width: 78px;
  height: 78px;

  display: grid;
  place-items: center;

  margin: 0 auto 22px;

  border: 1px solid rgba(224,185,92,.35);
  border-radius: 20px;

  background:
    linear-gradient(
      145deg,
      #4c2068,
      #281036
    );

  color: #e2b95c;

  font-size: 25px;
  font-weight: 900;
  letter-spacing: .05em;
}

#mag-auth-gate h1 {
  margin: 0 0 12px;

  color: #fff;
  font-size: 29px;
  line-height: 1.1;
}

#mag-auth-gate p {
  margin: 0 0 26px;

  color: #d8cfe0;
  font-size: 15px;
  line-height: 1.55;
}

#mag-auth-login {
  box-sizing: border-box;

  width: 100%;
  min-height: 50px;

  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      #71339a,
      #51206f
    );

  color: #fff;

  font-size: 15px;
  font-weight: 800;

  cursor: pointer;

  box-shadow:
    0 10px 28px rgba(0,0,0,.24);
}

#mag-auth-login:hover:not(:disabled) {
  filter: brightness(1.10);
}

#mag-auth-login:disabled {
  opacity: .55;
  cursor: wait;
}

#mag-auth-message {
  min-height: 20px;
  margin: 17px 0;

  color: #dfb75a;

  font-size: 13px;
  line-height: 1.4;
}

#mag-auth-gate .mag-auth-private {
  color: #998ca4;

  font-size: 11px;
  letter-spacing: .12em;
}

/* MAG_AUTH_FAIL_CLOSED_V4_END */

/* MAG_APPROVED_REAL_STYLE_START */

/* ==========================================================
   MAG · DESIGN LOCK OFICIAL
   Blanco / Marfil / Dorado
   Morado como acento
   ========================================================== */

:root{
  --mag-white:#fffefa;
  --mag-ivory:#faf6ed;
  --mag-ivory-deep:#f3ebdf;

  --mag-purple:#341047;
  --mag-purple-2:#53176f;
  --mag-purple-3:#76279e;

  --mag-gold:#bd8c31;
  --mag-gold-2:#dfb85d;
  --mag-gold-soft:#f2dfac;

  --mag-ink:#181126;
  --mag-muted:#6e6577;

  --mag-line:rgba(189,140,49,.28);

  --mag-shadow:
    0 22px 58px rgba(46,24,48,.11);

  --mag-shadow-soft:
    0 9px 28px rgba(46,24,48,.08);
}


/* ==========================================================
   LOGIN APROBADO
   ========================================================== */

#mag-auth-gate{
  background:
    radial-gradient(
      circle at 72% 40%,
      rgba(223,184,93,.16),
      transparent 30%
    ),
    radial-gradient(
      circle at 4% 93%,
      rgba(83,23,111,.22),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      #fffefa 0%,
      #faf5eb 58%,
      #fffdf8 100%
    ) !important;

  overflow:hidden !important;
}


/* purple/gold ribbon */
#mag-auth-gate::before{
  content:"";

  position:absolute;
  left:-160px;
  bottom:-290px;

  width:720px;
  height:560px;

  border-radius:50%;

  background:
    linear-gradient(
      145deg,
      rgba(56,14,77,.98),
      rgba(112,34,145,.91) 50%,
      rgba(223,184,93,.82) 71%,
      transparent 73%
    );

  transform:rotate(13deg);

  pointer-events:none;
}


/* gold / ivory right arc */
#mag-auth-gate::after{
  content:"";

  position:absolute;
  right:-130px;
  bottom:-245px;

  width:620px;
  height:580px;

  border-radius:50%;

  border:
    3px solid rgba(189,140,49,.25);

  box-shadow:
    0 0 0 34px rgba(255,255,255,.40),
    0 0 0 36px rgba(95,28,124,.10);

  pointer-events:none;
}


#mag-auth-gate .mag-auth-card{
  position:relative !important;
  z-index:3 !important;

  width:min(90vw,575px) !important;

  padding:
    38px 48px 34px !important;

  border:
    1px solid rgba(189,140,49,.70) !important;

  border-radius:
    22px !important;

  background:
    rgba(255,253,249,.96) !important;

  box-shadow:
    0 30px 85px rgba(60,34,52,.15) !important;

  color:
    var(--mag-ink) !important;

  backdrop-filter:
    blur(16px);
}


/* Official approved MAG logo */
#mag-auth-gate .mag-auth-logo{
  content:
    url("/assets/brand/mag-logo.png");

  display:block !important;

  width:min(82%,340px) !important;
  max-width:340px !important;
  height:auto !important;
  max-height:135px !important;

  margin:
    0 auto 18px !important;

  object-fit:
    contain !important;

  filter:
    drop-shadow(
      0 8px 18px rgba(64,20,82,.10)
    );
}


#mag-auth-gate h1{
  margin:
    6px 0 0 !important;

  color:
    var(--mag-ink) !important;

  font-size:
    clamp(28px,3vw,38px) !important;

  line-height:
    1.1 !important;

  letter-spacing:
    -.045em !important;
}


#mag-auth-gate .mag-auth-private{
  margin-top:
    13px !important;

  color:
    var(--mag-gold) !important;

  font-size:
    16px !important;

  font-weight:
    800 !important;
}


#mag-auth-gate p{
  max-width:
    410px;

  margin:
    9px auto 22px !important;

  color:
    var(--mag-muted) !important;

  font-size:
    15px !important;

  line-height:
    1.5 !important;
}


/* Google */
#mag-auth-login{
  min-height:
    58px !important;

  width:
    100% !important;

  padding:
    0 28px !important;

  border:
    1px solid rgba(223,184,93,.48) !important;

  border-radius:
    14px !important;

  background:
    linear-gradient(
      135deg,
      #74279d,
      #421157
    ) !important;

  color:
    #fff !important;

  font-size:
    16px !important;

  font-weight:
    800 !important;

  box-shadow:
    0 11px 26px rgba(75,20,99,.20) !important;

  transition:
    transform .16s ease,
    background .16s ease,
    border-color .16s ease !important;
}


#mag-auth-login:hover:not(:disabled){
  transform:
    translateY(-1px);

  background:
    linear-gradient(
      135deg,
      #852dad,
      #4d1465
    ) !important;

  border-color:
    rgba(223,184,93,.75) !important;
}


#mag-auth-login:disabled{
  opacity:
    .65 !important;
}


#mag-auth-message{
  color:
    var(--mag-muted) !important;
}


/* ALIDAX branding beneath login */
#mag-auth-gate .mag-auth-card::after{
  content:
    "ALIDAX   ·   ASISTENTE PRIVADO DE MAG";

  display:block;

  margin-top:
    26px;

  padding:
    78px 0 5px;

  border-top:
    1px solid rgba(189,140,49,.23);

  background:
    url("/assets/brand/alidax-logo.png")
    center 15px / 115px auto
    no-repeat;

  color:
    #83798a;

  font-size:
    9px;

  font-weight:
    800;

  letter-spacing:
    .17em;

  text-align:
    center;
}


/* ==========================================================
   APPLICATION BACKGROUND
   ========================================================== */

body{
  background:
    radial-gradient(
      circle at 85% -12%,
      rgba(223,184,93,.12),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      var(--mag-white),
      var(--mag-ivory)
    ) !important;

  color:
    var(--mag-ink) !important;
}


/* ==========================================================
   SIDEBAR
   ========================================================== */

.sidebar{
  background:
    radial-gradient(
      circle at 45% -4%,
      rgba(118,39,158,.31),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      #45145c 0%,
      #290d38 57%,
      #190820 100%
    ) !important;

  border-right:
    1px solid rgba(223,184,93,.43) !important;

  box-shadow:
    14px 0 40px rgba(30,10,39,.12) !important;
}


/*
  Cover common existing brand selectors without changing
  navigation icons.
*/
.sidebar .brand img,
.sidebar .logo img,
.sidebar .brand-logo,
.sidebar .mag-logo{
  content:
    url("/assets/brand/mag-logo.png");

  width:
    min(82%,190px) !important;

  max-height:
    100px !important;

  object-fit:
    contain !important;
}


.nav-label{
  color:
    #e3bd65 !important;
}


.nav button{
  color:
    white !important;

  border:
    1px solid transparent !important;

  border-radius:
    13px !important;

  transition:
    .16s ease !important;
}


.nav button:hover{
  color:
    #fff4cf !important;

  background:
    linear-gradient(
      90deg,
      rgba(223,184,93,.18),
      rgba(118,39,158,.25)
    ) !important;

  border-color:
    rgba(223,184,93,.45) !important;

  box-shadow:
    inset 3px 0 0 var(--mag-gold-2);

  transform:
    translateX(2px);
}


.nav button.active{
  color:
    #fff4cf !important;

  background:
    linear-gradient(
      90deg,
      rgba(223,184,93,.23),
      rgba(118,39,158,.34)
    ) !important;

  border-color:
    rgba(223,184,93,.63) !important;

  box-shadow:
    inset 4px 0 0 var(--mag-gold-2),
    0 8px 22px rgba(0,0,0,.15) !important;
}


/* ==========================================================
   TOP BAR
   ========================================================== */

.topbar{
  background:
    rgba(255,253,249,.96) !important;

  border-bottom:
    1px solid rgba(189,140,49,.17) !important;

  box-shadow:
    0 5px 20px rgba(52,25,56,.05) !important;

  backdrop-filter:
    blur(15px);
}


.top-title strong{
  color:
    var(--mag-ink) !important;
}


.top-title span{
  color:
    var(--mag-muted) !important;
}


/* ==========================================================
   HERO
   ========================================================== */

.hero{
  position:
    relative;

  overflow:
    hidden;

  min-height:
    170px;

  border:
    1px solid rgba(189,140,49,.25) !important;

  border-radius:
    22px !important;

  background:
    linear-gradient(
      120deg,
      rgba(255,253,249,.99),
      rgba(249,244,234,.97)
    ) !important;

  box-shadow:
    var(--mag-shadow) !important;
}


.hero::before{
  content:
    "BIENVENIDO A";

  display:
    block;

  margin-bottom:
    13px;

  color:
    var(--mag-gold);

  font-size:
    10px;

  font-weight:
    900;

  letter-spacing:
    .28em;
}


.hero::after{
  content:
    "";

  position:
    absolute;

  right:
    -70px;

  top:
    -120px;

  width:
    480px;

  height:
    380px;

  border-radius:
    50%;

  border:
    42px solid rgba(223,184,93,.11);

  box-shadow:
    0 0 0 27px rgba(93,28,121,.07);

  transform:
    rotate(-24deg);

  pointer-events:
    none;
}


.hero h1{
  color:
    var(--mag-ink) !important;

  font-size:
    clamp(34px,4vw,52px) !important;

  letter-spacing:
    -.045em !important;
}


.hero h1 b{
  color:
    var(--mag-purple-2) !important;
}


.hero p{
  color:
    var(--mag-muted) !important;
}


.motto{
  color:
    var(--mag-purple) !important;

  background:
    transparent !important;

  border:
    0 !important;

  font-weight:
    800 !important;

  letter-spacing:
    .18em !important;
}


/* ==========================================================
   WORKSPACES
   ========================================================== */

.section-head h2{
  color:
    var(--mag-ink) !important;

  font-size:
    32px !important;

  letter-spacing:
    -.035em !important;
}


.section-head h2::before{
  content:
    "";

  display:
    inline-block;

  width:
    38px;

  height:
    2px;

  margin-right:
    15px;

  vertical-align:
    middle;

  background:
    var(--mag-gold);
}


.section-head p{
  color:
    var(--mag-muted) !important;
}


.workspace-card{
  position:
    relative;

  overflow:
    hidden;

  border:
    1px solid rgba(189,140,49,.29) !important;

  border-radius:
    20px !important;

  background:
    linear-gradient(
      145deg,
      #fffefa,
      #fbf7ee
    ) !important;

  box-shadow:
    var(--mag-shadow-soft) !important;

  transition:
    .17s ease !important;
}


.workspace-card::after{
  content:
    "";

  position:
    absolute;

  right:
    -85px;

  bottom:
    -112px;

  width:
    250px;

  height:
    215px;

  border:
    28px solid rgba(223,184,93,.10);

  border-radius:
    50%;

  transform:
    rotate(-25deg);

  pointer-events:
    none;
}


.workspace-card:hover{
  transform:
    translateY(-2px);

  border-color:
    rgba(189,140,49,.54) !important;

  box-shadow:
    0 18px 42px rgba(39,22,43,.12) !important;
}


.workspace-card h3{
  color:
    var(--mag-ink) !important;

  font-size:
    23px !important;
}


.workspace-card p,
.workspace-card .meta{
  color:
    var(--mag-muted) !important;
}


.ws-icon{
  background:
    linear-gradient(
      145deg,
      #69218e,
      #351049
    ) !important;

  color:
    #efd17a !important;

  border:
    1px solid rgba(223,184,93,.28) !important;
}


.pill{
  background:
    linear-gradient(
      90deg,
      #f3e7c8,
      #eee5f2
    ) !important;

  color:
    var(--mag-ink) !important;

  border:
    1px solid rgba(189,140,49,.15) !important;
}


/* ==========================================================
   BUTTONS
   ========================================================== */

.btn{
  border-radius:
    11px !important;

  font-weight:
    800 !important;
}


.btn:not(.ghost):not(.danger){
  color:
    white !important;

  background:
    linear-gradient(
      135deg,
      #72269a,
      #3b1050
    ) !important;

  border:
    1px solid rgba(223,184,93,.28) !important;

  box-shadow:
    0 8px 18px rgba(73,19,96,.16) !important;
}


.btn:not(.ghost):not(.danger):hover{
  transform:
    translateY(-1px);

  background:
    linear-gradient(
      135deg,
      #822eaa,
      #49135f
    ) !important;

  border-color:
    rgba(223,184,93,.61) !important;
}


.btn.ghost{
  color:
    var(--mag-ink) !important;

  background:
    rgba(255,255,255,.82) !important;

  border:
    1px solid rgba(189,140,49,.29) !important;
}


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

.stage{
  border:
    1px solid rgba(223,184,93,.60) !important;

  border-radius:
    14px !important;

  background:
    linear-gradient(
      145deg,
      rgba(79,22,102,.65),
      rgba(21,8,29,.76)
    ) !important;
}


.stage strong{
  color:
    #fff4ca !important;
}


.stage .dot{
  background:
    var(--mag-gold-2) !important;

  box-shadow:
    0 0 12px rgba(223,184,93,.70) !important;
}


/* ==========================================================
   INPUTS
   ========================================================== */

input,
textarea,
select{
  color:
    var(--mag-ink) !important;

  background:
    rgba(255,255,255,.92) !important;

  border:
    1px solid rgba(189,140,49,.21) !important;

  border-radius:
    11px !important;
}


@media(max-width:900px){

  #mag-auth-gate .mag-auth-card{
    width:
      min(92vw,520px) !important;

    padding:
      30px 24px 27px !important;
  }

}

/* MAG_APPROVED_REAL_STYLE_END */


/* MAG_OFFICIAL_BRAND_FIX_START */

/* El logo ahora es un IMG real. No permitir que CSS lo
   sustituya otra vez por el antiguo WEBP VIDAX. */
#mag-auth-gate .mag-auth-logo{
  content: normal !important;

  display:block !important;

  width:min(88%,360px) !important;
  max-width:360px !important;

  height:auto !important;
  max-height:145px !important;

  margin:
    0 auto 18px !important;

  object-fit:
    contain !important;

  background:
    transparent !important;

  border:
    0 !important;

  filter:
    drop-shadow(
      0 9px 20px rgba(49,19,61,.10)
    ) !important;
}


/* Subtítulo aprobado */
#mag-auth-gate .mag-auth-subtitle{
  display:inline-block;

  margin-bottom:7px;

  color:
    var(--mag-gold) !important;

  font-size:
    16px;

  line-height:
    1.2;

  font-weight:
    800;
}


/* Mensaje inferior de seguridad */
#mag-auth-gate .mag-auth-private{
  margin-top:
    18px !important;

  color:
    #766c79 !important;

  font-size:
    10px !important;

  font-weight:
    700 !important;

  letter-spacing:
    .06em !important;

  text-transform:
    none !important;
}


/* ALIDAX oficial y sin superposición */
#mag-auth-gate .mag-auth-card::after{
  content:
    "ASISTENTE PRIVADO DE MAG";

  box-sizing:
    border-box;

  display:block;

  min-height:
    118px;

  margin-top:
    21px;

  padding:
    92px 8px 5px;

  border-top:
    1px solid rgba(189,140,49,.23);

  background:
    url("/assets/brand/alidax-logo.png")
    center 14px / 145px auto
    no-repeat;

  color:
    #817689;

  font-size:
    9px;

  line-height:
    1.25;

  font-weight:
    800;

  letter-spacing:
    .17em;

  text-align:
    center;
}


/* También usar MAG PNG en la plataforma interior. */
.sidebar .brand img,
.sidebar .logo img,
.sidebar .brand-logo,
.sidebar .mag-logo{
  content:
    normal !important;
}

/* MAG_OFFICIAL_BRAND_FIX_END */
