:root {
  color-scheme: dark;
  --bg: #101010;
  --bg-raised: #161616;
  --surface: #1c1c1c;
  --surface-2: #222222;
  --surface-3: #2b2b2b;
  --border: #363636;
  --border-soft: #292929;
  --text: #f3f3f3;
  --muted: #b5b5b5;
  --quiet: #919191;
  --cyan: #b9b9b9;
  --blue: #a5a5a5;
  --purple: #adadad;
  --green: #c2c2c2;
  --amber: #c9c9c9;
  --red: #9e9e9e;
  --shadow: 0 20px 52px rgba(0,0,0, .28);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --motion-fast: 150ms;
  font-family: 'DM Sans', 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-padding-top: 92px; }
body { margin: 0; min-height: 100vh; min-width: 320px; background: var(--bg); font-size: 15px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(185,185,185, .85); outline-offset: 2px; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { color: #0e0e0e; background: var(--cyan); }
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.boot-mark { width: 40px; height: 40px; border: 1px solid rgba(185,185,185,.45); border-radius: 12px; display: grid; place-items: center; color: var(--cyan); font-size: 13px; font-weight: 700; letter-spacing: .12em; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #141414; border-right: 1px solid var(--border-soft); padding: 24px 15px 16px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 25px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; color: #111111; border-radius: 12px; background: linear-gradient(145deg, #d8d8d8, #b2b2b2 60%, #a8a8a8); font-weight: 800; font-size: 12px; letter-spacing: .08em; box-shadow: 0 5px 22px rgba(174,174,174,.15); }
.brand-title { font-size: 14px; font-weight: 700; line-height: 1.3; letter-spacing: .01em; }
.brand-sub { margin-top: 3px; color: var(--quiet); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.nav-label { padding: 12px 11px 7px; color: #808080; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.nav-list { display: grid; gap: 3px; }
.nav-item { min-height: 44px; width: 100%; padding: 0 11px; display: flex; gap: 12px; align-items: center; text-align: left; color: var(--muted); border: 1px solid transparent; border-radius: 10px; background: transparent; transition: background var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast); }
.nav-item:hover { color: var(--text); background: rgba(158,158,158,.08); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, rgba(154,154,154,.16), rgba(103,103,103,.08)); border-color: rgba(185,185,185,.18); box-shadow: inset 2px 0 var(--cyan); }
.nav-item.active .icon { color: var(--cyan); }
.nav-item .nav-count { margin-left: auto; min-width: 22px; padding: 2px 6px; text-align: center; color: #adadad; background: #262626; border-radius: 20px; font-size: 11px; }
.icon { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-spacer { flex: 1; }
.side-divider { height: 1px; margin: 12px 5px; background: var(--border-soft); }
.side-user { min-height: 52px; padding: 8px 9px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-soft); border-radius: 12px; background: #1a1a1a; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #111111; background: linear-gradient(145deg,#cfcfcf,#a9a9a9); font-size: 12px; font-weight: 700; }
.side-user-name { font-size: 12px; font-weight: 600; }
.side-user-role { color: var(--quiet); font-size: 10px; }
.tiny-status { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px rgba(201,201,201,.55); }

.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; height: 70px; padding: 0 clamp(18px, 3vw, 42px); display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--border-soft); background: rgba(16,16,16,.92); backdrop-filter: blur(14px); }
.topbar-section { color: var(--quiet); font-size: 12px; white-space: nowrap; }
.topbar-section strong { color: var(--muted); font-weight: 500; }
.searchbox { width: min(430px, 42vw); height: 39px; margin-left: auto; padding: 0 12px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 10px; background: #181818; }
.searchbox .icon { width: 16px; height: 16px; color: #939393; }
.searchbox input { width: 100%; padding: 0; color: var(--text); border: 0; outline: 0; background: transparent; font-size: 12px; }
.searchbox input::placeholder { color: #8c8c8c; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 10px; color: #b6b6b6; background: transparent; }
.icon-button:hover { border-color: var(--border); background: var(--surface); }
.mobile-menu { display: none; }
.main { width: min(100%, 1680px); margin: 0 auto; padding: 30px clamp(18px, 3vw, 42px) 76px; }
.view-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.eyebrow { color: var(--cyan); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(23px, 2.2vw, 32px); font-weight: 650; letter-spacing: -.035em; line-height: 1.25; }
h2 { margin-bottom: 4px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
h3 { margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.page-subtitle { margin: 0; color: var(--muted); font-size: 13px; }
.view-kicker { margin-bottom: 7px; color: var(--quiet); font-size: 12px; }
.button-row { display: flex; gap: 9px; flex-wrap: wrap; }
.btn { min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: #222222; font-size: 12px; font-weight: 600; transition: transform var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast); }
.btn:hover { background: #2c2c2c; border-color: #505050; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { border-color: transparent; color: #111111; background: linear-gradient(110deg,#cdcdcd,#afafaf); box-shadow: 0 5px 18px rgba(164,164,164,.14); }
.btn-primary:hover { color: #111111; background: linear-gradient(110deg,#d9d9d9,#bfbfbf); }
.btn-quiet { color: var(--muted); background: transparent; }
.btn-danger { color: #b1b1b1; border-color: rgba(158,158,158,.22); background: rgba(158,158,158,.07); }
.btn-small { min-height: 44px; padding: 0 10px; font-size: 11px; }
.pill { min-height: 25px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 20px; color: #bfbfbf; background: #212121; font-size: 10px; white-space: nowrap; }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-cyan { color: var(--cyan); border-color: rgba(185,185,185,.22); background: rgba(185,185,185,.07); }
.pill-green { color: var(--green); border-color: rgba(194,194,194,.2); background: rgba(194,194,194,.07); }
.pill-amber { color: var(--amber); border-color: rgba(201,201,201,.22); background: rgba(201,201,201,.07); }
.pill-red { color: var(--red); border-color: rgba(158,158,158,.22); background: rgba(158,158,158,.07); }
.pill-purple { color: var(--purple); border-color: rgba(173,173,173,.24); background: rgba(173,173,173,.08); }
.muted { color: var(--muted); }
.quiet { color: var(--quiet); }
.mono { font-variant-numeric: tabular-nums; font-family: 'DM Sans', ui-monospace, SFMono-Regular, monospace; }
.divider { height: 1px; margin: 14px 0; background: var(--border-soft); }

.hero { position: relative; overflow: hidden; min-height: 226px; padding: 30px 31px; display: grid; grid-template-columns: 1.4fr .75fr; align-items: center; gap: 25px; border: 1px solid #3e3e3e; border-radius: 20px; background: radial-gradient(ellipse at 83% 20%, rgba(126,126,126,.19), transparent 48%), radial-gradient(ellipse at 96% 110%, rgba(107,107,107,.16), transparent 38%), linear-gradient(114deg,#1b1b1b,#181818 64%,#1f1f1f); box-shadow: var(--shadow); }
.hero::after { content: ''; position: absolute; top: -125px; right: -110px; width: 370px; height: 370px; border: 1px solid rgba(176,176,176,.12); border-radius: 50%; box-shadow: 0 0 0 36px rgba(176,176,176,.035),0 0 0 75px rgba(176,176,176,.024); pointer-events: none; }
.hero-copy, .hero-aside { position: relative; z-index: 1; }
.hero h1 { margin-top: 11px; font-size: clamp(28px,3vw,42px); }
.hero .page-subtitle { max-width: 540px; margin-bottom: 20px; }
.hero-aside { justify-self: end; width: min(100%, 295px); padding: 17px; border: 1px solid rgba(171,171,171,.19); border-radius: 14px; background: rgba(17,17,17,.42); }
.hero-aside-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hero-date { font-size: 11px; color: #cacaca; }
.hero-status { display: flex; align-items: center; gap: 7px; color: #b1b1b1; font-size: 10px; }
.hero-status .tiny-status { width: 6px; height: 6px; }
.hero-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.hero-stat { padding: 10px 9px 8px; border-left: 1px solid var(--border); }
.hero-stat:first-child { border-left: 0; padding-left: 0; }
.hero-stat-value { font-size: 22px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-stat-label { margin-top: 5px; color: var(--quiet); font-size: 10px; }
.grid { display: grid; gap: 15px; }
.grid-kpis { margin-top: 16px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.kpi-card { min-height: 105px; padding: 17px 18px; border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: linear-gradient(150deg,#1c1c1c,#191919); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { color: var(--muted); font-size: 11px; }
.kpi-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--cyan); background: rgba(185,185,185,.09); }
.kpi-icon .icon { width: 16px; height: 16px; }
.kpi-value { margin-top: 8px; font-size: 25px; font-weight: 650; letter-spacing: -.03em; }
.kpi-foot { margin-top: 3px; color: var(--quiet); font-size: 10px; }
.dashboard-grid { margin-top: 16px; grid-template-columns: minmax(0,1.42fr) minmax(290px,.78fr); align-items: start; }
.panel { min-width: 0; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: linear-gradient(155deg,rgba(28,28,28,.96),rgba(23,23,23,.98)); }
.panel-pad { padding: 19px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.panel-title { font-size: 14px; font-weight: 650; }
.panel-desc { margin-top: 3px; color: var(--quiet); font-size: 11px; }
.panel-label { display: flex; align-items: center; gap: 8px; }
.panel-accent { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 9px rgba(185,185,185,.4); }
.task-empty { min-height: 160px; padding: 22px; display: grid; place-items: center; text-align: center; border: 1px dashed #393939; border-radius: 12px; background: rgba(21,21,21,.45); }
.empty-icon { width: 44px; height: 44px; margin: 0 auto 10px; display: grid; place-items: center; border: 1px solid rgba(185,185,185,.2); border-radius: 13px; color: var(--cyan); background: rgba(185,185,185,.06); }
.empty-icon .icon { width: 21px; height: 21px; }
.empty-title { margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.empty-body { max-width: 320px; color: var(--muted); font-size: 11px; }
.task-list { display: grid; gap: 8px; }
.task-row { padding: 12px; display: grid; grid-template-columns: 3px minmax(0,1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--border-soft); border-radius: 11px; background: rgba(25,25,25,.82); }
.task-bar { width: 3px; height: 33px; border-radius: 4px; background: var(--purple); }
.task-bar.urgent { background: var(--red); }
.task-bar.soon { background: var(--amber); }
.task-title { font-size: 12px; font-weight: 600; }
.task-detail { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--quiet); font-size: 11px; }
.task-actions { display: flex; gap: 5px; }
.task-actions .icon-button { width: 34px; height: 34px; }
.quadrants { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.quadrant { min-height: 102px; padding: 13px; border: 1px solid var(--border-soft); border-radius: 11px; background: rgba(25,25,25,.7); }
.quadrant-label { color: var(--muted); font-size: 10px; }
.quadrant-value { margin-top: 9px; font-size: 21px; font-weight: 650; }
.quadrant-hint { margin-top: 2px; color: var(--quiet); font-size: 9px; }
.q-red { border-color: rgba(158,158,158,.18); }
.q-red .quadrant-value { color: var(--red); }
.q-amber .quadrant-value { color: var(--amber); }
.q-blue .quadrant-value { color: var(--blue); }
.q-muted .quadrant-value { color: var(--quiet); }
.source-list { display: grid; gap: 9px; }
.source-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 10px; align-items: center; }
.source-type { width: 31px; height: 34px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; color: #aeaeae; background: rgba(132,132,132,.1); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.source-name { overflow: hidden; color: var(--text); font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.source-meta { margin-top: 3px; color: var(--quiet); font-size: 10px; }
.source-arrow { color: var(--quiet); }
.integration-list { display: grid; gap: 0; }
.integration-row { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border-soft); }
.integration-row:first-child { border-top: 0; }
.integration-label { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.integration-label .icon { color: var(--quiet); }
.integration-status { color: var(--quiet); font-size: 10px; text-align: right; }
.integration-status.waiting { color: var(--amber); }
.callout { padding: 12px 13px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid rgba(201,201,201,.18); border-radius: 10px; color: #c9c9c9; background: rgba(201,201,201,.055); font-size: 10px; }
.callout .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--amber); }
.two-column { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,.72fr); gap: 15px; align-items: start; }
.three-column { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { color: var(--muted); font-size: 11px; font-weight: 550; }
.field-help { color: var(--quiet); font-size: 11px; }
.control { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; color: var(--text); background: #151515; font-size: 12px; }
.control::placeholder { color: #818181; }
.control:focus { border-color: #767676; }
textarea.control { min-height: 100px; resize: vertical; line-height: 1.55; }
.select-control { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2393a6ba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.filters { margin-bottom: 13px; padding: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; border: 1px solid var(--border-soft); border-radius: 12px; background: rgba(25,25,25,.8); }
.filters .control { width: auto; min-width: 130px; min-height: 36px; padding: 6px 9px; font-size: 11px; }
.filters .search-control { width: min(330px,100%); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 11px; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
thead { position: sticky; top: 0; z-index: 1; background: #232323; }
th { padding: 11px 12px; color: #b9b9b9; font-size: 10px; font-weight: 650; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
td { padding: 11px 12px; color: #e7e7e7; vertical-align: top; border-top: 1px solid var(--border-soft); }
tr:first-child td { border-top: 0; }
tbody tr:hover { background: rgba(153,153,153,.045); }
.td-sub { margin-top: 3px; color: var(--quiet); font-size: 9px; }
.knowledge-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.knowledge-card { min-height: 176px; padding: 15px; display: flex; flex-direction: column; border: 1px solid var(--border-soft); border-radius: 13px; background: linear-gradient(155deg,#1d1d1d,#191919); }
.knowledge-card:hover { border-color: #4e4e4e; }
.overtime-panel { margin-top:15px; }
.overtime-recent,.overtime-list { display:grid; gap:8px; }
.overtime-list { margin-top:12px; max-height:42vh; overflow:auto; }
.overtime-row { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:10px; padding:11px 13px; border:1px solid var(--border-soft); border-radius:10px; background:#202020; }
.overtime-row > div:first-child { flex:1 1 200px; min-width:0; overflow-wrap:anywhere; }
.overtime-note,.overtime-empty { color:var(--muted); margin-top:4px; font-size:11px; }
.overtime-duration { color:#66d69a; white-space:nowrap; font-weight:600; }
.overtime-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.overtime-fields .control { width:100%; min-width:0; }
@media(max-width:580px) { .overtime-fields { grid-template-columns:1fr 1fr; } .overtime-fields .field:first-child { grid-column:1/-1; } }
.knowledge-card { cursor:pointer; }
.knowledge-card:focus-within { outline:2px solid #a9bbb4; outline-offset:2px; }
.knowledge-open-hint { margin-top:8px; color:#91c8b4; font-size:11px; }
.chat-source { display:block; max-width:100%; margin-top:6px; padding:0; border:0; background:none; color:#91c8b4; text-align:left; overflow-wrap:anywhere; cursor:pointer; }
.chat-source:hover { text-decoration:underline; }
.doc-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.doc-icon { width: 34px; height: 38px; display: grid; place-items: center; border: 1px solid #444444; border-radius: 8px; color: #b4b4b4; background: rgba(150,150,150,.09); font-size: 9px; font-weight: 700; }
.doc-title { display: -webkit-box; overflow: hidden; margin: 13px 0 6px; color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.doc-preview { display: -webkit-box; overflow: hidden; margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.55; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.doc-footer { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border-top: 1px solid var(--border-soft); color: var(--quiet); font-size: 9px; }
.upload-zone { padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px dashed #565656; border-radius: 13px; background: rgba(101,101,101,.065); }
.upload-zone.dragover { border-color: var(--cyan); background: rgba(185,185,185,.11); }
.upload-copy { display: flex; align-items: center; gap: 12px; }
.upload-copy .empty-icon { margin: 0; }
.upload-title { font-size: 12px; font-weight: 600; }
.upload-note { margin-top: 3px; color: var(--quiet); font-size: 10px; }
.view-layout { display: grid; grid-template-columns: minmax(0,1fr) 285px; gap: 14px; align-items: start; }
.record-card { padding: 15px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; border: 1px solid var(--border-soft); border-radius: 12px; background: #1b1b1b; }
.record-card + .record-card { margin-top: 8px; }
.record-card h3 { font-size: 12px; }
.record-text { white-space: pre-wrap; color: var(--muted); font-size: 10px; }
.status-line { display: flex; align-items: center; gap: 7px; color: var(--quiet); font-size: 10px; }
.module-hero { padding: 21px; border: 1px solid #3e3e3e; border-radius: 15px; background: radial-gradient(ellipse at 90% 10%, rgba(135,135,135,.13), transparent 45%), #1c1c1c; }
.module-hero h2 { margin-top: 9px; font-size: 20px; }
.module-hero p { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.alert-card { padding: 15px; border: 1px solid rgba(201,201,201,.18); border-radius: 12px; background: rgba(201,201,201,.045); }
.alert-card h3 { color: var(--amber); }
.alert-card p { margin: 0; color: #bfbfbf; font-size: 10px; }
.steps { display: grid; gap: 9px; }
.step-row { padding: 12px; display: grid; grid-template-columns: 27px minmax(0,1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--border-soft); border-radius: 10px; background: #1b1b1b; }
.step-num { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--cyan); font-size: 10px; }
.step-title { font-size: 11px; font-weight: 600; }
.step-desc { margin-top: 2px; color: var(--quiet); font-size: 9px; }
.chat-fab { position: fixed; right: 24px; bottom: 24px; z-index: 29; min-height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(189,189,189,.27); border-radius: 26px; color: #f5f5f5; background: linear-gradient(130deg,#313131,#3d3d3d); box-shadow: 0 10px 30px rgba(0,0,0,.35); font-size: 12px; font-weight: 600; }
.chat-fab .icon { color: var(--cyan); }
.chat-panel { position: fixed; top: 0; right: 0; z-index: 40; width: min(470px,100vw); height: 100dvh; display: flex; flex-direction: column; transform: translateX(102%); transition: transform 260ms cubic-bezier(.2,.8,.2,1); border-left: 1px solid var(--border); background: #171717; box-shadow: -22px 0 60px rgba(0,0,0,.4); }
.chat-panel.open { transform: translateX(0); }
.chat-scrim { position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.52); }
.chat-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-soft); }
.chat-messages { flex: 1; overflow: auto; padding: 17px; display: flex; flex-direction: column; gap: 12px; }
.chat-welcome { margin: 24px 4px; padding: 17px; border: 1px solid var(--border-soft); border-radius: 13px; color: var(--muted); background: #1e1e1e; font-size: 12px; }
.chat-bubble { max-width: 92%; padding: 12px 13px; white-space: pre-wrap; border: 1px solid var(--border-soft); border-radius: 13px; color: #e7e7e7; background: #222222; font-size: 11px; }
.chat-bubble.user { align-self: flex-end; border-color: rgba(185,185,185,.2); background: #2f2f2f; }
.chat-bubble.assistant { align-self: flex-start; }
.chat-citations { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border-soft); color: var(--cyan); font-size: 9px; }
.chat-input-area { padding: 13px; border-top: 1px solid var(--border-soft); background: #151515; }
.chat-input-area .control { min-height: 70px; }
.chat-input-foot { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-model { width: auto; min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 10px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; padding: 20px; display: grid; place-items: center; background: rgba(0,0,0,.65); }
.modal { width: min(540px,100%); max-height: 90dvh; overflow: auto; padding: 21px; border: 1px solid #4c4c4c; border-radius: 16px; background: #1b1b1b; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.modal-close { width: 36px; height: 36px; }
.modal-actions { margin-top: 17px; display: flex; justify-content: flex-end; gap: 8px; }
.toast-region { position: fixed; top: 84px; right: 22px; z-index: 70; display: grid; gap: 8px; }
.toast { max-width: min(390px,calc(100vw - 30px)); padding: 12px 14px; border: 1px solid #4c4c4c; border-radius: 11px; color: var(--text); background: #252525; box-shadow: var(--shadow); font-size: 11px; }
.toast.error { border-color: rgba(158,158,158,.35); color: #dfdfdf; background: #1d1d1d; }
.login-shell { min-height: 100vh; padding: 22px; display: grid; place-items: center; background: radial-gradient(ellipse at 70% 15%, rgba(128,128,128,.16), transparent 38%), radial-gradient(ellipse at 20% 90%, rgba(97,97,97,.11), transparent 35%), var(--bg); }
.login-card { width: min(460px,100%); padding: 30px; border: 1px solid #404040; border-radius: 20px; background: linear-gradient(155deg,#1e1e1e,#171717); box-shadow: var(--shadow); }
.login-brand { margin-bottom: 26px; }
.login-card h1 { margin: 14px 0 7px; font-size: 25px; }
.login-card > p { margin-bottom: 21px; color: var(--muted); font-size: 12px; }
.login-note { margin-top: 13px; color: var(--quiet); font-size: 10px; }
.loading-line { width: 100%; height: 3px; overflow: hidden; border-radius: 4px; background: #2b2b2b; }
.loading-line::after { content: ''; display: block; width: 35%; height: 100%; border-radius: inherit; background: var(--cyan); animation: load 1.2s infinite ease-in-out; }
@keyframes load { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }
.bottom-nav { display: none; }
.small { font-size: 11px; }
.empty-state { padding: 36px 16px; text-align: center; color: var(--quiet); border: 1px dashed var(--border); border-radius: 12px; font-size: 11px; }
.checkrow { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 10px; }
.checkrow input { margin-top: 2px; accent-color: #bbbbbb; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.settings-card { padding: 16px; border: 1px solid var(--border-soft); border-radius: 13px; background: #1b1b1b; }
.settings-card p { margin-bottom: 12px; color: var(--quiet); font-size: 10px; }
.settings-card .button-row { margin-top: 13px; }
.doc-detail { max-height: 58vh; overflow: auto; padding: 15px; white-space: pre-wrap; border: 1px solid var(--border-soft); border-radius: 10px; color: #d6d6d6; background: #151515; font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill, .hero-status, .hero-stat-label, .kpi-foot, .quadrant-label, .quadrant-hint, .integration-status, .callout, .td-sub, .doc-footer, .upload-note, .record-text, .status-line, .alert-card p, .step-desc, .chat-citations, .checkrow, .settings-card p, .login-note, .chat-model { font-size: 11px; }
.source-type, .doc-icon { font-size: 10px; }
.task-actions .icon-button { width: 44px; height: 44px; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 220px minmax(0,1fr); }
  .dashboard-grid { grid-template-columns: minmax(0,1.1fr) minmax(250px,.9fr); }
  .knowledge-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero { grid-template-columns: 1fr .7fr; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: 270px; transform: translateX(-105%); transition: transform 220ms ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 19; background: rgba(0,0,0,.54); }
  .mobile-menu { display: inline-grid; }
  .topbar { height: 62px; padding: 0 16px; gap: 10px; }
  .topbar-section { display: none; }
  .searchbox { width: auto; flex: 1; }
  .top-actions .desktop-only { display: none; }
  .main { padding: 22px 16px 90px; }
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .hero-aside { width: 100%; justify-self: stretch; }
  .dashboard-grid, .two-column, .view-layout { grid-template-columns: 1fr; }
  .three-column { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; min-height: calc(63px + env(safe-area-inset-bottom)); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid var(--border); background: rgba(16,16,16,.97); backdrop-filter: blur(16px); }
  .bottom-nav button { min-height: 48px; display: grid; place-items: center; gap: 2px; border: 0; border-radius: 9px; color: var(--quiet); background: transparent; font-size: 10px; }
  .bottom-nav button.active { color: var(--cyan); background: rgba(185,185,185,.07); }
  .bottom-nav .icon { width: 19px; height: 19px; }
  .chat-fab { right: 15px; bottom: calc(74px + env(safe-area-inset-bottom)); }
  .view-title-row { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 540px) {
  body { font-size: 14px; }
  .main { padding: 18px 13px 92px; }
  .hero { padding: 21px 17px; border-radius: 16px; }
  .hero h1 { font-size: 28px; }
  .hero .page-subtitle { font-size: 11px; }
  .hero-aside { padding: 13px; }
  .hero-stat-value { font-size: 19px; }
  .kpi-card { min-height: 95px; padding: 12px; }
  .kpi-value { font-size: 22px; }
  .panel-pad { padding: 14px; }
  .quadrants { gap: 7px; }
  .quadrant { min-height: 90px; padding: 10px; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .three-column, .settings-grid { grid-template-columns: 1fr; }
  .filters { align-items: stretch; }
  .filters .control, .filters .search-control { width: 100%; }
  .upload-zone { align-items: flex-start; flex-direction: column; }
  .upload-zone .button-row { width: 100%; }
  .upload-zone .btn { flex: 1; }
  .chat-fab { min-height: 48px; padding: 0 13px; }
  .modal-backdrop { padding: 12px; }
  .modal { padding: 16px; }
  th,td { padding: 9px; }
  .chat-header { padding: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.chat-actions { display: flex; justify-content: flex-start; margin-top: 8px; }
.chat-actions .btn { min-height: 40px; font-size: 11px; }

/* Graphite surfaces with restrained warm accents; no blue light in the interface. */
:root { --bg:#121212; --bg-raised:#191919; --surface:#222220; --surface-2:#292825; --surface-3:#302e2a; --cyan:#dca36d; --blue:#dca36d; --purple:#b9a58f; --green:#a8b99a; --amber:#e5be78; --red:#d98768; --text:#f1ece3; --muted:#c5bcae; --quiet:#978e83; --border:#403d38; --border-soft:#302e2a; }
.sidebar { background:#191919; }
.topbar { background:rgba(18,18,18,.95); }
.brand-mark,.avatar { background:linear-gradient(145deg,#e7b57e,#ca8853); color:#1b1712; box-shadow:none; }
.nav-item.active { background:linear-gradient(90deg,rgba(220,163,109,.16),rgba(220,163,109,.045)); border-color:rgba(220,163,109,.2); }
.hero { border-color:#403d38; background:radial-gradient(ellipse at 90% 8%,rgba(220,163,109,.11),transparent 48%),linear-gradient(115deg,#222220,#191918 62%,#24221f); }
.hero::after { border-color:rgba(220,163,109,.13); box-shadow:0 0 0 36px rgba(220,163,109,.035),0 0 0 75px rgba(220,163,109,.02); }
.hero-aside { border-color:rgba(220,163,109,.17); background:rgba(18,18,18,.48); }
.btn-primary { color:#1b1712; background:linear-gradient(110deg,#e5b478,#d99b61); box-shadow:0 5px 18px rgba(217,155,97,.12); }
.btn-primary:hover { color:#17130f; background:linear-gradient(110deg,#edc18a,#e2a66b); }
.kpi-icon,.empty-icon { color:var(--cyan); background:rgba(220,163,109,.1); }
.panel-accent { box-shadow:0 0 9px rgba(220,163,109,.3); }
.chat-fab { border-color:#66513d; background:linear-gradient(130deg,#3a3027,#51402f); }
.pill-cyan { color:var(--cyan); border-color:rgba(220,163,109,.28); background:rgba(220,163,109,.08); }
.pill-green { color:var(--green); border-color:rgba(168,185,154,.25); background:rgba(168,185,154,.07); }
.pill-amber { color:var(--amber); border-color:rgba(229,190,120,.26); background:rgba(229,190,120,.08); }
.pill-red { color:var(--red); border-color:rgba(217,135,104,.28); background:rgba(217,135,104,.07); }
.pill-purple { color:var(--purple); border-color:rgba(185,165,143,.25); background:rgba(185,165,143,.08); }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline-color:rgba(229,190,120,.92); }
.login-shell { background:radial-gradient(ellipse at 70% 15%,rgba(220,163,109,.10),transparent 38%),radial-gradient(ellipse at 20% 90%,rgba(168,185,154,.06),transparent 35%),var(--bg); }
.login-card { border-color:#403d38; background:linear-gradient(155deg,#222220,#191919); }
.checkrow input { accent-color:#dca36d; }

/* Document review workspace */
.draft-tabs { display:flex; gap:9px; overflow-x:auto; padding:3px 0 14px; }
.draft-tab { min-width:205px; max-width:280px; padding:12px 14px; text-align:left; color:var(--muted); background:#222220; border:1px solid var(--border-soft); border-radius:12px; cursor:pointer; }
.draft-tab span,.draft-tab small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.draft-tab span { color:var(--text); font-size:13px; font-weight:650; }
.draft-tab small { margin-top:5px; color:var(--quiet); font-size:11px; }
.draft-tab.active { background:#302b25; border-color:#826246; }
.draft-workspace { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(270px,.85fr); gap:16px; align-items:start; }
.draft-document,.draft-assistant { min-width:0; border:1px solid var(--border); border-radius:16px; background:#1e1e1c; overflow:hidden; }
.draft-panel-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding:20px; border-bottom:1px solid var(--border-soft); }
.draft-panel-head h2 { margin:5px 0; font-size:17px; line-height:1.4; }
.draft-meta { display:flex; flex-wrap:wrap; gap:12px; color:var(--quiet); font-size:11px; }
.draft-toolbar { justify-content:flex-end; flex-wrap:wrap; }
.draft-editor-bar { display:flex; justify-content:space-between; align-items:center; padding:12px 18px; color:var(--muted); font-size:12px; border-bottom:1px solid var(--border-soft); }
.draft-paper { padding:30px clamp(22px,4vw,55px); min-height:68vh; max-height:calc(100vh - 260px); overflow:auto; color:#ece6dc; background:#272623; font-size:14px; line-height:1.85; overflow-wrap:anywhere; }
.draft-paper h1 { font-size:21px; line-height:1.5; text-align:center; margin:0 0 24px; }
.draft-paper h2 { color:#e3b477; font-size:17px; margin:25px 0 10px; }
.draft-paper h3 { font-size:15px; color:#d5c7b5; margin:20px 0 8px; }
.draft-paper p { margin:0 0 14px; }
.draft-paper th,.draft-paper td { padding:9px; font-size:12px; }
.draft-editor { display:block; width:100%; min-height:68vh; padding:26px; resize:vertical; border:0; background:#272623; color:#ece6dc; font:14px/1.8 ui-monospace,monospace; }
.draft-sheet { padding:20px; max-height:calc(100vh - 240px); overflow:auto; }
.draft-sheet .field { margin-top:15px; }.draft-goal { min-height:120px; }
.draft-cell { min-width:140px; min-height:40px; font-size:12px; }.draft-sheet table td { padding:6px; }
.draft-assistant { position:sticky; top:85px; display:flex; flex-direction:column; min-height:70vh; max-height:calc(100vh - 115px); }
.draft-messages { flex:1; min-height:180px; overflow:auto; padding:18px; display:flex; flex-direction:column; gap:13px; }
.draft-welcome { margin:auto 0; padding:17px; border:1px solid #403d38; border-radius:12px; background:#252421; color:var(--muted); font-size:13px; line-height:1.7; }
.draft-welcome strong { color:var(--text); }.draft-welcome p { margin:8px 0 0; }
.draft-message { padding:12px; border:1px solid var(--border-soft); border-radius:12px; background:#252421; overflow-wrap:anywhere; }
.draft-message.user { margin-left:20px; background:#332c24; border-color:#66513d; }
.draft-message-role { color:var(--cyan); font-size:11px; font-weight:700; margin-bottom:6px; }
.draft-user-text { white-space:pre-wrap; font-size:13px; }.draft-message summary { cursor:pointer; color:var(--muted); font-size:12px; }
.draft-answer { max-height:300px; overflow:auto; font-size:12px; line-height:1.7; }.draft-answer h1,.draft-answer h2,.draft-answer h3 { font-size:14px; margin:12px 0 5px; }.draft-answer p { margin:8px 0; }
.draft-message .btn { margin-top:10px; }.draft-chat-form { padding:15px; border-top:1px solid var(--border-soft); display:grid; gap:8px; }
.draft-chat-form label { color:var(--muted); font-size:12px; }.draft-chat-form textarea { min-height:80px; }.draft-chat-form .btn { justify-self:end; }
@media(max-width:820px){.draft-workspace{grid-template-columns:1fr}.draft-assistant{position:static;max-height:none;min-height:420px}.draft-paper,.draft-sheet{max-height:none}}
@media(max-width:540px){.draft-panel-head{flex-direction:column;padding:16px}.draft-toolbar{justify-content:flex-start}.draft-paper{padding:22px 18px}.draft-tab{min-width:180px}}
.weekly-plan-panel { margin-bottom:16px; }
.week-plan { display:grid; gap:4px; }
.week-plan-day { display:grid; grid-template-columns:64px minmax(0,1fr); gap:14px; padding:12px 0; border-top:1px solid var(--border-soft); }
.week-plan-date { color:var(--cyan); font-weight:700; font-size:13px; padding-top:8px; }
.week-plan-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:6px 0; color:var(--text); line-height:1.6; font-size:13px; }
.week-plan-row .btn { flex-shrink:0; }
@media(max-width:540px){.week-plan-day{grid-template-columns:52px minmax(0,1fr);gap:8px}.week-plan-row{align-items:flex-start;flex-direction:column}}

/* Daily workflow: one clear next action per item. */
.today-head { display:flex; justify-content:space-between; align-items:flex-end; flex-wrap:wrap; gap:18px; margin-bottom:20px; }
.today-head h1 { margin:8px 0 4px; font-size:clamp(25px,3vw,34px); letter-spacing:-.03em; }
.today-head p { margin:0; color:var(--muted); font-size:13px; }
.today-summary { display:flex; align-items:center; flex-wrap:wrap; gap:16px; color:var(--muted); font-size:12px; }
.today-summary strong { color:var(--text); font-size:20px; margin-right:3px; }
.today-panel { margin-bottom:15px; }
.today-panel > #dashboard-urgent-host,.today-panel > #dashboard-task-list,.today-panel > #dashboard-plan-host { display:contents; }
.today-list { display:grid; gap:9px; }
.dashboard-plan { margin:14px 0 6px; padding-top:14px; border-top:1px solid var(--border-soft); }
.dashboard-plan-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.dashboard-step-list { display:grid; gap:7px; margin-top:8px; }
.dashboard-step { display:grid; grid-template-columns:52px minmax(0,1fr) auto; align-items:center; gap:10px; padding:9px 10px; border:1px solid var(--border-soft); border-radius:10px; background:#252523; }
.dashboard-step-date { color:var(--cyan); font-size:12px; font-weight:700; }
.dashboard-step-copy { min-width:0; display:grid; gap:3px; }
.dashboard-step-copy strong { font-size:13px; line-height:1.4; }
.dashboard-step-copy span { color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-step-empty { padding:10px 0; color:var(--muted); font-size:13px; }
.dashboard-plan-more { margin-top:8px; color:var(--muted); font-size:12px; }
.dashboard-plan-more summary { cursor:pointer; padding:7px 0; }
.urgent-alerts { margin:8px 0 14px; padding:11px; border:1px solid rgba(224,112,112,.35); border-radius:12px; background:rgba(120,44,44,.12); }
.urgent-alert-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 2px; border-top:1px solid rgba(224,112,112,.18); }
.urgent-alert-row>div { min-width:0; display:grid; gap:3px; }
.urgent-alert-row strong { font-size:13px; overflow-wrap:anywhere; }
.urgent-alert-row span { color:var(--muted); font-size:12px; }
.urgent-alert-row > .urgent-alert-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; }
.urgent-alert-actions .btn { white-space:nowrap; }
.btn.btn-task-done { color:var(--green); border-color:rgba(67,209,125,.45); }
@media (max-width:700px) {
  .urgent-alert-row { align-items:flex-start; flex-direction:column; }
  .urgent-alert-row > .urgent-alert-actions { justify-content:flex-start; width:100%; }
}
.daily-task { display:grid; grid-template-columns:minmax(0,1fr) auto 44px; align-items:center; gap:12px; padding:15px; border:1px solid var(--border-soft); border-radius:12px; background:#2c2b28; }
.daily-task.is-overdue { border-color:rgba(223,157,157,.5); }
.daily-task-main { min-width:0; }
.daily-task-title { font-weight:700; line-height:1.5; font-size:14px; overflow-wrap:anywhere; }
.daily-task-detail { color:var(--muted); font-size:12px; line-height:1.65; margin-top:7px; }
.task-quick-actions { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:7px; }
.action-count { font-variant-numeric:tabular-nums; opacity:.88; }
.today-more { display:flex; justify-content:center; margin-top:12px; }
.weekly-summary { display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--text); font-weight:700; cursor:pointer; }
.weekly-summary small { color:var(--muted); font-size:11px; font-weight:400; }
.dashboard-compact { grid-template-columns:repeat(2,minmax(0,1fr)); }
.review-path { display:flex; align-items:center; gap:12px; padding:13px 15px; margin-bottom:12px; border:1px solid #66513d; border-radius:12px; background:#27231e; }
.review-path div { min-width:0; flex:1; }
.review-path strong,.review-path span { display:block; }
.review-path strong { font-size:13px; overflow-wrap:anywhere; }
.review-path span { color:var(--muted); font-size:11px; margin-top:2px; }
.review-controls { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:11px 18px; border-bottom:1px solid var(--border-soft); }
.review-controls>span { margin-right:auto; color:var(--cyan); font-weight:700; font-size:12px; }
@media(max-width:1000px){.daily-task{grid-template-columns:minmax(0,1fr) 44px}.daily-task-main{grid-column:1}.task-quick-actions{grid-column:1;justify-content:flex-start}.daily-task>.icon-button{grid-column:2;grid-row:1/3}.dashboard-compact{grid-template-columns:1fr}}
@media(max-width:540px){.dashboard-step{grid-template-columns:44px minmax(0,1fr)}.dashboard-step>.btn{grid-column:2;justify-self:start}}
@media(max-width:540px){.today-head{align-items:flex-start}.today-summary{gap:10px}.daily-task{padding:12px}.review-path{align-items:flex-start;flex-wrap:wrap}.review-path div{min-width:calc(100% - 110px)}}

/* Figma workbench home: graphite, warm accents, clear working regions. */
.dashboard-topline { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(245px,.55fr); gap:22px; align-items:center; margin:2px 0 22px; }
.dashboard-date { min-width:0; }
.dashboard-day { color:var(--text); font-size:clamp(20px,2vw,26px); font-weight:650; letter-spacing:-.025em; }
.dashboard-lunar { margin-top:6px; color:var(--muted); font-size:12px; }
.dashboard-clock { min-width:84px; color:var(--green); font-size:23px; font-weight:600; font-variant-numeric:tabular-nums; text-align:center; }
.weather-card { min-height:76px; padding:13px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid var(--border-soft); border-radius:13px; background:#222220; }
.weather-label { color:var(--muted); font-size:11px; }
.weather-value { margin-top:2px; color:var(--text); font-size:17px; font-weight:600; white-space:nowrap; }
.weather-detail { color:var(--quiet); font-size:10px; text-align:right; }
.dashboard-main-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(290px,.92fr); gap:14px; align-items:stretch; margin-bottom:14px; }
.today-panel { min-width:0; }
.today-panel .panel-head { align-items:center; }
.today-panel .panel-desc { margin-top:4px; }
.dashboard-task { min-width:0; min-height:70px; padding:11px 12px; display:grid; grid-template-columns:4px minmax(0,1fr) auto; gap:12px; align-items:center; border:1px solid var(--border); border-radius:12px; background:#2c2b28; }
.dashboard-task.is-overdue { border-color:rgba(217,135,104,.45); }
.dashboard-task-mark { width:3px; height:40px; border-radius:4px; background:var(--muted); }
.dashboard-task-mark.overdue { background:var(--red); }
.dashboard-task-mark.urgent { background:var(--amber); }
.dashboard-task-mark.important { background:var(--green); }
.dashboard-task-copy { min-width:0; }
.dashboard-task-title { color:var(--text); font-size:13px; font-weight:600; line-height:1.45; overflow-wrap:anywhere; }
.dashboard-task-meta { margin-top:4px; color:var(--muted); font-size:10px; line-height:1.45; }
.dashboard-task-actions { display:flex; align-items:center; flex-wrap:wrap; gap:5px; }
.dashboard-task-actions .btn { white-space:nowrap; }
.dashboard-task-actions .icon-button { width:36px; height:36px; color:var(--green); }
.dashboard-add { margin-top:10px; }
.paper-card { min-width:0; padding:19px; display:flex; flex-direction:column; }
.paper-card .panel-head { align-items:center; }
.paper-title { margin:4px 0 5px; color:var(--text); font-size:16px; line-height:1.45; }
.paper-meta { color:var(--quiet); font-size:10px; }
.paper-summary { margin:13px 0 14px; padding:13px; min-height:92px; border-radius:11px; background:#2c2b28; color:var(--muted); font-size:11px; line-height:1.72; display:-webkit-box; overflow:hidden; -webkit-line-clamp:4; -webkit-box-orient:vertical; }
.paper-actions { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-top:auto; }
.paper-empty { min-height:88px; margin:12px 0; padding:16px; border-radius:11px; background:#2c2b28; color:var(--muted); font-size:12px; }
.personal-schedule { margin-bottom:14px; }
.course-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.course-card { min-width:0; min-height:138px; padding:13px; display:flex; flex-direction:column; gap:6px; border:1px solid var(--border); border-radius:12px; background:#2c2b28; overflow-wrap:anywhere; }
.course-day { color:var(--green); font-size:10px; font-weight:600; }
.course-name { color:var(--text); font-size:13px; font-weight:600; line-height:1.4; }
.course-group { color:var(--muted); font-size:10px; }
.course-period { color:var(--amber); font-size:10px; }
.course-room { margin-top:auto; color:var(--quiet); font-size:10px; }
.dashboard-footer { min-height:42px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.dashboard-footer .status-line { margin:0; color:var(--amber); }
.dashboard-footer .tiny-status { background:var(--amber); box-shadow:0 0 9px rgba(229,190,120,.35); }
.paper-modal { width:min(760px,100%); }
.paper-detail-summary { padding:16px; margin:5px 0 18px; border:1px solid var(--border-soft); border-radius:12px; background:#272623; }
.paper-detail-summary h3 { color:var(--amber); }
.paper-detail-summary p,.paper-guide p { margin:0; color:var(--muted); font-size:12px; line-height:1.75; }
.paper-guide { padding:14px 0; display:grid; grid-template-columns:40px minmax(0,1fr); gap:12px; border-top:1px solid var(--border-soft); }
.paper-guide-index { color:var(--amber); font-size:12px; font-weight:650; }
.paper-guide h3 { margin:0 0 5px; font-size:13px; }
.paper-guide .paper-meta { margin-top:6px; }
.q-blue .quadrant-value { color:var(--red); }

@media(max-width:1000px) {
  .dashboard-topline { grid-template-columns:minmax(0,1fr) auto; }
  .weather-card { grid-column:1/-1; }
  .dashboard-main-grid { grid-template-columns:1fr; }
}
@media(max-width:700px) {
  .dashboard-topline { gap:11px; }
  .dashboard-day { font-size:18px; }
  .dashboard-clock { font-size:20px; }
  .course-card-grid { grid-template-columns:1fr; }
  .course-card { min-height:116px; }
  .dashboard-task { grid-template-columns:3px minmax(0,1fr); gap:9px; }
  .dashboard-task-actions { grid-column:2; justify-content:flex-start; }
  .dashboard-task-mark { grid-row:1/3; height:100%; min-height:40px; }
  .dashboard-footer { align-items:flex-start; flex-direction:column; padding-bottom:12px; }
}

/* Charcoal base with restrained, role-specific color accents. */
:root { --bg:#121314; --bg-raised:#191a1c; --surface:#202124; --surface-2:#27282b; --surface-3:#303135; --cyan:#54cbea; --blue:#5e8cff; --purple:#b183ff; --green:#43d17d; --amber:#ffd166; --red:#ff647c; --text:#f0f1f2; --muted:#b4b7bc; --quiet:#898d93; --border:#383a3e; --border-soft:#2d2f33; }
#main:has(.agent-panel) { overflow:hidden; padding-bottom:0; }
.kpi-icon,.empty-icon { color:var(--cyan); background:rgba(84,203,234,.10); }
.pill-cyan { color:var(--cyan); border-color:rgba(84,203,234,.30); background:rgba(84,203,234,.09); }
.pill-green { color:var(--green); border-color:rgba(67,209,125,.30); background:rgba(67,209,125,.08); }
.pill-amber { color:var(--amber); border-color:rgba(255,209,102,.30); background:rgba(255,209,102,.08); }
.pill-red { color:var(--red); border-color:rgba(255,100,124,.30); background:rgba(255,100,124,.08); }
.pill-purple { color:var(--purple); border-color:rgba(177,131,255,.30); background:rgba(177,131,255,.09); }
.kpi-card:nth-child(4n+1) .kpi-icon { color:var(--cyan); background:rgba(84,203,234,.10); }
.kpi-card:nth-child(4n+2) .kpi-icon { color:var(--purple); background:rgba(177,131,255,.10); }
.kpi-card:nth-child(4n+3) .kpi-icon { color:var(--green); background:rgba(67,209,125,.10); }
.kpi-card:nth-child(4n+4) .kpi-icon { color:var(--red); background:rgba(255,100,124,.10); }
.dashboard-topline,.weather-card,.panel,.panel-pad { border-color:var(--border); }
.paper-summary,.paper-empty,.course-card { background:#28292c; }
.dashboard-clock,.course-day { color:var(--green); }
.course-period,.task-bar.soon,.task-bar.urgent { color:var(--amber); }
.dashboard-task-mark.overdue,.task-bar.urgent { background:var(--red); }
.dashboard-task-mark.urgent { background:var(--amber); }
.dashboard-task-mark.important { background:var(--green); }
.course-period { color:var(--purple); }
.dashboard-footer .status-line { color:var(--muted); }
.dashboard-footer .tiny-status { background:var(--green); box-shadow:0 0 8px rgba(67,209,125,.32); }
.paper-detail-summary h3,.paper-guide-index { color:var(--cyan); }
.q-red .quadrant-value { color:var(--red); }
.q-amber .quadrant-value { color:var(--amber); }
.q-blue .quadrant-value { color:var(--blue); }
.event-decision-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:8px; }
.event-decision-actions span { margin-right:3px; color:#a9adb3; font-size:10px; }
.btn-event-yes { border-color:rgba(67,209,125,.42)!important; color:var(--green)!important; background:rgba(67,209,125,.10)!important; }
.btn-event-no { border-color:rgba(255,100,124,.40)!important; color:var(--red)!important; background:rgba(255,100,124,.08)!important; }
@media(max-width:700px) { #main:has(.agent-panel) { overflow:auto; padding-bottom:60px; } }

/* Operational controls added for the lecture planner and notification setup. */
.lecture-planner { margin-top: 18px; }
.lecture-controls { display:grid; grid-template-columns:repeat(6,minmax(120px,1fr)); gap:12px; align-items:end; }
.lecture-field { display:grid; gap:6px; color:var(--muted); font-size:12px; }
.lecture-field .control { width:100%; }
.lecture-day-hint { color:var(--quiet); font-size:11px; min-height:17px; }
.lecture-presets,.lecture-submit-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:14px; }
.lecture-presets > span { color:var(--quiet); font-size:11px; margin-right:3px; }
.lecture-results { margin-top:18px; padding:16px; border:1px solid var(--border-soft); border-radius:var(--radius-md); background:rgba(255,255,255,.018); }
.lecture-result-head,.lecture-result-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.lecture-result-date { color:var(--muted); font-size:12px; }
.lecture-result-period { margin-top:3px; color:var(--text); font-size:20px; font-weight:650; }
.lecture-result-summary { margin:15px 0; padding:12px 14px; border-radius:10px; background:var(--surface-2); }
.lecture-result-summary > div:first-child { display:flex; flex-wrap:wrap; gap:12px; color:var(--muted); font-size:12px; }
.lecture-student-count { color:var(--green); font-size:20px; white-space:nowrap; }
.lecture-result-block { padding:13px 0; border-top:1px solid var(--border-soft); }
.lecture-result-block h3 { display:flex; align-items:center; gap:8px; }
.lecture-result-block h3 span { color:var(--quiet); font-size:11px; font-weight:500; }
.lecture-class-chips { display:flex; flex-wrap:wrap; gap:7px; }
.lecture-class-chips span { padding:5px 9px; border:1px solid var(--border); border-radius:20px; color:var(--muted); background:var(--surface-2); font-size:11px; }
.lecture-busy-list { display:grid; gap:8px; }
.lecture-busy-list > div { display:grid; grid-template-columns:minmax(150px,.35fr) minmax(0,1fr); gap:12px; color:var(--muted); font-size:12px; }
.lecture-busy-list strong { color:var(--text); }
.lecture-warning,.lecture-unknown { color:var(--amber); }
.lecture-result-note { margin-top:12px; color:var(--quiet); font-size:11px; line-height:1.6; }
.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
.settings-card { min-width:0; padding:16px; border:1px solid var(--border-soft); border-radius:var(--radius-md); background:var(--surface); }
.settings-card > p { margin:5px 0 14px; color:var(--muted); font-size:11px; }
.model-test-status { min-height:0; margin-top:8px; }
.model-test-status:not(:empty) { padding:9px 10px; border-radius:8px; background:var(--surface-2); }
.reminder-email-form { display:grid; gap:11px; }
.reminder-email-form > label:not(.reminder-toggle) { display:grid; gap:5px; color:var(--muted); font-size:11px; }
.reminder-email-form .control { width:100%; }
.reminder-toggle { display:flex; align-items:center; gap:8px; color:var(--text); font-size:12px; }
.reminder-toggle input { accent-color:var(--green); width:17px; height:17px; }
.reminder-email-form .field-help { margin:0; }
.wechat-capture-form { display:grid; gap:12px; }
.dashboard-feed-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:15px; }
.dashboard-change-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; padding:11px 0; border-top:1px solid var(--border-soft); }
.dashboard-change-row > div:first-child { min-width:0; display:grid; gap:3px; }
.dashboard-change-row strong { overflow:hidden; color:var(--text); font-size:12px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-change-row span { color:var(--quiet); font-size:10px; }
.dashboard-change-row .button-row { flex-wrap:nowrap; }
.dashboard-change-row .btn { min-height:34px; padding:0 8px; font-size:10px; }
@media(max-width:1050px) { .lecture-controls { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:700px) {
  .lecture-controls,.settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .lecture-class-field { grid-column:span 2; }
  .lecture-result-summary { align-items:flex-start; }
  .lecture-busy-list > div { grid-template-columns:1fr; gap:3px; }
  .lecture-results { padding:12px; }
  .dashboard-feed-grid { grid-template-columns:1fr; }
  .dashboard-change-row { grid-template-columns:minmax(0,1fr); }
  .dashboard-change-row .button-row { flex-wrap:wrap; }
}

/* Home dashboard layout: pair daily work with the compact paper and timetable stack. */
.dashboard-main-grid { grid-template-columns:minmax(0,1.28fr) minmax(340px,.92fr); align-items:start; gap:14px; margin-bottom:14px; }
.dashboard-side-stack { min-width:0; display:grid; align-content:start; gap:12px; }
.dashboard-main-grid > .today-panel,.dashboard-side-stack > .panel { min-width:0; }
.dashboard-main-grid .today-panel { align-self:start; }
.dashboard-main-grid .dashboard-task { min-height:64px; padding:9px 11px; }
.dashboard-main-grid .dashboard-task-mark { height:34px; }
.dashboard-main-grid .dashboard-task-title { font-size:12px; }
.dashboard-main-grid .dashboard-task-meta { font-size:10px; }
.dashboard-main-grid .dashboard-step { padding:7px 9px; }
.dashboard-main-grid .paper-card { align-self:start; padding:15px 16px; }
.dashboard-main-grid .paper-card .panel-head { margin-bottom:8px; }
.dashboard-main-grid .paper-summary { min-height:0; margin:9px 0 10px; padding:10px 11px; line-height:1.6; -webkit-line-clamp:3; }
.dashboard-main-grid .paper-empty { min-height:0; margin:8px 0; padding:11px; }
.dashboard-main-grid .paper-actions { margin-top:2px; }
.personal-schedule { min-width:0; margin:0; }
.personal-schedule .panel-head { display:grid; grid-template-columns:minmax(0,1fr); gap:9px; margin-bottom:11px; }
.personal-schedule .panel-head .button-row { flex-wrap:nowrap; justify-content:space-between; }
.personal-schedule .select-control { width:min(145px,52%); min-width:0; }
.course-card-grid { grid-template-columns:minmax(0,1fr); align-content:start; gap:7px; }
.course-card { min-height:0; padding:9px 10px; display:grid; grid-template-columns:minmax(88px,.34fr) minmax(0,1fr); align-items:center; gap:11px; }
.course-time,.course-card-main { min-width:0; display:grid; align-content:start; gap:3px; }
.course-time { padding-right:10px; border-right:1px solid var(--border-soft); }
.course-day { font-size:10px; line-height:1.35; }
.course-period { color:var(--purple); font-size:11px; font-weight:600; line-height:1.35; }
.course-week { color:var(--quiet); font-size:9px; line-height:1.3; }
.course-name { font-size:12px; line-height:1.35; }
.course-group,.course-room { font-size:10px; line-height:1.35; }
.course-room { margin:0; }
.schedule-empty { padding:9px 11px; border:1px dashed var(--border); border-radius:9px; color:var(--quiet); font-size:11px; }
.dashboard-feed-grid { align-items:stretch; }
.dashboard-feed-grid > .panel { min-width:0; min-height:250px; display:flex; flex-direction:column; }
.dashboard-feed-grid > .panel .panel-head { flex:0 0 auto; margin-bottom:8px; }
.dashboard-feed-grid #dashboard-file-changes,.dashboard-feed-grid #dashboard-mail-changes { min-width:0; flex:1; display:grid; align-content:start; grid-auto-rows:minmax(52px,auto); }
.dashboard-change-row { min-width:0; padding:8px 0; }
.dashboard-change-row .button-row { justify-content:flex-end; }
@media(max-width:1000px) {
  .dashboard-main-grid { grid-template-columns:minmax(0,1.12fr) minmax(300px,.88fr); }
}
@media(max-width:800px) {
  .dashboard-main-grid { grid-template-columns:1fr; }
  .dashboard-side-stack { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
  .personal-schedule .panel-head { display:flex; align-items:flex-start; flex-wrap:wrap; }
  .dashboard-feed-grid > .panel { min-height:0; }
  .dashboard-feed-grid #dashboard-file-changes,.dashboard-feed-grid #dashboard-mail-changes { flex:auto; }
}
@media(max-width:600px) {
  .dashboard-side-stack { grid-template-columns:1fr; }
  .dashboard-main-grid .dashboard-task { grid-template-columns:3px minmax(0,1fr); }
  .dashboard-main-grid .dashboard-task-mark { grid-row:1/3; height:100%; min-height:34px; }
  .dashboard-feed-grid { grid-template-columns:1fr; }
}

/* Secondary-page layout and responsive controls. */
html,body { min-width:0; }
.sidebar { height:100dvh; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.sidebar > * { flex-shrink:0; }
.sidebar-spacer { flex-shrink:1; }
.view-title-row { align-items:center; flex-wrap:wrap; }
.view-title-row > div:first-child { min-width:0; }
.view-title-row .eyebrow { display:none; }
.view-title-row h1 { margin-bottom:4px; }
.btn-primary { color:#161719; background:#e2e4e6; box-shadow:none; }
.btn-primary:hover { color:#111; background:#f3f4f5; }
.filters .control,.control { min-height:44px; font-size:13px; }
.filters .select-control { padding-right:34px; }
.panel-desc,.field-help,.record-text,.lecture-result-note { font-size:12px; line-height:1.6; }
.record-card h3,.doc-title,.upload-title { font-size:14px; line-height:1.45; }
.record-text,.record-card h3,.doc-detail,.chat-bubble,.portfolio-record,.thesis-entry { min-width:0; overflow-wrap:anywhere; }
.modal-actions { flex-wrap:wrap; }
.lecture-controls { grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr)); }
.lecture-planner { margin:0 0 18px; }
.draft-paper { min-height:0; height:clamp(320px,60vh,800px); max-height:none; }
.teaching-launch,.thesis-entry { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.teaching-launch-copy,.thesis-entry > div:first-child { min-width:0; flex:1 1 300px; }
.teaching-module-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.teaching-module { min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.teaching-module h2,.teaching-module p { margin:0; }
.teaching-module p,.thesis-entry p,.thesis-migration-grid p { color:var(--muted); font-size:13px; line-height:1.6; }
.teaching-module p { flex:1; }
.teaching-module-tag { font-size:12px; font-weight:650; color:var(--cyan); }
.teaching-green .teaching-module-tag { color:var(--green); }
.teaching-purple .teaching-module-tag { color:var(--purple); }
.teaching-red .teaching-module-tag { color:var(--red); }
.teaching-followups,.thesis-migration { margin-bottom:16px; }
.thesis-entry h2 { margin:10px 0 4px; }
.thesis-entry p { margin:0; }
.thesis-migration-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.thesis-migration-grid article { min-width:0; padding:14px; border:1px solid var(--border-soft); border-radius:11px; background:var(--surface-2); }
.thesis-migration-grid p { margin:0; }
.portfolio-tabs { display:flex; flex-wrap:wrap; gap:8px; }
.portfolio-tab { min-height:40px; padding:8px 14px; border:1px solid var(--border); border-radius:9px; color:var(--muted); background:transparent; cursor:pointer; }
.portfolio-tab.active { color:var(--text); border-color:var(--cyan); background:rgba(84,203,234,.1); }
.portfolio-create { margin-bottom:14px; padding:12px; border:1px solid var(--border-soft); border-radius:11px; }
.portfolio-create summary { cursor:pointer; font-size:13px; font-weight:600; }
.portfolio-create-form { display:grid; grid-template-columns:2fr 1fr 1fr 1fr auto; gap:8px; margin-top:12px; }
.portfolio-records { display:grid; gap:10px; }
.portfolio-record { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,260px); gap:14px; padding:15px; border:1px solid var(--border-soft); border-radius:11px; background:var(--surface-2); }
.portfolio-record h3 { margin:0 0 6px; }
.portfolio-record p { margin:8px 0; color:var(--muted); font-size:13px; }
.portfolio-meta,.portfolio-documents { display:flex; flex-wrap:wrap; gap:8px 12px; color:var(--muted); font-size:12px; }
.portfolio-documents { margin-top:10px; }
.portfolio-record-side { min-width:0; }
.dashboard-grid > *, .two-column > *, .view-layout > *, .integration-list { min-width:0; }
.integration-row { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); align-items:start; gap:8px 12px; padding:12px 0; }
.integration-label,.integration-value,.integration-status,.integration-detail { min-width:0; overflow-wrap:anywhere; font-size:12px; line-height:1.55; }
.integration-status,.integration-detail { color:var(--muted); text-align:left; }
.integration-detail summary { cursor:pointer; color:var(--amber); }
.integration-detail > div { margin-top:7px; padding:9px; border-radius:8px; background:var(--surface-2); }
.doc-preview { font-size:12px; }
.knowledge-card { min-width:0; }
.doc-title,.doc-preview { overflow-wrap:anywhere; }
.doc-footer { flex-wrap:wrap; }
.doc-footer > * { min-width:0; overflow-wrap:anywhere; }
#course-results .table-wrap { max-height:min(65vh,700px); overflow:auto; }
body:has(#main .draft-workspace) .chat-fab { display:none; }
.dashboard-feed-grid { align-items:start; }
.dashboard-feed-grid > .panel { min-height:0; }
.dashboard-main-grid .dashboard-task-title { font-size:14px; }
.dashboard-main-grid .dashboard-task-meta,.paper-meta,.course-week,.course-group,.course-room { font-size:12px; }
.dashboard-main-grid .paper-summary { font-size:13px; }
.course-name { font-size:13px; }
.course-day { font-size:12px; }
@media(max-width:1100px) {
  .dashboard-main-grid { grid-template-columns:minmax(0,1fr); }
  .dashboard-side-stack { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:1100px) { .portfolio-create-form { grid-template-columns:repeat(2,minmax(0,1fr)); } .portfolio-create-form input[name=title] { grid-column:1/-1; } }
@media(max-width:820px) { .dashboard-grid,.two-column,.view-layout,.teaching-module-grid,.thesis-migration-grid { grid-template-columns:minmax(0,1fr); } .portfolio-record { grid-template-columns:1fr; } .portfolio-record-side { max-width:100%; } }
@media(max-width:600px) { .dashboard-side-stack { grid-template-columns:minmax(0,1fr); } }
@media(max-width:540px) {
  .settings-grid { grid-template-columns:minmax(0,1fr); }
  .knowledge-grid { grid-template-columns:minmax(0,1fr); }
  .lecture-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .lecture-class-field { grid-column:1/-1; }
  .portfolio-create-form { grid-template-columns:1fr; }
  .portfolio-create-form input[name=title] { grid-column:auto; }
  .filters form { width:100%; min-width:0; flex-wrap:wrap; }
  .filters .control,.filters .search-control { width:100%; min-width:0; }
  .record-card { grid-template-columns:minmax(0,1fr); }
  .record-card > .btn { justify-self:start; }
  .modal-actions .btn { flex:1 1 auto; }
  .integration-row { grid-template-columns:minmax(0,1fr); gap:4px; }
}

/* Courses: keep the date, audience and lesson-period controls aligned. */
.course-page-title { margin-bottom:16px; }
.course-chat-shortcut { display:none; }
.course-data-note { margin-bottom:16px; align-items:flex-start; line-height:1.6; }
.course-data-note span { max-width:1000px; }
.lecture-planner { margin-bottom:20px; }
.lecture-panel-head { align-items:center; margin-bottom:22px; }
.lecture-panel-head h2,.courses-list-panel h2 { margin:0; font-size:16px; }
.lecture-panel-head .panel-desc { margin-top:5px; }
.lecture-controls { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:start; gap:14px; }
.lecture-field { display:grid; min-width:0; gap:8px; color:var(--muted); font-size:13px; line-height:20px; }
.lecture-field-label { display:flex; align-items:baseline; justify-content:space-between; gap:8px; min-width:0; }
.lecture-field .control { width:100%; min-width:0; height:46px; min-height:46px; }
.lecture-field input[type=date] { display:block; box-sizing:border-box; max-width:100%; }
.lecture-day-hint { min-height:0; color:var(--cyan); font-size:12px; white-space:nowrap; }
.lecture-time-row { display:grid; grid-template-columns:minmax(250px, 1fr) minmax(0, 2fr); align-items:end; gap:20px; margin-top:20px; }
.lecture-period-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; min-width:0; }
.lecture-presets { display:flex; flex-direction:column; align-items:stretch; gap:8px; min-width:0; margin:0; }
.lecture-presets > span { margin:0; color:var(--muted); font-size:13px; line-height:20px; }
.lecture-preset-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.lecture-preset-buttons .btn { min-height:46px; padding:9px 14px; white-space:nowrap; }
.lecture-preset-buttons .btn.is-selected { color:var(--text); border-color:#777b80; background:var(--surface-2); }
.lecture-submit-row { margin-top:20px; }
.lecture-submit-row .btn { min-height:46px; }
.lecture-results { margin-top:20px; padding:18px; }
.lecture-empty { padding:9px 0; color:var(--muted); font-size:13px; line-height:1.6; }
.lecture-result-summary { flex-wrap:wrap; }
.lecture-result-summary > div:first-child { min-width:0; }
.lecture-student-count { white-space:normal; overflow-wrap:anywhere; }
.lecture-class-chips span,.lecture-busy-list > div { overflow-wrap:anywhere; }
.courses-list-panel { min-width:0; margin-bottom:16px; }
.courses-filters { display:grid; grid-template-columns:minmax(250px,2fr) repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.courses-filters > *,.course-search { min-width:0; }
.course-search { display:flex; gap:8px; }
.course-search .search-control { min-width:0; flex:1; }
.course-search .btn { min-height:44px; flex-shrink:0; }
.courses-filters .control { min-width:0; width:100%; }
@media(max-width:1100px) {
  .lecture-time-row { grid-template-columns:1fr; gap:16px; }
  .lecture-period-fields { max-width:500px; }
  .courses-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .course-search { grid-column:1/-1; }
}
@media(max-width:700px) {
  body:has(.course-page-title) .chat-fab { display:none; }
  .course-chat-shortcut { display:inline-flex; }
  .lecture-controls { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 10px; }
  .lecture-class-field { grid-column:auto; }
  .lecture-time-row { margin-top:16px; }
  .lecture-period-fields { gap:10px; max-width:none; }
  .lecture-preset-buttons { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .lecture-preset-buttons .btn { width:100%; padding:9px 6px; }
  .lecture-submit-row .btn { width:100%; }
  .lecture-results { padding:14px; }
  .lecture-result-summary { align-items:flex-start; }
  .courses-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .courses-filters #course-day { grid-column:1/-1; }
}
@media(max-width:360px) {
  .lecture-controls { grid-template-columns:1fr; }
  .lecture-presets .btn { flex:1 0 auto; }
}
