/* 228px navigation + 8px sheet inset + fluid canvas; one 16px content gutter. */
:root{--studio-bg:#f3f4f5;--studio-surface:#fff;--studio-elevated:#f7f8f9;--studio-ink:#202428;--studio-muted:#606970;--studio-border:#e5e8eb;--studio-accent:#b45109;--studio-soft:#fff3e8;--studio-shadow:none;--ui-bg:var(--studio-bg);--ui-surface:var(--studio-surface);--ui-ink:var(--studio-ink);--ui-muted:var(--studio-muted);--ui-border:var(--studio-border);--ui-accent:var(--studio-accent);--ui-accent-soft:var(--studio-soft);--ui-shadow:none}
html[data-theme=dark]{color-scheme:dark;--studio-bg:#171819;--studio-surface:#202122;--studio-elevated:#28292b;--studio-ink:#f2f3f4;--studio-muted:#aeb4bb;--studio-border:#35373a;--studio-accent:#ffab68;--studio-soft:#34291f;--ui-bg:var(--studio-bg);--ui-surface:var(--studio-surface);--ui-ink:var(--studio-ink);--ui-muted:var(--studio-muted);--ui-border:var(--studio-border);--ui-accent:var(--studio-accent);--ui-accent-soft:var(--studio-soft);--ui-shadow:none}
.studio-shell.ui-refreshed{background:var(--studio-bg);color:var(--studio-ink);font-size:14px;line-height:1.65}.studio-shell,.studio-shell button,.studio-shell input,.studio-shell textarea,.studio-shell select{font-family:Vazirmatn,'Segoe UI',sans-serif!important;letter-spacing:0!important}.studio-shell *{box-sizing:border-box}.studio-shell [hidden]{display:none!important}
.studio-shell.ui-refreshed .topbar{height:64px;min-height:64px;padding:10px 24px;background:var(--studio-bg);border:0;gap:16px;box-shadow:none}.studio-shell .brand{gap:12px}.studio-shell .brand img{width:102px;height:32px;object-fit:contain}.studio-shell .brand-product{font-size:14px;font-weight:650}.studio-shell .brand-product span{font-size:12px;color:var(--studio-muted)}.studio-shell .brand-divider{height:28px;background:var(--studio-border)}.studio-shell .top-actions{gap:12px;flex-wrap:nowrap}.studio-shell .environment{font-size:12px;color:var(--studio-muted)}.studio-shell .identity{display:flex;gap:6px;background:none;font-size:12px;padding:0;color:var(--studio-muted);white-space:nowrap}.studio-identity-name{color:var(--studio-ink);font-weight:600}.studio-shell .language-control{font-size:12px}.studio-shell .language-control select{height:34px;font-size:12px;min-width:80px}.studio-shell .theme-toggle,.studio-shell #logout{height:34px;font-size:12px;padding:6px 10px}
.studio-shell.ui-refreshed .app-shell{display:grid;grid-template-columns:228px minmax(0,1fr);gap:0;min-height:calc(100vh - 64px)}.studio-shell.ui-refreshed .nav{background:var(--studio-bg);border:0;padding:14px 12px;min-height:calc(100vh - 64px);position:sticky;top:0;max-height:100vh;overflow-y:auto;gap:20px;align-self:start}.studio-workspace{display:flex;align-items:center;gap:10px;padding:0 10px 16px;border-bottom:1px solid var(--studio-border)}.studio-workspace-icon svg{width:22px;height:22px;color:var(--studio-accent)}.studio-workspace strong{display:block;font-size:14px;font-weight:650}.studio-workspace small{display:block;color:var(--studio-muted);font-size:12px}.studio-workspace-edition{display:none}.studio-shell .nav-section{gap:3px}.studio-shell .nav-section-toggle{font-size:12px!important;font-weight:500;padding:4px 10px 8px!important;letter-spacing:0!important;opacity:1;color:var(--studio-muted)!important}
.studio-shell.ui-refreshed .nav button[data-tab]{border:0;background:none;color:var(--studio-muted);padding:9px 10px;min-height:40px;font-size:13px;line-height:1.6;border-radius:6px;box-shadow:none;transition:background .15s,color .15s}.studio-shell.ui-refreshed .nav button[data-tab]:hover,.studio-shell.ui-refreshed .nav button[data-tab].active{background:var(--studio-border);color:var(--studio-ink);border:0;box-shadow:none}.studio-shell .nav button[data-tab].active::before{content:none}.studio-shell .nav-icon svg{width:17px;height:17px}.studio-shell .nav-bottom{font-size:12px;padding:12px 10px;margin-top:0;color:var(--studio-muted)}
.studio-shell.ui-refreshed main{background:var(--studio-surface);border:1px solid var(--studio-border);border-radius:16px;padding:24px;min-width:0;max-width:none;margin:0 8px 8px 0;width:auto}html[dir=rtl] .studio-shell.ui-refreshed main{margin:0 0 8px 8px}.studio-shell .page-context{font-size:12px;margin-bottom:20px!important;color:var(--studio-muted)}.studio-shell .context-host{font-size:12px}.studio-shell #breadcrumb{color:var(--studio-ink)}.studio-shell h1,.studio-shell.ui-refreshed h2{font-size:25px;font-weight:650;line-height:1.4;margin:0;color:var(--studio-ink)}.studio-shell h3{font-size:16px;line-height:1.5;font-weight:600}.studio-shell .page-heading{margin-bottom:20px;align-items:center;gap:12px}.studio-shell p{line-height:1.7}.studio-shell .muted,.studio-shell small{color:var(--studio-muted)}.studio-shell.ui-refreshed .box{background:var(--studio-surface);border:1px solid var(--studio-border);border-radius:8px;box-shadow:none;padding:20px;margin-bottom:16px}
.studio-overview{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;margin:0 0 16px;background:var(--studio-elevated);border-radius:8px;border:1px solid var(--studio-border)}.studio-overview h2{font-size:16px!important;margin:0 0 8px}.studio-hero-meta{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.studio-state{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--studio-muted)}.studio-state::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}.studio-state[data-state=online]{color:#23764e}.studio-state[data-state=warning]{color:#a54c16}html[data-theme=dark] .studio-state[data-state=online]{color:#88d5ad}html[data-theme=dark] .studio-state[data-state=warning]{color:#ffc088}.studio-host{font-size:12px;color:var(--studio-muted)}.studio-hero-actions{display:flex;gap:8px;flex-wrap:wrap}.studio-hero-actions button{display:inline-flex;gap:8px;align-items:center}.studio-hero-actions svg{width:16px;height:16px}
.studio-shell .health-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0!important;margin:0 0 16px!important;border:1px solid var(--studio-border);border-radius:8px;overflow:hidden}.studio-shell .health-cards>.box{border:0;border-radius:0;margin:0!important;padding:18px!important;min-height:142px!important;display:flex;flex-direction:column;gap:8px!important;border-inline-end:1px solid var(--studio-border)}.studio-shell .health-cards>.box:last-child{border-inline-end:0}.studio-shell .health-cards>.box::before{content:none}.studio-shell .health-label{font-size:13px!important;font-weight:500;color:var(--studio-muted)}.studio-shell .health-cards strong{font-size:30px!important;font-weight:600!important;line-height:1.3;font-variant-numeric:tabular-nums;color:var(--studio-ink)}.studio-shell .health-cards small{font-size:12px!important;opacity:1!important}.studio-shell .health-band b{font-size:21px!important;color:var(--studio-ink)!important;font-variant-numeric:tabular-nums}.studio-shell #health-chart{width:100%;height:30px}.studio-shell #health-chart polyline{stroke:var(--studio-accent)}.studio-shell #health-resources{font-size:12px!important}.studio-shell #health-resources progress{accent-color:var(--studio-accent);height:4px;border:0;border-radius:0}.studio-shell .health-network{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px!important}.studio-shell .health-network>.box{margin:0;min-width:0}.studio-shell .health-network h3{font-size:14px;margin:0 0 16px}
.studio-shell.ui-refreshed .table-box{padding:0;overflow:hidden}.studio-shell .table-toolbar,.studio-shell .group-list-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 20px;background:transparent}.studio-shell .table-toolbar .search-field{max-width:320px;min-width:200px;flex:1;background:var(--studio-elevated);border:1px solid var(--studio-border);border-radius:6px}.studio-shell .search-field input{background:transparent!important;border:0!important;box-shadow:none!important;min-height:38px;font-size:13px}.studio-shell #user-total{margin-inline-start:auto;white-space:nowrap;font-size:12px;color:var(--studio-muted)}.studio-scope{display:flex;align-items:center;gap:8px;margin:0!important;font-size:12px;white-space:nowrap}.studio-scope select{width:auto;max-width:180px}.studio-sync-button{white-space:nowrap}.studio-shell .table-wrap,.studio-shell .group-table-wrap{overflow-x:auto;max-width:100%;min-width:0}
.studio-shell table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.studio-shell.ui-refreshed th{background:var(--studio-surface)!important;color:var(--studio-muted);font-weight:500;font-size:12px;padding:12px 16px;text-align:start;white-space:nowrap;border-bottom:1px solid var(--studio-border)}.studio-shell.ui-refreshed td,.studio-shell #users th,.studio-shell #users td{font-size:13px;padding:14px 16px!important;height:56px;border-bottom:1px solid var(--studio-border);background:transparent;vertical-align:middle}.studio-shell tbody tr:last-child td{border-bottom:0}.studio-shell.ui-refreshed tbody tr:hover{background:var(--studio-elevated)}.studio-shell .table-sort-button,.studio-shell .user-sort-button{font-size:12px!important;min-height:28px}.studio-shell .empty-row{padding:32px 16px!important;font-size:13px!important;text-align:center;color:var(--studio-muted)}.studio-shell #users .studio-user-cell{padding-inline-start:62px!important;position:relative}.studio-avatar{position:absolute;inset-inline-start:16px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:32px;height:32px;border-radius:50%;font-size:12px;font-weight:600;background:var(--studio-elevated);color:var(--studio-muted)}.studio-user-cell>strong{font-size:13px;font-weight:600}.studio-shell .permission-username{font-size:12px!important}.studio-shell .permission-group{background:var(--studio-elevated);border:0!important;font-size:12px!important;padding:4px 8px!important;border-radius:4px!important}.studio-shell .permission-sms{font-size:12px!important}.studio-shell .permission-edit{font-size:20px!important;color:var(--studio-muted)!important}.studio-shell #users table{min-width:850px}
.studio-shell .group-list-box{padding:0!important;overflow:hidden}.studio-shell .group-list-toolbar p{margin:0;margin-inline-start:auto;font-size:12px;color:var(--studio-muted)}.studio-shell .group-table{min-width:680px;table-layout:fixed}.studio-shell .group-table th:first-child{width:27%}.studio-shell .group-table th:nth-child(2){width:17%}.studio-shell .group-table th:nth-child(3){width:36%}.studio-shell .group-row-mark{display:none}.studio-shell .group-row-name{font-size:13px;font-weight:600;overflow-wrap:anywhere}.studio-shell .group-member-details>summary{cursor:pointer;font-size:12px;color:var(--studio-muted);white-space:nowrap}.studio-shell .group-member-count{font-size:14px;font-weight:600;color:var(--studio-ink)}.studio-shell .group-member-list{display:grid;gap:8px;padding:12px 0;max-height:220px;overflow:auto}.studio-shell .group-member{display:grid;gap:2px}.studio-shell .group-member small{font-size:12px}.studio-shell .group-access-badge{font-size:12px;color:var(--studio-muted)}.studio-shell .group-actions{white-space:nowrap;text-align:end}.studio-shell .group-actions button{font-size:12px;padding:6px 9px;margin-inline-start:4px}
.studio-shell #route-domain-list{margin-top:12px;border:1px solid var(--studio-border);border-radius:6px;padding:0 14px}.studio-shell #route-domain-list>div{font-size:13px!important;padding:13px 0!important;border-color:var(--studio-border)!important;align-items:center}.studio-domain-label{color:var(--studio-ink);font-size:13px;font-weight:500}.studio-shell #route-domain-list>div>span:last-child{font-size:12px;color:var(--studio-muted)}.studio-shell #route-domain-count,.studio-shell #route-router-status{font-size:12px;color:var(--studio-muted)}
.studio-shell button,.studio-shell .primary,.studio-shell .secondary{min-height:36px;border-radius:6px!important;font-size:13px;line-height:1.5;box-shadow:none!important;transition:background .15s,color .15s,border-color .15s}.studio-shell.ui-refreshed button{background:var(--studio-surface);color:var(--studio-ink);border:1px solid var(--studio-border)}.studio-shell.ui-refreshed button:hover{background:var(--studio-elevated)}.studio-shell.ui-refreshed button.primary,.studio-shell.ui-refreshed a.primary{background:var(--studio-ink)!important;color:var(--studio-surface)!important;border-color:var(--studio-ink)!important}.studio-shell button:active{transform:translateY(1px)}.studio-shell button:disabled{opacity:.5;cursor:not-allowed}.studio-shell :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--studio-accent)!important;outline-offset:3px!important;box-shadow:none!important}
.studio-shell.ui-refreshed input:not([type=checkbox]):not([type=radio]),.studio-shell.ui-refreshed select,.studio-shell.ui-refreshed textarea{min-height:40px;background:var(--studio-surface);color:var(--studio-ink);border:1px solid var(--studio-border);border-radius:6px;font-size:14px;box-shadow:none;padding:9px 12px}.studio-shell.ui-refreshed input::placeholder,.studio-shell.ui-refreshed textarea::placeholder{color:var(--studio-muted)}.studio-shell label{font-size:13px;color:var(--studio-ink)}.studio-shell label input,.studio-shell label select,.studio-shell label textarea{margin-top:7px}.studio-shell .form{gap:20px}.studio-shell .badge{font-size:12px;border-radius:4px;box-shadow:none}.studio-shell .detail-list{font-size:13px;gap:10px 16px}.studio-shell .detail-list dd{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.studio-shell .detail-list dt{color:var(--studio-muted)}.studio-shell footer{font-size:12px;margin-top:28px;padding:16px 0;border-color:var(--studio-border);color:var(--studio-muted)}.studio-shell dialog{background:var(--studio-surface);color:var(--studio-ink);border:1px solid var(--studio-border);border-radius:12px;padding:24px;box-shadow:0 16px 48px #0003}.studio-shell dialog::backdrop{background:#0006;backdrop-filter:none}.studio-shell .warning{font-size:13px;background:var(--studio-elevated);border:1px solid var(--studio-border);color:var(--studio-ink)}
.studio-shell .login-layout{width:min(920px,calc(100% - 48px));margin:56px auto;grid-template-columns:1fr 1fr;border:1px solid var(--studio-border);border-radius:12px;box-shadow:none;background:var(--studio-surface);overflow:hidden}.studio-shell .login-story{background:var(--studio-elevated)!important;padding:40px!important;border-color:var(--studio-border);display:flex;flex-direction:column;justify-content:space-between}.studio-shell .login-story h1{font-size:30px;line-height:1.5;max-width:360px}.studio-shell .security-art{display:none}.studio-shell .login-story .eyebrow{font-size:12px;letter-spacing:0;color:var(--studio-muted);margin-bottom:32px}.studio-shell .story-bottom{margin-top:64px;font-size:12px;flex-wrap:wrap;gap:8px}.studio-shell .login-card{padding:40px;background:var(--studio-surface)}.studio-shell .login-card>.eyebrow{display:none}.studio-shell .login-card h2{font-size:24px;margin-bottom:28px}.studio-shell .login-note{font-size:12px;margin-top:24px;color:var(--studio-muted);padding-top:16px}.studio-shell .login-submit{width:100%;margin-top:12px}.studio-shell .otp-disclosure{font-size:12px}.studio-shell #loginerror{font-size:13px}.studio-shell .login-story::before,.studio-shell .login-story::after{content:none}
.studio-shell.user-portal main{width:min(720px,calc(100% - 32px))!important;margin:24px auto!important;padding:24px!important;border:1px solid var(--studio-border)}.studio-shell.user-portal main>img{filter:none!important;object-fit:contain}.studio-shell.user-portal h1{font-size:25px;margin:24px 0 12px}.studio-shell.user-portal .studio-portal-eyebrow{display:none}.studio-shell.user-portal #notice{font-size:13px}.studio-shell.user-portal #account>.box{background:var(--studio-elevated)}.studio-shell .portal-tools{display:flex;justify-content:flex-end;gap:12px;align-items:center;margin-bottom:20px}.studio-shell.user-portal #totp-qr{background:#fff;padding:8px;border-radius:6px}.studio-shell.user-portal #totp-key{font-size:12px}.console-menu-toggle{display:none}
@media(max-width:1100px){.studio-shell.ui-refreshed .app-shell{grid-template-columns:minmax(0,1fr)}.studio-shell.ui-refreshed main{margin:0 8px 8px!important;padding:20px}.studio-shell.ui-refreshed .nav{display:none;position:static;min-height:0;max-height:none;padding:16px 20px;border-bottom:1px solid var(--studio-border)}.studio-shell.console-menu-open .nav{display:grid}.studio-shell .nav-section{display:grid!important}.studio-shell .nav-section-toggle{display:flex!important}.studio-shell .nav-section.is-collapsed>button[data-tab]{display:none!important}.studio-shell .studio-workspace{display:none}.studio-shell .nav button[data-tab]{width:100%}.studio-shell .topbar{position:sticky;top:0;z-index:20}.studio-shell .console-menu-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:38px;font-size:20px}.studio-shell .environment,.studio-shell .identity{display:none}.studio-shell .health-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-shell .health-cards>.box:nth-child(2){border-inline-end:0}.studio-shell .health-cards>.box:nth-child(-n+2){border-bottom:1px solid var(--studio-border)}}
@media(max-width:640px){.studio-shell.ui-refreshed .topbar{height:auto;min-height:64px;padding:10px 12px;gap:8px;flex-wrap:wrap}.studio-shell .brand{gap:6px}.studio-shell .brand img{width:80px}.studio-shell .brand-product,.studio-shell .brand-divider,.studio-shell .language-control>span{display:none}.studio-shell .top-actions{margin-inline-start:auto;gap:6px}.studio-shell .language-control select{min-width:72px}.studio-shell .theme-toggle{font-size:0!important;width:36px}.studio-shell .theme-toggle::first-letter{font-size:17px}.studio-shell #logout{font-size:12px;padding:6px}.studio-shell.ui-refreshed main{border:0;border-radius:0;margin:0!important;padding:20px 16px}.studio-shell h1,.studio-shell.ui-refreshed h2{font-size:22px}.studio-shell .page-context .context-host{display:none}.studio-overview{padding:16px;display:block}.studio-hero-actions{margin-top:14px}.studio-shell .health-cards>.box{padding:14px!important;min-height:142px!important}.studio-shell .health-label{font-size:12px!important}.studio-shell .health-cards strong{font-size:28px!important}.studio-shell .health-band{display:grid;gap:4px}.studio-shell .health-band b{font-size:18px!important}.studio-shell .health-network{grid-template-columns:minmax(0,1fr)}.studio-shell .table-toolbar{padding:14px}.studio-shell .table-toolbar .search-field{max-width:none;min-width:100%;order:2}.studio-shell .studio-scope{flex-wrap:wrap}.studio-shell .detail-list{grid-template-columns:minmax(0,1fr);gap:4px}.studio-shell .detail-list dd{margin:0 0 10px!important;text-align:start!important}.studio-shell .group-list-toolbar{padding:14px;align-items:start}.studio-shell .group-list-toolbar p{margin-inline-start:0}.studio-shell #route-domain-list>div{gap:8px!important;align-items:flex-start;flex-direction:column}.studio-shell button,.studio-shell.ui-refreshed input,.studio-shell.ui-refreshed select{min-height:44px}.studio-shell .login-layout{width:calc(100% - 32px);margin:24px auto;display:block}.studio-shell .login-story{padding:24px!important}.studio-shell .login-story h1{font-size:24px}.studio-shell .login-story .eyebrow{margin-bottom:12px}.studio-shell .story-bottom{margin-top:20px}.studio-shell .login-card{padding:24px}.studio-shell.user-portal main{width:100%!important;margin:0!important;padding:20px 16px!important}.studio-shell dialog{width:calc(100% - 24px)!important;padding:20px}.studio-shell .form{grid-template-columns:minmax(0,1fr)}.studio-shell .page-heading{flex-wrap:wrap}.studio-shell footer{flex-wrap:wrap;gap:8px}}
@media(prefers-reduced-motion:reduce){.studio-shell *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.studio-shell .console-section-title{margin-bottom:20px}.studio-shell .health-cards>.box{justify-content:flex-start!important}.studio-shell .health-cards small{margin-top:0!important}.studio-shell .health-network .box{align-self:start}.studio-shell .context-host{color:var(--studio-muted)!important}.studio-shell #health-service-rows td{font-size:13px!important;text-align:end}.studio-shell #health-service-rows td:first-child{text-align:start;font-weight:600}.studio-shell .nav-bottom span{font-size:12px!important}.studio-shell .theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:12px!important;width:auto}.theme-toggle svg{width:16px;height:16px;flex-shrink:0}.studio-shell .theme-toggle::first-letter{font-size:inherit}.studio-shell progress::-webkit-progress-bar{background:var(--studio-border)}.studio-shell progress::-webkit-progress-value{background:var(--studio-accent)}
@media(max-width:640px){.studio-shell .theme-toggle span{display:none}.studio-shell .top-actions{width:auto;justify-content:flex-end}.studio-shell #health-service-rows{font-size:12px}.studio-shell .health-cards>.box{min-height:148px!important}}
.studio-shell .health-good{color:#23764e!important}html[data-theme=dark] .studio-shell .health-good{color:#88d5ad!important}
.studio-shell .table-toolbar>.badge{background:var(--studio-elevated)!important;color:var(--studio-muted)!important}.studio-shell #dashboard .table-box table{min-width:640px}.studio-shell #logout{display:inline-flex;align-items:center;gap:6px;justify-content:center}.studio-shell #logout svg{flex-shrink:0}
html[data-theme=dark] .studio-shell.user-portal main>img{filter:brightness(0) invert(1)!important}
.studio-shell .eyebrow{font-family:inherit!important}.studio-shell .login-story p{color:var(--studio-muted);font-size:14px;line-height:1.8;max-width:330px}.studio-shell .login-story h1{margin:0 0 14px}
.studio-shell.user-portal a.primary{display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;text-decoration:none;font-size:14px;line-height:1.5}
@media(max-width:640px){.studio-shell #users tr>:first-child,.studio-shell .group-table tr>:first-child{position:sticky;inset-inline-start:0;z-index:1;background:var(--studio-surface)!important}.studio-shell #users thead tr>:first-child,.studio-shell .group-table thead tr>:first-child{z-index:2}}
@media(max-width:640px){.studio-shell #logout{width:36px;padding:8px}.studio-shell #logout span{display:none}.studio-shell .brand img{width:74px}.studio-shell .console-menu-toggle{min-width:36px}.studio-shell .topbar .brand{margin-inline-end:0}.studio-shell .top-actions{gap:4px}.studio-shell .health-cards>.box{padding:12px!important}}

/* Keep sortable headers and row data on the same column edge. */
.studio-shell :is(#logs,#sessions) .scroll{overflow-x:auto}
.studio-shell :is(#logs,#sessions) table{width:100%;table-layout:fixed;min-width:620px}
.studio-shell :is(#logs,#sessions) :is(th,td){text-align:start;vertical-align:middle;padding-inline:20px}
.studio-shell #logs th:nth-child(1){width:220px}
.studio-shell #logs th:nth-child(2){width:180px}
.studio-shell #logs td:nth-child(1){direction:ltr;font-variant-numeric:tabular-nums;white-space:nowrap}
html[dir=rtl] .studio-shell #logs td:nth-child(1){text-align:right}
.studio-shell #logs td:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.studio-shell #logs td:nth-child(3){white-space:normal;overflow-wrap:anywhere;line-height:1.7}
html[dir=rtl] .studio-shell #sessions td.ltr{text-align:right}
.studio-shell #sessions th:nth-child(1){width:22%}
.studio-shell #sessions th:nth-child(2){width:20%}
.studio-shell #sessions th:nth-child(4){width:160px}
.studio-shell #sessions :is(th,td):last-child:not([colspan]){text-align:end}
.studio-shell :is(#logs,#sessions) td[colspan]{text-align:center}

/* Final system: one frame, one sheet, one reading rhythm. */
:root{--studio-bg:#f1f3f5;--studio-surface:#fff;--studio-elevated:#f7f8fa;--studio-ink:#1d2228;--studio-muted:#5f6974;--studio-border:#e2e6eb;--studio-accent:#ad4708;--studio-soft:#fff2e8;--studio-positive:#19724f;--studio-control:#c9d0d8;--studio-shadow:none;--navy:var(--studio-ink);--navy-deep:var(--studio-bg);--text:var(--studio-ink);--muted:var(--studio-muted);--page:var(--studio-bg);--line:var(--studio-border);--white:var(--studio-surface);--teal:var(--studio-accent);--teal-soft:var(--studio-soft)}
html[data-theme=dark]{--studio-bg:#141516;--studio-surface:#1d1f21;--studio-elevated:#25282b;--studio-ink:#f0f2f4;--studio-muted:#aab2bc;--studio-border:#34383d;--studio-accent:#ffad73;--studio-soft:#352a22;--studio-positive:#85d2ae;--studio-control:#545b64;--navy:var(--studio-ink);--text:var(--studio-ink);--muted:var(--studio-muted);--page:var(--studio-bg);--line:var(--studio-border);--white:var(--studio-surface)}
.studio-shell.ui-refreshed{font-size:14px;line-height:1.6;accent-color:var(--studio-accent)}
.studio-shell.ui-refreshed .topbar{height:72px;min-height:72px;padding-inline:28px;gap:20px}
.studio-shell .brand-product{font-size:15px;line-height:1.4}.studio-shell .brand-product>span{font-size:11px;margin-top:3px}.studio-shell .brand img{width:96px}
.studio-shell .environment{display:none}.studio-shell .top-actions{gap:12px}.studio-shell .identity{padding-inline:12px;border-inline-start:1px solid var(--studio-border)}
.studio-shell .language-control select{border-color:var(--studio-control);min-height:36px!important;height:36px}.studio-shell .language-control>span{color:var(--studio-muted)}
.studio-shell .theme-toggle,.studio-shell #logout{border-color:var(--studio-border);background:var(--studio-surface);min-height:36px!important;height:36px;border-radius:7px}
.studio-shell.ui-refreshed .app-shell{grid-template-columns:236px minmax(0,1fr);min-height:calc(100vh - 72px)}
.studio-shell.ui-refreshed .nav{padding:16px 12px;gap:22px;min-height:calc(100vh - 72px);max-height:calc(100vh - 10px)}
.studio-shell .studio-workspace{border:0;padding:0 12px 8px;gap:12px}.studio-workspace-icon{display:flex}.studio-workspace-icon svg{width:25px;height:25px}.studio-workspace strong{font-size:15px;letter-spacing:.01em!important}.studio-workspace small{font-size:12px;margin-top:3px}
.studio-shell .nav-section-toggle{font-size:11px!important;color:var(--studio-muted)!important;text-transform:none;min-height:30px!important}.studio-shell .nav-section{gap:4px}.studio-shell.ui-refreshed .nav button[data-tab]{min-height:42px;border-radius:7px;padding:10px 12px;gap:11px;font-size:13px}.studio-shell.ui-refreshed .nav button[data-tab].active{background:var(--studio-surface);color:var(--studio-ink);font-weight:600}.studio-shell.ui-refreshed .nav button[data-tab].active .nav-icon{color:var(--studio-accent)}
.studio-shell.ui-refreshed main{padding:28px 32px;min-height:calc(100vh - 80px);border-radius:16px;margin-inline-end:8px}.studio-shell .page-context{font-size:12px;margin-bottom:22px!important}.studio-shell .page-heading{margin-bottom:22px}.studio-shell h1{font-size:25px;letter-spacing:-.025em!important;font-weight:650;line-height:1.4}.studio-shell h3{font-size:15px;font-weight:600}.studio-shell .context-host{color:var(--studio-muted)}
.studio-shell .studio-overview{border:0;border-inline-start:3px solid var(--studio-accent);border-radius:0 8px 8px 0;padding:18px 20px;margin-bottom:20px;background:var(--studio-elevated)}
html[dir=rtl] .studio-shell .studio-overview{border-radius:8px 0 0 8px}.studio-shell .studio-overview h2{font-size:16px!important;margin-bottom:8px}.studio-shell .studio-state{font-size:12px;font-weight:500}.studio-shell .studio-host{padding-inline-start:12px;border-inline-start:1px solid var(--studio-control)}
.studio-shell .health-cards{margin-bottom:22px!important;border-radius:10px}.studio-shell .health-cards>.box{padding:22px!important;min-height:154px!important;gap:9px!important}.studio-shell .health-label{font-size:12px!important}.studio-shell .health-cards strong{font-size:34px!important;letter-spacing:-.02em!important;line-height:1.2}.studio-shell .health-cards .health-band{font-size:12px;gap:20px}.studio-shell .health-band b{font-size:22px!important;margin-top:4px}.studio-shell #health-chart{height:27px}.studio-shell #health-resources{line-height:1.8}.studio-shell #health-resources>div{margin-bottom:7px}.studio-shell #health-resources b{font-weight:600;float:inline-end}
.studio-shell .health-network{gap:20px!important;margin-top:20px}.studio-shell .health-network>.box{padding:22px;border-radius:10px}.studio-shell .health-network h3{font-size:14px;padding-bottom:14px;border-bottom:1px solid var(--studio-border)}.studio-shell .health-network .detail-list{font-size:13px;line-height:1.8}.studio-shell .health-good{color:var(--studio-positive)!important}
.studio-shell.ui-refreshed .box{border-radius:10px}.studio-shell.ui-refreshed .table-box{padding:0}.studio-shell :is(.scroll,.table-wrap,.group-table-wrap){scrollbar-width:thin;scrollbar-color:var(--studio-control) transparent}.studio-shell .table-toolbar{padding:18px 20px;min-height:76px;border-bottom:1px solid var(--studio-border)}.studio-shell .table-toolbar strong{font-size:14px;font-weight:600}.studio-shell .table-toolbar .search-field{max-width:360px;border-color:var(--studio-control);border-radius:7px;min-height:40px}.studio-shell .table-toolbar .search-field input{height:38px!important;min-height:38px!important}.studio-shell .search-field>span{font-size:18px;color:var(--studio-muted)}
.studio-shell.ui-refreshed th{padding:13px 18px;background:var(--studio-elevated)!important;font-size:12px}.studio-shell.ui-refreshed td,.studio-shell #users th,.studio-shell #users td{padding:15px 18px!important;font-size:13px;line-height:1.6;text-align:start}.studio-shell td small{font-size:12px}.studio-shell #health-service-rows td{text-align:start}.studio-shell #health-service-rows td.ltr{direction:ltr}.studio-shell tbody tr:hover{transition:background .12s}.studio-shell .table-sort-button{min-height:30px}.studio-shell #users table{min-width:1050px}.studio-shell #users .studio-user-cell{padding-inline-start:66px!important}.studio-shell .studio-avatar{inset-inline-start:18px;background:var(--studio-elevated);color:var(--studio-ink);border:1px solid var(--studio-border);width:34px;height:34px;font-size:12px}
.studio-shell .permission-group{border:0!important;background:var(--studio-elevated);color:var(--studio-ink);padding:5px 8px!important}.studio-shell .permission-checkbox{accent-color:var(--studio-accent)}.studio-shell .permission-checkbox:focus-visible,.studio-shell input[type=checkbox]:focus-visible{outline:2px solid var(--studio-accent)!important;outline-offset:3px!important;box-shadow:none!important}.studio-shell :is(.permission-label,.tick-label){min-height:32px}.studio-shell .permission-sms{font-size:12px!important}
.studio-shell #vpngroups .group-table{border-collapse:collapse;border-spacing:0;min-width:720px;table-layout:fixed}.studio-shell #vpngroups .group-table th{background:var(--studio-elevated)!important;border-bottom:1px solid var(--studio-border);font-size:12px;padding:14px 18px}.studio-shell #vpngroups .group-table th:nth-child(1){width:30%}.studio-shell #vpngroups .group-table th:nth-child(2){width:18%}.studio-shell #vpngroups .group-table th:nth-child(3){width:32%}.studio-shell #vpngroups .group-table th:nth-child(4){width:20%;text-align:end}.studio-shell #vpngroups .group-table td{background:transparent;border-radius:0;border-bottom:1px solid var(--studio-border);padding:15px 18px;vertical-align:top}.studio-shell #vpngroups .group-row-mark{border:0;border-radius:0;background:none;width:auto;height:auto;margin-inline-end:10px;color:var(--studio-muted);font-size:17px}.studio-shell #vpngroups .group-access-badge{border:0;background:var(--studio-elevated);padding:5px 9px;border-radius:5px;font-size:12px;color:var(--studio-ink);max-width:100%}.studio-shell #vpngroups .group-member-count{font-weight:600}.studio-shell #vpngroups .group-member-list{min-width:0;max-height:200px;overflow:auto;background:var(--studio-elevated);border:0;box-shadow:none;padding:10px;border-radius:6px}.studio-shell #vpngroups .group-actions{white-space:nowrap;text-align:end}.studio-shell #vpngroups .group-actions button{font-size:12px;padding:6px 10px;min-height:34px}.studio-shell #vpngroups .group-row-name{font-weight:600}
.studio-shell button,.studio-shell a.primary{border-radius:7px;transition:background .15s,border-color .15s,transform .12s}.studio-shell button:active{transform:translateY(1px)}.studio-shell button.primary,.studio-shell a.primary{background:#ea6a14!important;color:#111!important;border-color:#ea6a14!important;font-weight:600}.studio-shell button.primary:hover,.studio-shell a.primary:hover{background:#f37d30!important;border-color:#f37d30!important}.studio-shell button:not(.primary):hover{background:var(--studio-elevated);border-color:var(--studio-control)}.studio-shell button:focus-visible,.studio-shell a:focus-visible,.studio-shell summary:focus-visible{outline:2px solid var(--studio-accent)!important;outline-offset:3px;box-shadow:none}.studio-shell button:disabled{opacity:.5;transform:none}
.studio-shell.ui-refreshed input:not([type=checkbox]):not([type=radio]),.studio-shell.ui-refreshed select,.studio-shell.ui-refreshed textarea{border-color:var(--studio-control);border-radius:7px;min-height:42px;font-size:14px}.studio-shell.ui-refreshed input:focus,.studio-shell.ui-refreshed textarea:focus,.studio-shell.ui-refreshed select:focus{outline:2px solid var(--studio-accent);outline-offset:2px;border-color:var(--studio-accent);box-shadow:none}.studio-shell label{font-size:13px;font-weight:500;line-height:1.6}.studio-shell :is(.form,.settings-grid){gap:22px}.studio-shell .savebar{padding-top:20px;gap:16px;border-color:var(--studio-border)}
.studio-shell :is(#settings,#smssettings,#ldapsettings,#authentication)>.box,.studio-shell :is(#settings,#smssettings,#ldapsettings,#authentication) form>.box{background:var(--studio-elevated);border:0;padding:24px}.studio-shell .auth-card{background:var(--studio-elevated);border:1px solid var(--studio-border)}.studio-shell .auth-icon{display:none}.studio-shell .auth-card .auth-badge{font-size:12px}.studio-shell .warning{border-color:var(--studio-border);border-inline-start:3px solid var(--studio-accent);background:var(--studio-elevated)}.studio-shell .badge{background:var(--studio-elevated);color:var(--studio-muted);border:1px solid var(--studio-border);font-size:11px;padding:3px 7px}.studio-shell .badge.success{color:var(--studio-positive)}
.studio-shell dialog{border-radius:12px;padding:26px;max-height:calc(100dvh - 32px);overflow:auto}.studio-shell dialog .dialog-heading{border-bottom:1px solid var(--studio-border);padding-bottom:16px}.studio-shell dialog h3{font-size:18px}.studio-shell dialog .dialog-actions{gap:10px}.studio-shell #message{border-radius:7px;font-size:13px}.studio-shell footer{font-size:11px;color:var(--studio-muted);border-color:var(--studio-border);padding:18px 0 0;margin-top:28px}.studio-shell .empty-row{min-height:0;height:auto!important;padding:44px 20px!important;font-size:13px!important}.studio-shell .empty-row::before{content:none!important}
.studio-shell.admin-console .login-layout{width:min(1000px,calc(100% - 48px));margin:48px auto;grid-template-columns:1fr 1fr;border-radius:16px}.studio-shell.admin-console .login-story{padding:44px!important;background:var(--studio-elevated)!important;justify-content:flex-start;gap:0}.studio-shell .login-story h1{font-size:34px;line-height:1.4;letter-spacing:-.03em!important;margin:26px 0 16px}.studio-shell .login-story p{font-size:14px;line-height:1.8;max-width:320px}.studio-shell .login-story>.eyebrow{font-size:12px;color:var(--studio-muted);margin-bottom:12px}.studio-shell .access-story-steps{display:grid;gap:0;margin-top:30px}.studio-shell .access-story-steps span{display:flex;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid var(--studio-border);font-size:13px}.studio-shell .access-story-steps span::before{content:'';height:6px;width:6px;border-radius:50%;background:var(--studio-accent)}.studio-shell .access-story-steps span:last-child{border-bottom:0}.studio-shell .login-story .story-bottom{margin-top:auto;padding-top:40px;font-size:11px}.studio-shell .login-card{padding:44px}.studio-shell .login-card h2{font-size:24px!important;margin:12px 0 28px}.studio-shell .login-note{font-size:12px;padding-top:20px;border-top:1px solid var(--studio-border);line-height:1.8}.studio-shell .login-submit{min-height:44px}.studio-shell .otp-disclosure summary{font-size:12px;padding:8px 0}
@media(min-width:1600px){.studio-shell.ui-refreshed main{padding:32px 40px}.studio-shell .page-heading{margin-bottom:26px}}
@media(max-width:1100px){.studio-shell.ui-refreshed .app-shell{grid-template-columns:minmax(0,1fr)}.studio-shell.ui-refreshed .topbar{padding-inline:20px;height:64px;min-height:64px}.studio-shell.ui-refreshed main{padding:24px}.studio-shell.ui-refreshed .nav{min-height:0;max-height:none}.studio-shell .health-cards>.box{padding:20px!important}.studio-shell .identity{display:none}.studio-shell .studio-overview{padding:18px}.studio-shell.admin-console .login-layout{margin:32px auto}}
@media(max-width:640px){.studio-shell.ui-refreshed .topbar{padding:10px 14px;gap:8px}.studio-shell.ui-refreshed main{padding:22px 16px;min-height:calc(100vh - 64px)}.studio-shell h1{font-size:23px}.studio-shell .health-cards>.box{padding:15px!important;min-height:158px!important}.studio-shell .health-cards strong{font-size:29px!important}.studio-shell .health-band b{font-size:20px!important}.studio-shell .studio-overview{padding:16px}.studio-shell .studio-hero-actions{gap:8px}.studio-shell .studio-hero-actions button{font-size:12px;min-height:42px}.studio-shell .table-toolbar{padding:14px}.studio-shell.ui-refreshed td,.studio-shell #users td{padding:13px 14px!important}.studio-shell :is(#logs,#sessions) :is(th,td){padding-inline:14px!important}.studio-shell #logs th:first-child{width:200px}.studio-shell #logs th:nth-child(2){width:150px}.studio-shell #users .studio-user-cell{padding-inline-start:60px!important}.studio-shell .studio-avatar{inset-inline-start:14px}.studio-shell.admin-console .login-layout{width:calc(100% - 32px);margin:20px auto}.studio-shell.admin-console .login-story{padding:26px!important}.studio-shell .login-story h1{font-size:27px;margin:10px 0}.studio-shell .access-story-steps{display:none}.studio-shell .login-story .story-bottom{padding-top:12px;margin-top:0}.studio-shell .login-card{padding:26px}.studio-shell .login-card h2{margin:0 0 22px}.studio-shell .top-actions{gap:6px}.studio-shell .top-actions select{max-width:80px}.studio-shell .theme-toggle{padding:7px}.studio-shell .theme-toggle,.studio-shell #logout{min-height:40px!important;height:40px}.studio-shell .nav-section-toggle{min-height:36px!important}.studio-shell :is(.permission-label,.tick-label){min-height:44px}.studio-shell .console-menu-toggle{min-height:40px!important}.studio-shell .savebar{align-items:stretch}.studio-shell .savebar>button{align-self:flex-start}}
/* Compact controls keep their size inside touch-friendly labels. */
.studio-shell.ui-refreshed input[type=radio],.studio-shell.ui-refreshed input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px!important;min-width:18px!important;padding:0!important;flex:0 0 18px;margin:0;vertical-align:middle;accent-color:var(--studio-accent)}
.studio-shell.ui-refreshed label:has(>input[type=radio]){display:flex!important;align-items:center;gap:10px;min-height:40px}
.studio-shell.ui-refreshed label:has(>input[type=radio])>input{margin:0!important}
@media(max-width:640px){.studio-shell.ui-refreshed label:has(>input[type=radio]){min-height:44px}}
.studio-shell.ui-refreshed button.primary,.studio-shell.ui-refreshed a.primary{background:#ea6a14!important;color:#111!important;border-color:#ea6a14!important}
.studio-shell.ui-refreshed button.primary:hover,.studio-shell.ui-refreshed a.primary:hover{background:#f37d30!important;border-color:#f37d30!important}
.studio-shell .health-cards>.box{border-radius:0!important}
.studio-shell #users .permission-sms.verified{color:var(--studio-positive)}
/* Header controls use one height; form field spacing must not leak into chrome. */
.studio-shell .top-actions{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;line-height:1.4}
.studio-shell .top-actions .language-control{display:flex;align-items:center;gap:0;margin:0;flex:0 0 auto;white-space:nowrap}
.studio-shell .top-actions .language-control>span{display:none}
.studio-shell .top-actions .language-control select{width:100px;min-width:100px;max-width:none;height:38px;min-height:38px!important;margin:0!important;padding:0 10px;font-size:12px;line-height:normal;border-radius:7px}
.studio-shell .top-actions .theme-toggle,.studio-shell .top-actions #logout{height:38px;min-height:38px!important;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;white-space:nowrap;border-radius:7px;flex-shrink:0}
.studio-shell .top-actions .identity{align-items:center;gap:6px;padding:0 14px;border-inline-start:1px solid var(--studio-border);min-height:28px;font-size:12px;line-height:1.4}
.studio-shell .top-actions .studio-identity-name{direction:ltr;unicode-bidi:isolate;font-size:12px;font-weight:600}
.studio-shell .top-actions .studio-identity-role{font-size:11px;color:var(--studio-muted)}
.studio-shell .top-actions :is(button,select):focus:not(:focus-visible){outline:none;box-shadow:none}
@media(max-width:640px){.studio-shell .top-actions{gap:6px}.studio-shell .top-actions .language-control select{width:92px;min-width:92px;height:44px;min-height:44px!important}.studio-shell .top-actions .theme-toggle,.studio-shell .top-actions #logout{width:44px;height:44px;min-height:44px!important;padding:0}.studio-shell .top-actions .identity{display:none}}

/* User portal only: original forms and authentication remain the source of truth. */
body.studio-shell.user-portal {
  --pf-ground: #f4f5f6;
  --pf-surface: #fff;
  --pf-raised: #f8f9fa;
  --pf-ink: #202326;
  --pf-muted: #62686f;
  --pf-line: #e0e3e6;
  --pf-accent: #c54d08;
  background: var(--pf-ground);
  background-image: none;
  color: var(--pf-ink);
}
html[data-theme="dark"] body.studio-shell.user-portal {
  --pf-ground: #141516;
  --pf-surface: #1c1e20;
  --pf-raised: #222527;
  --pf-ink: #f0f1f2;
  --pf-muted: #aeb3b8;
  --pf-line: #35393d;
  --pf-accent: #ff9c59;
}
body.user-portal main.portal-main {
  max-width: 1152px !important;
  width: min(1152px, calc(100% - 64px)) !important;
  margin: 24px auto !important;
  padding: 0 24px 24px !important;
}
.user-portal .portal-header {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--pf-line);
}
.user-portal .portal-brand { display: flex; align-items: center; gap: 24px; min-width: 0; }
.user-portal .portal-logo { width: 104px !important; height: 38px; object-fit: contain; filter: brightness(0) !important; }
html[data-theme="dark"] .user-portal .portal-logo { filter: brightness(0) invert(1) !important; }
.user-portal .portal-scope { border-inline-start: 1px solid var(--pf-line); padding-inline-start: 24px; color: var(--pf-muted); font-size: 13px; }
.user-portal .portal-tools { display: flex; align-items: center; gap: 8px; margin: 0; flex: none; }
.user-portal .portal-tools .language-control { margin: 0; }
.user-portal .portal-tools .language-control > span { display: none; }
.user-portal .portal-tools .theme-toggle { position: static; float: none; margin: 0; }
.user-portal .portal-tools button, .user-portal .portal-tools select { min-height: 38px; font-size: 12px; }
.user-portal .portal-heading { padding-block: 38px 28px; }
body.user-portal .portal-heading h1 { color: var(--pf-ink); margin: 0 0 8px; font-size: 28px; line-height: 1.4; font-weight: 600; letter-spacing: -.025em; }
.user-portal .portal-heading p { color: var(--pf-muted); margin: 0; font-size: 14px; }
.user-portal #notice { margin: 0; color: var(--pf-ink); }
.user-portal #notice:empty { display: none; }
.user-portal #notice:not(:empty) { margin-block-end: 22px; padding: 12px 16px; background: var(--pf-raised); border: 1px solid var(--pf-line); border-inline-start: 3px solid #ea6a14; border-radius: 6px; font-size: 13px; overflow-wrap: anywhere; }
/* 1152px sheet = two equal columns; no independent card widths to drift apart. */
.user-portal .portal-entry { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--pf-line); border-radius: 12px; background: var(--pf-surface); }
.user-portal .portal-story { padding: 40px; background: var(--pf-raised); }
.user-portal .portal-story h2 { margin: 0 0 14px; color: var(--pf-ink); font-size: 25px; font-weight: 550; line-height: 1.6; letter-spacing: -.02em; }
.user-portal .portal-story-help { color: var(--pf-muted); font-size: 14px; line-height: 1.9; max-width: 36ch; margin: 0; }
.user-portal .portal-steps { list-style: none; margin: 34px 0 30px; padding: 0; }
.user-portal .portal-steps li { position: relative; padding: 0 0 28px; padding-inline-start: 25px; }
.user-portal .portal-steps li:last-child { padding-block-end: 0; }
.user-portal .portal-steps li::before { content: ''; position: absolute; inset-inline-start: 0; top: 10px; width: 7px; height: 7px; background: var(--pf-muted); border-radius: 50%; }
.user-portal .portal-steps li:not(:last-child)::after { content: ''; position: absolute; inset-inline-start: 3px; top: 22px; bottom: 3px; width: 1px; background: var(--pf-line); }
.user-portal .portal-steps li[aria-current="step"]::before { background: #ea6a14; }
.user-portal .portal-steps strong { display: block; color: var(--pf-ink); font-size: 14px; font-weight: 550; }
.user-portal .portal-steps span { display: block; margin-top: 4px; color: var(--pf-muted); font-size: 12px; line-height: 1.9; }
.user-portal .portal-community { font-size: 12px; color: var(--pf-muted); }
body.user-portal #signin { margin: 0; border: 0; border-inline-start: 1px solid var(--pf-line); border-radius: 0; padding: 40px; background: var(--pf-surface); box-shadow: none; }
.user-portal .portal-signin-title { font-size: 22px; font-weight: 550; color: var(--pf-ink); margin: 0 0 8px; }
.user-portal .portal-signin-help { color: var(--pf-muted); font-size: 13px; margin-bottom: 25px; }
.user-portal #userlogin { display: flex; flex-direction: column; gap: 16px; }
.user-portal #userlogin label { margin: 0; font-size: 13px; color: var(--pf-ink); }
.user-portal #userlogin input { min-height: 44px; margin-top: 8px; }
.user-portal #userlogin > button { width: 100%; min-height: 42px; margin: 0; }
.user-portal #userlogin > .primary { margin-top: 8px; }
.user-portal #restart-login { border: 0; background: transparent; color: var(--pf-muted); min-height: 32px; padding: 4px; }
.user-portal #restart-login:hover { color: var(--pf-ink); text-decoration: underline; background: transparent; }
.user-portal #login-otp-label input, .user-portal #phone-confirm input, .user-portal #totp-confirm input { font-variant-numeric: tabular-nums; font-size: 20px; letter-spacing: .2em; text-align: start; direction: ltr; }
.user-portal #account { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
body.user-portal #account > .box { margin: 0; border: 1px solid var(--pf-line); border-radius: 10px; background: var(--pf-surface); padding: 28px; box-shadow: none; overflow: visible; }
body.user-portal #account > .box::after { display: none; }
.studio-shell.user-portal #account > .box.portal-profile-card { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; column-gap: 32px; align-items: center; background: var(--pf-surface); border-color: var(--pf-line); }
.user-portal .portal-profile-label { grid-column: 1; margin: 0 0 6px; color: var(--pf-muted); font-size: 12px; }
.user-portal #account-name { grid-column: 1; margin: 0; color: var(--pf-ink); font-size: 24px; line-height: 1.5; direction: ltr; text-align: start; font-weight: 550; overflow-wrap: anywhere; }
.user-portal #download { grid-column: 2; grid-row: 1 / 3; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 18px; text-decoration: none; font-size: 13px; white-space: nowrap; min-height: 44px; }
.user-portal #download svg { width: 18px; height: 18px; flex: none; }
.user-portal .portal-endpoint { grid-column: 1; margin: 14px 0 0; color: var(--pf-muted); font-size: 12px; overflow-wrap: anywhere; }
.user-portal .portal-signout { grid-column: 2; grid-row: 3; justify-self: end; padding: 4px 0; min-height: 32px; color: var(--pf-muted); border: 0; background: transparent; font-size: 12px; }
.user-portal .portal-signout:hover { background: transparent; color: var(--pf-ink); text-decoration: underline; }
.user-portal .portal-security-heading { grid-column: 1 / -1; margin-top: 6px; }
.user-portal .portal-security-heading h2 { color: var(--pf-ink); font-size: 20px; font-weight: 550; margin: 0 0 5px; }
.user-portal .portal-security-heading p { margin: 0; color: var(--pf-muted); font-size: 13px; }
.user-portal #account > .box h2:not(#account-name), .user-portal #account > .box h3 { font-size: 18px; color: var(--pf-ink); font-weight: 550; margin-bottom: 10px; }
.user-portal #phone-state, .user-portal #totp-state { color: var(--pf-muted); font-size: 13px; line-height: 1.9; margin-bottom: 20px; }
.user-portal #account label { color: var(--pf-ink); font-size: 13px; }
.user-portal #phone-form button, .user-portal #phone-confirm button, .user-portal #totp-start, .user-portal #totp-confirm button { min-height: 42px; }
.user-portal #totp-setup { border-top: 1px solid var(--pf-line); margin-top: 22px; padding-top: 22px; }
.user-portal #totp-qr { display: block; background: #fff; padding: 8px; width: 206px; max-width: 100%; height: auto; margin-bottom: 20px; }
.user-portal #totp-key { font-family: ui-monospace, monospace; font-size: 12px; letter-spacing: .035em; }
.user-portal .portal-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 32px; padding: 18px 0 0; border-top: 1px solid var(--pf-line); color: var(--pf-muted); font-size: 12px; }
.user-portal .studio-portal-eyebrow { display: none; }
@media (max-width: 860px) {
  body.user-portal main.portal-main { width: calc(100% - 40px) !important; }
  .user-portal .portal-story, body.user-portal #signin { padding: 28px; }
  .user-portal .portal-scope { display: none; }
  .user-portal .portal-entry { grid-template-columns: .95fr 1.05fr; }
  .user-portal .portal-story h2 { font-size: 23px; }
  body.user-portal #account > .box { padding: 24px; }
  .user-portal #account { gap: 20px; }
}
@media (max-width: 640px) {
  body.user-portal main.portal-main { width: calc(100% - 24px) !important; margin: 12px auto !important; padding: 0 16px 20px !important; }
  .user-portal .portal-header { min-height: 76px; gap: 12px; }
  .user-portal .portal-logo { width: 88px !important; height: 32px; }
  .user-portal .portal-tools { gap: 6px; }
  .user-portal .portal-tools button, .user-portal .portal-tools select { min-height: 44px; padding-inline: 10px; }
  .user-portal .portal-heading { padding-block: 28px 24px; }
  body.user-portal .portal-heading h1 { font-size: 24px; }
  .user-portal .portal-heading p { font-size: 13px; }
  .user-portal .portal-entry { grid-template-columns: 1fr; }
  .user-portal .portal-story { display: none; }
  body.user-portal #signin { padding: 26px 22px; border-inline-start: 0; }
  .user-portal #userlogin { gap: 18px; }
  .user-portal #userlogin > button, .user-portal #account button { min-height: 44px; }
  .user-portal #account { grid-template-columns: 1fr; gap: 20px; }
  .studio-shell.user-portal #account > .box.portal-profile-card { grid-template-columns: minmax(0, 1fr); }
  .user-portal #download { grid-column: 1; grid-row: auto; width: 100%; margin-top: 22px; white-space: normal; }
  .user-portal .portal-signout { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
  .user-portal .portal-endpoint { grid-row: 3; }
  .user-portal .portal-footer { flex-wrap: wrap; row-gap: 6px; margin-top: 28px; }
}
