/* MEGA TEAM / UX UI CONSISTENCY PATCH — 2026-10-26
   Public + students + admin; semantic theme tokens; no global reset on Laravel components. */
:root,html[data-theme="light"]{--mt-paper:#f7f9fc;--mt-panel:#fff;--mt-ink:#10213c;--mt-sub:#667990;--mt-divider:#dbe5ed;--mt-accent:#098d78;--mt-input:#f9fbfd;--mt-ui-shadow:0 25px 75px rgba(21,48,75,.095)}
html[data-theme="dark"]{--mt-paper:#081425;--mt-panel:#11243a;--mt-ink:#eff5fb;--mt-sub:#afbed0;--mt-divider:#29445d;--mt-accent:#38d2ac;--mt-input:#0b1c30;--mt-ui-shadow:0 28px 75px rgba(0,5,14,.33)}
body.mega-body{--mega-green:var(--mt-accent);background:var(--mt-paper);color:var(--mt-ink)}
body.mega-body.is-interior .page>.container{width:min(1370px,100%);min-height:calc(100vh - 175px);padding-top:0;color:var(--mt-ink)}
body.mega-body .mega-site-header{box-shadow:0 4px 22px rgba(0,18,40,.055)}
body.mega-body .mega-navigation .mega-login{color:var(--mt-ink)}
body.mega-body.is-interior .page>.container a:not(.mt-auth-submit){text-underline-offset:3px}
/* Main content pages: same visual language after authentication */
body.mega-body .cx-page,body.mega-body .cs-page,body.mega-body .topic-page-wrapper{color:var(--mt-ink)}
body.mega-body .cx-head h1,body.mega-body .cs-page h1,body.mega-body .topic-title-main h2{color:var(--mt-ink)}
body.mega-body .cx-head p,body.mega-body .cs-back{color:var(--mt-sub)}
body.mega-body .cx-card,body.mega-body .cs-panel,body.mega-body .topic-hero-card,body.mega-body .topic-main-card,body.mega-body .topic-gate-card,body.mega-body .topic-nav-btn{background:var(--mt-panel);color:var(--mt-ink);border:1px solid var(--mt-divider);box-shadow:var(--mt-ui-shadow)}
body.mega-body .cx-title a,body.mega-body .cx-by-name,body.mega-body .cs-lesson-title,body.mega-body .cs-prose,body.mega-body .cs-meta-row span:last-child,body.mega-body .topic-body,body.mega-body .topic-title-main h2,body.mega-body .nav-title{color:var(--mt-ink)}
body.mega-body .cx-desc,body.mega-body .cx-by-meta,body.mega-body .cx-fact,body.mega-body .cs-panel .sub,body.mega-body .cs-lesson-meta,body.mega-body .cs-by-role,body.mega-body .topic-title-main p,body.mega-body .nav-label{color:var(--mt-sub)}
body.mega-body .cx-fact,body.mega-body .cs-num,body.mega-body .cs-fact,body.mega-body .topic-pill-row .pill{background:var(--mt-input);border-color:var(--mt-divider);color:var(--mt-ink)}
body.mega-body .cx-btn.ghost,body.mega-body .cs-cta.ghost{background:var(--mt-input);color:var(--mt-ink);border-color:var(--mt-divider)}
body.mega-body .cx-card:hover,body.mega-body a.cs-lesson:hover,body.mega-body .topic-nav-btn:hover{border-color:var(--mt-accent);box-shadow:0 20px 50px rgba(14,131,111,.12)}
body.mega-body .cx-empty,body.mega-body .cx-notice{background:var(--mt-panel);color:var(--mt-ink);border-color:var(--mt-divider)}
body.mega-body .cx-empty p{color:var(--mt-sub)}
body.mega-body .cx-state.open{color:var(--mt-accent)}
body.mega-body .cx-state.approved{color:var(--mt-accent)}
body.mega-body .cx-state.pending{color:#ac7d17}
body.mega-body .cx-state.denied{color:#bc4655}
body.mega-body .cs-hero{background:linear-gradient(125deg,#102943,#0e354a 70%,#073b3e);border:1px solid #285c68;box-shadow:0 26px 65px rgba(4,36,51,.16)}
body.mega-body .cs-hero h1,body.mega-body .cs-by-name{color:#fff}
body.mega-body .cs-hero .cs-lead,body.mega-body .cs-hero .cs-by-role{color:#d2e7ed}
body.mega-body .cs-lesson-go{color:var(--mt-accent)}
body.mega-body .topic-pill-row .pill{color:var(--mt-ink)}
body.mega-body .topic-body a{color:var(--mt-accent)}
body.mega-body .topic-video-wrapper{background:#07192b}
body.mega-body .cx-page input,body.mega-body .cx-page select,body.mega-body .cs-page input,body.mega-body .cs-page select{background:var(--mt-input);color:var(--mt-ink);border:1px solid var(--mt-divider);border-radius:10px}
@media(max-width:650px){body.mega-body .cx-page,body.mega-body .cs-page,body.mega-body .topic-page-wrapper{padding-inline:0}body.mega-body.is-interior .page>.container{padding-inline:16px}.topic-title-main{max-width:100%}}
/* Authentication: deliberate two-panel design, NOT generic card/inline labels. */
body.mega-body .mt-auth-page{padding:clamp(30px,5vw,75px) 16px clamp(42px,6vw,92px);min-height:calc(100vh - 190px);display:grid;align-items:center}
body.mega-body .mt-auth-shell{display:grid;grid-template-columns:minmax(0,.93fr) minmax(0,1fr);width:min(1050px,100%);margin:0 auto;min-height:605px;border:1px solid var(--mt-divider);border-radius:28px;overflow:hidden;background:var(--mt-panel);box-shadow:var(--mt-ui-shadow)}
body.mega-body .mt-auth-story{position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 60% 33%,#195b71 0%,#102b4a 49%,#071628 85%);color:white;display:flex;flex-direction:column;justify-content:space-between;padding:36px clamp(27px,3vw,48px)}
body.mega-body .mt-auth-story::before{content:"";position:absolute;inset:0;z-index:-1;background:repeating-linear-gradient(90deg,transparent 0 59px,rgba(105,216,213,.06) 60px 61px),repeating-linear-gradient(0deg,transparent 0 59px,rgba(105,216,213,.05) 60px 61px);mask-image:linear-gradient(transparent,black 26%,black 80%,transparent)}
body.mega-body .mt-auth-story-glow{position:absolute;width:350px;height:350px;border-radius:50%;background:rgba(30,201,161,.16);filter:blur(72px);top:10%;left:15%;pointer-events:none}
body.mega-body .mt-auth-story-top{font:700 10px/1.5 Consolas,monospace;letter-spacing:.1em;color:#98e6d8;display:flex;align-items:center;gap:9px}
body.mega-body .mt-auth-dot{width:7px;height:7px;border-radius:50%;background:#38d6af;box-shadow:0 0 0 5px rgba(54,211,177,.13)}
body.mega-body .mt-auth-story-logo{position:relative;z-index:1;margin:12px auto 0;max-width:400px;width:100%;filter:drop-shadow(0 25px 28px rgba(0,3,17,.38))}
body.mega-body .mt-auth-story-logo img{width:100%;height:auto;object-fit:contain}
body.mega-body .mt-auth-story-bottom{position:relative;z-index:1;max-width:380px}
body.mega-body .mt-auth-story-bottom h2{font-size:clamp(24px,2.45vw,34px);line-height:1.32;letter-spacing:-.035em;color:#fff;margin:0 0 12px;font-weight:830}
body.mega-body .mt-auth-story-bottom p{font-size:13px;line-height:1.8;color:#c5d9e4;margin:0 0 23px}
body.mega-body .mt-auth-story-bottom ul{list-style:none;margin:0;padding:0;display:grid;gap:10px}
body.mega-body .mt-auth-story-bottom li{display:flex;align-items:center;gap:10px;font-size:12px;color:#e4f4f5}
body.mega-body .mt-auth-story-bottom li span{display:grid;place-items:center;width:23px;height:23px;border-radius:8px;background:rgba(44,215,166,.13);color:#66e4c2}
body.mega-body .mt-auth-main{padding:clamp(30px,4.7vw,67px) clamp(22px,5vw,69px);display:flex;flex-direction:column;justify-content:center;min-width:0}
body.mega-body .mt-auth-eyebrow{display:flex;align-items:center;gap:9px;font:800 10px/1.5 Consolas,monospace;letter-spacing:.13em;color:var(--mt-accent);text-transform:uppercase}
body.mega-body .mt-auth-eyebrow span{width:21px;height:2px;border-radius:3px;background:var(--mt-accent)}
body.mega-body .mt-auth-main h1{font-size:clamp(27px,2.6vw,37px)!important;line-height:1.2;letter-spacing:-.035em;font-weight:840;margin:17px 0 9px;color:var(--mt-ink)}
body.mega-body .mt-auth-description{font-size:13px;color:var(--mt-sub);line-height:1.85;margin:0 0 29px}
body.mega-body .mt-auth-form{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;width:100%;margin:0}
body.mega-body .mt-auth-field{display:block;min-width:0}
body.mega-body .mt-auth-field>label,body.mega-body .mt-auth-label-row label{display:block;margin:0 0 9px;font-size:12.5px;font-weight:750;color:var(--mt-ink)}
body.mega-body .mt-auth-label-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
body.mega-body .mt-auth-label-row a{font-size:11.5px;font-weight:700;color:var(--mt-accent);margin-bottom:9px}
body.mega-body .mt-auth-form input:not([type=hidden]){display:block;width:100%;min-width:0;height:50px;margin:0;padding:12px 15px;border-radius:12px;border:1px solid var(--mt-divider);background:var(--mt-input);color:var(--mt-ink);font-size:15px;line-height:1.4;outline:none;transition:border-color .2s,box-shadow .2s}
body.mega-body .mt-auth-form input:focus{border-color:var(--mt-accent);box-shadow:0 0 0 4px rgba(17,173,143,.12)}
body.mega-body .mt-auth-form input::placeholder{color:var(--mt-sub)}
body.mega-body .mt-auth-password-wrap{position:relative}
body.mega-body .mt-auth-password-wrap input{padding-inline-end:86px}
body.mega-body .mt-auth-password-toggle{position:absolute;inset-inline-end:10px;top:50%;transform:translateY(-50%);padding:6px 10px;border:0;border-radius:7px;background:transparent;color:var(--mt-accent);font-size:12px;font-weight:750;cursor:pointer}
body.mega-body .mt-auth-password-toggle:focus-visible{outline:2px solid var(--mt-accent)}
body.mega-body .mt-auth-field-hint{display:block;font-size:11px;color:var(--mt-sub);margin-top:7px}
body.mega-body .mt-auth-submit{margin-top:5px;width:100%;min-height:51px;display:flex;align-items:center;justify-content:center;gap:12px;border:0;border-radius:12px;background:linear-gradient(120deg,#0a917d,#0aaf91);color:#fff;font-size:14px;font-weight:780;cursor:pointer;box-shadow:0 12px 26px rgba(8,148,121,.16);transition:transform .2s,box-shadow .2s}
body.mega-body .mt-auth-submit:hover{transform:translateY(-2px);box-shadow:0 16px 30px rgba(8,148,121,.24)}
body.mega-body .mt-auth-submit span{font-size:18px}
body.mega-body .mt-auth-alternate{text-align:center;font-size:12.5px;color:var(--mt-sub);margin:23px 0 0}
body.mega-body .mt-auth-alternate a{font-weight:800;color:var(--mt-accent);margin-inline-start:5px}
body.mega-body .mt-auth-footnote{font-size:10.5px;line-height:1.7;color:var(--mt-sub);border-top:1px solid var(--mt-divider);padding-top:15px;margin:21px 0 0;text-align:center}
body.mega-body .mt-auth-alert{padding:13px 17px;border-radius:11px;margin:0 0 21px;border:1px solid;font-size:12px}
body.mega-body .mt-auth-alert ul{padding-inline-start:20px;margin:5px 0 0}
body.mega-body .mt-auth-alert-error{color:#ac3346;background:rgba(228,82,101,.07);border-color:rgba(205,68,88,.3)}
body.mega-body .mt-auth-alert-success{color:var(--mt-accent);background:rgba(18,179,138,.08);border-color:rgba(18,179,138,.35)}
body.mega-body .mt-auth-honeypot{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0;pointer-events:none}
/* Existing reset screens (legacy form) stay readable; consistent with new auth cards */
body.mega-body .auth-wrapper{padding:30px 12px 65px;min-height:calc(100vh - 180px)}
body.mega-body .auth-card{background:var(--mt-panel)!important;color:var(--mt-ink)!important;border:1px solid var(--mt-divider)!important;border-radius:21px;box-shadow:var(--mt-ui-shadow);max-width:550px;padding:35px;display:flex;flex-direction:column;gap:8px}
body.mega-body .auth-card label{display:block;color:var(--mt-ink);font-size:13px;font-weight:700;margin:9px 0 2px}
body.mega-body .auth-card input{display:block;width:100%;max-width:none;min-width:0;min-height:49px;border-radius:11px;padding:11px 14px;background:var(--mt-input);border:1px solid var(--mt-divider);color:var(--mt-ink)}
body.mega-body .auth-card button{width:100%;border:0;border-radius:11px;background:#0a947e;color:white;min-height:48px;font-weight:750}
body.mega-body .reset-note{color:var(--mt-sub)}
/* Admin: keep every dashboard view in one theme including post-login */
body.app-layout{--mt-panel:var(--admin-surface,var(--surface));--mt-ink:var(--admin-ink,var(--text));}
body.app-layout .content{min-width:0}
body.app-layout .panel,body.app-layout .stat-card,body.app-layout .table-responsive{max-width:100%}
body.app-layout .table-responsive{overflow-x:auto}
body.app-layout img,body.app-layout iframe{max-width:100%}
body.app-layout input:not([type=checkbox]):not([type=radio]),body.app-layout select,body.app-layout textarea{max-width:100%}
body.app-layout .sidebar a,body.app-layout .topbar a{text-decoration:none}
@media(max-width:850px){body.mega-body .mt-auth-shell{grid-template-columns:minmax(0,1fr);max-width:560px}body.mega-body .mt-auth-story{min-height:180px;padding:23px 27px;display:block}body.mega-body .mt-auth-story-top{margin-bottom:5px}body.mega-body .mt-auth-story-logo{width:190px;margin:0 auto}body.mega-body .mt-auth-story-bottom{display:none}body.mega-body .mt-auth-main{padding:31px 25px 34px}body.mega-body .mt-auth-page{padding-top:24px;align-items:start}}
@media(max-width:480px){body.mega-body .mt-auth-shell{border-radius:18px}body.mega-body .mt-auth-story{min-height:133px;padding:19px 22px}body.mega-body .mt-auth-story-logo{width:155px}body.mega-body .mt-auth-main{padding:27px 19px}body.mega-body .mt-auth-page{padding:13px 0 36px}body.mega-body .mt-auth-main h1{font-size:27px!important}body.mega-body .mt-auth-label-row{flex-wrap:wrap}body.mega-body .mt-auth-form{gap:16px}}
@media(prefers-reduced-motion:reduce){body.mega-body .mt-auth-submit{transition:none}body.mega-body .mt-auth-submit:hover{transform:none}}

/* V40: auth-only logo: cleaner original artwork, centered without distortion. Homepage untouched. */
body.mega-body .mt-auth-story-logo{display:flex;align-items:center;justify-content:center;max-width:430px;min-height:240px;filter:drop-shadow(0 17px 25px rgba(0,3,17,.24))}body.mega-body .mt-auth-story-logo img{display:block;width:100%;height:auto;max-height:270px;object-fit:contain;object-position:center}@media(max-width:850px){body.mega-body .mt-auth-story-logo{min-height:120px;max-width:220px}body.mega-body .mt-auth-story-logo img{max-height:140px}}@media(max-width:480px){body.mega-body .mt-auth-story-logo{min-height:88px;max-width:164px}body.mega-body .mt-auth-story-logo img{max-height:100px}}
