@charset "UTF-8";

:root {
  color-scheme: dark;
  --bg: #151619;
  --surface: #1c1e22;
  --surface-2: #22252a;
  --surface-3: #2a2d33;
  --text: #eeefef;
  --muted: #a4a7ad;
  --faint: #747981;
  --line: #343840;
  --line-soft: #292d34;
  --accent: #e1b675;
  --accent-bright: #efca92;
  --accent-ink: #211b12;
  --personal: #9fbdc7;
  --work: #cfb883;
  --success: #a2c391;
  --danger: #e7a19a;
  --radius: 19px;
  --shadow: 0 14px 50px #00000029;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
button:disabled, input:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration: none; }
button, a, input, textarea, select { outline: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--accent) !important; box-shadow: 0 0 0 3px #e1b6751a; }
svg { width: 20px; height: 20px; stroke-width: 1.7; vertical-align: middle; flex-shrink: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.035em; }
h1 { font-size: 32px; font-weight: 600; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin-bottom: 1em; }
::selection { color: #fff; background: #82603e; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.eyebrow, .page-kicker { color: var(--faint); font-size: 10px; font-weight: 650; letter-spacing: .15em; text-transform: uppercase; }
.flex { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--line-soft); margin: 22px 0; }
.danger-text { color: var(--danger); }
.success-text { color: var(--success); }
.badge, .pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 50px; font-size: 11px; color: var(--muted); background: #ffffff06; border: 1px solid var(--line); white-space: nowrap; }

/* Desktop shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 238px; display: flex; flex-direction: column; padding: 30px 18px 20px; background: #191b1f; border-right: 1px solid var(--line-soft); z-index: 40; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 13px; margin-bottom: 45px; }
.brand-mark { display: inline-grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border: 1px solid #b28b544f; border-radius: 12px; background: linear-gradient(145deg,#e8c38b25,#d29a4721); color: var(--accent); }
.brand-mark svg { width: 24px; height: 24px; }
.brand-word { font-size: 24px; line-height: 1; letter-spacing: -.055em; font-weight: 650; }
.brand-word small { display: block; color: var(--faint); font-size: 9px; font-weight: 500; letter-spacing: .16em; margin-top: 8px; text-transform: uppercase; }
.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; text-align: left; padding: 11px 14px; background: transparent; border-radius: 10px; color: #a8aaad; font-weight: 500; font-size: 13px; transition: background .15s, color .15s; }
.nav-item:hover { background: #ffffff04; color: var(--text); }
.nav-item.active { background: #e1b67514; color: var(--accent-bright); box-shadow: inset 0 0 0 1px #e1b67512; }
.nav-item.active::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: auto; }
.nav-icon { width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-icon svg { width: 19px; height: 19px; }
.sidebar-bottom { margin-top: auto; padding: 22px 12px 0; }
.sidebar-bottom .nav-item { padding-left: 0; }
.version { color: #686a6d; font-size: 10px; padding: 18px 0 0; letter-spacing: .02em; }
.account-summary { display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line-soft); margin-top: 18px; }
.account-summary strong { display: block; font-size: 12px; font-weight: 600; }
.account-summary small { display: block; font-size: 10px; color: var(--faint); margin-top: 2px; }
.main-shell { margin-left: 238px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 106px; padding: 21px 38px; border-bottom: 1px solid #292d3496; }
.topbar-left { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.page-heading { margin: 0; font-size: 21px; font-weight: 550; letter-spacing: -.035em; }
.topbar-right { display: flex; align-items: center; gap: 18px; min-width: 0; }
.space-switch { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: #191b1e; padding: 4px; flex-shrink: 0; }
.space-switch button { background: transparent; color: var(--faint); font-size: 11px; font-weight: 550; padding: 7px 12px; border-radius: 6px; white-space: nowrap; }
.space-switch button.active { background: #34373e; color: #e7e9ec; box-shadow: 0 1px 4px #0002; }
.icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #ddbb861b; border: 1px solid #c09d6659; color: var(--accent); display: inline-grid; place-items: center; flex-shrink: 0; font-size: 11px; font-weight: 650; letter-spacing: -.025em; }
.sync-status { font-size: 10px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sync-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.page-content { width: 100%; max-width: 1680px; margin: 0 auto; padding: 31px 38px 48px; }
.bottom-nav { display: none; }
.banner { border: 1px solid #b68d4c3d; border-radius: 11px; background: #dba54a09; color: #d0b789; padding: 12px 15px; display: flex; align-items: center; gap: 10px; font-size: 12px; margin-bottom: 20px; }
.banner svg { width: 17px; height: 17px; }
.banner.demo { background: #91acbf0a; border-color: #91acbf32; color: #b2cad1; }
.banner.error { color: #e9b5ae; background: #da8f840b; border-color: #da8f8444; }
.banner.info { color: #c2cbb7; background: #adc8900a; border-color: #adc8902f; }
.banner p { margin: 0; }

/* Components */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; min-height: 39px; border-radius: 9px; font-weight: 600; font-size: 12px; line-height: 1.4; background: var(--surface-3); border: 1px solid transparent; white-space: nowrap; transition: background .15s, transform .15s, border-color .15s; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: #373a41; }
.btn:active { transform: translateY(1px); }
.btn.primary { color: var(--accent-ink); background: var(--accent); border-color: #eccb97; box-shadow: 0 3px 10px #0001; }
.btn.primary:hover { background: var(--accent-bright); }
.btn.secondary { background: #ffffff04; border-color: #585a5d; color: #d7d9dc; }
.btn.secondary:hover { background: #ffffff09; border-color: #76787b; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: #ffffff05; }
.btn.danger { color: var(--danger); border-color: #bd7c753f; background: #bd7c750c; }
.btn.danger:hover { background: #bd7c7520; }
.btn.small { padding: 7px 11px; min-height: 32px; font-size: 11px; }
.view-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.view-header h1 { margin-bottom: 7px; }
.view-subtitle { color: var(--muted); margin: 0; font-size: 13px; }
.section-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 23px; }
.section-actions .search-box { flex: 1; max-width: 380px; }
.search-box { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: #1a1d21; border-radius: 9px; padding: 0 12px; min-height: 40px; color: var(--faint); }
.search-box svg { width: 16px; height: 16px; }
.search-box input { border: 0; box-shadow: none !important; background: transparent; padding: 10px 0; min-width: 0; width: 100%; color: var(--text); font-size: 12px; }
.search-box:focus-within { border-color: #a48b65; }
.filter-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.chip { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; }
.chip.active { background: #c5b58d14; color: var(--accent); border-color: #b9a67e59; }
.chip:hover { color: var(--text); }
.panel { background: linear-gradient(145deg,#1d2025,#1b1e23); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; box-shadow: 0 5px 20px #0000000a; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 23px 17px; }
.panel-title { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.025em; }
.panel-title svg { color: var(--faint); width: 16px; height: 16px; }
.panel-link { display: inline-flex; gap: 5px; align-items: center; color: #bdb19a; background: transparent; font-size: 10px; padding: 4px 0; white-space: nowrap; }
.panel-link svg { width: 13px; height: 13px; }
.panel-link:hover { color: var(--accent); }
.panel > .stack { padding: 0 22px 14px; }
.stack { display: flex; flex-direction: column; gap: 0; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 40px 22px; min-height: 180px; color: var(--muted); }
.empty-state h2, .empty-state h3 { color: var(--text); margin: 3px 0 0; font-weight: 550; }
.empty-state p { max-width: 390px; margin: 0 0 10px; font-size: 12px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 14px; color: #8f9b80; background: #f1efd304; margin-bottom: 4px; }
.empty-icon svg { width: 22px; height: 22px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px; font-size: 10px; line-height: 1.4; border: 1px solid var(--line); color: var(--muted); background: #ffffff03; white-space: nowrap; }
.status-pill::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-pill.ok { color: var(--success); background: #87ad6d09; border-color: #87ad6d2a; }
.status-pill.warn { color: var(--accent); background: #d5ac6c09; border-color: #d5ac6c2a; }

/* Today */
.welcome-date { color: var(--faint); font-size: 11px; margin: 0 0 12px; letter-spacing: .02em; text-transform: capitalize; }
.hero { position: relative; display: flex; align-items: center; min-height: 240px; background: radial-gradient(ellipse at 83% 12%,#c9a97610,transparent 45%),linear-gradient(120deg,#282b31,#22252a 70%,#282b30); border: 1px solid #52545770; border-radius: 20px; overflow: hidden; margin-bottom: 22px; padding: 31px 34px; }
.hero::after { content: ""; pointer-events: none; position: absolute; inset: 0; background: linear-gradient(90deg,transparent 50%,#b0b98c04); }
.hero-copy { position: relative; z-index: 2; flex: 1; max-width: 65%; }
.hero .eyebrow { color: #c4b58d; font-size: 9px; margin-bottom: 13px; display: flex; align-items: center; gap: 8px; }
.hero .eyebrow::before { content: ""; width: 17px; height: 1px; background: var(--accent); }
.hero-title { margin: 0 0 12px; font-size: clamp(27px,2.8vw,42px); line-height: 1.18; font-weight: 500; letter-spacing: -.045em; color: #eef0f3; }
.hero-title em { color: var(--accent-bright); font-style: normal; }
.hero-subtitle { max-width: 430px; font-size: 12px; line-height: 1.75; margin: 0 0 23px; color: #aeb9a2; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-actions .btn { font-size: 11px; }
.hero-orb { position: absolute; right: 9%; top: 50%; width: 156px; height: 156px; transform: translateY(-50%); border: 1px solid #ddc39131; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #e0c995; background: radial-gradient(circle at 44% 37%,#d8b57523,#a5af7c10 48%,#d8b57504 70%); box-shadow: inset 0 0 35px #d8b57505,0 0 60px #b9aa6c0b; }
.hero-orb::before { content: ""; position: absolute; width: 210px; height: 210px; border: 1px solid #d0bd8e16; border-radius: 50%; }
.hero-orb::after { content: ""; position: absolute; width: 264px; height: 264px; border: 1px solid #d0bd8e0b; border-radius: 50%; }
.hero-orb svg { width: 69px; height: 69px; stroke-width: 1; filter: drop-shadow(0 0 12px #d9bf7e2b); }
.metrics-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 27px; }
.metric { display: flex; align-items: center; gap: 13px; padding: 18px 19px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 13px; min-width: 0; }
.metric-icon { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid #86966f29; border-radius: 11px; background: #a6b77e09; color: #a9ba89; flex-shrink: 0; }
.metric:nth-child(2) .metric-icon { color: #b6c5cb; background: #96aebd09; border-color: #96aebd29; }
.metric:nth-child(3) .metric-icon { color: #d0b789; background: #ceb38209; border-color: #ceb38229; }
.metric:nth-child(4) .metric-icon { color: #c6accb; background: #c6accb09; border-color: #c6accb29; }
.metric-icon svg { width: 18px; height: 18px; }
.metric-value { font-size: 24px; line-height: 1; font-weight: 500; letter-spacing: -.04em; }
.metric-label { color: var(--faint); font-size: 10px; margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 21px; align-items: start; }
.dashboard-grid > * { min-width: 0; }
.dashboard-grid .panel + .panel { margin-top: 0; }
.quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 0 22px 22px; }
.quick-actions button { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; text-align: left; padding: 16px; border-radius: 11px; background: #ffffff03; border: 1px solid var(--line); color: #b6beaa; font-size: 11px; }
.quick-actions button svg { color: var(--accent); width: 18px; height: 18px; }
.quick-actions button:hover { border-color: #a38a5a7a; background: #d4ae6c08; }

/* Tasks and agenda */
.task-row { display: flex; align-items: center; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.task-row:last-child { border-bottom: 0; }
.check-btn { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; padding: 0; background: transparent; border: 1px solid #65676a; border-radius: 6px; flex-shrink: 0; color: transparent; }
.check-btn:hover { border-color: var(--accent); }
.check-btn.checked { color: #252c2c; background: #b1c197; border-color: #b1c197; }
.check-btn svg { width: 12px; height: 12px; stroke-width: 2.3; }
.task-copy { flex: 1; min-width: 0; }
.task-title { font-size: 12px; font-weight: 500; color: #dbdde0; margin: 0; overflow-wrap: anywhere; }
.task-row.completed .task-title, .check-btn.checked + .task-copy .task-title { text-decoration: line-through; color: var(--faint); }
.task-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 5px; color: var(--faint); font-size: 10px; }
.task-meta svg { width: 11px; height: 11px; }
.priority-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; background: #9ca78f; flex-shrink: 0; }
.priority-dot.high { background: #d99d79; }
.priority-dot.normal { background: #b2b883; }
.priority-dot.low { background: #87a9b3; }
.space-tag { display: inline-flex; gap: 4px; align-items: center; font-size: 9px; padding: 2px 6px; border-radius: 4px; color: var(--muted); border: 1px solid #74767925; background: #8e9a7405; white-space: nowrap; }
.space-tag::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.space-tag.personal { color: var(--personal); background: #91aeba09; border-color: #91aeba24; }
.space-tag.work { color: var(--work); background: #bda16b09; border-color: #bda16b24; }
.row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.row-actions .icon-btn { width: 29px; height: 29px; border-color: transparent; }
.row-actions .icon-btn svg { width: 15px; height: 15px; }
.task-group { margin-bottom: 25px; }
.task-group > h2 { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 9px; }
.task-group .stack { padding: 0 20px; border: 1px solid var(--line-soft); border-radius: 13px; background: var(--surface); }
.agenda-row { display: flex; align-items: flex-start; gap: 12px; padding: 15px 0; min-width: 0; }
.agenda-row + .agenda-row { border-top: 1px solid var(--line-soft); }
.agenda-time { width: 38px; flex-shrink: 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.agenda-bar { width: 2px; min-height: 37px; border-radius: 2px; background: #bba272; flex-shrink: 0; }
.agenda-row:nth-child(2n) .agenda-bar { background: #91afb8; }
.agenda-details { min-width: 0; flex: 1; }
.agenda-details strong { font-size: 12px; font-weight: 500; display: block; overflow-wrap: anywhere; color: #dbdde0; }
.agenda-details small { display: block; font-size: 10px; color: var(--faint); margin-top: 4px; }
.calendar-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 22px; align-items: start; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.calendar-weekday { padding: 13px 5px; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); text-align: center; background: #24272d; border-bottom: 1px solid var(--line); }
.calendar-day { min-height: 106px; padding: 9px 7px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; display: flex; align-items: flex-start; flex-direction: column; gap: 5px; cursor: pointer; overflow: hidden; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:hover { background: #ffffff04; }
.calendar-day.today { background: #d0ac6b09; }
.calendar-day.muted { opacity: .3; }
.day-number { display: inline-grid; place-items: center; width: 23px; height: 23px; font-size: 10px; font-variant-numeric: tabular-nums; color: #bdbfc2; margin-bottom: 2px; }
.calendar-day.today .day-number { background: var(--accent); color: #211b12; border-radius: 50%; font-weight: 700; }
.calendar-event { font-size: 9px; line-height: 1.5; width: 100%; border-radius: 4px; padding: 2px 4px; background: #c9ad7433; color: #e0c899; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.calendar-event.personal { background: #94b9c025; color: #abcad0; }
.calendar-aside { padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.calendar-aside h2 { font-size: 14px; margin-bottom: 9px; }
.month-switch { display: flex; align-items: center; gap: 12px; }
.month-switch h2 { min-width: 130px; margin: 0; text-align: center; font-size: 17px; text-transform: capitalize; }

/* Notes, files, shortcuts */
.note-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.note-card { min-width: 0; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); min-height: 205px; }
.note-card h2, .note-card h3 { font-size: 15px; margin-bottom: 12px; overflow-wrap: anywhere; }
.note-content { color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; flex: 1; max-height: 175px; overflow: hidden; }
.note-date { color: var(--faint); font-size: 9px; }
.note-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding-top: 20px; margin-top: auto; }
.note-footer .row-actions { margin-left: auto; }
.module-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.module-card { display: flex; flex-direction: column; min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.module-card h2 { margin: 17px 0 7px; font-size: 16px; }
.module-card p { font-size: 11px; color: var(--muted); margin-bottom: 19px; min-height: 34px; overflow-wrap: anywhere; }
.module-mark { width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid #ccb17d3b; border-radius: 12px; background: #d8be8710; color: var(--accent); }
.module-mark svg { width: 20px; height: 20px; }
.module-actions { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 15px; border-top: 1px solid var(--line-soft); }
.module-actions .btn { flex: 1; }
.documents-list { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); padding: 0 22px; }
.document-row { display: flex; align-items: center; gap: 15px; padding: 19px 0; min-width: 0; }
.document-row + .document-row { border-top: 1px solid var(--line-soft); }
.document-row h3 { font-size: 12px; margin: 0 0 5px; overflow-wrap: anywhere; }
.document-row p { color: var(--faint); font-size: 10px; margin: 0; }
.document-icon { width: 37px; height: 43px; border-radius: 8px; background: #bdab8220; border: 1px solid #bdab8238; color: #c4b38c; display: inline-grid; place-items: center; flex-shrink: 0; }
.document-icon svg { width: 17px; height: 17px; }
.file-picker { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 20px; border: 1px dashed #5c6571; border-radius: 12px; color: var(--muted); background: #ffffff03; font-size: 12px; cursor: pointer; }
.file-picker svg { color: var(--accent); margin-bottom: 4px; }
.file-picker input[type=file] { max-width: 100%; margin-top: 9px; font-size: 11px; }

/* Forms and settings */
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1/-1; }
.field label { display: flex; align-items: center; justify-content: space-between; color: #c3c5c8; font-size: 11px; font-weight: 550; }
.field input, .field textarea, .field select, input.form-input, select.form-input, textarea.form-input { width: 100%; max-width: 100%; background: #17191d; border: 1px solid #41454d; border-radius: 8px; padding: 11px 12px; color: var(--text); font-size: 12px; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.field textarea, textarea.form-input { resize: vertical; min-height: 110px; line-height: 1.75; }
.field input::placeholder, .field textarea::placeholder, input.form-input::placeholder, textarea.form-input::placeholder { color: #696b6e; opacity: 1; }
.field input[type="datetime-local"], .field input[type="date"] { min-height: 43px; }
.field input[type="checkbox"] { width: 16px; height: 16px; accent-color: #d6b57b; }
.hint { color: var(--faint); font-size: 10px; line-height: 1.7; margin: 0; overflow-wrap: anywhere; }
.form-actions { display: flex; gap: 9px; justify-content: flex-end; padding-top: 7px; grid-column: 1/-1; flex-wrap: wrap; }
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: start; }
.settings-card { border: 1px solid var(--line); border-radius: 16px; padding: 25px; background: var(--surface); min-width: 0; }
.settings-card h2 { font-size: 17px; margin-bottom: 8px; }
.settings-card > p { font-size: 12px; color: var(--muted); margin-bottom: 21px; line-height: 1.75; }
.settings-card .field + .field { margin-top: 16px; }
.settings-card .form-grid .field + .field { margin-top: 0; }
.settings-card .status-pill { margin-bottom: 19px; }
.settings-card .form-actions { margin-top: 14px; }
.connection-row { display: flex; align-items: center; gap: 11px; padding: 14px 0; min-width: 0; border-bottom: 1px solid var(--line-soft); }
.connection-row:last-child { border-bottom: 0; }
.connection-copy { flex: 1; min-width: 0; }
.connection-copy strong { display: block; font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.connection-copy small { display: block; font-size: 10px; color: var(--faint); margin-top: 4px; }
.auth-shell { min-height: 100dvh; display: grid; place-items: center; padding: 40px 20px; background: radial-gradient(ellipse at 22% 20%,#a7aa6d0d,transparent 40%),radial-gradient(ellipse at 90% 80%,#d8a65b09,transparent 45%),var(--bg); }
.auth-card { width: min(440px,100%); padding: 36px; background: #1d2025; border: 1px solid #474e59; border-radius: 22px; box-shadow: 0 25px 100px #0004; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 31px; }
.auth-brand .brand-word { font-size: 23px; }
.auth-title { font-size: 27px; margin-bottom: 10px; font-weight: 550; }
.auth-subtitle { font-size: 12px; line-height: 1.8; color: var(--muted); margin-bottom: 27px; }
.auth-card .field + .field { margin-top: 16px; }
.auth-card .btn { width: 100%; margin-top: 23px; min-height: 44px; }
.auth-footer { text-align: center; color: var(--faint); font-size: 11px; margin-top: 22px; }
.auth-footer a, .auth-footer button { color: var(--accent); background: transparent; font-size: 11px; padding: 0; }
.setup-notice { background: #e0b66e09; color: #c7b68f; border: 1px solid #e0b66e2c; border-radius: 8px; padding: 13px; font-size: 11px; line-height: 1.8; margin-bottom: 20px; }

/* Assistant */
.chat-layout { max-width: 1000px; margin: 0 auto; }
.chat-main { display: flex; flex-direction: column; min-height: calc(100dvh - 210px); }
.chat-messages { display: flex; flex-direction: column; gap: 23px; padding: 10px 0 30px; min-height: 350px; }
.chat-bubble { max-width: 85%; padding: 19px 22px; border-radius: 17px; border: 1px solid var(--line); font-size: 13px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble.user { align-self: flex-end; background: #b59d6e16; border-color: #b59d6e3a; border-bottom-right-radius: 5px; color: #ece4d2; }
.chat-bubble.assistant { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 5px; color: #cdcfd2; }
.chat-bubble .chat-author { display: block; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.chat-empty { margin: auto 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 45px 10px 40px; }
.chat-empty .brand-mark { width: 62px; height: 62px; border-radius: 20px; margin-bottom: 27px; box-shadow: 0 0 60px #d8b5750b; }
.chat-empty .brand-mark svg { width: 32px; height: 32px; }
.chat-empty h1 { font-size: 31px; font-weight: 500; margin-bottom: 10px; }
.chat-empty > p { color: var(--muted); font-size: 12px; max-width: 400px; }
.chat-suggestions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; width: 100%; max-width: 720px; margin-top: 25px; text-align: left; }
.chat-suggestions button { min-width: 0; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #ffffff03; color: #b5bea8; font-size: 11px; line-height: 1.65; }
.chat-suggestions button svg { display: block; width: 17px; height: 17px; margin-bottom: 10px; color: #c2ad85; }
.chat-suggestions button:hover { border-color: #8c805f; background: #bca36f09; }
.chat-composer { position: sticky; bottom: 20px; margin-top: auto; border: 1px solid #68717c; border-radius: 17px; padding: 15px 16px 12px; background: #24272d; box-shadow: 0 8px 40px #0005; z-index: 3; }
.composer-input { width: 100%; resize: none; padding: 1px 3px; min-height: 58px; max-height: 190px; border: 0; background: transparent; color: var(--text); font-size: 13px; line-height: 1.8; box-shadow: none !important; }
.composer-input::placeholder { color: #929d84; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 7px; }
.composer-bottom .hint { font-size: 9px; }
.voice-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid #535c66; background: #ffffff04; color: #c5ceb6; flex-shrink: 0; }
.voice-btn svg { width: 17px; height: 17px; }
.voice-btn.listening { background: #cf7f6f22; border-color: #cf7f6f; color: #f1b7a9; animation: breathe 1.3s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 6px #cf7f6f0a; } }

/* Mail */
.mail-layout { display: grid; grid-template-columns: minmax(250px,.8fr) minmax(0,1.4fr); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; min-height: 650px; background: var(--surface); }
.mail-sidebar { border-right: 1px solid var(--line); min-width: 0; background: #1b1e23; }
.mail-toolbar { display: flex; gap: 8px; align-items: center; padding: 15px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mail-toolbar select { min-width: 0; max-width: 100%; flex: 1; color: var(--text); border: 1px solid var(--line); background: #17191d; padding: 9px; font-size: 11px; border-radius: 7px; }
.mail-toolbar .search-box { width: 100%; }
.mail-list { max-height: 740px; overflow-y: auto; }
.mail-card { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line-soft); padding: 17px 18px; background: transparent; }
.mail-card:hover { background: #ffffff03; }
.mail-card.active { background: #d9b16f0d; border-left: 2px solid #c0a16a; padding-left: 16px; }
.mail-card .mail-sender { display: flex; justify-content: space-between; gap: 6px; color: #d3dac6; font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.mail-card .mail-date { color: var(--faint); font-weight: 400; font-size: 9px; white-space: nowrap; }
.mail-subject { color: #c8cacd; font-size: 11px; margin-bottom: 6px; line-height: 1.6; overflow-wrap: anywhere; }
.mail-preview { color: var(--faint); font-size: 10px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mail-detail { padding: 27px; min-width: 0; }
.mail-detail > h1, .mail-detail > h2 { font-size: 20px; margin-bottom: 13px; overflow-wrap: anywhere; }
.mail-detail .mail-meta { font-size: 10px; color: var(--faint); line-height: 1.8; overflow-wrap: anywhere; margin-bottom: 24px; }
.mail-body { color: #c4c6c9; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; padding: 19px 0 25px; border-top: 1px solid var(--line-soft); }
.mail-compose { padding-top: 22px; border-top: 1px solid var(--line); }
.mail-compose h3 { margin-bottom: 14px; font-size: 14px; }
.mail-compose .field + .field { margin-top: 14px; }
.mail-compose .form-actions { justify-content: flex-start; margin-top: 12px; }
.mail-placeholder { min-height: 500px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 9px; color: var(--muted); }
.mail-placeholder p { max-width: 330px; font-size: 12px; }
.mail-placeholder h2 { margin: 10px 0 0; font-size: 20px; color: var(--text); }
.mail-placeholder svg { color: var(--faint); width: 35px; height: 35px; stroke-width: 1.2; }

/* Dialogs and feedback */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: #08090bb8; backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.modal { width: min(560px,100%); max-height: calc(100dvh - 48px); overflow-y: auto; border: 1px solid #505661; border-radius: 19px; box-shadow: 0 25px 100px #0008; background: #22252b; }
.modal-header { padding: 23px 25px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 19px; margin: 0; }
.modal-close { display: inline-grid; place-items: center; width: 30px; height: 30px; background: transparent; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); flex-shrink: 0; }
.modal-close:hover { background: #ffffff06; color: var(--text); }
.modal-close svg { width: 15px; height: 15px; }
.modal-body { padding: 24px 25px; }
.modal-body > p { font-size: 12px; line-height: 1.8; color: var(--muted); }
.modal-footer { padding: 17px 25px; display: flex; gap: 9px; justify-content: flex-end; border-top: 1px solid var(--line); background: #17191c55; }
.toast-container { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; z-index: 200; pointer-events: none; max-width: min(410px,calc(100vw - 32px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #30383b; border: 1px solid #5f6164; border-radius: 11px; color: #e0e9d3; box-shadow: 0 10px 35px #0005; font-size: 12px; line-height: 1.65; animation: toast-in .2s ease-out; overflow-wrap: anywhere; }
.toast svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--success); }
.toast.error { background: #382b25; border-color: #966e5f; color: #f0cec0; }
.toast.error svg { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 220px; font-size: 12px; color: var(--muted); }
.spinner { display: inline-block; width: 17px; height: 17px; border: 2px solid #6e707340; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #595b5e70; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #6e7073; }

/* Compact desktop and tablets */
@media (min-width: 1600px) { .page-content { padding-top: 38px; } .hero { min-height: 265px; padding: 40px; } .hero-orb { right: 12%; } }
@media (max-width: 1200px) {
  .sidebar { width: 214px; padding-left: 14px; padding-right: 14px; }
  .main-shell { margin-left: 214px; }
  .topbar { padding: 22px 27px; }
  .page-content { padding: 27px; }
  .topbar-right { gap: 10px; }
  .sync-status { display: none; }
  .metric { padding: 16px 13px; gap: 10px; }
  .metric-icon { width: 31px; height: 31px; border-radius: 9px; }
  .metric-value { font-size: 21px; }
  .metric-label { font-size: 9px; }
  .hero { padding: 28px; }
  .hero-orb { width: 130px; height: 130px; right: 7%; }
  .hero-orb::before { width: 177px; height: 177px; }
  .hero-orb::after { width: 223px; height: 223px; }
  .hero-orb svg { width: 57px; height: 57px; }
  .dashboard-grid { gap: 16px; }
  .note-grid, .module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .calendar-layout { grid-template-columns: minmax(0,1fr); }
  .calendar-aside { display: block; }
  .calendar-aside .stack { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 22px; }
}
@media (max-width: 940px) {
  .sidebar { display: none; }
  .main-shell { margin-left: 0; }
  .topbar { min-height: 90px; }
  .page-content { padding-bottom: 106px; }
  .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(65px + env(safe-area-inset-bottom)); padding: 5px 12px calc(5px + env(safe-area-inset-bottom)); background: #1c1e21ee; border-top: 1px solid #454e5b7a; display: flex; align-items: stretch; justify-content: space-around; z-index: 50; backdrop-filter: blur(16px); }
  .bottom-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 46px; padding: 5px 8px; background: transparent; color: #8c9880; font-size: 9px; border-radius: 10px; }
  .bottom-nav-item svg { width: 19px; height: 19px; }
  .bottom-nav-item.active { color: var(--accent-bright); }
  .bottom-nav-item.active svg { filter: drop-shadow(0 0 5px #d0aa5a35); }
  .hero-copy { max-width: 66%; }
  .hero-orb { right: 9%; }
  .toast-container { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .chat-main { min-height: calc(100dvh - 250px); }
  .chat-composer { bottom: 83px; }
  .mail-layout { min-height: 580px; }
}

/* Phones */
@media (max-width: 600px) {
  body { font-size: 13px; }
  .topbar { min-height: auto; padding: 17px 19px 15px; gap: 12px; flex-wrap: wrap; align-items: center; }
  .topbar-left { gap: 3px; flex: 1; }
  .page-kicker { font-size: 8px; letter-spacing: .15em; }
  .page-heading { font-size: 18px; }
  .topbar-right { gap: 8px; }
  .topbar-right .space-switch { order: 5; }
  .topbar .space-switch { padding: 3px; border-radius: 8px; }
  .space-switch button { padding: 6px 8px; font-size: 9px; }
  .avatar { width: 30px; height: 30px; font-size: 10px; }
  .icon-btn { width: 31px; height: 31px; }
  .icon-btn svg { width: 15px; height: 15px; }
  .page-content { padding: 22px 17px calc(92px + env(safe-area-inset-bottom)); }
  .welcome-date { font-size: 10px; margin-bottom: 11px; }
  .banner { padding: 10px 12px; font-size: 10px; line-height: 1.65; border-radius: 9px; gap: 8px; margin-bottom: 17px; }
  .banner .btn { padding: 5px 7px; min-height: 29px; font-size: 9px; }
  .hero { min-height: 266px; padding: 24px 22px; border-radius: 17px; margin-bottom: 16px; align-items: flex-start; }
  .hero-copy { max-width: 100%; }
  .hero .eyebrow { font-size: 8px; margin-bottom: 15px; }
  .hero-title { font-size: 31px; max-width: 245px; line-height: 1.2; margin-bottom: 11px; }
  .hero-subtitle { max-width: 235px; font-size: 11px; margin-bottom: 20px; }
  .hero-orb { width: 97px; height: 97px; right: -15px; top: 90px; opacity: .54; }
  .hero-orb::before { width: 132px; height: 132px; }
  .hero-orb::after { width: 168px; height: 168px; }
  .hero-orb svg { width: 42px; height: 42px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 9px 11px; min-height: 36px; font-size: 10px; }
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 21px; }
  .metric { padding: 15px; gap: 11px; border-radius: 12px; }
  .metric-icon { width: 33px; height: 33px; }
  .metric-value { font-size: 22px; }
  .metric-label { font-size: 9px; margin-top: 6px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); gap: 17px; }
  .panel { border-radius: 15px; }
  .panel-header { padding: 20px 19px 13px; }
  .panel-title { font-size: 14px; }
  .panel-link { font-size: 9px; }
  .panel > .stack { padding: 0 18px 12px; }
  .task-row { padding: 14px 0; gap: 10px; }
  .task-title { font-size: 11px; }
  .task-meta { font-size: 9px; gap: 6px; }
  .space-tag { font-size: 8px; }
  .task-row .row-actions { gap: 0; }
  .task-row .row-actions .icon-btn { width: 27px; }
  .quick-actions { padding: 0 18px 19px; }
  .quick-actions button { padding: 14px; font-size: 10px; }
  .view-header { margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
  .view-header h1 { font-size: 26px; margin-bottom: 6px; }
  .view-subtitle { font-size: 11px; line-height: 1.75; }
  .view-header > .btn { min-height: 34px; padding: 8px 11px; font-size: 10px; }
  .section-actions { gap: 12px; margin-bottom: 19px; }
  .section-actions .search-box { flex-basis: 100%; max-width: none; }
  .filter-row { gap: 6px; width: 100%; }
  .chip { padding: 6px 10px; font-size: 10px; }
  .task-group .stack { padding: 0 15px; }
  .task-group > h2 { font-size: 10px; }
  .empty-state { padding: 32px 18px; min-height: 170px; }
  .empty-state p { font-size: 11px; }
  .note-grid, .module-grid { grid-template-columns: minmax(0,1fr); gap: 13px; }
  .note-card { padding: 20px; min-height: 190px; }
  .module-card { padding: 21px; }
  .documents-list { padding: 0 15px; }
  .document-row { gap: 11px; padding: 16px 0; }
  .document-row h3 { font-size: 11px; }
  .document-row p { font-size: 9px; }
  .document-row .row-actions { gap: 0; }
  .document-row .row-actions .btn { padding: 6px; min-width: 29px; }
  .document-icon { width: 32px; height: 37px; }
  .calendar-layout { gap: 17px; }
  .calendar-grid { border-radius: 11px; }
  .calendar-weekday { font-size: 8px; padding: 10px 1px; letter-spacing: 0; }
  .calendar-day { padding: 6px 3px; min-height: 70px; gap: 3px; }
  .day-number { width: 19px; height: 19px; font-size: 9px; margin-bottom: 1px; }
  .calendar-event { font-size: 7px; padding: 1px 3px; border-radius: 3px; }
  .calendar-aside { padding: 18px; border-radius: 12px; }
  .calendar-aside .stack { display: flex; }
  .month-switch { gap: 7px; }
  .month-switch h2 { min-width: 112px; font-size: 14px; }
  .settings-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .settings-card { padding: 21px; border-radius: 14px; }
  .settings-card h2 { font-size: 16px; }
  .settings-card > p { font-size: 11px; }
  .connection-row { gap: 9px; }
  .connection-copy strong { font-size: 11px; }
  .form-grid { gap: 15px; grid-template-columns: minmax(0,1fr); }
  .field.full { grid-column: auto; }
  .form-actions { grid-column: auto; }
  .field input, .field textarea, .field select { font-size: 14px; padding: 12px; }
  .field label { font-size: 11px; }
  .field input[type="datetime-local"] { font-size: 12px; }
  .auth-shell { padding: 25px 17px; }
  .auth-card { padding: 28px 23px; border-radius: 19px; }
  .auth-title { font-size: 25px; }
  .chat-main { min-height: calc(100dvh - 238px); }
  .chat-empty { padding: 25px 0; }
  .chat-empty .brand-mark { width: 52px; height: 52px; border-radius: 16px; margin-bottom: 21px; }
  .chat-empty h1 { font-size: 26px; }
  .chat-empty > p { font-size: 11px; }
  .chat-suggestions { grid-template-columns: minmax(0,1fr); gap: 8px; margin-top: 19px; }
  .chat-suggestions button { padding: 12px 14px; display: flex; align-items: center; gap: 11px; font-size: 10px; }
  .chat-suggestions button svg { display: inline-block; margin: 0; width: 15px; height: 15px; }
  .chat-messages { min-height: 280px; gap: 17px; padding-bottom: 20px; }
  .chat-bubble { max-width: 94%; font-size: 12px; padding: 15px 17px; line-height: 1.85; }
  .chat-composer { bottom: calc(76px + env(safe-area-inset-bottom)); padding: 13px 13px 10px; border-radius: 14px; }
  .composer-input { font-size: 14px; min-height: 52px; }
  .composer-bottom { gap: 9px; }
  .composer-bottom .hint { font-size: 8px; max-width: 170px; line-height: 1.5; }
  .composer-bottom .btn { padding: 8px 10px; min-height: 34px; font-size: 10px; }
  .voice-btn { width: 32px; height: 32px; }
  .mail-layout { display: flex; flex-direction: column; min-height: 450px; border-radius: 14px; }
  .mail-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .mail-list { max-height: 280px; }
  .mail-detail { padding: 21px 18px; }
  .mail-detail > h1, .mail-detail > h2 { font-size: 18px; }
  .mail-body { font-size: 12px; }
  .mail-placeholder { min-height: 280px; padding: 25px 17px; }
  .mail-placeholder h2 { font-size: 17px; }
  .mail-placeholder p { font-size: 11px; }
  .mail-toolbar { padding: 13px; }
  .mail-compose .form-actions { flex-wrap: wrap; }
  .mail-compose .form-actions .btn { font-size: 10px; }
  .modal-backdrop { padding: 15px; align-items: center; }
  .modal { max-height: calc(100dvh - 30px); border-radius: 17px; }
  .modal-header { padding: 19px 20px 17px; }
  .modal-header h2 { font-size: 18px; }
  .modal-body { padding: 21px 20px; }
  .modal-footer { padding: 15px 20px; }
  .modal-footer .btn { font-size: 11px; }
  .toast-container { right: 15px; left: 15px; max-width: none; align-items: stretch; }
  .toast { font-size: 11px; padding: 12px 15px; }
}
@media (max-width: 370px) {
  .topbar { padding-left: 15px; padding-right: 15px; }
  .topbar-right { gap: 6px; }
  .topbar-right .avatar { display: none; }
  .space-switch button { font-size: 8px; padding: 6px 7px; }
  .hero-title { font-size: 28px; }
  .hero-actions .btn { padding-left: 9px; padding-right: 9px; }
  .metric { padding: 13px 11px; gap: 9px; }
  .metric-icon { width: 28px; height: 28px; }
  .metric-label { font-size: 8px; }
  .bottom-nav { padding-left: 4px; padding-right: 4px; }
  .bottom-nav-item { padding-left: 5px; padding-right: 5px; font-size: 8px; }
}
/* Markup-specific refinements */
.brand-word > span { display: block; margin-top: 9px; max-width: 155px; color: #858b92; font-size: 8px; line-height: 1.5; letter-spacing: .01em; font-weight: 400; }
.sidebar > .eyebrow { padding: 0 14px; margin-bottom: 13px; color: #68717c; font-size: 8px; letter-spacing: .17em; }
.nav-ai { margin-left: auto; display: inline-block; padding: 1px 5px; border: 1px solid #d9b87b40; border-radius: 4px; font-size: 8px; color: var(--accent); letter-spacing: .05em; }
.nav-item > .badge { margin-left: auto; padding: 1px 6px; background: #e0b46b13; color: #dec18d; border-color: #dec18d1f; font-size: 9px; }
.nav-item.active:has(> .badge)::after, .nav-item.active:has(> .nav-ai)::after { display: none; }
.sidebar-bottom .account-summary { gap: 9px; }
.account-summary > span:nth-child(2) { min-width: 0; flex: 1; }
.account-summary .icon-btn { width: 25px; height: 25px; border-color: transparent; }
.account-summary .icon-btn svg { width: 14px; height: 14px; }
.sidebar-bottom .version { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 9px; }
.space-switch button { display: inline-flex; align-items: center; gap: 5px; }
.space-switch button svg { width: 12px; height: 12px; }
.main-shell > .banner { margin: 20px 38px 0; }
.main-shell > .banner > span { flex: 1; }
.main-shell > .banner .panel-link { flex-shrink: 0; }
.panel-header .eyebrow { margin-bottom: 6px; font-size: 8px; letter-spacing: .12em; }
.panel-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line-soft); padding: 14px 22px; }
.panel-footer > .muted { font-size: 9px; }
.hero { min-height: 288px; }
.hero-copy { max-width: 68%; }
.hero-title { font-size: clamp(28px,2.6vw,40px); }
.hero-title > span { color: #d9dde2; }
.hero .eyebrow::before { display: none; }
.tiny-spark { color: var(--accent); font-size: 13px; }
.hero-orb { width: 238px; height: 238px; right: 7%; top: 46%; border: 0; background: transparent; box-shadow: none; }
.hero-orb::before, .hero-orb::after { display: none; }
.orb-ring { position: absolute; left: 50%; top: 50%; border: 1px solid #e3be7d19; border-radius: 50%; transform: translate(-50%,-50%); }
.ring-one { width: 138px; height: 138px; border-color: #e3be7d39; }
.ring-two { width: 188px; height: 188px; border-color: #e3be7d20; }
.ring-three { width: 236px; height: 236px; border-color: #e3be7d0d; }
.orb-core { display: grid; place-items: center; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 88px; height: 88px; border-radius: 27px; border: 1px solid #efd29c6b; background: radial-gradient(circle at 32% 22%,#e7c58237,#aa7b3f0c); box-shadow: inset 0 1px 0 #ffdfa51a,0 0 45px #d8b57510; color: #f0d3a2; }
.orb-core svg { width: 44px; height: 44px; stroke-width: 1.15; filter: drop-shadow(0 0 8px #e9c17a24); }
.orb-dot { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #dfbd82; box-shadow: 0 0 12px #dfbd8230; }
.dot-one { left: 24%; top: 21%; }
.dot-two { left: 84%; top: 63%; width: 4px; height: 4px; background: #98afb9; }
.dot-three { left: 23%; top: 83%; width: 3px; height: 3px; background: #a2aa97; }
.orb-caption { position: absolute; width: 180px; left: 50%; top: calc(50% + 85px); transform: translateX(-50%); color: #959da8; font-size: 9px; letter-spacing: .04em; text-align: center; line-height: 1.6; }
.orb-caption strong { color: #c7b18b; font-size: 10px; font-weight: 500; }
.metric { text-align: left; transition: border-color .15s,background .15s; }
.metric:hover { background: #25282e; border-color: #55514a; }
.metric > .metric-value { display: block; min-width: 0; flex: 1; font-weight: 500; }
.metric-label { display: block; line-height: 1.4; letter-spacing: 0; font-weight: 400; }
.metric > svg:last-child { width: 12px; height: 12px; color: #606975; margin-left: auto; }
.metric-icon.amber { color: #dbba82; border-color: #dbba8233; background: #dbba820b; }
.metric-icon.blue { color: #9fbdc7; border-color: #9fbdc733; background: #9fbdc70b; }
.metric-icon.purple { color: #b5abca; border-color: #b5abca33; background: #b5abca0b; }
.metric-icon.sage { color: #aeb9a2; border-color: #aeb9a233; background: #aeb9a20b; }
.task-group { padding: 0 22px; }
.task-group .empty-state { min-height: 230px; }
button.task-title { display: block; width: 100%; background: transparent; padding: 0; text-align: left; }
button.task-title:hover { color: var(--accent-bright); }
.task-row.is-completed .task-title { color: var(--faint); text-decoration: line-through; }
.priority-label { display: inline-flex; align-items: center; gap: 5px; color: #c9a58b; font-size: 9px; }
.agenda-row { width: 100%; background: transparent; padding-left: 22px; padding-right: 22px; text-align: left; }
.agenda-row:hover { background: #ffffff03; }
.agenda-row > svg:last-child { width: 13px; height: 13px; color: #67717c; margin-left: auto; align-self: center; }
.agenda-time { width: 48px; }
.agenda-time strong { font-size: 12px; font-weight: 500; display: block; }
.agenda-time small { display: block; margin-top: 5px; color: #6f7a85; font-size: 8px; }
.agenda-bar.personal { background: #91afb8; }
.agenda-bar.work { background: #c3a675; }
.agenda-details .space-tag { margin-top: 7px; }
.quick-capture { padding-bottom: 8px; }
.quick-capture form { padding: 0 22px 15px; }
.quick-capture textarea { width: 100%; min-height: 83px; resize: vertical; padding: 13px 14px; border: 1px solid #343c46; border-radius: 9px; color: #dce0e4; background: #171b20; font-size: 11px; line-height: 1.7; }
.quick-capture textarea::placeholder { color: #75808d; }
.quick-capture .form-actions { align-items: center; justify-content: flex-end; gap: 8px; padding-top: 10px; }
.quick-capture .form-actions > .muted { margin-right: auto; font-size: 9px; }
.small-companion { padding: 24px; background: radial-gradient(ellipse at 15% 12%,#dcc08d0c,transparent 65%),#1c1f24; }
.small-companion > .metric-icon { margin-bottom: 18px; }
.small-companion h2 { font-size: 21px; font-weight: 500; margin-bottom: 12px; }
.small-companion p { font-size: 11px; line-height: 1.95; color: #949eaa; margin-bottom: 18px; }
.page-content > .sync-status { display: flex; align-items: center; justify-content: flex-end; margin-top: 25px; gap: 7px; font-size: 9px; }
.page-content > .sync-status::before { display: none; }
.page-content > .sync-status svg { width: 12px; height: 12px; color: #859581; }
.note-top, .module-top { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 18px; }
.note-open { display: block; width: 100%; background: transparent; padding: 0; text-align: left; flex: 1; }
.note-open h3 { margin-bottom: 10px; font-size: 15px; color: #dfe2e7; }
.note-open:hover h3 { color: var(--accent-bright); }
.note-open .note-content { font-size: 11px; line-height: 1.85; margin: 0; }
.note-footer > svg { width: 14px; height: 14px; color: #606d7c; }
.module-card .module-top { margin-bottom: 17px; }
.module-card > h3 { margin: 0 0 9px; font-size: 16px; }
.module-card > .note-footer { border-top: 1px solid var(--line-soft); margin-bottom: 13px; padding-top: 11px; }
.module-card > .btn { width: 100%; justify-content: space-between; }
.module-grid + .banner { margin-top: 23px; }
.calendar-panel { border: 0; background: transparent; }
.calendar-aside { padding: 0 0 14px; }
.calendar-aside > .panel-header { padding: 21px 19px 13px; }
.calendar-aside .agenda-row { padding: 13px 18px; }
.calendar-aside .agenda-time { width: 35px; }
.calendar-aside .agenda-details strong { font-size: 11px; }
.calendar-aside .agenda-time strong { font-size: 10px; }
.month-switch h3 { min-width: 120px; font-size: 16px; font-weight: 500; margin: 0; text-transform: capitalize; text-align: center; }
.settings-card > .panel-header { padding: 0 0 20px; align-items: flex-start; }
.settings-card > .panel-header .status-pill { margin-bottom: 0; }
.settings-card > .panel-header > div { min-width: 0; }
.settings-card .panel-header .hint { margin-top: 8px; }
.settings-card > .profile-name { color: #e1e5ea; font-size: 24px; font-weight: 500; margin-bottom: 6px; letter-spacing: -.04em; }
.settings-card.full-card { grid-column: 1/-1; }
.settings-card form > .btn { margin-top: 17px; }
.settings-card form + .hint { margin-top: 15px; }
.redirect-uri { display: block; width: 100%; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 10px; line-height: 1.75; color: #b8bbc2; background: #171b20; padding: 12px; border: 1px solid #343b46; border-radius: 8px; overflow-wrap: anywhere; }
.form-actions.full { grid-column: 1/-1; align-items: center; }
.form-actions.full > .hint { margin-right: auto; }
.chat-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding-bottom: 15px; border-bottom: 1px solid #2e343d; margin-bottom: 12px; }
.chat-top .status-pill { font-size: 9px; }
.chat-message { display: flex; align-items: flex-start; gap: 12px; width: 100%; }
.chat-message.user { justify-content: flex-end; }
.chat-message.user .chat-avatar { order: 2; background: #dac18d13; border-color: #dac18d3b; color: #d6bd8d; }
.chat-avatar { width: 29px; height: 29px; border-radius: 9px; background: #c5b58d13; border: 1px solid #c5b58d2d; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent); font-size: 10px; margin-top: 4px; }
.chat-avatar svg { width: 16px; height: 16px; stroke-width: 1.5; }
.chat-message .chat-bubble { align-self: auto; max-width: calc(90% - 42px); }
.chat-message .chat-bubble.user { background: #c0a77712; color: #e0d9ce; border-color: #c0a77737; }
.chat-message .chat-bubble.assistant { background: #20242a; border-color: #363e49; }
.chat-bubble .chat-author { font-size: 8px; margin-bottom: 7px; color: #83909e; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-actions { display: flex; justify-content: flex-start; gap: 4px; margin-top: 12px; padding-top: 9px; border-top: 1px solid #3b434d; }
.message-actions .icon-btn { border: 0; background: transparent; width: 25px; height: 25px; }
.message-actions .icon-btn svg { width: 14px; height: 14px; }
.chat-empty .assistant-emblem { width: 66px; height: 66px; display: grid; place-items: center; border: 1px solid #d5b7825e; border-radius: 21px; background: radial-gradient(circle at 30% 20%,#e1bf882b,#aa7b3f05); box-shadow: 0 0 70px #e1bf880d; margin-bottom: 25px; color: var(--accent-bright); }
.assistant-emblem svg { width: 34px; height: 34px; stroke-width: 1.25; }
.chat-empty > .eyebrow { margin-bottom: 16px; font-size: 8px; color: #9f9d93; }
.chat-empty h2 { font-size: 32px; font-weight: 500; margin-bottom: 12px; letter-spacing: -.04em; }
.chat-empty > .hint { margin-top: 19px; color: #748190; max-width: 420px; font-size: 10px; }
.chat-suggestions button { display: flex; gap: 10px; align-items: flex-start; }
.chat-suggestions button > span { flex: 1; }
.chat-suggestions button svg { width: 15px; height: 15px; margin: 0; flex-shrink: 0; }
.chat-suggestions button > svg:last-child { width: 12px; height: 12px; color: #606e7b; }
.typing-dots { display: inline-flex; align-items: center; gap: 4px; margin-right: 9px; }
.typing-dots i { display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); animation: typing 1.3s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,60%,100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.mail-toolbar { border: 1px solid var(--line); border-radius: 12px; background: #1c2026; margin-bottom: 18px; }
.mail-toolbar > .field { flex: 0 1 270px; }
.mail-toolbar > .search-box { flex: 1; min-width: 150px; width: auto; }
.mail-layout > .panel { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.mail-layout > .mail-sidebar { border-right: 1px solid var(--line); background: #1a1e24; }
.mail-card-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; min-width: 0; }
.mail-card-top strong { color: #d5dce3; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-card-top small { color: #758191; font-size: 8px; flex-shrink: 0; }
.mail-card .mail-preview { margin: 0; }
.mail-detail-header { padding-bottom: 21px; }
.mail-detail-header .eyebrow { margin-bottom: 14px; font-size: 8px; }
.mail-detail-header h2 { font-size: 22px; margin-bottom: 19px; line-height: 1.5; }
.mail-detail-header p { margin: 4px 0; font-size: 10px; color: #a8b0ba; overflow-wrap: anywhere; }
.mail-detail-header p strong { color: #d5dae1; font-weight: 500; }
.mail-compose > .eyebrow { margin-bottom: 8px; font-size: 8px; }
.mail-compose textarea { width: 100%; min-height: 105px; resize: vertical; background: #171b20; border: 1px solid #414954; border-radius: 9px; padding: 13px; font-size: 12px; line-height: 1.85; color: #dfe3e8; }
.mail-compose textarea::placeholder { color: #6d7b8a; }
.mail-compose > .form-actions { align-items: center; gap: 8px; margin-top: 7px; padding-top: 4px; }
.mail-compose select { border: 1px solid #414954; border-radius: 7px; padding: 8px 9px; background: #171b20; color: #c8d0da; font-size: 10px; margin-right: auto; }
.draft-block { margin-top: 25px; border-top: 1px solid #414954; padding-top: 22px; }
.draft-block > .eyebrow { margin-bottom: 11px; font-size: 8px; color: #c4ad88; }
.draft-block > .hint { margin-top: 12px; }
.mail-manual-entry { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; border-top: 1px solid var(--line); padding: 18px 20px; font-size: 10px; }
.send-summary { background: #171c22; border: 1px solid #37424e; border-radius: 11px; padding: 15px 17px; margin-bottom: 22px; }
.send-summary p { font-size: 11px; color: #abb6c3; margin: 5px 0; overflow-wrap: anywhere; }
.send-summary strong { color: #e0e4ea; font-weight: 550; }
.more-menu { display: flex; flex-direction: column; gap: 6px; }
.more-menu .nav-item { width: 100%; border: 1px solid var(--line); background: #1b2027; padding: 14px; gap: 13px; }
.more-menu .nav-item > svg:last-child { margin-left: auto; width: 13px; height: 13px; color: #69798a; }
.auth-shell { grid-template-columns: minmax(0,440px) minmax(0,340px); align-content: center; justify-content: center; gap: 85px; }
.auth-decoration { position: relative; display: flex; min-height: 390px; align-items: center; justify-content: center; min-width: 0; }
.auth-decoration .hero-orb { position: relative; top: auto; right: auto; transform: none; }
.auth-decoration p { position: absolute; bottom: 0; text-align: center; width: 100%; color: #b0a38c; font-size: 26px; line-height: 1.4; font-weight: 400; letter-spacing: -.03em; }
.auth-card > .eyebrow { font-size: 8px; letter-spacing: .12em; margin-bottom: 17px; }
.auth-card .auth-footer { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 9px; }
.auth-card .auth-footer svg { width: 12px; height: 12px; color: #879482; }
.demo-entry { display: flex; width: 100%; align-items: center; justify-content: center; gap: 6px; margin-top: 23px; font-size: 10px; border-top: 1px solid var(--line); padding-top: 21px; }
.auth-card > .version { display: block; text-align: center; margin-top: 10px; padding-top: 0; font-size: 9px; color: #606d7b; }
.action-proposals { display: flex; flex-direction: column; gap: 9px; margin-top: 19px; padding-top: 16px; border-top: 1px solid #3b434d; }
.proposed-action { display: flex; align-items: center; gap: 13px; padding: 15px 16px; background: #d0ae7110; border: 1px solid #d0ae7135; border-radius: 11px; color: #d9dddf; }
.proposed-action > div { flex: 1; min-width: 0; }
.proposed-action-label { display: flex; gap: 5px; align-items: center; color: #c7ad80; font-size: 8px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 5px; }
.proposed-action-label svg { width: 12px; height: 12px; }
.proposed-action-title { color: #e6e3dc; font-size: 12px; font-weight: 550; line-height: 1.55; overflow-wrap: anywhere; }
.proposed-action-meta { font-size: 10px; color: #929dab; line-height: 1.65; margin-top: 5px; }
.proposed-action .btn { flex-shrink: 0; }
.applied-action { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 9px; border: 1px solid #94ae8238; background: #94ae820b; color: #b2c2a3; font-size: 11px; margin-top: 10px; }
.applied-action svg { width: 15px; height: 15px; }

@media (max-width:1200px) {
  .main-shell > .banner { margin-left: 27px; margin-right: 27px; }
  .hero-orb { width: 210px; height: 210px; right: 3%; }
  .ring-one { width: 128px; height: 128px; }
  .ring-two { width: 174px; height: 174px; }
  .ring-three { width: 214px; height: 214px; }
  .metric { gap: 9px; }
  .metric > svg:last-child { width: 10px; height: 10px; }
  .auth-shell { gap: 40px; padding-left: 35px; padding-right: 35px; }
}
@media (max-width:940px) {
  .auth-shell { grid-template-columns: minmax(0,440px); padding: 35px 25px; }
  .auth-decoration { display: none; }
  .calendar-aside > .agenda-row { padding: 13px 19px; }
}
@media (max-width:600px) {
  .main-shell > .banner { margin: 15px 17px 0; align-items: flex-start; flex-wrap: wrap; }
  .main-shell > .banner > svg { margin-top: 2px; }
  .main-shell > .banner > span { flex-basis: calc(100% - 29px); font-size: 9px; }
  .main-shell > .banner .panel-link { padding-left: 25px; font-size: 9px; margin-top: 1px; }
  .space-switch button svg { width: 10px; height: 10px; }
  .topbar-right > .icon-btn { width: 28px; height: 28px; }
  .top-avatar { display: none; }
  .hero { min-height: 281px; padding: 24px 21px; }
  .hero-title { font-size: 30px; max-width: 250px; }
  .hero-subtitle { max-width: 252px; font-size: 11px; }
  .hero-orb { width: 185px; height: 185px; top: 111px; right: -65px; opacity: .2; }
  .orb-core { width: 65px; height: 65px; border-radius: 20px; }
  .orb-core svg { width: 34px; height: 34px; }
  .orb-caption { display: none; }
  .ring-one { width: 110px; height: 110px; }
  .ring-two { width: 160px; height: 160px; }
  .ring-three { width: 205px; height: 205px; }
  .hero-actions { gap: 7px; }
  .hero-actions .btn { font-size: 9px; padding: 9px 10px; }
  .hero-actions .btn svg { width: 13px; height: 13px; }
  .metric { padding: 14px 12px; gap: 9px; }
  .metric-icon { width: 29px; height: 29px; border-radius: 9px; }
  .metric-value { font-size: 21px; }
  .metric-label { font-size: 8px; white-space: normal; line-height: 1.5; }
  .metric > svg:last-child { display: none; }
  .panel-footer { padding: 13px 18px; gap: 9px; }
  .panel-footer > .muted { max-width: 160px; font-size: 8px; line-height: 1.6; }
  .panel-header .eyebrow { font-size: 7px; letter-spacing: .12em; }
  .task-group { padding: 0 15px; }
  .task-group .empty-state { min-height: 230px; }
  .agenda-row { padding: 15px 18px; gap: 10px; }
  .agenda-time { width: 43px; }
  .agenda-time strong { font-size: 11px; }
  .agenda-time small { font-size: 8px; }
  .agenda-details strong { font-size: 11px; }
  .agenda-details small { font-size: 9px; }
  .quick-capture form { padding: 0 18px 13px; }
  .quick-capture .form-actions { gap: 7px; }
  .quick-capture .form-actions > .muted { font-size: 8px; }
  .quick-capture .btn { font-size: 9px; padding: 7px 9px; }
  .small-companion { padding: 23px 21px; }
  .small-companion h2 { font-size: 20px; }
  .page-content > .sync-status { font-size: 8px; justify-content: flex-start; margin-top: 23px; }
  .calendar-aside > .panel-header { padding: 19px 18px 10px; }
  .calendar-aside .agenda-time { width: 43px; }
  .month-switch { flex-wrap: wrap; gap: 6px; }
  .month-switch h3 { font-size: 14px; min-width: 104px; }
  .section-actions > .panel-link { font-size: 10px; }
  .settings-card > .panel-header { padding-bottom: 18px; }
  .settings-card.full-card { grid-column: auto; }
  .settings-card .panel-header .hint { font-size: 9px; }
  .settings-card .panel-header .status-pill { font-size: 8px; }
  .settings-card > .profile-name { font-size: 22px; }
  .form-actions.full { grid-column: auto; }
  .form-actions.full > .hint { flex-basis: 100%; font-size: 9px; }
  .redirect-uri { font-size: 9px; }
  .chat-top { padding-bottom: 12px; }
  .chat-message { gap: 8px; }
  .chat-avatar { width: 24px; height: 24px; border-radius: 7px; font-size: 9px; }
  .chat-avatar svg { width: 13px; height: 13px; }
  .chat-message .chat-bubble { max-width: calc(100% - 32px); padding: 13px 15px; font-size: 11px; }
  .chat-empty .assistant-emblem { width: 56px; height: 56px; border-radius: 18px; margin-bottom: 22px; }
  .assistant-emblem svg { width: 29px; height: 29px; }
  .chat-empty h2 { font-size: 27px; }
  .chat-empty > .eyebrow { font-size: 7px; }
  .chat-empty > .hint { font-size: 9px; }
  .chat-suggestions button { align-items: center; }
  .chat-suggestions button svg { width: 15px; height: 15px; }
  .mail-toolbar > .field { flex-basis: calc(100% - 45px); }
  .mail-toolbar > .search-box { flex-basis: calc(100% - 45px); min-width: 0; }
  .mail-toolbar > .icon-btn { align-self: flex-end; }
  .mail-layout > .mail-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .mail-detail-header { padding-bottom: 18px; }
  .mail-detail-header h2 { font-size: 19px; margin-bottom: 16px; }
  .mail-detail-header p { font-size: 9px; }
  .mail-compose textarea { font-size: 14px; padding: 12px; }
  .mail-compose .form-actions { gap: 7px; }
  .mail-compose select { font-size: 10px; max-width: 145px; }
  .mail-compose .form-actions .btn { padding: 8px 10px; font-size: 9px; }
  .draft-block { margin-top: 22px; padding-top: 20px; }
  .draft-block .form-actions .btn { font-size: 9px; }
  .send-summary p { font-size: 10px; }
  .auth-shell { padding: 25px 17px; }
  .auth-card .auth-footer { font-size: 8px; align-items: flex-start; }
  .auth-card .auth-footer svg { margin-top: 2px; flex-shrink: 0; }
  .demo-entry { font-size: 9px; }
  .proposed-action { padding: 13px; gap: 9px; flex-wrap: wrap; }
  .proposed-action > div { flex-basis: calc(100% - 22px); }
  .proposed-action .btn { margin-left: auto; font-size: 9px; padding: 7px 10px; }
  .proposed-action-title { font-size: 11px; }
  .proposed-action-meta { font-size: 9px; }
  .applied-action { font-size: 10px; padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}


/* Integration centre — v0.2 */
.field[hidden] { display: none; }
.integration-intro { position: relative; display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px; margin: 0 0 29px; border: 1px solid #e1b67529; border-radius: var(--radius); background: radial-gradient(ellipse at 0 0, #e1b6750d, transparent 65%), var(--surface); overflow: hidden; }
.integration-intro > svg { width: 26px; height: 26px; color: var(--accent); margin-top: 2px; }
.integration-intro > div { min-width: 0; flex: 1; }
.integration-intro .badge, .integration-intro .pill { color: var(--accent-bright); border-color: #e1b67532; background: #e1b6750b; font-size: 9px; letter-spacing: .04em; margin-bottom: 10px; }
.integration-intro h2, .integration-intro h3 { font-size: 19px; font-weight: 550; letter-spacing: -.03em; margin: 0 0 8px; }
.integration-intro p { max-width: 760px; color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0; }
.integration-intro > .btn { align-self: center; flex-shrink: 0; }
.integration-sections { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.integration-sections > section, .integration-sections > div { min-width: 0; }
.integration-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 18px; padding: 0 2px; margin-bottom: 15px; }
.integration-section-head > div { min-width: 0; }
.integration-section-head h2, .integration-section-head h3 { font-size: 17px; font-weight: 550; margin: 0; letter-spacing: -.025em; }
.integration-section-head h2 > .badge, .integration-section-head h3 > .badge { vertical-align: middle; margin: 0 0 2px 8px; color: var(--faint); font-size: 9px; padding: 2px 7px; letter-spacing: 0; }
.integration-section-head p { font-size: 11px; line-height: 1.7; margin: 5px 0 0; color: var(--faint); }
.integration-section-head > .btn { flex-shrink: 0; }
.integration-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: stretch; min-width: 0; }
.integration-card { display: flex; flex-direction: column; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 20px #0000000a; }
.integration-card-head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; margin-bottom: 17px; }
.integration-card-head > svg { width: 23px; height: 23px; color: #cfb58e; padding: 8px; box-sizing: content-box; background: #e1b6750c; border: 1px solid #e1b67521; border-radius: 12px; }
.integration-card-head > div { flex: 1; min-width: 0; }
.integration-card-head .status-pill, .integration-card-head .badge { margin-left: auto; flex-shrink: 0; align-self: flex-start; font-size: 9px; }
.integration-title { display: block; margin: 0; color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: -.025em; line-height: 1.5; overflow-wrap: anywhere; }
.integration-host { display: block; color: var(--faint); font-size: 10px; margin-top: 4px; line-height: 1.7; overflow-wrap: anywhere; word-break: break-word; }
.integration-host a:hover { color: var(--accent-bright); }
.integration-card > p { color: var(--muted); font-size: 11px; line-height: 1.85; margin-bottom: 16px; }
.integration-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; align-items: center; margin: 0 0 16px; color: var(--faint); font-size: 10px; line-height: 1.7; }
.integration-meta > span, .integration-meta > div { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.integration-meta svg { width: 12px; height: 12px; color: #8c939d; }
.integration-meta .space-tag { font-size: 9px; }
.integration-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.integration-actions .btn { min-height: 33px; font-size: 10px; padding: 7px 10px; }
.integration-actions .btn svg { width: 13px; height: 13px; }
.integration-actions .icon-btn { width: 32px; height: 32px; margin-left: auto; }
.integration-card .integration-action-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-soft); min-width: 0; }
.integration-action-row > div { min-width: 0; flex: 1; }
.integration-action-row > span:not(.method-badge) { flex: 1; min-width: 0; color: #d9dce1; font-size: 11px; overflow-wrap: anywhere; }
.integration-action-row strong { display: block; font-size: 11px; font-weight: 550; line-height: 1.6; overflow-wrap: anywhere; }
.integration-action-row small { display: block; color: var(--faint); font-size: 9px; line-height: 1.7; margin-top: 3px; overflow-wrap: anywhere; }
.integration-action-row > .btn { min-height: 30px; font-size: 9px; padding: 6px 9px; flex-shrink: 0; }
.integration-action-row > .icon-btn { width: 29px; height: 29px; }
.method-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 4px 7px; border: 1px solid #b2bac329; border-radius: 5px; background: #b2bac308; color: #b8c1ca; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 8px; font-weight: 650; letter-spacing: .035em; line-height: 1.4; flex-shrink: 0; }
.method-get { color: #a6c5d9; border-color: #91b8d137; background: #91b8d10b; }
.method-post { color: #b3caa5; border-color: #9fbd8a35; background: #9fbd8a0a; }
.method-patch, .method-put { color: #e6c38d; border-color: #d9b16e35; background: #d9b16e0b; }
.method-delete { color: #e0aaa4; border-color: #da9a9235; background: #da9a920a; }
.integration-preview { padding: 18px; margin: 18px 0 0; border: 1px solid var(--line); border-radius: 11px; background: #17191d; min-width: 0; }
.integration-preview > h3, .integration-preview > h4 { margin: 0 0 15px; color: #dfe1e5; font-size: 13px; font-weight: 550; }
.integration-preview dl { display: grid; grid-template-columns: minmax(62px,.3fr) minmax(0,1fr); gap: 10px 15px; margin: 0 0 17px; min-width: 0; font-size: 11px; line-height: 1.7; }
.integration-preview dt { margin: 0; color: var(--faint); }
.integration-preview dd { margin: 0; color: #d1d5dc; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.integration-preview dd > code { font-size: 10px; color: #c6b38f; }
.integration-preview pre, .integration-result pre { max-height: 260px; max-width: 100%; overflow: auto; overscroll-behavior: contain; margin: 12px 0 0; padding: 14px 15px; background: #121417; border: 1px solid var(--line-soft); border-radius: 8px; color: #b7c0ca; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 10px; line-height: 1.85; tab-size: 2; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.integration-preview pre code, .integration-result pre code { font: inherit; color: inherit; }
.integration-preview .form-actions { margin-top: 18px; padding-top: 0; gap: 8px; flex-wrap: wrap; }
.integration-preview .form-actions > .hint { flex: 1 1 180px; }
.integration-result { margin: 17px 0 0; padding: 16px 18px; border: 1px solid #a2c39130; border-radius: 11px; background: #a2c39108; min-width: 0; }
.integration-result > .status-pill { margin-bottom: 11px; }
.integration-result.error { border-color: #e7a19a40; background: #e7a19a08; }
.integration-summary { display: flex; align-items: flex-start; gap: 9px; color: #b9c9af; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.integration-summary > svg { width: 16px; height: 16px; margin-top: 2px; }
.integration-summary > div { min-width: 0; }
.integration-summary strong { font-weight: 600; color: #d3ddcd; }
.integration-summary p { margin: 3px 0 0; color: #9da995; font-size: 10px; line-height: 1.8; }
.integration-result.error .integration-summary, .integration-result.error .integration-summary strong { color: var(--danger); }
.integration-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 200px; padding: 30px 24px; text-align: center; border: 1px dashed #42464e; border-radius: 15px; background: #ffffff01; }
.integration-empty > svg { width: 26px; height: 26px; margin-bottom: 2px; color: #a28d6a; }
.integration-empty h3, .integration-empty strong { font-size: 14px; font-weight: 500; margin: 0; color: #c4c9d0; }
.integration-empty p { max-width: 420px; margin: 0; color: var(--faint); font-size: 11px; line-height: 1.8; }
.integration-empty .btn { margin-top: 6px; }
.integration-risk { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 12px 14px; margin: 15px 0 0; border: 1px solid #e1b67535; border-radius: 9px; background: #e1b6750a; color: #d2b98e; font-size: 10px; line-height: 1.8; }
.integration-risk > svg { width: 15px; height: 15px; margin-top: 2px; flex-shrink: 0; }
.integration-risk > div, .integration-risk > span { min-width: 0; }
.integration-risk p { margin: 0; }
.integration-risk strong { color: #e0c598; font-weight: 600; }
.integration-risk.danger { border-color: #e7a19a3b; background: #e7a19a08; color: #d8a7a1; }
.integration-risk.danger strong { color: #edbbb5; }

@media (max-width:1100px) {
  .integration-card { padding: 19px; }
  .integration-card-head { flex-wrap: wrap; gap: 10px; }
  .integration-card-head > div { flex-basis: calc(100% - 52px); }
  .integration-card-head > .status-pill { margin-left: 0; }
}
@media (max-width:760px) {
  .integration-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .integration-intro { padding: 20px; flex-wrap: wrap; }
  .integration-intro > div { flex-basis: calc(100% - 42px); }
  .integration-intro > .btn { margin-left: 42px; }
  .integration-card-head { flex-wrap: nowrap; }
  .integration-card-head > div { flex-basis: auto; }
  .integration-card-head > .status-pill { margin-left: auto; }
}
@media (max-width:600px) {
  .integration-intro { gap: 12px; padding: 19px 18px; margin-bottom: 24px; }
  .integration-intro > svg { width: 22px; height: 22px; }
  .integration-intro > div { flex-basis: calc(100% - 34px); }
  .integration-intro > .btn { margin-left: 34px; }
  .integration-intro h2, .integration-intro h3 { font-size: 17px; }
  .integration-intro p { font-size: 11px; }
  .integration-sections { gap: 28px; }
  .integration-section-head { margin-bottom: 13px; gap: 11px; }
  .integration-section-head h2, .integration-section-head h3 { font-size: 16px; }
  .integration-section-head p { font-size: 10px; }
  .integration-section-head .btn { font-size: 10px; padding: 8px 10px; min-height: 34px; }
  .integration-card { padding: 18px; border-radius: 13px; }
  .integration-card-head { gap: 10px; margin-bottom: 15px; }
  .integration-card-head > svg { width: 19px; height: 19px; padding: 7px; border-radius: 10px; }
  .integration-card-head .status-pill, .integration-card-head .badge { font-size: 8px; padding: 3px 6px; }
  .integration-title { font-size: 14px; }
  .integration-host { font-size: 10px; }
  .integration-meta { gap: 6px 12px; font-size: 9px; }
  .integration-card .integration-action-row { gap: 8px; }
  .integration-action-row strong { font-size: 10px; }
  .integration-action-row > span:not(.method-badge) { font-size: 10px; }
  .integration-action-row small { font-size: 9px; }
  .integration-action-row > .btn { padding: 6px 7px; font-size: 9px; }
  .method-badge { min-width: 43px; padding: 4px 5px; font-size: 7px; }
  .integration-preview { padding: 15px; }
  .integration-preview dl { grid-template-columns: 55px minmax(0,1fr); gap: 9px 11px; font-size: 10px; }
  .integration-preview dd > code { font-size: 9px; }
  .integration-preview pre, .integration-result pre { padding: 12px; font-size: 9px; }
  .integration-preview .form-actions .btn { font-size: 10px; }
  .integration-result { padding: 14px; }
  .integration-summary { font-size: 10px; }
  .integration-empty { padding: 27px 20px; min-height: 190px; }
  .integration-empty p { font-size: 10px; }
  .integration-risk { padding: 11px 12px; font-size: 10px; }
}


/* Integration centre — final markup alignment */
.integration-intro { align-items: center; }
.integration-intro > .status-pill { align-self: flex-start; margin-top: 2px; padding: 5px 9px; background: #e1b6750b; border-color: #e1b67532; color: var(--accent-bright); font-size: 9px; flex-shrink: 0; }
.integration-intro > p { flex: 1; min-width: 0; max-width: none; }
.integration-card-head { align-items: center; flex-wrap: nowrap; }
.integration-card-head > .module-mark { width: 39px; height: 39px; border-radius: 11px; flex-shrink: 0; }
.integration-card-head > .module-mark svg { width: 19px; height: 19px; }
.integration-card-head > .status-pill { margin-left: auto; align-self: center; }
.integration-title + p, .integration-host + p { margin-top: 10px; }
.integration-action-list { display: flex; flex-direction: column; min-width: 0; margin: 0 0 15px; }
.integration-action-list > .hint { padding: 11px 0 0; border-top: 1px solid var(--line-soft); }
.integration-action-list > .integration-action-row:last-child { padding-bottom: 0; }
.integration-action-name { min-width: 0; flex: 1; }
.integration-actions > .icon-btn { margin-left: 0; }
.integration-actions > .btn + .icon-btn { margin-left: auto; }
.integration-summary { flex-direction: column; align-items: flex-start; gap: 5px; margin-bottom: 18px; }
.integration-summary > strong { display: block; max-width: 100%; color: var(--text); font-size: 13px; font-weight: 550; line-height: 1.6; overflow-wrap: anywhere; }
.integration-summary > span:not(.status-pill) { display: block; max-width: 100%; color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 0; overflow-wrap: anywhere; word-break: break-word; }
.integration-summary > .status-pill { max-width: 100%; margin-top: 2px; white-space: normal; line-height: 1.6; }
.integration-preview > label { display: block; color: #c3c8cf; font-size: 11px; line-height: 1.7; margin-top: 17px; }
.integration-preview dd pre { margin-top: 0; }
.integration-preview dl:last-child { margin-bottom: 0; }
.integration-result > .hint + pre { margin-top: 10px; }
.integration-empty + .integration-empty { margin-top: 14px; }
.integration-grid + .integration-empty { margin-top: 16px; }
.integration-history-row { display: flex; align-items: flex-start; gap: 14px; min-width: 0; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.integration-history-row:last-child { border-bottom: 0; }
.integration-history-row > .method-badge { margin-top: 3px; }
.integration-history-row > div { flex: 1; min-width: 0; }
.integration-history-row strong { display: block; color: #dce0e5; font-size: 12px; line-height: 1.6; font-weight: 550; overflow-wrap: anywhere; }
.integration-history-row small { display: block; color: var(--faint); font-size: 10px; line-height: 1.75; margin-top: 3px; overflow-wrap: anywhere; }
.integration-history-row p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; overflow-wrap: anywhere; }
.integration-history-row > .status-pill { align-self: center; flex-shrink: 0; margin-left: auto; font-size: 9px; }
.field label.checkbox-label, label.checkbox-label { display: flex; align-items: flex-start; justify-content: flex-start; gap: 9px; min-height: 27px; margin: 0; color: #c3c8cf; font-size: 11px; font-weight: 450; line-height: 1.7; cursor: pointer; }
.field label.checkbox-label + label.checkbox-label { margin-top: 2px; }
.field .checkbox-label input[type="checkbox"], .checkbox-label input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; flex: 0 0 16px; margin: 2px 0 0; padding: 0; border-radius: 3px; accent-color: var(--accent); }
.checkbox-label input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: none; }
@media (max-width:600px) {
  .integration-intro { align-items: flex-start; flex-direction: column; gap: 11px; }
  .integration-intro > .status-pill { margin-top: 0; }
  .integration-intro > p { flex-basis: auto; width: 100%; }
  .integration-card-head { flex-wrap: nowrap; }
  .integration-card-head > .module-mark { width: 35px; height: 35px; border-radius: 10px; }
  .integration-card-head > .module-mark svg { width: 17px; height: 17px; }
  .integration-card-head > .status-pill { margin-left: auto; }
  .integration-action-list { margin-bottom: 14px; }
  .integration-actions > .btn { white-space: normal; text-align: left; }
  .integration-summary { gap: 4px; margin-bottom: 16px; }
  .integration-summary > strong { font-size: 12px; }
  .integration-summary > span:not(.status-pill) { font-size: 10px; }
  .integration-history-row { flex-wrap: wrap; gap: 7px 11px; padding: 16px 18px; }
  .integration-history-row > div { flex-basis: calc(100% - 54px); }
  .integration-history-row strong { font-size: 11px; }
  .integration-history-row small { font-size: 9px; }
  .integration-history-row p { font-size: 10px; margin-top: 5px; }
  .integration-history-row > .status-pill { margin-left: 54px; margin-top: 3px; font-size: 8px; }
  .field label.checkbox-label, label.checkbox-label { min-height: 32px; font-size: 11px; }
}

/* Mum's explicit, persistent AI voice player. */
.mum-voice-player { position: fixed; right: 28px; bottom: 24px; z-index: 75; width: min(420px,calc(100vw - 32px)); max-height: calc(100dvh - 72px); overflow-y: auto; padding: 17px 18px 15px; border: 1px solid #b697635c; border-radius: 16px; background: #23252a; color: var(--text); box-shadow: 0 12px 50px #0008, 0 0 0 1px #ffffff04 inset; }
.mum-voice-player[hidden], .mum-voice-player [hidden] { display: none; }
.mum-voice-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mum-voice-heading > div { min-width: 0; flex: 1; }
.mum-voice-heading strong { display: block; color: #e8e0d2; font-size: 13px; font-weight: 550; line-height: 1.55; letter-spacing: -.015em; }
.mum-voice-heading small { display: block; color: #aca499; font-size: 10px; line-height: 1.7; }
.mum-voice-heading > .icon-btn { width: 38px; height: 38px; border-color: #b697633b; color: #d9c8aa; background: #d6b57b08; }
.mum-voice-heading > .icon-btn:hover { background: #d6b57b15; color: #f0d6aa; }
.mum-voice-heading > .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mum-voice-emblem { position: relative; display: inline-grid; place-items: center; width: 37px; height: 37px; flex: 0 0 37px; border: 1px solid #c4a36d40; border-radius: 11px; background: #d6b57b0c; color: var(--accent); }
.mum-voice-emblem svg { width: 19px; height: 19px; }
.mum-voice-emblem.loading svg, .mum-voice-player.loading .mum-voice-emblem svg { opacity: 0; }
.mum-voice-emblem.loading::after, .mum-voice-player.loading .mum-voice-emblem::after { content: ''; position: absolute; width: 17px; height: 17px; border: 2px solid #d6b57b35; border-top-color: #e0bd83; border-radius: 50%; animation: mum-voice-spin .9s linear infinite; }
.mum-voice-status { margin: 12px 0 9px; color: #c4c9d0; font-size: 11px; line-height: 1.75; overflow-wrap: anywhere; }
.mum-voice-audio { display: block; width: 100%; max-width: 100%; height: 44px; margin: 0; border-radius: 10px; color-scheme: dark; }
.mum-voice-audio:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mum-voice-hint { margin: 10px 0 0; color: #a5a8ae; font-size: 10px; line-height: 1.75; overflow-wrap: anywhere; }
.voice-settings-card .voice-description { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0 0 16px; }
.voice-settings-card .voice-settings-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 17px 0 12px; }
.voice-settings-card .voice-settings-actions > .btn { min-height: 38px; }
.voice-settings-card .voice-settings-actions > .btn:disabled { opacity: .48; cursor: not-allowed; }
.voice-settings-card .voice-settings-actions + .hint { margin-top: 0; }
@keyframes mum-voice-spin { to { transform: rotate(360deg); } }
@media (max-width:940px) {
  .mum-voice-player { left: 16px; right: 16px; bottom: calc(78px + env(safe-area-inset-bottom)); width: auto; max-width: 420px; margin-left: auto; max-height: calc(100dvh - 106px - env(safe-area-inset-bottom)); }
}
@media (max-width:600px) {
  .mum-voice-player { padding: 15px 16px 13px; border-radius: 14px; }
  .mum-voice-heading { gap: 9px; }
  .mum-voice-heading strong { font-size: 12px; }
  .mum-voice-heading small { font-size: 9px; }
  .mum-voice-heading > .icon-btn { width: 40px; height: 40px; }
  .mum-voice-status { font-size: 11px; margin-top: 11px; }
  .mum-voice-hint { font-size: 10px; }
  .voice-settings-card .voice-description { font-size: 11px; }
  .voice-settings-card .voice-settings-actions > .btn { min-height: 40px; }
}
@media (prefers-reduced-motion:reduce) {
  .mum-voice-emblem.loading::after, .mum-voice-player.loading .mum-voice-emblem::after { animation: none; }
}

/* En courses in Mum */
.courses-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px;align-items:start}.courses-items{max-height:620px;overflow:auto;margin:12px 0}.courses-ai-choice{display:flex;align-items:start;gap:10px;font-size:14px;line-height:1.5;margin-top:20px}.courses-ai-choice input{margin-top:4px;accent-color:var(--amber,#e8b475)}.courses-status{padding:12px 14px;border:1px solid #665139;border-radius:12px;line-height:1.5}.courses-layout .panel-header{flex-wrap:wrap;gap:12px}@media(max-width:960px){.courses-layout{grid-template-columns:1fr}}
