/* iVT Studio — one portal, two accessible color modes. */
html{--studio-bg:#f6f6fb;--studio-surface:#fff;--studio-subtle:#f7f7fc;--studio-text:#20212c;--studio-muted:#777986;--studio-border:#e9e9f1;--studio-accent:#7560e6;--studio-soft:#f0ecff;--studio-shadow:0 3px 16px #27223e03;color-scheme:light}
html[data-color-mode="night"]{--studio-bg:#141522;--studio-surface:#1d1f30;--studio-subtle:#25273b;--studio-text:#f0eff9;--studio-muted:#a7a8bd;--studio-border:#34364c;--studio-accent:#aa99ff;--studio-soft:#332e50;--studio-shadow:none;color-scheme:dark}
html body[data-theme="studio"]{--green:var(--studio-accent);--deep:#302656;--mint:var(--studio-soft);--ink:var(--studio-text);--muted:var(--studio-muted);--line:var(--studio-border);--bg:var(--studio-bg);--accent:var(--studio-accent);--t-bg:var(--studio-bg);--t-panel:var(--studio-surface);--t-input:var(--studio-surface);--t-text:var(--studio-text);--t-muted:var(--studio-muted);--t-line:var(--studio-border);--t-accent:var(--studio-accent);font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--studio-text);background:var(--studio-bg)!important;background-image:none!important}
html body.portal[data-theme="studio"]{display:block;padding:0;min-height:100vh}
html body.portal[data-theme="studio"]::before,html body.portal[data-theme="studio"]::after{display:none}
html body[data-theme="studio"] :is(h1,h2,h3,h4,strong){color:inherit}
html body[data-theme="studio"] :is(.card,.stat-card,.daily-attendance,.record-directory,.profile-section,.enrollment-card,.course-card,.auth-card,.auth-brand-panel){background:var(--studio-surface);border:1px solid var(--studio-border);border-radius:24px;box-shadow:var(--studio-shadow);backdrop-filter:none;color:var(--studio-text)}
html body[data-theme="studio"] :is(.card,.stat-card,.welcome-panel)::before,html body[data-theme="studio"] :is(.card,.stat-card,.welcome-panel)::after{display:none}
html body.portal[data-theme="studio"] #sidebar{position:fixed;inset:0 auto 0 0;width:252px;height:100dvh;padding:30px 20px 22px;border:0;border-right:1px solid var(--studio-border);border-radius:0;background:var(--studio-surface);box-shadow:none;backdrop-filter:none;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--studio-border) transparent;z-index:100;transform:none}
html body.portal[data-theme="studio"] #sidebar>.brand{padding:0 8px;margin-bottom:25px;color:var(--studio-text)}
html body.portal[data-theme="studio"] #sidebar .brand img{background:transparent;border:0;padding:0;border-radius:50%;width:42px;height:42px}
html body.portal[data-theme="studio"] #sidebar .brand strong{font-size:20px;color:var(--studio-text);font-weight:650}
html body.portal[data-theme="studio"] #sidebar .brand small{font-size:8px;color:var(--studio-muted);letter-spacing:1.2px}
html body.portal[data-theme="studio"] .workspace-label{background:none;border:0;border-bottom:1px solid var(--studio-border);border-radius:0;padding:0 8px 20px;margin:0 0 16px;color:var(--studio-muted)}
html body.portal[data-theme="studio"] .workspace-label span{color:var(--studio-accent);background:var(--studio-soft)}
html body.portal[data-theme="studio"] #sidebar nav{display:block;flex:1}
html body.portal[data-theme="studio"] .nav-group{border:0;border-radius:0;background:none;margin:0 0 14px;padding:0}
html body.portal[data-theme="studio"] .nav-group>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;list-style:none;cursor:pointer;padding:14px 10px 10px;color:var(--studio-muted);font-size:10px;letter-spacing:1.1px;font-weight:600;user-select:none}
.nav-group>summary::-webkit-details-marker{display:none}.nav-chevron{font-size:17px;transform:rotate(-90deg);transition:transform .18s}.nav-group[open] .nav-chevron{transform:none}
html body.portal[data-theme="studio"] #sidebar nav a{display:flex;position:relative;align-items:center;gap:12px;min-height:46px;padding:11px 12px;margin:4px 0;border:0;border-radius:12px;box-shadow:none;background:transparent;color:var(--studio-text);font-size:13px;font-weight:500;text-decoration:none;line-height:1.4}
html body.portal[data-theme="studio"] #sidebar nav a:hover{background:var(--studio-subtle)}
html body.portal[data-theme="studio"] #sidebar nav a.selected{background:var(--studio-soft);color:var(--studio-accent);font-weight:700}
html body.portal[data-theme="studio"] #sidebar nav a.selected::before{display:none}
html body.portal[data-theme="studio"] #sidebar nav a .icon{width:20px;height:20px;color:inherit}
html body.portal[data-theme="studio"] .nav-count{margin-left:auto;background:var(--studio-soft);color:var(--studio-accent)}
html body.portal[data-theme="studio"] :is(.verification-link,.sidebar-foot){color:var(--studio-muted);border-color:var(--studio-border)}
html body.portal[data-theme="studio"] .main{margin:0 0 0 252px;min-width:0;width:auto;max-width:none;position:relative}
html body.portal[data-theme="studio"] .topbar{position:relative;top:auto;display:flex;align-items:center;gap:18px;min-height:108px;height:auto;margin:0;padding:26px 34px;border:0;border-radius:0;background:var(--studio-bg);box-shadow:none;backdrop-filter:none}
html body.portal[data-theme="studio"] #menu{display:inline-flex;background:var(--studio-surface);border:1px solid var(--studio-border);border-radius:50%;width:40px;height:40px;color:var(--studio-text)}
html body.portal[data-theme="studio"] .header-search{display:flex;align-items:center;flex:1;gap:10px;min-width:140px;margin:0;padding:5px 9px 5px 18px;background:var(--studio-surface);border:1px solid var(--studio-border);border-radius:40px;box-shadow:none;max-width:960px}
html body.portal[data-theme="studio"] .header-search input{min-width:0;flex:1;width:100%;border:0!important;background:transparent!important;box-shadow:none!important;padding:8px 0;min-height:38px;font-size:14px;color:var(--studio-text)}
.header-search-icon{display:flex;align-items:center;color:var(--studio-muted);margin:0!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
html body.portal[data-theme="studio"] .header-search select{width:auto;max-width:140px;font-size:11px;min-height:32px;padding:5px 20px 5px 10px;border:0!important;border-left:1px solid var(--studio-border)!important;border-radius:0;background:transparent!important;color:var(--studio-muted);box-shadow:none!important}
html body.portal[data-theme="studio"] .header-search .icon-button{width:32px;height:32px;border:0;background:var(--studio-soft);color:var(--studio-accent)}
html body.portal[data-theme="studio"] .topbar-right{gap:12px;flex-shrink:0}
html body.portal[data-theme="studio"] .topbar-right>.icon-button{width:43px;height:43px;border:1px solid var(--studio-border);background:transparent;border-radius:50%;color:var(--studio-text)}
html body.portal[data-theme="studio"] .studio-mode-toggle span{font-size:23px;line-height:1}
html body.portal[data-theme="studio"] .topbar-date{display:none}
html body.portal[data-theme="studio"] .user-chip{border-left:1px solid var(--studio-border);padding-left:19px;color:var(--studio-text)}
html body.portal[data-theme="studio"] .user-chip strong{font-size:13px;font-weight:600}.user-chip .avatar{object-fit:cover}
html body.portal[data-theme="studio"] .user-chip small{font-size:10px;color:var(--studio-muted)}
html body.portal[data-theme="studio"] .avatar{background:var(--studio-soft);color:var(--studio-accent)}
html body.portal[data-theme="studio"] .main>main{width:100%;max-width:1800px;padding:12px 34px 36px;margin:auto}
html body.portal[data-theme="studio"] .page-heading{border:0;margin:0 0 25px;padding:0;gap:18px}
html body.portal[data-theme="studio"] h1{font-size:30px;font-weight:650;letter-spacing:-1px;line-height:1.2}
html body.portal[data-theme="studio"] .page-heading .eyebrow{color:var(--studio-muted);letter-spacing:1px;font-size:9px}
html body.portal[data-theme="studio"] .page-heading p{color:var(--studio-muted);font-size:13px}
html body.portal[data-theme="studio"] .welcome-panel{border:0;border-radius:25px;background:#7560e6;color:white;padding:33px 35px;min-height:190px;box-shadow:none;overflow:hidden}
html body.portal[data-theme="studio"] .welcome-panel :is(h2,p,.eyebrow,.crystal-label){color:white}.welcome-panel .crystal-label{display:none}
html body.portal[data-theme="studio"] .welcome-panel h2{font-size:32px;letter-spacing:-.9px;margin:12px 0}
html body.portal[data-theme="studio"] .welcome-panel p{opacity:.85;font-size:14px}
html body.portal[data-theme="studio"] .welcome-mark{border:0;box-shadow:none;background:#ffffff16;width:105px;height:105px;border-radius:30px;transform:rotate(-8deg);animation:none;color:white}
html body.portal[data-theme="studio"] .welcome-mark .icon{color:white;width:48px;height:48px}
html body.portal[data-theme="studio"] :is(.button,button:not([class])){background:var(--studio-accent);border:1px solid var(--studio-accent);border-radius:13px;color:#fff;box-shadow:none;min-height:43px;font-weight:600;padding:12px 18px;transform:none}
html body.portal[data-theme="studio"] :is(.button.secondary,.small-button,.icon-button){background:var(--studio-surface);border:1px solid var(--studio-border);border-radius:12px;box-shadow:none;color:var(--studio-text)}
html body.portal[data-theme="studio"] :is(.button.secondary,.small-button):hover{background:var(--studio-soft);border-color:var(--studio-accent);color:var(--studio-accent)}
html body.portal[data-theme="studio"] .button.danger{background:#fce9ed;color:#a32647;border-color:#f3ccd7}
html body.portal[data-theme="studio"] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){color:var(--studio-text);background:var(--studio-surface);border:1px solid var(--studio-border);border-radius:12px;box-shadow:none}
html body.portal[data-theme="studio"] :is(input,select,textarea):focus{border-color:var(--studio-accent);outline:2px solid var(--studio-soft);outline-offset:2px}
html body.portal[data-theme="studio"] :is(label,.field-label){color:var(--studio-text)}
html body.portal[data-theme="studio"] :is(.stat-card,.card){padding:24px}
html body.portal[data-theme="studio"] .stat-card>strong{font-size:29px;font-weight:650;color:var(--studio-text)}
html body.portal[data-theme="studio"] :is(.stat-top,.stat-card>small,.muted,small,.card-heading p,.field-hint){color:var(--studio-muted)}
html body.portal[data-theme="studio"] .stat-icon.purple{background:var(--studio-soft);color:var(--studio-accent)}
html body.portal[data-theme="studio"] :is(.quick-action,.payment-row,.notice-item){border-color:var(--studio-border);color:var(--studio-text);background:transparent}
html body.portal[data-theme="studio"] .quick-action{border-radius:16px;padding:15px}
html body.portal[data-theme="studio"] :is(.quick-icon,.notice-symbol){background:var(--studio-soft);color:var(--studio-accent)}
html body.portal[data-theme="studio"] table{color:var(--studio-text);background:transparent}
html body.portal[data-theme="studio"] :is(th,td){border-color:var(--studio-border);background:transparent;color:var(--studio-text)}
html body.portal[data-theme="studio"] th{color:var(--studio-muted);font-weight:500;font-size:11px;letter-spacing:.3px;background:var(--studio-subtle)}
html body.portal[data-theme="studio"] tbody tr:hover td{background:var(--studio-subtle)}
html body.portal[data-theme="studio"] :is(.table-wrap,.tabs,.list-toolbar,.list-footer,.record-view-toolbar,.record-tabs,.record-view-toolbar nav){border-color:var(--studio-border);background:transparent;color:var(--studio-text);box-shadow:none}
html body.portal[data-theme="studio"] :is(.tabs a.active,.record-tabs a.active,.record-view-toolbar a.selected){background:var(--studio-soft);color:var(--studio-accent);border-color:var(--studio-accent)}
html body.portal[data-theme="studio"] :is(.chat-shell,.chat-conversation,.chat-header,.chat-compose,.chat-contacts,.message-compose){background:var(--studio-surface);border-color:var(--studio-border);color:var(--studio-text)}
html body.portal[data-theme="studio"] :is(.portal-footer,.portal-footer-credit){border-color:var(--studio-border);background:none;color:var(--studio-muted)}
html body.portal[data-theme="studio"] .soft-nav-status{background:var(--studio-accent);border:0;color:white}
html body.portal[data-theme="studio"] .portal-toast{background:var(--studio-surface);border-color:var(--studio-border);color:var(--studio-text);box-shadow:0 10px 40px #13152b20}
html body.portal[data-theme="studio"] .portal-toast :is(small,button){color:var(--studio-accent)}
html body.portal[data-theme="studio"].sidebar-collapsed #sidebar{transform:translateX(-110%)}
html body.portal[data-theme="studio"].sidebar-collapsed .main{margin-left:0}
html[data-color-mode="night"] body.portal[data-theme="studio"] :is(.list-toolbar,.record-view-toolbar,.empty-state,.daily-attendance-card,.daily-stat,.chart-card,.chart-legend,.installment-row,.profile-summary,.profile-contact,.record-section,.form-aside,.form-section){background:var(--studio-surface);color:var(--studio-text);border-color:var(--studio-border)}
html[data-color-mode="night"] body.portal[data-theme="studio"] :is(.chat-message,.message-bubble){background:var(--studio-subtle);color:var(--studio-text)}
html[data-color-mode="night"] body.portal[data-theme="studio"] .notification-count{background:#eb4774;color:#fff}
@media(min-width:1001px){html body.portal[data-theme="studio"] .sheet-close{display:none}}
@media(max-width:1200px){html body.portal[data-theme="studio"] .topbar{gap:10px;padding:22px}.user-chip{max-width:150px}.user-chip strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}html body.portal[data-theme="studio"] .header-messages{display:none}html body.portal[data-theme="studio"] .main>main{padding:10px 22px 30px}}
@media(max-width:1000px){html body.portal[data-theme="studio"] #sidebar{width:280px;inset:0 auto 0 0;transform:translateX(-110%);transition:transform .2s ease;z-index:120;height:100dvh;padding-top:calc(18px + env(safe-area-inset-top,0px))}html body.portal[data-theme="studio"].menu-open #sidebar{transform:translateX(0)}html body.portal[data-theme="studio"] .main{margin-left:0!important}html body.portal[data-theme="studio"] .sheet-close{display:block;background:var(--studio-subtle);border:1px solid var(--studio-border);color:var(--studio-text);margin-bottom:22px;border-radius:10px;padding:10px}html body.portal[data-theme="studio"] .sidebar-backdrop{position:fixed;inset:0;background:#10112570;backdrop-filter:blur(3px);z-index:110}html body.portal[data-theme="studio"].menu-open .sidebar-backdrop{display:block}}
@media(max-width:700px){html body.portal[data-theme="studio"] .topbar{padding:calc(14px + env(safe-area-inset-top,0px)) 16px 14px;min-height:80px;flex-wrap:wrap;gap:12px}html body.portal[data-theme="studio"] .topbar-right{margin-left:auto;gap:9px}html body.portal[data-theme="studio"] .header-search{order:3;flex-basis:100%;max-width:none;padding:3px 8px 3px 14px}html body.portal[data-theme="studio"] .header-search select{max-width:105px;font-size:10px}html body.portal[data-theme="studio"] .header-search input{font-size:13px}html body.portal[data-theme="studio"] .user-chip{padding-left:10px;border:0;max-width:130px}html body.portal[data-theme="studio"] .user-chip strong{font-size:11px}html body.portal[data-theme="studio"] .user-chip small{font-size:9px}html body.portal[data-theme="studio"] .topbar-right>.icon-button{width:36px;height:36px}html body.portal[data-theme="studio"] .topbar-right>form{display:none}html body.portal[data-theme="studio"] .main>main{padding:14px 16px calc(100px + env(safe-area-inset-bottom,0px))}html body.portal[data-theme="studio"] .page-heading{align-items:flex-start;flex-wrap:wrap;margin-bottom:20px}html body.portal[data-theme="studio"] h1{font-size:25px}html body.portal[data-theme="studio"] :is(.card,.stat-card){padding:18px;border-radius:20px}html body.portal[data-theme="studio"] .welcome-panel{padding:25px;min-height:180px;border-radius:22px}html body.portal[data-theme="studio"] .welcome-panel h2{font-size:28px}html body.portal[data-theme="studio"] .welcome-panel p{font-size:12px;max-width:240px}html body.portal[data-theme="studio"] .welcome-mark{width:65px;height:65px;flex-shrink:0;margin:0 0 0 12px}html body.portal[data-theme="studio"] .welcome-mark .icon{width:30px;height:30px}html body.portal[data-theme="studio"] .mobile-nav{background:var(--studio-surface);border-color:var(--studio-border);box-shadow:0 -3px 18px #12142a08;backdrop-filter:none}html body.portal[data-theme="studio"] .mobile-nav a{color:var(--studio-muted)}html body.portal[data-theme="studio"] .mobile-nav a.selected{background:var(--studio-soft);color:var(--studio-accent)}}
@media(prefers-reduced-motion:reduce){.nav-chevron,html body.portal[data-theme="studio"] #sidebar{transition:none}}
@media print{.studio-mode-toggle,.header-search{display:none!important}html body[data-theme="studio"]{background:white!important;color:black!important}}
/* Explicit foregrounds also cover older page-specific heading colors. */
html body.portal[data-theme="studio"] :is(h1,h2,h3,h4,.user-chip strong,.quick-action strong,.stat-card>strong,.person strong,.card-heading h2,.page-heading h1){color:var(--studio-text)!important}
html body.portal[data-theme="studio"] .welcome-panel :is(h2,strong){color:white!important}
html body.portal[data-theme="studio"] :is(.quick-action small,.card-heading p,.page-heading p,.cell-sub,.person small){color:var(--studio-muted)!important}
html body.portal[data-theme="studio"] .header-messages svg{width:18px;height:18px}
@media(max-width:700px){html body.portal[data-theme="studio"] .topbar-right>form{display:block}html body.portal[data-theme="studio"] .user-chip{max-width:105px}html body.portal[data-theme="studio"] .topbar-right>form .icon-button{width:32px;height:32px}}

/* Refined navigation: compact accordion groups with a clear nested hierarchy. */
html body.portal[data-theme="studio"] #sidebar{padding:27px 16px 18px}
html body.portal[data-theme="studio"] #sidebar>.brand{padding:0 10px 22px;margin-bottom:17px;border-bottom:1px solid var(--studio-border)}
html body.portal[data-theme="studio"] .workspace-label{margin:0 8px 24px;padding:0;border:0;font-size:10px;gap:8px}
html body.portal[data-theme="studio"] .workspace-label span{font-size:10px;padding:5px 9px;border-radius:7px}
html body.portal[data-theme="studio"] .nav-group{margin:0 0 12px;border:1px solid var(--studio-border);border-radius:16px;background:var(--studio-surface);overflow:hidden}
html body.portal[data-theme="studio"] .nav-group>summary{padding:15px 13px;font-size:12px;letter-spacing:0;font-weight:600;color:var(--studio-text);min-height:51px}
html body.portal[data-theme="studio"] .nav-group-title{display:flex;align-items:center;gap:10px}
html body.portal[data-theme="studio"] .nav-group-title .icon{width:18px;height:18px;color:var(--studio-accent)}
html body.portal[data-theme="studio"] .nav-chevron{font-size:16px;color:var(--studio-muted)}
html body.portal[data-theme="studio"] .nav-group[open]>summary{background:var(--studio-subtle)}
html body.portal[data-theme="studio"] .nav-group-items{padding:7px 8px 9px;position:relative}
html body.portal[data-theme="studio"] #sidebar nav .nav-group-items a{gap:11px;padding:11px 12px;margin:3px 0;min-height:44px;font-size:12px;border-radius:10px;color:var(--studio-muted);transition:background .15s,color .15s}
html body.portal[data-theme="studio"] #sidebar nav .nav-group-items a .icon{width:17px;height:17px}
html body.portal[data-theme="studio"] #sidebar nav .nav-group-items a.selected{color:var(--studio-accent);background:var(--studio-soft);font-weight:650}
html body.portal[data-theme="studio"] #sidebar nav .nav-group-items a.selected::after{content:"";width:5px;height:5px;border-radius:50%;background:var(--studio-accent);margin-left:auto}
html body.portal[data-theme="studio"] #sidebar nav .nav-group-items a:hover{color:var(--studio-text);background:var(--studio-subtle)}
html body.portal[data-theme="studio"] #sidebar .verification-link{margin:20px 8px 0;padding:17px 0 12px;font-size:10px}
html body.portal[data-theme="studio"] #sidebar .sidebar-foot{padding:3px 8px;font-size:9px}
@media(max-width:1000px){html body.portal[data-theme="studio"] #sidebar{padding-top:calc(18px + env(safe-area-inset-top,0px))}}

/* Flat navigation, with all permitted pages directly visible. */
html body.portal[data-theme="studio"] .nav-section{margin:0 0 18px;padding:0;border:0;background:none}
html body.portal[data-theme="studio"] .nav-section-heading{padding:12px 12px 8px;color:var(--studio-muted);font-size:10px;font-weight:600;letter-spacing:.7px;text-transform:uppercase}
html body.portal[data-theme="studio"] .nav-section .nav-group-items{padding:0}
html body.portal[data-theme="studio"] #sidebar nav .nav-section a{min-height:43px;padding:10px 12px;font-size:12px;margin:3px 0;border-radius:10px;color:var(--studio-text)}
html body.portal[data-theme="studio"] #sidebar nav .nav-section a.selected{background:var(--studio-soft);color:var(--studio-accent)}
html body.portal[data-theme="studio"] #sidebar nav .nav-section a .icon{color:var(--studio-muted)}
html body.portal[data-theme="studio"] #sidebar nav .nav-section a.selected .icon{color:var(--studio-accent)}
/* Institute palette: blue, teal and warm white. */
html{--studio-bg:#f5f7fa;--studio-surface:#fff;--studio-subtle:#f1f5f9;--studio-text:#183047;--studio-muted:#6c7f90;--studio-border:#e2e9ef;--studio-accent:#1677ba;--studio-soft:#e9f3fb}
html[data-color-mode="night"]{--studio-bg:#0e1926;--studio-surface:#172638;--studio-subtle:#203348;--studio-text:#e8f0f7;--studio-muted:#a2b5c7;--studio-border:#30465c;--studio-accent:#76bff1;--studio-soft:#223e55}
html body.portal[data-theme="studio"] .welcome-panel{background:linear-gradient(115deg,#175b91,#157b96);color:white}
html body.portal[data-theme="studio"] .stat-icon.purple{background:#e8f2fc;color:#2875af}
html body.portal[data-theme="studio"] .stat-icon.teal{background:#e7f5f0;color:#27866e}
html body.portal[data-theme="studio"] .soft-navigating .main>main::before{background:linear-gradient(90deg,#1677ba,#219995)}
html body.portal[data-theme="studio"] :focus-visible{outline-color:var(--studio-accent)}
/* Small compositor-friendly movements; no continuous background animation. */
@keyframes ivt-content-enter{from{opacity:.25;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
html body.portal[data-theme="studio"] .main>main>.page-heading{animation:ivt-content-enter .24s ease-out both}
html body.portal[data-theme="studio"] .main>main>:is(.welcome-panel,.card,.stats,.dashboard-grid){animation:ivt-content-enter .32s ease-out both}
html body.portal[data-theme="studio"] .main>main>:nth-child(3){animation-delay:.035s}
html body.portal[data-theme="studio"] .main>main>:nth-child(4){animation-delay:.07s}
html body.portal[data-theme="studio"] :is(.button,.small-button,.icon-button,.quick-action,.stat-card){transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease}
@media(hover:hover){html body.portal[data-theme="studio"] :is(.quick-action,.stat-card):hover{transform:translateY(-2px);box-shadow:0 7px 20px #1830470c}html body.portal[data-theme="studio"] :is(.button,.small-button):hover{transform:translateY(-1px)}}
html body.portal[data-theme="studio"] :is(.button,.small-button,.icon-button):active{transform:translateY(1px)}
@media(prefers-reduced-motion:reduce){html body.portal[data-theme="studio"] *,html body.portal[data-theme="studio"] *::before,html body.portal[data-theme="studio"] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Public entry pages share the same design language as the workspace. */
html body.auth.auth-modern[data-theme="studio"]{--login-accent:var(--studio-accent);--login-text:var(--studio-text);--login-card:var(--studio-surface);--t-input:var(--studio-surface);--t-line:var(--studio-border);display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100svh;padding:32px 20px!important;color:var(--studio-text)}
html body.auth.auth-modern[data-theme="studio"]:not(.login-custom){background:radial-gradient(ellipse at 0 0,#e0edf7,transparent 65%),var(--studio-bg)!important}
html[data-color-mode="night"] body.auth.auth-modern[data-theme="studio"]:not(.login-custom){background:var(--studio-bg)!important}
html body.auth.auth-modern[data-theme="studio"] .auth-layout{width:min(100%,1040px)!important;max-width:1040px!important;display:grid;grid-template-columns:1fr 1fr;gap:0;min-height:580px!important;margin:auto!important;padding:0!important;border:1px solid var(--studio-border)!important;border-radius:28px!important;background:var(--studio-surface)!important;box-shadow:0 20px 65px #15334912!important;overflow:hidden}
html body.auth.auth-modern[data-theme="studio"] .auth-story{padding:36px!important;min-height:580px!important;border:0!important;border-radius:0!important;background:linear-gradient(145deg,#175b91,#157b96)!important;color:white!important;box-shadow:none!important;display:flex;flex-direction:column;justify-content:space-between}
html body.auth.auth-modern[data-theme="studio"] .auth-story :is(h1,p,small,strong,.eyebrow){color:white!important}
html body.auth.auth-modern[data-theme="studio"] .auth-story h1{font-size:37px!important;line-height:1.18!important;letter-spacing:-1.1px;max-width:390px}
html body.auth.auth-modern[data-theme="studio"] .auth-story-content{padding:35px 0 25px!important;margin:0!important}
html body.auth.auth-modern[data-theme="studio"] .auth-features{display:grid;gap:10px;margin-top:26px}
html body.auth.auth-modern[data-theme="studio"] .auth-features span{background:#ffffff12;border:1px solid #ffffff22;border-radius:12px;padding:12px;color:white!important}
html body.auth.auth-modern[data-theme="studio"] .auth-story .brand{color:white!important}.auth-story>.brand img{background:white;border-radius:12px}
html body.auth.auth-modern[data-theme="studio"] .auth-card{padding:38px!important;border:0!important;border-radius:0!important;min-height:0!important;width:100%!important;max-width:none!important;margin:0!important;background:var(--studio-surface)!important;color:var(--studio-text)!important;box-shadow:none!important;backdrop-filter:none!important;align-self:stretch;display:flex;flex-direction:column;justify-content:center}
html body.auth.auth-modern[data-theme="studio"] .auth-card :is(h1,h2,h3,label,strong){color:var(--studio-text)!important}
html body.auth.auth-modern[data-theme="studio"] .auth-card :is(p,small,.muted){color:var(--studio-muted)!important}
html body.auth.auth-modern[data-theme="studio"] .auth-card :is(input:not([type="checkbox"]),select,textarea){background:var(--studio-subtle)!important;border:1px solid var(--studio-border)!important;border-radius:12px!important;box-shadow:none!important;color:var(--studio-text)!important;min-height:48px;padding:12px 14px}
html body.auth.auth-modern[data-theme="studio"] .auth-card :is(.button,button[type="submit"]){background:var(--studio-accent)!important;color:#fff!important;border:0!important;border-radius:12px!important;min-height:48px;box-shadow:none!important}
html body.auth.auth-modern[data-theme="studio"] .auth-card a{color:var(--studio-accent)!important}
html body.auth.auth-modern[data-theme="studio"] .auth-card .otp-code-field{font-size:29px!important;letter-spacing:.35em!important;text-align:center;min-height:70px!important}
html body.auth.auth-modern[data-theme="studio"] .auth-card button.secondary{background:var(--studio-soft)!important;color:var(--studio-accent)!important;border:1px solid var(--studio-border)!important}
html body.auth.auth-modern[data-theme="studio"]:not([data-page="login"]) .auth-layout{display:block!important;width:min(100%,530px)!important;max-width:530px!important;min-height:0!important;border-radius:25px!important}
html body.auth.auth-modern[data-theme="studio"]:not([data-page="login"]) .auth-story{display:none!important}
html body.auth.auth-modern[data-theme="studio"]:not([data-page="login"]) .auth-card{padding:34px!important}
html body.auth.auth-modern[data-theme="studio"]:not([data-page="login"]) .mobile-brand{display:flex!important;justify-content:center;align-items:center;gap:12px;margin-bottom:26px;color:var(--studio-text)!important}
html body.auth.auth-modern[data-theme="studio"] .auth-card{animation:ivt-content-enter .3s ease-out both}
.auth-appearance{position:fixed;top:18px;right:20px;z-index:100}
html body.auth.auth-modern[data-theme="studio"] .auth-appearance button{width:40px;height:40px;border:1px solid var(--studio-border);background:var(--studio-surface);color:var(--studio-text);border-radius:50%;font-size:23px}
@media(max-width:700px){html body.auth.auth-modern[data-theme="studio"]{padding:70px 16px 24px!important}html body.auth.auth-modern[data-theme="studio"] .auth-layout{display:block!important;min-height:0!important;max-width:480px!important}html body.auth.auth-modern[data-theme="studio"] .auth-story{display:none!important}html body.auth.auth-modern[data-theme="studio"] .auth-card{padding:28px 23px!important}html body.auth.auth-modern[data-theme="studio"] .mobile-brand{display:flex!important;align-items:center;justify-content:center;gap:10px;margin-bottom:22px;color:var(--studio-text)!important}html body.auth.auth-modern[data-theme="studio"] .mobile-brand img{width:42px;height:42px}.auth-appearance{top:calc(14px + env(safe-area-inset-top,0px));right:16px}}
@media(prefers-reduced-motion:reduce){html body.auth.auth-modern[data-theme="studio"] .auth-card{animation:none!important}}

.auth-appearance{left:20px;right:auto}@media(max-width:700px){.auth-appearance{left:16px;right:auto}}

/* Daily attendance remains a grid independently of retired theme styles. */
html body.portal[data-theme="studio"] .daily-attendance{margin-top:24px}
html body.portal[data-theme="studio"] .daily-attendance-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:23px 0 17px}
html body.portal[data-theme="studio"] .daily-attendance-stat{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:9px;min-width:0;min-height:128px;padding:17px 14px;background:var(--studio-subtle);border:1px solid var(--studio-border);border-top:3px solid var(--studio-accent);border-radius:15px;color:var(--studio-text);text-decoration:none;transition:transform .16s,border-color .16s,background-color .16s}
html body.portal[data-theme="studio"] .daily-attendance-stat>span{display:block;font-size:11px;color:var(--studio-muted);font-weight:550}
html body.portal[data-theme="studio"] .daily-attendance-stat>strong{display:block;font-size:28px;line-height:1.1;font-weight:700;color:var(--studio-text)!important}
html body.portal[data-theme="studio"] .daily-attendance-stat>small{display:block;font-size:10px;line-height:1.5;color:var(--studio-accent)!important}
html body.portal[data-theme="studio"] .daily-attendance-stat:nth-child(1){border-top-color:#2b9f87}
html body.portal[data-theme="studio"] .daily-attendance-stat:nth-child(2){border-top-color:#d86b7c}
html body.portal[data-theme="studio"] .daily-attendance-stat:nth-child(3){border-top-color:#4992cc}
html body.portal[data-theme="studio"] .daily-attendance-stat:nth-child(4){border-top-color:#d6a548}
html body.portal[data-theme="studio"] .daily-attendance-stat:nth-child(5){border-top-color:#a77ac0}
html body.portal[data-theme="studio"] .daily-attendance-stat:nth-child(6){border-top-color:#93a3b3}
html body.portal[data-theme="studio"] .daily-attendance>.muted{font-size:11px;line-height:1.7;margin:0}
@media(hover:hover){html body.portal[data-theme="studio"] .daily-attendance-stat:hover{transform:translateY(-2px);background:var(--studio-soft);border-color:var(--studio-accent)}}
@media(max-width:1250px){html body.portal[data-theme="studio"] .daily-attendance-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:540px){html body.portal[data-theme="studio"] .daily-attendance-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}html body.portal[data-theme="studio"] .daily-attendance .card-heading{flex-wrap:wrap;gap:14px}html body.portal[data-theme="studio"] .daily-attendance-stat{padding:15px;min-height:120px}}
@media(prefers-reduced-motion:reduce){html body.portal[data-theme="studio"] .daily-attendance-stat{transition:none!important}}

/* Mobile navigation: flush with viewport bottom; safe area stays inside. */
@media screen and (max-width:1000px){
 html body.portal .mobile-bottom-nav{bottom:0!important;margin-bottom:0!important;padding-bottom:env(safe-area-inset-bottom,0px);}
}
