:root {
  color-scheme: dark;
  --canvas:#0b0c0f;
  --shell:#08090b;
  --surface-1:#121419;
  --surface-2:#181b21;
  --surface-3:#20242c;
  --surface-hover:#252a33;
  --border:#2d323b;
  --border-strong:#424954;
  --text-1:#f3efe7;
  --text-2:#bbb5ab;
  --text-3:#918b82;
  --accent:#c8a96b;
  --accent-hover:#dec58f;
  --accent-soft:#2b2418;
  --success:#76b58c;
  --success-bg:#13231a;
  --warning:#d3a557;
  --warning-bg:#2a2113;
  --danger:#df7d78;
  --danger-bg:#2c1717;
  --info:#7798c3;
  --info-bg:#14202e;
  --radius:8px;
  --sidebar:232px;
  --topbar:64px;
}

*,*::before,*::after { box-sizing:border-box; letter-spacing:0; }
html { min-width:320px; background:var(--canvas); }
body { margin:0; min-height:100vh; overflow-x:hidden; background:var(--canvas); color:var(--text-1); font:400 14px/1.6 "Noto Sans JP","Hiragino Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; -webkit-font-smoothing:antialiased; }
button,input,select,textarea { font:inherit; color:inherit; }
button { min-height:44px; }
button,[role="button"],tr[data-nav],tr[data-ref-select],tr[data-live-action] { cursor:pointer; }
[hidden] { display:none!important; }
a { color:var(--accent-hover); }
h1,h2,h3,h4,p { margin:0; }
h1,h2,h3 { font-family:"Noto Serif JP","Yu Mincho",serif; font-weight:500; }
small,.muted { color:var(--text-3); font-size:12px; }
svg { display:block; }
::selection { background:rgba(200,169,107,.3); }
::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-track { background:var(--shell); }
::-webkit-scrollbar-thumb { border:2px solid var(--shell); border-radius:8px; background:var(--border-strong); }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:2px solid var(--accent-hover); outline-offset:2px; }

/* Login */
.liveLogin { position:fixed; inset:0; z-index:1000; display:grid; place-items:center start; min-height:100svh; padding:clamp(24px,5vw,80px); background:linear-gradient(90deg,rgba(7,8,10,.96) 0%,rgba(7,8,10,.82) 40%,rgba(7,8,10,.15) 76%),url("assets/studio-login-v3.jpg") center/cover no-repeat; }
.liveLoginCard { width:min(408px,100%); padding:32px; border:1px solid rgba(200,169,107,.34); border-radius:8px; background:rgba(11,12,15,.9); backdrop-filter:blur(14px); }
.liveLoginCard .brandMark { display:block; width:10px; height:10px; margin:0 0 20px; transform:rotate(45deg); background:var(--accent); }
.liveLoginCard h1 { margin-bottom:28px; font-size:22px; }
.liveLoginCard label { display:block; margin:16px 0 6px; color:var(--text-2); font-size:13px; }
.liveLoginCard input { width:100%; min-height:44px; padding:9px 12px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface-1); }
.liveLoginCard button { width:100%; margin-top:24px; border:1px solid var(--accent); border-radius:6px; background:var(--accent); color:#14110c; font-weight:700; }
.liveLoginCard button:hover { background:var(--accent-hover); }
.liveLoginCard p { min-height:22px; margin-top:10px; color:var(--danger); font-size:13px; }

/* Application shell */
.appShell { min-height:100vh; display:flex; background:var(--canvas); }
.sideNav { position:fixed; inset:0 auto 0 0; z-index:30; width:var(--sidebar); display:flex; flex-direction:column; border-right:1px solid var(--border); background:var(--shell); }
.sideBrand { min-height:88px; padding:20px 18px; display:flex; align-items:center; gap:12px; border-bottom:1px solid var(--border); background:linear-gradient(rgba(8,9,11,.8),rgba(8,9,11,.94)),url("assets/nav-texture-v3.jpg") center/cover; }
.brandMark { flex:0 0 10px; width:10px; height:10px; transform:rotate(45deg); background:var(--accent); }
.sideBrand strong { display:block; font-family:"Noto Serif JP","Yu Mincho",serif; font-size:16px; font-weight:600; }
.sideBrand small { display:block; margin-top:3px; color:var(--text-3); font-size:12px; }
.sideTabs { flex:1; padding:14px 10px; overflow-y:auto; }
.navGroup+.navGroup { margin-top:18px; }
.navLabel { display:block; padding:0 10px 6px; color:var(--text-3); font-size:12px; }
.sideTabs button,.navSubButton { position:relative; width:100%; min-height:44px; padding:9px 10px; display:flex; align-items:center; gap:8px; border:0; border-radius:6px; background:transparent; color:var(--text-2); text-align:left; }
.sideTabs button:hover,.navSubButton:hover { background:var(--surface-2); color:var(--text-1); }
.sideTabs button.active,.navSubButton.active { background:var(--accent-soft); color:var(--accent-hover); }
.sideTabs button.active::before { content:""; position:absolute; left:0; top:9px; bottom:9px; width:2px; background:var(--accent); }
.badge,.navSubCount,.notificationBadge { display:inline-grid; place-items:center; min-width:23px; height:23px; padding:0 7px; border-radius:999px; background:var(--danger); color:#fff; font-size:12px; font-weight:700; }
.sideTabs .badge,.navChevron,.navSubCount { margin-left:auto; }
.badge.zero,.navSubCount.zero { background:var(--surface-3); color:var(--text-3); }
.navCurtain { display:grid; grid-template-rows:0fr; opacity:0; visibility:hidden; pointer-events:none; transition:grid-template-rows .18s ease,opacity .18s ease,visibility 0s .18s; }
.navCurtain.open { grid-template-rows:1fr; opacity:1; visibility:visible; pointer-events:auto; transition-delay:0s; }
.navCurtainInner { min-height:0; margin-left:10px; overflow:hidden; border-left:1px solid var(--border); }
.sideTabs .navSubButton { padding-left:18px; border-radius:0 6px 6px 0; font-size:13px; }
.sideFoot { min-height:72px; padding:12px 16px; display:flex; align-items:center; gap:10px; border-top:1px solid var(--border); }
.sideAvatar,.topAvatar { display:grid; place-items:center; border-radius:50%; background:var(--accent); color:#15110b; font-size:12px; font-weight:700; }
.sideAvatar { width:36px; height:36px; }
.sideFoot strong { display:block; font-size:13px; }
.sideFoot small { display:block; font-size:12px; }
.workspace { width:calc(100% - var(--sidebar)); min-width:0; margin-left:var(--sidebar); }
.topbar { position:sticky; top:0; z-index:20; height:var(--topbar); padding:0 24px; display:flex; align-items:center; gap:14px; border-bottom:1px solid var(--border); background:rgba(11,12,15,.96); backdrop-filter:blur(12px); }
.navToggle { display:none; width:44px; padding:0; border:1px solid var(--border); border-radius:6px; background:var(--surface-1); }
.globalSearch { width:min(460px,44vw); }
.globalSearch input { width:100%; min-height:40px; padding:8px 12px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface-1); }
.globalSearch input::placeholder,input::placeholder,textarea::placeholder { color:var(--text-3); }
.topActions { margin-left:auto; display:flex; align-items:center; gap:10px; }
.topDate { color:var(--text-3); font-size:12px; white-space:nowrap; }
.topCreate,.refButton.primary,.miniBtn.primary,.feedbackSubmit,.areaAction.primary { border-color:var(--accent)!important; background:var(--accent)!important; color:#15110b!important; font-weight:700; }
.topCreate:hover,.refButton.primary:hover,.miniBtn.primary:hover,.feedbackSubmit:hover,.areaAction.primary:hover { background:var(--accent-hover)!important; }
.topCreate { padding:0 15px; border:1px solid; border-radius:6px; }
.topAvatar { width:40px; height:40px; padding:0; border:0; }
.navOverlay { display:none; position:fixed; inset:0; z-index:25; border:0; background:rgba(0,0,0,.68); }
.container { width:100%; max-width:1600px; margin:0 auto; padding:24px 28px 80px; overflow-x:hidden; }
#backBar { position:sticky; top:var(--topbar); z-index:10; margin:-24px -28px 18px; padding:10px 28px; display:none; align-items:center; gap:12px; border-bottom:1px solid var(--border); background:var(--surface-1); }
#backBar button,.queuePageBack button,.refBack { min-height:44px; border:0; background:transparent; color:var(--accent-hover); }
#toast { position:fixed; right:20px; bottom:20px; z-index:400; max-width:min(420px,calc(100vw - 32px)); padding:12px 16px; transform:translateY(18px); opacity:0; border:1px solid var(--border-strong); border-radius:8px; background:var(--surface-3); transition:.18s ease; pointer-events:none; }
#toast.show { transform:none; opacity:1; }

/* Shared headers and controls */
.dashTitle,.areaHeader,.refHead,.analyticsHeader,.feedbackHeader,.queueOverviewHead,.customerDirectoryHead,.customerListHead,.studentPageHead { margin-bottom:18px; display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }
.dashTitle h2,.areaHeader h2,.refHead h2,.analyticsHeader h2,.feedbackHeader h2,.queueOverviewHead h2 { font-size:24px; line-height:1.35; }
.dashTitle p,.areaHeader p,.refHead p,.analyticsHeader p,.feedbackHeader p,.queueOverviewHead p,.colHead .purpose { margin-top:4px; color:var(--text-2); font-size:14px; }
.dashUpdated { color:var(--text-3); font-size:12px; }
.dashTitleActions,.refHeadActions,.areaActions,.analyticsHeaderActions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.panel,.dashTool,.areaSurface,.refSurface,.metricPanel,.analyticsSurface,.feedbackSurface,.rowList,.detail,.taskLauncher,.workPanel { min-width:0; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); box-shadow:none; }
.toolHead,.areaSurfaceHead,.refSurfaceHead,.metricHead,.analyticsSurfaceHead,.feedbackSurfaceHead { min-height:52px; padding:11px 14px; display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--border); background:var(--surface-2); }
.toolHead h3,.areaSurfaceHead h3,.refSurfaceHead h3,.metricHead h3,.analyticsSurfaceHead h3,.feedbackSurfaceHead h3 { font-size:16px; }
.toolHead .sub,.areaSurfaceHead span,.refSurfaceHead span,.metricHead span,.analyticsSurfaceHead span,.feedbackSurfaceHead span { margin-left:auto; color:var(--text-3); font-size:12px; }
.refButton,.miniBtn,.iconBtn,.areaAction,.areaOpen,.caseAction,.refFilter,.metricLink { min-height:44px; padding:8px 12px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface-2); color:var(--text-2); font-size:13px; }
.refButton:hover,.miniBtn:hover,.iconBtn:hover,.areaAction:hover,.areaOpen:hover,.caseAction:hover,.refFilter:hover { background:var(--surface-hover); color:var(--text-1); }
.refButton.danger,.dangerButton { border-color:#70403f; color:var(--danger); }
.refLink,.metricLink { padding:6px 0; border:0; background:transparent; color:var(--accent-hover); }
.refBack { margin-bottom:12px; }
.push { margin-left:auto; }
.controlBar,.refToolbar,.recordsFilters,.caseFilterBar,.colFilters { min-height:52px; margin-bottom:12px; padding:8px 10px; display:flex; align-items:center; gap:8px; overflow-x:auto; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.sectionTabs,.segTabs,.feedbackTabs,.analyticsModes,.customerHubModes,.dashMode { margin-bottom:16px; display:flex; gap:4px; overflow-x:auto; border-bottom:1px solid var(--border); }
.sectionTabs button,.segTabs button,.feedbackTabs button,.analyticsModes button,.customerHubMode,.dashMode button { flex:0 0 auto; min-height:44px; padding:8px 13px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--text-2); }
.sectionTabs button.active,.segTabs button.active,.feedbackTabs button.active,.analyticsModes button.active,.customerHubMode.active,.dashMode button.active { border-bottom-color:var(--accent); color:var(--accent-hover); }
.st,.status,.paymentState,.feedbackState,.refStatus,.customerTypeTag,.recordsDetailState,.queuePriority { display:inline-flex; align-items:center; min-height:26px; padding:3px 8px; border:1px solid var(--border-strong); border-radius:5px; background:var(--surface-3); color:var(--text-2); font-size:12px; white-space:nowrap; }
.st.ok,.status.ok,.paymentState.ok,.feedbackState.done,.feedbackState.fixed,.refStatus { border-color:#315d42; background:var(--success-bg); color:var(--success); }
.st.warn,.status.warn,.paymentState.warn,.feedbackState.checking,.feedbackState.planned { border-color:#674e27; background:var(--warning-bg); color:var(--warning); }
.st.err,.status.err,.paymentState.err,.feedbackState.approval,.queuePriority.hot { border-color:#75403e; background:var(--danger-bg); color:var(--danger); }
.feedbackState.received,.status.info { border-color:#385574; background:var(--info-bg); color:var(--info); }

/* Dashboard */
.dashNotice,.studentAlert,.operationWarning,.analyticsCaution { margin-bottom:14px; padding:11px 13px; border:1px solid #75403e; border-left:3px solid var(--danger); border-radius:6px; background:var(--danger-bg); color:#edaaa6; }
.riskStrip,.managementKpis,.analyticsSummary,.analyticsKpis,.feedbackSummary,.refKpis,.compactSummary { margin-bottom:14px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid var(--border); border-radius:8px; overflow:hidden; background:var(--border); gap:1px; }
.riskBtn,.managementKpi,.analyticsSummaryItem,.analyticsKpi,.feedbackSummary>div,.refKpi { min-height:88px; padding:14px; border:0; background:var(--surface-1); color:var(--text-1); text-align:left; }
.riskBtn:hover,.managementKpi:hover { background:var(--surface-hover); }
.riskBtn.active { box-shadow:inset 0 -2px var(--accent); }
.riskNum,.managementKpi .value,.analyticsSummaryItem strong,.analyticsKpi strong,.feedbackSummary strong,.refKpi strong { display:block; margin-top:4px; font-size:22px; font-weight:650; }
.riskLabel,.managementKpi .label,.managementKpi .note,.analyticsSummaryItem small,.analyticsSummaryItem span,.analyticsKpi small,.analyticsKpi span,.feedbackSummary small,.feedbackSummary span,.refKpi small,.refKpi span { color:var(--text-3); font-size:12px; }
.dashMain { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(360px,.72fr); gap:14px; align-items:start; }
.dashLower,.managementGrid,.analyticsOverviewGrid,.analyticsDetailGrid { margin-top:14px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.priorityTool { grid-column:1; }
.calendarTool { grid-column:2; grid-row:1 / span 2; }
.todayTool { grid-column:1; }
.taskLauncher { margin-bottom:14px; }
.taskLauncherHead { min-height:50px; padding:11px 14px; display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--border); background:var(--surface-2); }
.taskLauncherGrid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); }
.taskLaunch { min-height:72px; padding:11px; border:0; border-right:1px solid var(--border); background:transparent; color:var(--text-1); text-align:left; }
.taskLaunch:hover { background:var(--surface-hover); }
.taskLaunch strong,.taskLaunch span { display:block; }
.taskLaunch span { margin-top:4px; color:var(--text-3); font-size:12px; }
.caseHead,.caseRow { display:grid; grid-template-columns:90px minmax(180px,1.5fr) minmax(120px,.8fr) 90px 120px; gap:10px; align-items:center; }
.caseHead,.areaColumns { padding:8px 14px; border-bottom:1px solid var(--border); background:var(--surface-2); color:var(--text-3); font-size:12px; }
.caseRow { min-height:64px; padding:10px 14px; border-bottom:1px solid var(--border); }
.caseRow:hover,.areaRow:hover { background:var(--surface-hover); }
.caseTitle,.caseWho { font-size:13px; }
.caseType,.caseWhen,.caseStatus,.casePriority { color:var(--text-3); font-size:12px; }
.casePriority.overdue,.caseStatus.waiting,.oldHot { color:var(--danger); }
.caseEmpty,.analyticsNoData,.notificationEmpty { padding:40px 20px; color:var(--text-3); text-align:center; }
.calendar { padding:12px; }
.calendarNav { display:flex; align-items:center; gap:8px; }
.calWeek,.calGrid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.calWeek span { padding:7px; color:var(--text-3); font-size:12px; text-align:center; }
.calBlank,.calDay { min-height:66px; padding:6px; border:1px solid var(--border); background:var(--surface-1); }
.calDay:hover,.calDay.selected { background:var(--surface-hover); }
.calDay.today { box-shadow:inset 0 0 0 1px var(--info); }
.calDayNum,.calEvent { font-size:12px; }
.calEvent { display:block; margin-top:3px; padding-left:5px; overflow:hidden; border-left:2px solid var(--info); color:var(--text-2); text-overflow:ellipsis; white-space:nowrap; }
.dayAgenda { padding:12px 14px; border-top:1px solid var(--border); }
.agendaRow,.agendaFocus,.agendaLessonRow { padding:8px 0; display:grid; grid-template-columns:86px minmax(0,1fr); gap:10px; border-bottom:1px solid var(--border); }
.agendaTime,.agendaGroupLabel { color:var(--text-3); font-size:12px; }
.agendaColumns { display:grid; gap:12px; }
.agendaName { color:var(--text-2); }
.calMonth { min-width:100px; text-align:center; }

/* Lists, detail, tables */
.colHead { margin-bottom:12px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.colHead h2 { font-size:22px; }
.titleCount { display:inline-grid; place-items:center; min-width:28px; height:28px; border:1px solid var(--border-strong); border-radius:999px; color:var(--accent-hover); font-size:12px; }
.colBody { display:grid; grid-template-columns:380px minmax(0,1fr); gap:14px; align-items:start; }
.rowList { max-height:calc(100vh - 260px); overflow-y:auto; }
.rowItem { width:100%; min-height:96px; padding:13px 14px; border:0; border-bottom:1px solid var(--border); border-left:3px solid transparent; background:transparent; color:var(--text-1); text-align:left; }
.rowItem:hover { background:var(--surface-hover); }
.rowItem.sel { border-left-color:var(--accent); background:var(--accent-soft); }
.rowItem.done { opacity:.55; }
.riTop,.riFooter { display:flex; align-items:flex-start; gap:8px; }
.riFooter { margin-top:8px; }
.riWho { font-size:14px; font-weight:650; }
.riWho.unknown,.riAge.hot { color:var(--danger); }
.riAge { margin-left:auto; color:var(--text-3); font-size:12px; }
.riSub,.riBody { margin-top:4px; overflow:hidden; color:var(--text-2); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.riProgress { margin-left:auto; color:var(--success); font-size:12px; white-space:nowrap; }
.detail { min-height:380px; padding:18px; }
.dHead,.refIdentity,.studentIdentity { margin-bottom:16px; padding-bottom:14px; display:flex; align-items:flex-start; gap:12px; border-bottom:1px solid var(--border); }
.dHead .name,.refIdentity h3,.studentIdentity h2 { font-family:"Noto Serif JP","Yu Mincho",serif; font-size:20px; }
.dHeadName { min-height:44px; padding:0; border:0; background:transparent; color:var(--text-1); text-align:left; }
.dHeadName:hover { color:var(--accent-hover); }
.dHeadName small { display:block; margin-top:3px; color:var(--accent-hover); font-family:"Noto Sans JP","Hiragino Sans",sans-serif; font-size:12px; }
.dHeadName { padding:0; border:0; background:transparent; color:var(--text-1); text-align:left; }
.dHead .right,.studentIdentityMeta { margin-left:auto; display:flex; gap:8px; flex-wrap:wrap; }
.dFacts,.refFacts,.profileRows { margin-bottom:14px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid var(--border); background:var(--border); gap:1px; }
.profileRowsSingle { grid-template-columns:1fr; }
.dFact,.refFact,.profileRow { min-height:68px; padding:10px 12px; background:var(--surface-1); }
.dFact .k,.refFact small,.profileRow small,.dSec>.h,.refSectionTitle { color:var(--text-3); font-size:12px; }
.dFact .v,.refFact strong,.profileRow strong { display:block; margin-top:4px; font-size:14px; }
.profileRowsSingle { grid-template-columns:1fr; }
.sectionInset { padding:0 12px; }
.sectionGap { margin-bottom:12px; }
.factsSpaced { margin-top:16px; }
.timelineDate { width:130px; color:var(--text-3); font-size:12px; }
.calendarEventFilter { display:inline-flex; align-items:center; gap:7px; color:var(--text-2); font-size:12px; }
.calendarEventFilter input { min-height:auto; }
.calendarMonthLabel { color:var(--text-1); font-size:13px; }
.toolbarSpacer { flex:1; }
.toolbarHint { color:var(--text-3); font-size:12px; }
.formActionField { align-self:end; }
.settingsStack { display:grid; gap:12px; }
.knownApplicant { color:var(--text-1)!important; }
.caseWarning { padding:12px 14px; border:1px solid #674e27; border-radius:6px; background:var(--warning-bg); color:#e4be79; font-size:13px; line-height:1.8; }
.dSec { margin-top:16px; }
.actions { margin-top:16px; padding-top:14px; display:flex; gap:8px; flex-wrap:wrap; border-top:1px solid var(--border); }
.actionsTitle { flex-basis:100%; color:var(--text-3); font-size:12px; }
.noteBox,.replyRow input { width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface-1); }
.replyRow { display:flex; gap:8px; margin-top:10px; }
.replyRow .miniBtn { min-width:96px; white-space:nowrap; }
.refTable,.recordsTable,.analyticsDataTable,.metricTable,.miniTable,.impactTable { width:100%; border-collapse:collapse; color:var(--text-2); font-size:13px; }
.refTable th,.recordsTable th,.analyticsDataTable th,.metricTable th,.miniTable th,.impactTable th { position:sticky; top:0; z-index:1; padding:10px 12px; border-bottom:1px solid var(--border-strong); background:var(--surface-2); color:var(--text-3); font-size:12px; font-weight:600; text-align:left; }
.refTable td,.recordsTable td,.analyticsDataTable td,.metricTable td,.miniTable td,.impactTable td { padding:11px 12px; border-bottom:1px solid var(--border); vertical-align:top; }
.refTable tbody tr:hover,.recordsTable tbody tr:hover { background:var(--surface-hover); }
.money { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.refSurface,.recordsTableWrap { overflow:auto; }
.dSec table { width:100%; border-collapse:collapse; font-size:13px; }
.dSec th,.dSec td { padding:9px 10px; border-bottom:1px solid var(--border); text-align:left; }
.optionalBlock,.customerDetails { margin-top:14px; border-top:1px solid var(--border); }
.optionalBlock summary,.customerDetails summary { min-height:44px; padding:10px 0; color:var(--accent-hover); cursor:pointer; }
.pick { display:grid; gap:8px; }
.pickOpt { width:100%; min-height:44px; padding:8px 11px; border:1px solid var(--border); border-radius:6px; background:var(--surface-2); color:var(--text-2); text-align:left; }
.pickOpt:hover,.pickOpt.active { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-hover); }
.workResult { margin-bottom:14px; padding:11px 13px; border:1px solid #315d42; border-left:3px solid var(--success); border-radius:6px; background:var(--success-bg); color:var(--success); }
.refToolbar input,.controlBar input,.controlBar select,.recordsFilters input,.recordsFilters select,.refSearch { min-height:40px; padding:8px 11px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface-1); }
.refSearch { flex:1; min-width:200px; }
.controlBar label,.refToolbar span { font-size:12px!important; }
.calendarEventFilter { display:flex; min-height:44px; align-items:center; gap:7px; color:var(--text-2); font-size:12px; }
.calendarMonthLabel { color:var(--text-1); font-size:14px; }
.toolbarSpacer { flex:1; }
.toolbarHint { color:var(--text-3); font-size:12px; }
.sectionGap { margin-bottom:12px; }
.sectionInset { padding:0 12px; }
.formActionField { align-self:end; }
.settingsStack { display:grid; gap:12px; }
.knownApplicant { color:var(--text-1)!important; }
.caseWarning { padding:12px 14px; border:1px solid #674e27; border-radius:6px; background:var(--warning-bg); color:var(--warning); font-size:13px; line-height:1.7; }
.factsSpaced { margin-top:16px; }
.timelineDate { width:130px; color:var(--text-3); font-size:12px; }

/* Customers and records */
.customerHubHead,.customerSearchPanel { margin-bottom:14px; }
.customerSearchPanel { padding:14px; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.customerSearchMain { display:flex; gap:8px; }
.customerSearchMain input { flex:1; min-width:0; min-height:44px; padding:9px 12px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface-1); }
.customerFilters { margin-top:12px; display:flex; gap:10px; flex-wrap:wrap; }
.customerFilter { min-width:180px; flex:1; }
.customerFilter label,.formField label { display:block; margin-bottom:5px; color:var(--text-2); font-size:13px; }
.customerFilter select,.formField input,.formField select,.formField textarea,.feedbackText,.feedbackInput,.feedbackSelect { width:100%; min-height:44px; padding:9px 11px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface-1); }
.formField textarea,.feedbackText { min-height:130px; resize:vertical; }
.customerPerson strong,.customerContext strong,.customerLastRecord strong { display:block; }
.customerPerson span,.customerLastRecord time { color:var(--text-3); font-size:12px; }
.customerAttentionFlag { color:var(--danger); }
.customerAttentionCell,.customerResultTools,.customerAttentionToggle { display:flex; align-items:center; gap:8px; }
.customerResultTools { margin-left:auto; }
.customerAttentionToggle { min-height:44px; }
.customerFilterReset { align-self:end; }
.customerNoAttention { color:var(--text-3); }
.studentCrumb { margin-bottom:12px; color:var(--text-3); }
.studentCrumb button { border:0; background:transparent; color:var(--accent-hover); }
.studentNav { margin-bottom:16px; display:flex; gap:4px; overflow-x:auto; border-bottom:1px solid var(--border); }
.studentNav button { flex:0 0 auto; padding:8px 12px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--text-2); }
.studentNav button.active { border-bottom-color:var(--accent); color:var(--accent-hover); }
.studentGrid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr); gap:14px; }
.studentActionRow,.studentMiniRow,.studentLesson,.studentTimelineRow { min-height:58px; padding:10px 12px; display:grid; gap:10px; align-items:center; border-bottom:1px solid var(--border); }
.studentActionRow { grid-template-columns:86px minmax(0,1fr) auto; }
.studentMiniRow { grid-template-columns:minmax(0,1fr) auto; }
.studentLesson { grid-template-columns:130px minmax(0,1fr) 110px auto; }
.studentTimelineRow { grid-template-columns:80px 14px minmax(0,1fr); }
.studentTimelineDot { width:9px; height:9px; border-radius:50%; background:var(--accent); }
.studentActionList,.studentMiniList,.studentTimeline,.settingClassList,.caseList,.feedbackRequestList,.feedbackChanges,.analyticsIssueList,.analyticsProblemList,.analyticsTrackingList { min-width:0; }
.recordsWorkspace { display:grid; grid-template-columns:190px minmax(0,1fr) 320px; gap:12px; }
.recordsRail,.recordsMain,.recordsDetail,.recordsThread { min-width:0; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.recordsRail { align-self:start; overflow:hidden; }
.recordsTypeButton { width:100%; min-height:48px; padding:10px; display:flex; align-items:center; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--text-2); text-align:left; }
.recordsTypeButton.active { background:var(--accent-soft); color:var(--accent-hover); box-shadow:inset 2px 0 var(--accent); }
.recordsTypeCounts { margin-left:auto; }
.recordsMainHead,.recordsDetailHead { min-height:52px; padding:11px 14px; border-bottom:1px solid var(--border); background:var(--surface-2); }
.recordsDetailBody,.recordsDetailBlock { padding:14px; }
.recordsPager,.recordsDetailActions { padding:10px; display:flex; gap:8px; justify-content:flex-end; }
.recordSummary,.recordWorkflow,.recordStatusStack { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.recordExcerpt { display:block; max-width:360px; overflow:hidden; color:var(--text-3); text-overflow:ellipsis; white-space:nowrap; }
.refDetail,.recordsDetailBlock { padding:16px; }

/* Chat */
.lineChat,.lineThread { overflow:hidden; border:1px solid #334a64; border-radius:8px; background:#101820; }
.lineThreadHead { min-height:58px; padding:10px 12px; display:flex; align-items:center; gap:10px; border-bottom:1px solid #334a64; }
.lineThreadBack,.lineThreadPerson { border:0; background:transparent; color:var(--info); }
.lineThreadIdentity strong,.lineThreadIdentity span { display:block; }
.lineThreadIdentity span,.lineThreadEmpty,.lineTargetCount { color:var(--text-3); font-size:12px; }
.lineThreadMessages { min-height:360px; max-height:56vh; padding:16px; overflow-y:auto; }
.lineThreadDay { margin:14px 0; color:var(--text-3); font-size:12px; text-align:center; }
.lineMessage { max-width:76%; margin-bottom:10px; }
.lineMessage.out { margin-left:auto; }
.lineMessageBubble,.lcBubble { padding:9px 11px; border-radius:8px; background:#24374d; }
.lineMessage.out .lineMessageBubble,.lcOut { background:#25452e; }
.lineMessageMeta,.lcTime { margin-top:3px; color:var(--text-3); font-size:12px; }
.lcRow { display:flex; gap:9px; margin-bottom:10px; }
.lcRow.lcRight { justify-content:flex-end; }
.lcAvatar { flex:0 0 32px; width:32px; height:32px; display:grid; place-items:center; border-radius:50%; background:var(--surface-3); font-size:12px; }
.linePersonLink { border:0; background:transparent; color:var(--accent-hover); }
.lineThreadComposer { padding:10px; display:flex; gap:8px; border-top:1px solid #334a64; }
.lineThreadComposer textarea { flex:1; min-height:48px; padding:10px; border:1px solid #405b78; border-radius:6px; background:#101820; }

/* Schedule */
.monthScheduleLayout,.weekLayout { display:grid; grid-template-columns:minmax(0,1fr) 380px; gap:12px; align-items:start; }
.weekScroll { overflow:auto; }
.monthScheduleBoard { min-width:760px; }
.monthWeekdays,.monthGrid { display:grid; grid-template-columns:repeat(7,minmax(100px,1fr)); }
.monthWeekdays span { padding:9px; border-right:1px solid var(--border); background:var(--surface-2); color:var(--text-3); font-size:12px; text-align:center; }
.monthCell { min-height:92px; padding:9px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); background:var(--surface-1); }
.monthCell:hover,.monthCell.selected { background:var(--surface-hover); }
.monthCell.today { box-shadow:inset 0 0 0 1px var(--info); }
.monthCell.outside { opacity:.52; }
.monthDate,.monthDayCount,.monthDayNotice { font-size:12px; }
.monthDayCount,.monthDayNotice { display:block; margin-top:5px; color:var(--text-3); }
.monthDayNotice { color:var(--info); }
.monthAgendaButton { width:100%; min-height:68px; padding:10px 12px; display:grid; grid-template-columns:58px minmax(0,1fr) auto; gap:10px; align-items:start; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--text-1); text-align:left; }
.monthAgendaButton:hover { background:var(--surface-hover); }
.monthAgendaButton span,.monthAgendaCount { color:var(--text-3); font-size:12px; }
.monthAgendaAction { grid-column:3; color:var(--accent-hover)!important; }
.monthDaySummary { margin-top:5px; }

/* Forms, CMS, broadcast, settings */
.compactForm,.composerGrid { padding:14px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.formField.wide,.wide { grid-column:1 / -1; }
.eventSelector { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.eventChoice { min-height:70px; padding:12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.eventChoice.active { border-color:var(--accent); background:var(--accent-soft); }
.cmsEditorLayout,.lineComposerLayout,.settingsLayout { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr); gap:14px; align-items:start; }
.cmsPreview,.linePreviewSurface { position:sticky; top:calc(var(--topbar) + 16px); }
.cmsPreviewBody,.linePreviewBody,.lineEditorBody { padding:16px; }
.cmsPreviewCard { overflow:hidden; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); }
.cmsPreviewImage { min-height:230px; display:grid; place-items:center; overflow:hidden; background:linear-gradient(rgba(10,11,13,.12),rgba(10,11,13,.12)),url("assets/event-editorial-v3.jpg") center/cover no-repeat; color:transparent; font-size:0; }
.cmsPreviewImage img { width:100%; height:100%; min-height:230px; object-fit:cover; }
.cmsPreviewCopy { padding:16px; }
.cmsPreviewMeta,.lineQuota,.lineTemplateRow,.lineSendRow,.lineFileTiming { display:flex; align-items:center; gap:10px; }
.cmsPreviewMeta { color:var(--text-3); font-size:12px; }
.cmsPreviewMeta time { margin-left:auto; }
.cmsPreviewCopy h3 { margin-top:12px; font-size:18px; }
.cmsPreviewCopy p,.lineHelp,.linePreviewNote { margin-top:8px; color:var(--text-2); font-size:13px; }
.cmsOrderButton { width:44px; padding:0; border:1px solid var(--border); border-radius:6px; background:var(--surface-2); }
.cmsOrderControls { display:flex; gap:6px; }
.cmsPublishToggle { min-height:44px; display:flex!important; align-items:center; gap:8px; }
.lineQuota { margin-bottom:12px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.lineQuotaTrack { min-width:120px; flex:1; height:6px; overflow:hidden; border-radius:999px; background:var(--surface-3); }
.lineQuotaTrack i { display:block; height:100%; background:var(--accent); }
.phonePreview { max-width:280px; min-height:360px; margin:auto; padding:16px; border:1px solid var(--border-strong); border-radius:8px; background:#101820; }
.phoneBubble { margin-top:40px; padding:11px; border-radius:8px; background:#25452e; }
.settingsNav { padding:8px; }
.settingsNav button { width:100%; min-height:44px; padding:9px 10px; border:0; border-radius:6px; background:transparent; color:var(--text-2); text-align:left; }
.settingsNav button.active { background:var(--accent-soft); color:var(--accent-hover); }
.settingClassCard { border-bottom:1px solid var(--border); }
.settingClassHead,.settingScheduleLine { min-height:56px; padding:10px 12px; display:grid; grid-template-columns:minmax(140px,1fr) 90px 120px auto; gap:10px; align-items:center; }
.settingScheduleLine { border-top:1px solid var(--border); }
.permissionGrid { display:grid; grid-template-columns:minmax(160px,1fr) 100px 120px; }
.permissionGrid>div { min-height:44px; padding:10px; border-right:1px solid var(--border); border-bottom:1px solid var(--border); }
.permissionGrid .yes { color:var(--success); }
.permissionGrid .no { color:var(--danger); }
.backupAction { padding:18px; }

/* Operational areas and management metrics */
.areaGrid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); gap:14px; }
.areaColumns,.areaRow { display:grid; grid-template-columns:minmax(160px,1.3fr) minmax(130px,1fr) minmax(100px,.7fr) 112px; gap:12px; align-items:center; }
.areaRow { min-height:64px; padding:10px 14px; border-bottom:1px solid var(--border); }
.areaRow strong,.areaRow span { display:block; }
.areaRow span { color:var(--text-3); font-size:12px; }
.areaSummary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; background:var(--border); }
.areaStat { min-height:94px; padding:14px; background:var(--surface-1); }
.areaStat small,.areaStat strong { display:block; }
.areaStat strong { margin-top:5px; font-size:20px; }
.metricBody { padding:14px; }
.metricFoot { padding:9px 14px; display:flex; justify-content:flex-end; border-top:1px solid var(--border); }
.metricSubhead { margin-bottom:8px; color:var(--text-3); font-size:12px; }
.metricSubhead.withTop { margin-top:16px; padding-top:14px; border-top:1px solid var(--border); }
.funnelRow { margin-bottom:8px; display:grid; grid-template-columns:96px minmax(0,1fr) 42px; gap:9px; align-items:center; }
.funnelLabel,.funnelValue { font-size:12px; }
.funnelValue { text-align:right; }
.barTrack { height:7px; overflow:hidden; border-radius:999px; background:var(--surface-3); }
.barFill,.bar { display:block; height:100%; border-radius:999px; background:var(--accent); }
.signalGrid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.signal { min-height:74px; padding:10px; border:1px solid var(--border); border-radius:6px; background:var(--surface-1); color:var(--text-1); text-align:left; }
.signal:hover { background:var(--surface-hover); }
.signal .label,.signal .go { display:block; color:var(--text-3); font-size:12px; }
.signal .value { display:block; margin-top:4px; font-size:18px; }
.revenueChart { height:150px; display:flex; align-items:flex-end; gap:7px; }
.revCol { min-width:0; flex:1; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:5px; }
.revBar,.revenueBar { width:100%; max-width:24px; min-height:10px; border-radius:3px 3px 0 0; background:var(--accent); }
.revMonth { color:var(--text-3); font-size:12px; }
.capacityBar { display:inline-block; width:72px; height:7px; margin-left:6px; overflow:hidden; border-radius:999px; background:var(--surface-3); }
.capacityBar i { display:block; height:100%; background:var(--accent); }

/* Analytics */
.analyticsPage,.feedbackPage { color:var(--text-2); }
.analyticsPeriod { display:flex; padding:3px; border:1px solid var(--border); border-radius:6px; background:var(--surface-1); }
.analyticsPeriod button { min-height:44px; padding:6px 11px; border:0; border-radius:4px; background:transparent; color:var(--text-2); }
.analyticsPeriod button.active { background:var(--accent-soft); color:var(--accent-hover); }
.analyticsDemo { display:inline-flex; min-height:30px; padding:4px 8px; align-items:center; border:1px solid var(--info); border-radius:5px; background:var(--info-bg); color:var(--info); font-size:12px; }
.analyticsIssue,.feedbackRequest { width:100%; min-height:68px; padding:11px 13px; display:grid; align-items:center; gap:10px; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--text-1); text-align:left; }
.analyticsIssue { grid-template-columns:84px minmax(0,1fr) 20px; }
.analyticsIssue:hover,.analyticsIssue.active,.feedbackRequest:hover,.feedbackRequest.active { background:var(--surface-hover); }
.analyticsIssueLevel { color:var(--warning); font-size:12px; }
.analyticsIssueLevel.hot { color:var(--danger); }
.analyticsIssueArrow { color:var(--accent-hover); font-size:18px; }
.analyticsIssueTitle strong,.analyticsIssueTitle span { display:block; }
.analyticsIssueTitle span { color:var(--text-3); font-size:12px; }
.analyticsDiagnosis,.analyticsProblem,.analyticsTrackingIntro { padding:16px; }
.analyticsQuestion { color:var(--text-3); font-size:12px; }
.analyticsAction,.analyticsProblem { margin-top:12px; padding:12px; border-left:3px solid var(--info); background:var(--info-bg); }
.analyticsTrackingRow { min-height:66px; padding:10px 12px; display:grid; grid-template-columns:minmax(180px,1fr) 110px minmax(180px,1fr) 84px 48px; gap:10px; align-items:center; border-bottom:1px solid var(--border); }
.analyticsTrackingName strong,.analyticsTrackingName span { display:block; }
.analyticsTrackingName span,.analyticsTrackingSource,.analyticsTrackingWhy,.analyticsTrackingStatus { color:var(--text-3); font-size:12px; }
.analyticsToggle { position:relative; width:48px; min-height:44px; padding:0; border:0; border-radius:6px; background:transparent; }
.analyticsToggle::before { content:""; position:absolute; top:9px; left:2px; right:2px; height:26px; border:1px solid var(--border-strong); border-radius:999px; background:var(--surface-3); }
.analyticsToggle::after { content:""; position:absolute; top:14px; left:7px; width:16px; height:16px; border-radius:50%; background:var(--text-3); }
.analyticsToggle.on::before { border-color:#6c5732; background:var(--accent-soft); }
.analyticsToggle.on::after { transform:translateX(18px); background:var(--accent); }

/* Feedback */
.feedbackQuickWrap { max-width:760px; }
.feedbackQuick { padding:18px; }
.feedbackQuick label { display:block; margin-bottom:8px; color:var(--text-1); }
.feedbackSubmit { margin-top:12px; padding:8px 16px; border:1px solid; border-radius:6px; }
.feedbackStatusGrid { display:grid; grid-template-columns:minmax(340px,.9fr) minmax(0,1.1fr); gap:14px; }
.feedbackRequest { grid-template-columns:80px minmax(0,1fr) auto 20px; }
.feedbackRequestType,.feedbackRequestTitle span { color:var(--text-3); font-size:12px; }
.feedbackRequestTitle strong,.feedbackRequestTitle span { display:block; }
.feedbackDetail { padding:16px; }
.feedbackDetailTop { display:flex; justify-content:space-between; gap:12px; }
.feedbackMeta { margin:14px 0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border:1px solid var(--border); background:var(--border); gap:1px; }
.feedbackMeta>div { padding:10px; background:var(--surface-1); }
.feedbackMessage { padding:12px; border:1px solid var(--border); border-radius:6px; background:var(--surface-2); }
.feedbackTimelineRow,.feedbackChange { min-height:58px; padding:10px 12px; display:grid; grid-template-columns:90px 14px minmax(0,1fr); gap:10px; border-bottom:1px solid var(--border); }
.feedbackTimelineDot { width:9px; height:9px; margin-top:5px; border-radius:50%; background:var(--accent); }
.feedbackTimeline { margin-top:14px; }
.feedbackReportHero { margin-bottom:14px; display:grid; grid-template-columns:minmax(0,1fr) repeat(3,150px); border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.feedbackReportIntro,.feedbackReportStat { padding:16px; background:var(--surface-1); }
.feedbackReportStat { border-left:1px solid var(--border); }
.feedbackReportStat strong { display:block; margin-top:5px; font-size:20px; }

/* Secondary operational components */
.agendaColumns { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
.agendaColumns section:last-child { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:18px; }
.agendaColumns section:last-child .agendaGroupLabel { grid-column:1 / -1; }
.agendaName { color:var(--text-2); font-size:13px; line-height:1.5; }
.calMonth { min-width:96px; color:var(--text-1); font-size:13px; font-weight:650; text-align:center; }
.queueJump { width:100%; min-height:44px; border:0; background:transparent; color:inherit; text-align:left; }
.queueName { font-weight:650; }
.queueName small { display:block; margin-top:3px; color:var(--text-3); font-size:12px; font-weight:400; }
.filterBarLabel { padding:0 6px; color:var(--text-2); font-size:12px; font-weight:650; white-space:nowrap; }
.customerDetails,.optionalBlock { margin:2px 0 14px; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.customerDetails summary,.optionalBlock summary { min-height:44px; padding:10px 0; color:var(--accent-hover); font-size:12px; cursor:pointer; }
.customerDetails .dFacts { margin:2px 0 12px; }
.workResult { margin-bottom:14px; padding:11px 12px; border:1px solid #315d42; border-left:3px solid var(--success); border-radius:6px; background:var(--success-bg); color:#a9d2b6; font-size:12px; line-height:1.6; }
.completeBtn { margin-left:auto; border-color:var(--accent); background:var(--accent); color:#15110b; font-weight:700; }
.completeBtn:disabled { border-color:var(--border); background:var(--surface-2); color:var(--text-3); }
.lcRow { display:flex; align-items:flex-end; gap:7px; margin-bottom:11px; }
.lcRow.lcRight { justify-content:flex-end; }
.lcAvatar { flex:0 0 28px; width:28px; height:28px; display:grid; place-items:center; border-radius:50%; background:var(--surface-3); color:var(--info); font-size:12px; font-weight:700; }
.lcIn { background:var(--surface-3); color:var(--text-1); }
.pick { display:flex; flex-direction:column; gap:7px; }
.pickOpt { min-height:48px; padding:10px 12px; display:flex; align-items:center; gap:10px; border:1px solid var(--border); border-radius:6px; background:var(--surface-2); color:var(--text-1); text-align:left; }
.pickOpt:hover { border-color:#6b5b3d; background:var(--surface-hover); }
.pickOpt .seats { margin-left:auto; color:var(--text-3); font-size:12px; }
.areaGrid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); gap:14px; }
.areaSummary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; background:var(--border); }
.areaStat { min-height:94px; padding:15px; background:var(--surface-1); }
.areaStat small { display:block; color:var(--text-3); font-size:12px; }
.areaStat strong { display:block; margin-top:6px; color:var(--text-1); font-size:21px; }
.areaStat button,.managementKpi .go,.signal .go { min-height:30px; margin-top:5px; padding:0; border:0; background:transparent; color:var(--accent-hover); font-size:12px; }
.metricBody { padding:14px 15px; }
.metricSubhead { margin:2px 0 9px; color:var(--text-3); font-size:12px; }
.metricSubhead.withTop { margin-top:17px; padding-top:14px; border-top:1px solid var(--border); }
.funnelRow { margin-bottom:8px; display:grid; grid-template-columns:92px minmax(0,1fr) 40px; gap:9px; align-items:center; }
.funnelLabel { color:var(--text-2); font-size:12px; }
.funnelValue { color:var(--text-1); font-size:12px; text-align:right; font-variant-numeric:tabular-nums; }
.barTrack { height:6px; overflow:hidden; border-radius:3px; background:var(--surface-3); }
.barFill { display:block; height:100%; border-radius:3px; background:var(--accent); }
.signalGrid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.signal { padding:10px; border:1px solid var(--border); border-radius:6px; background:var(--surface-1); }
button.signal { width:100%; color:inherit; text-align:left; }
button.signal:hover { border-color:#675a40; background:var(--surface-hover); }
.signal .label { color:var(--text-3); font-size:12px; }
.signal .value { margin-top:5px; color:var(--text-1); font-size:15px; font-weight:650; }
.signal.warn .value { color:var(--danger); }
.revenueChart { height:132px; padding-top:8px; display:flex; align-items:flex-end; gap:7px; }
.revCol { min-width:0; height:100%; flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:5px; }
.revBar { width:100%; max-width:24px; min-height:12px; border-radius:3px 3px 0 0; background:var(--accent); }
.revMonth { color:var(--text-3); font-size:12px; }
.capacityBar { width:72px; height:6px; margin-left:7px; display:inline-block; overflow:hidden; border-radius:3px; background:var(--surface-3); vertical-align:middle; }
.capacityBar i { display:block; height:100%; background:var(--info); }
.metricFoot { padding:9px 15px; display:flex; justify-content:flex-end; border-top:1px solid var(--border); background:var(--surface-2); }
.monthDaySummary { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.monthAgenda { display:grid; gap:1px; background:var(--border); }
.monthAgendaButton { width:100%; min-height:74px; padding:11px 12px; display:grid; grid-template-columns:94px minmax(0,1fr) 58px 72px; gap:10px; align-items:center; border:0; background:var(--surface-1); color:var(--text-2); text-align:left; }
.monthAgendaButton:hover { background:var(--surface-hover); }
.monthAgendaButton time { color:var(--accent-hover); font-size:12px; }
.monthAgendaButton strong { display:block; color:var(--text-1); font-size:13px; }
.monthAgendaButton span,.monthAgendaCount,.monthAgendaAction { color:var(--text-3); font-size:12px; }
.monthAgendaCount,.monthAgendaAction { text-align:right; }
.lineTargetCount { color:var(--text-2); font-size:12px; white-space:nowrap; }
.customerAttentionToggle { min-height:40px; padding:7px 9px; display:flex; align-items:center; gap:7px; color:var(--text-2); font-size:12px; }
.customerFilterReset { margin-left:auto; }
.customerResultTools { margin-left:auto; display:flex; align-items:center; gap:9px; }
.customerResultTools select { min-height:40px; }
.customerResultsTable td { height:52px; padding:7px 10px; }
.customerResultsTable tbody tr[data-customer-open]:hover { background:var(--surface-hover); }
.customerAttentionCell,.customerResultsTable .customerName,.customerResultsTable .customerContactInfo,.customerResultsTable .customerLastRecord { min-width:0; display:flex; align-items:center; gap:7px; }
.customerAttentionCell time,.customerResultsTable .customerLastRecord time { color:var(--text-3); font-size:12px; white-space:nowrap; }
.studentActionList,.studentMiniList { display:grid; gap:1px; overflow:hidden; border:1px solid var(--border); border-radius:6px; background:var(--border); }
.studentTimeline { position:relative; padding:4px 0; }
.studentTimeline::before { content:""; position:absolute; left:91px; top:8px; bottom:8px; width:1px; background:var(--border); }
.studentTimelineRow { position:relative; min-height:60px; padding:8px 12px; display:grid; grid-template-columns:74px 14px minmax(0,1fr); gap:10px; }
.studentTimelineRow time { color:var(--text-3); font-size:12px; text-align:right; }
.studentTimelineDot { position:relative; z-index:1; width:9px; height:9px; margin-top:5px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px var(--surface-1); }
.studentTimelineRow strong { display:block; color:var(--text-1); font-size:13px; }
.studentTimelineRow span { display:block; margin-top:4px; color:var(--text-2); font-size:12px; }

/* Notifications and operation dialogs */
.notificationWrap { position:relative; }
.notificationBell { position:relative; width:44px; padding:0; display:grid; place-items:center; border:1px solid var(--border); border-radius:6px; background:var(--surface-1); }
.notificationBadge { position:absolute; top:-7px; right:-7px; }
.notificationPanel { position:absolute; top:52px; right:0; z-index:80; width:min(430px,calc(100vw - 24px)); max-height:min(640px,calc(100vh - 88px)); display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--border-strong); border-radius:8px; background:var(--surface-1); }
.notificationHead { min-height:54px; padding:10px 13px; display:flex; align-items:center; border-bottom:1px solid var(--border); }
.notificationHead button { margin-left:auto; border:0; background:transparent; color:var(--accent-hover); }
.notificationTabs { display:grid; grid-template-columns:repeat(4,1fr); padding:6px; gap:4px; border-bottom:1px solid var(--border); }
.notificationTabs button { min-width:0; min-height:44px; border:0; border-radius:5px; background:transparent; color:var(--text-2); }
.notificationTabs button.active { background:var(--accent-soft); color:var(--accent-hover); }
.notificationList { overflow-y:auto; }
.notificationItem { width:100%; min-height:76px; padding:11px 13px; display:grid; grid-template-columns:8px minmax(0,1fr) auto; gap:10px; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--text-1); text-align:left; }
.notificationItem:hover,.notificationItem.unread { background:var(--surface-hover); }
.notificationDot { width:8px; height:8px; margin-top:6px; border-radius:50%; background:var(--info); }
.notificationItem.action .notificationDot { background:var(--danger); }
.notificationItem.done .notificationDot { background:var(--success); }
.notificationCopy strong,.notificationCopy span { display:block; }
.notificationCopy span,.notificationMeta,.notificationLegend { color:var(--text-3); font-size:12px; }
.notificationLegend { padding:9px 13px; border-top:1px solid var(--border); }
.operationOverlay { position:fixed; inset:0; z-index:300; padding:20px; display:grid; place-items:center; background:rgba(3,4,6,.8); backdrop-filter:blur(5px); }
.operationDialog { width:min(760px,100%); max-height:calc(100vh - 40px); overflow:auto; border:1px solid var(--border-strong); border-radius:8px; background:var(--surface-1); }
.operationHead,.operationBody,.operationActions { padding:16px; }
.operationHead { display:flex; gap:12px; border-bottom:1px solid var(--border); background:var(--surface-2); }
.operationClose { width:44px; margin-left:auto; padding:0; border:1px solid var(--border); border-radius:6px; background:var(--surface-1); }
.operationSectionTitle { margin:16px 0 8px; color:var(--text-3); font-size:12px; }
.operationWarnings { display:grid; gap:8px; }
.operationNote { color:var(--text-2); font-size:13px; }
.impactMode { color:var(--info); font-size:12px; }
.operationActions { display:flex; justify-content:flex-end; gap:8px; border-top:1px solid var(--border); }
.receiptNumber,.receiptResult { display:block; margin-top:8px; color:var(--success); }

/* Responsive */
@media (max-width:1200px) {
  .dashMain,.monthScheduleLayout,.weekLayout { grid-template-columns:minmax(0,1fr); }
  .priorityTool,.calendarTool,.todayTool { grid-column:auto; grid-row:auto; }
  .taskLauncherGrid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .recordsWorkspace { grid-template-columns:180px minmax(0,1fr); }
  .recordsDetail,.recordsThread { grid-column:2; }
  .managementKpis,.analyticsSummary,.analyticsKpis,.feedbackSummary,.refKpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:900px) {
  :root { --sidebar:0px; }
  .sideNav { left:-244px; width:232px; transition:left .18s ease; }
  body.navOpen .sideNav { left:0; }
  body.navOpen .navOverlay { display:block; }
  .workspace { width:100%; margin-left:0; }
  .navToggle { display:grid; place-items:center; }
  .topbar { padding:0 14px; }
  .container { padding:20px 16px 72px; }
  #backBar { margin:-20px -16px 16px; padding:10px 16px; }
  .colBody,.studentGrid,.cmsEditorLayout,.lineComposerLayout,.settingsLayout,.feedbackStatusGrid,.analyticsOverviewGrid,.analyticsDetailGrid,.managementGrid,.areaGrid { grid-template-columns:minmax(0,1fr); }
  .rowList { max-height:340px; }
  .cmsPreview,.linePreviewSurface { position:static; }
  .recordsWorkspace { grid-template-columns:minmax(0,1fr); }
  .recordsRail { display:flex; overflow-x:auto; }
  .recordsTypeButton { flex:0 0 auto; width:auto; border-right:1px solid var(--border); }
  .recordsDetail,.recordsThread { grid-column:auto; }
  .eventSelector { grid-template-columns:1fr; }
  .feedbackReportHero { grid-template-columns:1fr 1fr; }
  .feedbackReportIntro { grid-column:1 / -1; }
  .analyticsTrackingRow { grid-template-columns:minmax(0,1fr) 60px; }
  .analyticsTrackingSource,.analyticsTrackingWhy,.analyticsTrackingStatus { grid-column:1; }
  .analyticsToggle { grid-column:2; grid-row:1 / span 4; }
}

@media (max-width:680px) {
  .liveLogin { place-items:end center; padding:18px; background:linear-gradient(0deg,rgba(7,8,10,.98) 0%,rgba(7,8,10,.78) 54%,rgba(7,8,10,.2) 100%),url("assets/studio-login-v3.jpg") 68% center/cover no-repeat; }
  .liveLoginCard { padding:24px 20px; }
  .topbar { height:64px; }
  .globalSearch { flex:1; width:auto; min-width:0; }
  .topDate,.topCreate { display:none; }
  .topActions { gap:6px; }
  .container { padding:16px 12px 68px; }
  #backBar { margin:-16px -12px 14px; padding:10px 12px; }
  .dashTitle,.areaHeader,.refHead,.analyticsHeader,.feedbackHeader,.queueOverviewHead,.customerDirectoryHead,.customerListHead,.studentPageHead { align-items:flex-start; flex-direction:column; }
  .dashTitle h2,.areaHeader h2,.refHead h2,.analyticsHeader h2,.feedbackHeader h2,.queueOverviewHead h2 { font-size:21px; }
  .dashTitleActions,.refHeadActions,.areaActions,.analyticsHeaderActions { width:100%; justify-content:flex-start; }
  .riskStrip,.managementKpis,.analyticsSummary,.analyticsKpis,.feedbackSummary,.refKpis { grid-template-columns:1fr 1fr; }
  .taskLauncherGrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .caseHead,.areaColumns { display:none; }
  .caseRow { grid-template-columns:76px minmax(0,1fr); gap:5px 9px; }
  .caseTitle,.caseWho,.caseWhen,.caseStatus,.caseAction { grid-column:2; }
  .caseAction { width:max-content; max-width:100%; }
  .controlBar,.refToolbar,.recordsFilters,.caseFilterBar,.colFilters { align-items:stretch; flex-wrap:wrap; overflow:visible; }
  .refSearch,.controlBar input,.controlBar select,.recordsFilters input,.recordsFilters select { width:100%; flex-basis:100%; }
  .customerSearchMain,.lineTemplateRow,.lineSendRow,.lineFileTiming { align-items:stretch; flex-direction:column; }
  .customerFilter { flex:1 1 calc(50% - 10px); min-width:140px; }
  .compactForm,.composerGrid { grid-template-columns:1fr; }
  .formField.wide,.wide { grid-column:auto; }
  .refSurface { overflow:visible; }
  .refTable,.recordsTable,.analyticsDataTable,.metricTable { display:block; width:100%; }
  .refTable thead,.recordsTable thead { display:none; }
  .refTable tbody,.refTable tr,.refTable td,.recordsTable tbody,.recordsTable tr,.recordsTable td { display:block; width:100%; }
  .refTable tr,.recordsTable tr { padding:10px 12px; border-bottom:1px solid var(--border); }
  .refTable td,.recordsTable td { min-height:28px; padding:3px 0; border:0; overflow-wrap:anywhere; }
  .refTable td:empty,.recordsTable td:empty { display:none; }
  .money { text-align:left; }
  .monthScheduleLayout { display:block; }
  .monthScheduleLayout .weekScroll { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
  .monthScheduleBoard { min-width:700px; }
  .monthScheduleLayout .weekScroll { margin-bottom:12px; }
  .studentActionRow,.studentLesson { grid-template-columns:minmax(0,1fr) auto; }
  .studentActionRow time,.studentActionRow span,.studentLesson span { grid-column:1; }
  .studentActionRow button,.studentLesson .refButton { grid-column:2; grid-row:1 / span 2; }
  .dFacts,.refFacts,.profileRows,.feedbackMeta { grid-template-columns:1fr; }
  .settingClassHead,.settingScheduleLine { grid-template-columns:minmax(0,1fr) auto; }
  .settingClassHead span,.settingScheduleLine span { grid-column:1; }
  .permissionGrid { min-width:520px; }
  .settingsNav { display:flex; overflow-x:auto; }
  .settingsNav button { flex:0 0 auto; width:auto; }
  .feedbackRequest { grid-template-columns:76px minmax(0,1fr) 18px; }
  .feedbackState { grid-column:2; }
  .feedbackRequestArrow { grid-column:3; grid-row:1 / span 2; }
  .feedbackReportHero { grid-template-columns:1fr; }
  .feedbackReportIntro { grid-column:auto; }
  .feedbackReportStat { border-left:0; border-top:1px solid var(--border); }
  .notificationPanel { position:fixed; top:66px; right:8px; left:8px; width:auto; }
  .operationOverlay { padding:10px; }
  .operationDialog { max-height:calc(100vh - 20px); }
  .signalGrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .agendaColumns section:last-child { grid-template-columns:minmax(0,1fr); }
  .customerResultTools { width:100%; margin-left:0; justify-content:space-between; }
  .monthAgendaButton { grid-template-columns:82px minmax(0,1fr); }
  .monthAgendaCount,.monthAgendaAction { grid-column:2; text-align:left; }
}

@media (max-width:420px) {
  .riskStrip,.managementKpis,.analyticsSummary,.analyticsKpis,.feedbackSummary,.refKpis { grid-template-columns:1fr; }
  .taskLauncherGrid { grid-template-columns:1fr; }
  .topAvatar { display:grid; flex:0 0 40px; }
  .globalSearch input { padding-inline:9px; }
  .notificationTabs { grid-template-columns:1fr 1fr; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}

/* V4 structural redesign: home command center */
.homeToplineV4 { min-height:48px; margin:-4px 0 18px; display:flex; align-items:center; justify-content:space-between; gap:18px; border-bottom:1px solid var(--border); }
.homeToplineV4>div:first-child { display:flex; align-items:center; gap:14px; }
.homeToplineV4>div:first-child span,.commandKickerV4,.commandSectionHeadV4 span,.serviceDockV4>div span,.customerEyebrowV4,.customerProfileLabelV4,.lineEyebrowV4 { color:var(--accent); font-size:12px; font-weight:700; }
.homeToplineV4>div:first-child strong { color:var(--text-2); font-size:13px; font-weight:500; }
.homeToplineV4 .dashMode { margin:0; border:0; }
.commandHeroV4 { position:relative; min-height:288px; margin-bottom:18px; overflow:hidden; border:1px solid #3a3328; border-radius:8px; background:linear-gradient(90deg,rgba(6,7,9,.98) 0%,rgba(6,7,9,.92) 38%,rgba(6,7,9,.28) 72%),url("assets/home-command-v4.png") right center/cover no-repeat; }
.commandHeroV4::after { content:""; position:absolute; inset:auto 0 0; height:1px; background:linear-gradient(90deg,var(--accent),transparent 60%); }
.commandHeroShadeV4 { position:relative; z-index:1; width:min(610px,72%); padding:42px 44px; }
.commandHeroShadeV4 h1 { margin:8px 0 10px; font-size:36px; line-height:1.25; }
.commandHeroShadeV4 p { color:#c7c3ba; font-size:15px; }
.commandHeroActionsV4 { margin-top:26px; display:flex; gap:9px; }
.commandHeroActionsV4 button { padding:0 16px; border:1px solid rgba(200,169,107,.62); border-radius:6px; background:rgba(12,13,16,.72); color:var(--accent-hover); }
.commandHeroActionsV4 button:first-child { background:var(--accent); color:#15110b; font-weight:700; }
.commandPendingV4 { position:absolute; right:26px; bottom:24px; z-index:1; width:88px; height:88px; display:grid; place-content:center; border:1px solid rgba(200,169,107,.42); border-radius:50%; background:rgba(8,9,11,.76); text-align:center; backdrop-filter:blur(10px); }
.commandPendingV4 strong,.commandPendingV4 span { display:block; }
.commandPendingV4 strong { font:500 28px/1 "Noto Serif JP","Yu Mincho",serif; }
.commandPendingV4 span { margin-top:5px; color:var(--text-3); font-size:12px; }
.commandGridV4 { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(390px,.8fr); gap:16px; align-items:start; }
.commandPriorityV4,.commandCalendarV4 { min-width:0; overflow:hidden; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.commandSectionHeadV4 { min-height:72px; padding:14px 18px; display:flex; align-items:center; justify-content:space-between; gap:14px; border-bottom:1px solid var(--border); background:linear-gradient(180deg,var(--surface-2),var(--surface-1)); }
.commandSectionHeadV4 h2 { margin-top:3px; font-size:18px; }
.commandSectionHeadV4 small { font-size:12px; }
.commandPriorityV4 .caseRow { grid-template-columns:82px minmax(170px,1.4fr) minmax(110px,.75fr) 92px 108px; }
.commandPriorityV4 .caseRow:last-child { border-bottom:0; }
.commandCalendarV4 .calendar { padding:10px 14px 2px; }
.commandCalendarV4 .calDay { min-height:58px; }
.commandCalendarV4 .dayAgenda { max-height:250px; overflow:auto; background:#0d0e11; }
.serviceDockV4 { margin-top:16px; display:grid; grid-template-columns:180px repeat(6,minmax(100px,1fr)); overflow:hidden; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.serviceDockV4>div,.serviceDockV4>button { min-width:0; min-height:78px; padding:12px 14px; border:0; border-right:1px solid var(--border); background:transparent; text-align:left; }
.serviceDockV4>div { display:flex; flex-direction:column; justify-content:center; background:var(--surface-2); }
.serviceDockV4>div strong { margin-top:3px; }
.serviceDockV4>button { display:flex; flex-direction:column; justify-content:center; gap:5px; }
.serviceDockV4>button:hover { background:var(--surface-hover); }
.serviceDockV4>button span { overflow:hidden; color:var(--text-2); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.serviceDockV4>button b { color:var(--accent-hover); font-size:18px; }

/* V4 LINE desk */
.lineDeskV4 { min-width:0; }
.lineDeskHeadV4 { margin-bottom:14px; display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }
.lineDeskHeadV4 h2 { margin-top:4px; font-size:24px; }
.lineDeskHeadV4 p { margin-top:3px; color:var(--text-3); }
.lineDeskCountV4 { min-width:86px; padding:8px 12px; border-left:1px solid var(--accent); text-align:right; }
.lineDeskCountV4 strong,.lineDeskCountV4 span { display:block; }
.lineDeskCountV4 strong { font:500 24px/1 "Noto Serif JP","Yu Mincho",serif; }
.lineDeskCountV4 span { margin-top:5px; color:var(--text-3); font-size:12px; }
.lineDeskGridV4 { height:calc(100vh - 176px); min-height:620px; display:grid; grid-template-columns:320px minmax(430px,1fr) 290px; overflow:hidden; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.lineQueueV4,.lineConversationV4,.lineContextV4 { min-width:0; min-height:0; }
.lineQueueV4 { display:flex; flex-direction:column; border-right:1px solid var(--border); background:#0c0d10; }
.lineQueueHeadV4 { min-height:58px; padding:14px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border); }
.lineQueueHeadV4 span { color:var(--text-3); font-size:12px; }
.lineFiltersV4 { min-height:auto; margin:0; padding:9px; flex:0 0 auto; border:0; border-bottom:1px solid var(--border); border-radius:0; background:transparent; }
.lineFiltersV4 .filterBarLabel { display:none; }
.lineFiltersV4 button { min-height:34px; padding:4px 8px; }
.lineRowsV4 { flex:1; max-height:none; border:0; border-radius:0; background:transparent; }
.lineRowsV4 .rowItem { min-height:92px; }
.lineConversationV4 { display:flex; flex-direction:column; background:#111216; }
.linePersonHeadV4 { min-height:72px; padding:12px 18px; display:flex; align-items:center; gap:11px; border-bottom:1px solid var(--border); }
.lineMonogramV4,.customerMonogramV4 { display:grid; place-items:center; flex:0 0 auto; border:1px solid #554a36; background:#211c14; color:var(--accent-hover); font-family:"Noto Serif JP","Yu Mincho",serif; }
.lineMonogramV4 { width:42px; height:42px; border-radius:50%; font-size:16px; }
.linePersonHeadV4>div:nth-child(2)>span { display:block; color:var(--text-3); font-size:12px; }
.linePersonNameV4 { min-height:auto; padding:0; border:0; background:transparent; color:var(--text-1); font-size:16px; font-weight:700; }
.linePersonNameV4:hover { color:var(--accent-hover); }
.lineStateV4 { margin-left:auto; padding:4px 8px; border:1px solid #315d42; border-radius:5px; color:var(--success); font-size:12px; }
.lineStateV4.needs { border-color:#75403e; color:var(--danger); }
.lineChatV4 { flex:1; min-height:0; padding:24px clamp(18px,4vw,52px); overflow-y:auto; background:linear-gradient(rgba(17,18,22,.9),rgba(17,18,22,.98)),url("assets/nav-texture-v3.jpg") center/cover; }
.lineChatV4 .lcRow { margin-bottom:18px; }
.lineComposerV4 { padding:14px 18px; border-top:1px solid var(--border); background:#0c0d10; }
.lineComposerV4 .replyRow { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.lineComposerV4 input { min-height:46px; }
.lineComposerV4>span { display:block; margin-top:6px; color:var(--text-3); font-size:12px; }
.lineContextV4 { padding:18px; overflow-y:auto; border-left:1px solid var(--border); background:#0c0d10; }
.lineContextHeadV4 { padding-bottom:14px; border-bottom:1px solid var(--border); }
.lineContextHeadV4 span,.lineActionsV4>span { display:block; color:var(--text-3); font-size:12px; }
.lineContextHeadV4 strong { display:block; margin-top:4px; font-size:16px; }
.lineContextV4 dl { margin:0; }
.lineContextV4 dl div { padding:11px 0; border-bottom:1px solid var(--border); }
.lineContextV4 dt { color:var(--text-3); font-size:12px; }
.lineContextV4 dd { margin:3px 0 0; overflow-wrap:anywhere; }
.lineLinkV4 { margin-top:18px; }
.lineLinkV4 h4 { margin-bottom:8px; font-size:13px; }
.lineLinkV4 .pickOpt { width:100%; margin-bottom:7px; }
.lineActionsV4 { margin-top:20px; padding-top:16px; display:grid; gap:8px; border-top:1px solid var(--border); }
.lineActionsV4 .miniBtn { width:100%; }

/* V4 customer atlas */
.customerAtlasV4,.customerProfileV4 { min-width:0; }
.customerAtlasV4 .customerHubHead { margin-bottom:4px; }
.customerAtlasV4 .customerHubModes { margin-bottom:24px; }
.customerCommandV4 { align-items:flex-end; margin-bottom:14px; }
.customerCommandV4 h3 { margin-top:3px; font:500 24px/1.35 "Noto Serif JP","Yu Mincho",serif; }
.customerCommandV4 p { margin-top:4px; color:var(--text-3); }
.customerDirectoryV4 { display:grid; grid-template-columns:282px minmax(0,1fr); gap:14px; align-items:start; }
.customerFilterRailV4 { position:sticky; top:calc(var(--topbar) + 16px); margin:0; padding:14px; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.customerFilterRailV4 .customerSearchMain { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; }
.customerFilterRailV4 .customerSearchMain input { min-width:0; width:100%; }
.customerFiltersV4 { margin-top:16px; display:grid; gap:12px; }
.customerFiltersV4 .customerFilter { min-width:0; }
.customerFiltersV4 label { display:block; margin-bottom:5px; color:var(--text-3); font-size:12px; }
.customerFiltersV4 select,.customerResultTools select { width:100%; min-height:42px; padding:7px 9px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface-2); }
.customerFiltersV4 .customerAttentionToggle { padding:10px; display:flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:6px; color:var(--text-2); }
.customerFiltersV4 .customerFilterReset { width:100%; }
.customerLedgerV4 { overflow:hidden; }
.customerLedgerV4 .refSurfaceHead { align-items:center; }
.customerLedgerV4 .refSurfaceHead>div:first-child span { display:block; }
.customerLedgerV4 .refSurfaceHead h3 { margin-top:2px; font-size:18px; }
.customerLedgerV4 .customerResultsTable tbody tr { height:76px; }
.customerLedgerV4 .customerResultsTable tbody tr:hover { box-shadow:inset 3px 0 var(--accent); }
.customerLedgerV4 .customerPerson strong { font-size:14px; }
.customerLedgerV4 .customerPerson span { display:block; margin-top:3px; color:var(--text-3); font-size:12px; }
.customerProfileV4 .studentCrumb { display:flex; align-items:center; gap:8px; color:var(--text-3); }
.customerProfileHeroV4 { min-height:132px; margin:10px 0 0; padding:24px; align-items:center; border:1px solid var(--border); border-bottom:1px solid var(--border); border-radius:8px 8px 0 0; background:linear-gradient(110deg,#141519,#0c0d10 70%); }
.customerProfileHeroV4 h2 { margin-top:2px; font-size:28px; }
.customerMonogramV4 { width:68px; height:68px; border-radius:50%; font-size:24px; }
.customerProfileHeroV4 .studentIdentityMeta { align-self:center; }
.customerProfileV4 .studentNav { margin:0 0 16px; padding:0 14px; border:1px solid var(--border); border-top:0; border-radius:0 0 8px 8px; background:var(--surface-1); }

/* V4 shared operating frame for all remaining screens */
.areaHeader,.refHead,.analyticsHeader,.feedbackHeader,.queueOverviewHead {
  min-height:78px; margin-bottom:14px; padding:14px 18px; align-items:center;
  border:1px solid var(--border); border-left:3px solid var(--accent); border-radius:8px;
  background:linear-gradient(100deg,#15161a 0%,#0d0e11 72%);
}
.areaHeader h2,.refHead h2,.analyticsHeader h2,.feedbackHeader h2,.queueOverviewHead h2 { font-size:21px; }
.areaHeader p,.refHead p,.analyticsHeader p,.feedbackHeader p,.queueOverviewHead p { max-width:760px; color:var(--text-3); }
.areaSurface,.refSurface,.analyticsSurface,.feedbackSurface,.metricPanel { overflow:hidden; }
.areaSurfaceHead,.refSurfaceHead,.analyticsSurfaceHead,.feedbackSurfaceHead,.metricHead { background:linear-gradient(180deg,#191a1f,#131419); }
.controlBar,.refToolbar,.recordsFilters,.caseFilterBar,.colFilters { box-shadow:inset 0 1px rgba(255,255,255,.015); }
.areaRow,.refTable tbody tr,.recordsTable tbody tr { transition:background .14s ease,box-shadow .14s ease; }
.areaRow:hover,.refTable tbody tr:hover,.recordsTable tbody tr:hover { box-shadow:inset 2px 0 var(--accent); }
.composerPanel,.eventBuilder,.settingsLayout,.analyticsOverviewGrid,.feedbackWorkspace { min-width:0; }
.settingsLayout,.recordsLayout,.analyticsDetailGrid { align-items:start; }

/* V4 domain workspaces */
.screenKickerV4 { display:block; margin-bottom:3px; color:var(--accent); font-size:12px; font-weight:700; }
.schedulePulseV4,.eventStatsV4,.cmsPulseV4,.financePulseV4 { margin-bottom:14px; display:grid; overflow:hidden; border:1px solid var(--border); border-radius:8px; background:var(--border); gap:1px; }
.schedulePulseV4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.schedulePulseV4>div,.eventStatsV4>div,.cmsPulseV4>div,.financePulseV4>div { min-height:76px; padding:12px 15px; display:flex; flex-direction:column; justify-content:center; background:var(--surface-1); }
.schedulePulseV4 span,.eventStatsV4 span,.cmsPulseV4 span,.financePulseV4 span { color:var(--text-3); font-size:12px; }
.schedulePulseV4 strong,.eventStatsV4 strong,.cmsPulseV4 strong,.financePulseV4 strong { margin-top:3px; font:600 21px/1.2 "Noto Serif JP","Yu Mincho",serif; }
.scheduleFilterDockV4 { margin-bottom:14px; }
.scheduleWorkspaceV4 { grid-template-columns:minmax(0,1.65fr) minmax(300px,.62fr); gap:14px; }
.scheduleWorkspaceV4>aside { position:sticky; top:calc(var(--topbar) + 14px); }
.scheduleWorkspaceV4 .monthCell { transition:background .14s ease,border-color .14s ease; }
.scheduleWorkspaceV4 .monthCell.selected { border-color:var(--accent); background:var(--accent-soft); }

.eventOpsGridV4 { display:grid; grid-template-columns:330px minmax(0,1fr); overflow:hidden; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.eventRailV4 { min-width:0; border-right:1px solid var(--border); background:#0c0d10; }
.eventRailHeadV4 { min-height:60px; padding:14px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border); }
.eventRailHeadV4 span { color:var(--text-3); font-size:12px; }
.eventRailListV4 { max-height:calc(100vh - 235px); overflow-y:auto; }
.eventRailItemV4 { width:100%; min-height:126px; padding:14px; display:block; border:0; border-bottom:1px solid var(--border); border-left:3px solid transparent; background:transparent; text-align:left; }
.eventRailItemV4:hover { background:var(--surface-hover); }
.eventRailItemV4.active { border-left-color:var(--accent); background:var(--accent-soft); }
.eventRailDateV4,.eventRailItemV4>span { display:block; color:var(--text-3); font-size:12px; }
.eventRailItemV4>strong { display:block; margin:4px 0; font-size:14px; }
.eventRailItemV4>div { margin-top:10px; display:flex; align-items:center; gap:8px; }
.eventRailItemV4 em { font-style:normal; }
.eventRailItemV4 b { margin-left:auto; font-size:12px; }
.eventDetailV4 { min-width:0; padding:18px; }
.eventSummaryV4 { min-height:80px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.eventSummaryV4 h3 { margin-top:3px; font:500 22px/1.35 "Noto Serif JP","Yu Mincho",serif; }
.eventSummaryV4 p { margin-top:3px; color:var(--text-3); }
.eventSummaryActionsV4 { display:flex; gap:8px; }
.eventStatsV4 { grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:12px; }
.eventLinksV4 { margin-bottom:14px; padding:14px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; border:1px solid var(--border); border-radius:8px; background:#0c0d10; }
.eventLinksV4 .formField>div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; }
.eventLinksV4 input { min-width:0; }
.eventParticipantsV4 { margin-top:0; }

.cmsPulseV4 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.cmsQueueV4 { overflow:hidden; border:1px solid var(--border); border-radius:8px; background:var(--surface-1); }
.cmsQueueHeadV4 { min-height:70px; padding:13px 16px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--border); background:linear-gradient(180deg,#191a1f,#131419); }
.cmsQueueHeadV4 h3 { margin-top:2px; font:500 18px/1.35 "Noto Serif JP","Yu Mincho",serif; }
.cmsQueueHeadV4 small { color:var(--text-3); }
.cmsArticleV4 { min-height:92px; padding:13px 16px; display:grid; grid-template-columns:120px minmax(0,1fr) auto; align-items:center; gap:16px; border-bottom:1px solid var(--border); }
.cmsArticleV4:last-child { border-bottom:0; }
.cmsArticleV4:hover { background:var(--surface-hover); box-shadow:inset 3px 0 var(--accent); }
.cmsArticleStateV4 small,.cmsArticleCopyV4 span,.cmsArticleCopyV4 small { display:block; color:var(--text-3); font-size:12px; }
.cmsArticleStateV4 small { margin-top:6px; }
.cmsArticleCopyV4 strong { display:block; margin:3px 0; font-size:14px; }

.financePulseV4 { grid-template-columns:1.4fr repeat(3,minmax(0,1fr)); }
.financePulseV4 .attention { box-shadow:inset 0 -2px var(--warning); }
.financePulseV4 .danger { box-shadow:inset 0 -2px var(--danger); }
.financePulseV4 .attention strong { color:var(--warning); }
.financePulseV4 .danger strong { color:var(--danger); }
.financeSurfaceV4 .refTable td:nth-child(3),.financeSurfaceV4 .refTable th:nth-child(3) { text-align:right; }
.chargeWorkbenchV4 { max-width:980px; }
.chargeWorkbenchV4 .compactForm { padding:22px; }

.broadcastPulseV4 { margin-bottom:14px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); overflow:hidden; border:1px solid var(--border); border-radius:8px; background:var(--border); gap:1px; }
.broadcastPulseV4>div { min-height:72px; padding:12px 15px; display:flex; flex-direction:column; justify-content:center; background:var(--surface-1); }
.broadcastPulseV4 span { color:var(--text-3); font-size:12px; }
.broadcastPulseV4 strong { margin-top:3px; font:600 20px/1.2 "Noto Serif JP","Yu Mincho",serif; }
.broadcastStudioV4 { grid-template-columns:minmax(0,1.35fr) 360px; align-items:stretch; }
.broadcastStudioV4>section,.broadcastStudioV4>aside { min-height:560px; }
.broadcastStudioV4 .lineEditorBody { padding:22px; }
.broadcastStudioV4 .linePreviewSurface { background:#0c0d10; }
.broadcastHistoryV4,.broadcastPortalV4 { margin-top:14px; }

.analyticsWorkspaceV4 .analyticsModes { padding:0 4px; }
.analyticsWorkspaceV4 .analyticsOverviewGrid { grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr); }
.analyticsWorkspaceV4 .analyticsIssue { min-height:76px; }
.analyticsWorkspaceV4 .analyticsDiagnosis { min-height:100%; padding:24px; background:linear-gradient(145deg,#15161b,#0d0e11); }
.analyticsWorkspaceV4 .analyticsAction { margin-top:20px; border-left:2px solid var(--accent); }

.feedbackWorkspaceV4 .feedbackTabs { margin-bottom:20px; }
.feedbackWorkspaceV4 .feedbackQuickWrap { min-height:520px; display:grid; place-items:center; border:1px solid var(--border); border-radius:8px; background:linear-gradient(145deg,#111216,#090a0c); }
.feedbackWorkspaceV4 .feedbackQuick { width:min(720px,calc(100% - 32px)); padding:28px; border-color:#443b2d; }
.feedbackWorkspaceV4 .feedbackText { min-height:180px; font-size:15px; }
.feedbackWorkspaceV4 .feedbackSubmit { justify-self:end; min-width:150px; }

.settingsWorkspaceV4 { grid-template-columns:250px minmax(0,1fr); gap:14px; }
.settingsRailV4 { position:sticky; top:calc(var(--topbar) + 14px); padding:10px; }
.settingsRailLabelV4 { display:block; padding:8px 10px 10px; color:var(--text-3); font-size:12px; }
.settingsRailV4 button { min-height:48px; border-left:2px solid transparent; }
.settingsRailV4 button.active { border-left-color:var(--accent); background:var(--accent-soft); }
.settingsWorkspaceV4>.refSurface:not(.settingsRailV4),.settingsWorkspaceV4>div { min-width:0; }

@media (max-width:1180px) {
  .commandGridV4 { grid-template-columns:1fr; }
  .lineDeskGridV4 { grid-template-columns:300px minmax(0,1fr); }
  .lineContextV4 { grid-column:1 / -1; border-top:1px solid var(--border); border-left:0; }
  .lineDeskGridV4 { height:auto; min-height:0; }
  .lineQueueV4,.lineConversationV4 { height:700px; }
  .serviceDockV4 { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .serviceDockV4>div { grid-column:1 / -1; min-height:62px; }
  .eventOpsGridV4 { grid-template-columns:280px minmax(0,1fr); }
  .broadcastStudioV4 { grid-template-columns:minmax(0,1fr) 320px; }
}

@media (max-width:760px) {
  .homeToplineV4 { align-items:flex-start; flex-direction:column; padding-bottom:10px; }
  .homeToplineV4>div:first-child { align-items:flex-start; flex-direction:column; gap:2px; }
  .commandHeroV4 { min-height:330px; background-position:68% center; }
  .commandHeroShadeV4 { width:100%; padding:30px 22px 110px; background:linear-gradient(90deg,rgba(6,7,9,.95),rgba(6,7,9,.7)); }
  .commandHeroShadeV4 h1 { font-size:28px; }
  .commandPendingV4 { right:18px; bottom:18px; width:76px; height:76px; }
  .commandPriorityV4 .caseRow { grid-template-columns:70px minmax(0,1fr); }
  .commandPriorityV4 .caseWho,.commandPriorityV4 .caseWhen,.commandPriorityV4 .caseStatus,.commandPriorityV4 .caseAction { grid-column:2; }
  .serviceDockV4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .lineDeskGridV4 { display:block; }
  .lineQueueV4,.lineConversationV4 { height:auto; min-height:520px; }
  .lineRowsV4 { max-height:420px; }
  .lineConversationV4 { min-height:620px; border-top:1px solid var(--border); }
  .lineContextV4 { min-height:0; }
  .customerDirectoryV4 { display:block; }
  .customerFilterRailV4 { position:static; margin-bottom:12px; }
  .customerFiltersV4 { grid-template-columns:1fr 1fr; }
  .customerFiltersV4 .customerAttentionToggle,.customerFiltersV4 .customerFilterReset { grid-column:1 / -1; }
  .customerProfileHeroV4 { align-items:flex-start; flex-wrap:wrap; }
  .customerProfileHeroV4 .studentIdentityMeta { width:100%; margin-left:0; }
  .areaHeader,.refHead,.analyticsHeader,.feedbackHeader,.queueOverviewHead { min-height:0; padding:13px 14px; }
  .schedulePulseV4,.eventStatsV4,.financePulseV4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .scheduleWorkspaceV4 { display:block; }
  .scheduleWorkspaceV4>aside { position:static; margin-top:12px; }
  .eventOpsGridV4 { display:block; }
  .eventRailListV4 { max-height:360px; }
  .eventRailV4 { border-right:0; border-bottom:1px solid var(--border); }
  .eventDetailV4 { padding:14px; }
  .eventSummaryV4 { align-items:flex-start; flex-direction:column; }
  .eventSummaryActionsV4 { width:100%; }
  .eventSummaryActionsV4 .refButton { flex:1; }
  .eventLinksV4 { grid-template-columns:1fr; }
  .cmsArticleV4 { grid-template-columns:100px minmax(0,1fr); gap:10px; }
  .cmsOrderControls { grid-column:2; justify-self:end; }
  .broadcastPulseV4 { grid-template-columns:1fr 1fr; }
  .broadcastPulseV4>div:first-child { grid-column:1 / -1; }
  .broadcastStudioV4 { grid-template-columns:1fr; }
  .broadcastStudioV4>section,.broadcastStudioV4>aside { min-height:0; }
  .analyticsWorkspaceV4 .analyticsOverviewGrid { grid-template-columns:1fr; }
  .settingsWorkspaceV4 { display:block; }
  .settingsRailV4 { position:static; margin-bottom:12px; }
}
