:root {
  color-scheme: light;
  --ink: #202225;
  --muted: #6f7378;
  --soft: #9a9da2;
  --paper: #f4f4f3;
  --surface: #ffffff;
  --surface-2: #eeeeed;
  --surface-3: #e3e4e4;
  --line: #dedfdf;
  --brand: #4a4d50;
  --brand-deep: #292c2f;
  --brand-soft: #e8e9ea;
  --gold: #b98a3d;
  --gold-soft: #f5ead8;
  --red: #ba4d52;
  --red-soft: #f9e7e7;
  --blue: #426c99;
  --blue-soft: #e7eef7;
  --shadow: 0 12px 34px rgba(29, 31, 33, .08);
  --shadow-soft: 0 3px 12px rgba(29, 31, 33, .06);
  --radius: 17px;
  --radius-sm: 11px;
  --sidebar: 254px;
  --sidebar-compact: 76px;
  --topbar: 76px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2f3f3;
  --muted: #aaadb0;
  --soft: #7c8084;
  --paper: #17191b;
  --surface: #1f2225;
  --surface-2: #262a2d;
  --surface-3: #303438;
  --line: #383d42;
  --brand: #c3c6c8;
  --brand-deep: #e1e3e4;
  --brand-soft: #303438;
  --gold: #d2a85f;
  --gold-soft: #3b3020;
  --red: #ee8387;
  --red-soft: #3f2728;
  --blue: #88acd3;
  --blue-soft: #213347;
  --shadow: 0 14px 36px rgba(0, 0, 0, .2);
  --shadow-soft: 0 3px 14px rgba(0, 0, 0, .18);
}

* { box-sizing: border-box; }
*[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(430px, .95fr) minmax(520px, 1.05fr); background: var(--surface); }
.auth-visual { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 40px 52px; background: #24272b; color: #f5f5f4; }
.auth-visual::before { content: ""; position: absolute; right: -240px; bottom: -220px; width: 720px; height: 720px; border: 1px solid rgba(224,197,143,.15); border-radius: 50%; }
.auth-visual::after { content: ""; position: absolute; right: -95px; bottom: -80px; width: 440px; height: 440px; border: 1px solid rgba(224,197,143,.11); border-radius: 50%; }
.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; width: fit-content; }
.auth-brand > span:last-child { display: grid; }
.auth-brand strong { font-family: "Playfair Display", serif; font-size: 20px; }
.auth-brand small { margin-top: 3px; color: #b8bbbe; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.auth-visual-copy { position: relative; z-index: 1; max-width: 600px; margin: auto 0; padding: 70px 0; }
.auth-visual-copy .eyebrow { color: #d7b976; }
.auth-visual-copy h1 { margin: 12px 0 17px; font-family: "Playfair Display", serif; font-size: clamp(41px, 5vw, 70px); font-weight: 600; line-height: 1.02; letter-spacing: -.035em; }
.auth-visual-copy > p:last-child { max-width: 520px; margin: 0; color: #c7c9cc; font-size: 15px; line-height: 1.7; }
.auth-security { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; color: #b4b7ba; font-size: 10px; }
.auth-security::before { content: ""; display: block; width: 7px; height: 7px; border-radius: 50%; background: #d2b46f; box-shadow: 0 0 0 5px rgba(210,180,111,.1); }
.auth-panel { display: grid; min-height: 100vh; place-items: center; align-content: center; padding: 48px; background: var(--paper); }
.auth-card { width: min(430px, 100%); padding: 36px 38px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 34px; }
.auth-mobile-brand .brand-mark { width: 34px; height: 42px; background: transparent; }
.auth-mobile-brand strong { font-family: "Playfair Display", serif; }
.auth-view h2 { margin: 6px 0 7px; font-family: "Playfair Display", serif; font-size: 32px; line-height: 1.15; }
.auth-subtitle { margin: 0 0 25px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-form { display: grid; gap: 16px; }
.auth-form .field input { min-height: 46px; background: var(--surface-2); }
.password-field { position: relative; }
.password-field input { padding-right: 47px; }
.password-field button { position: absolute; top: 50%; right: 7px; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transform: translateY(-50%); }
.password-field button:hover { background: var(--surface-3); color: var(--ink); }
.password-field svg { width: 16px; }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 13px; color: var(--muted); font-size: 10px; }
.check-option { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.check-option input { width: 15px; height: 15px; accent-color: var(--brand); }
.auth-submit { width: 100%; min-height: 47px; margin-top: 3px; }
.auth-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-links button, .back-link { padding: 0; border: 0; background: transparent; color: var(--brand); cursor: pointer; font-size: 10px; font-weight: 600; }
.auth-links button:hover, .back-link:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 26px; color: var(--muted); }
.back-link svg { width: 14px; }
.auth-message { padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--red) 30%, var(--line)); border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 10px; line-height: 1.5; }
.auth-message.success { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); background: var(--brand-soft); color: var(--brand); }
.password-rules { margin: -3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.change-password-logout { margin: 22px auto 0; }
.auth-footnote { margin: 20px 0 0; color: var(--soft); font-size: 9px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  overflow-y: auto;
  background: #222529;
  color: #dedfe1;
  border-right: 1px solid rgba(255,255,255,.04);
  transition: width .25s ease, transform .25s ease;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--topbar);
  padding: 0 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(236,213,174,.55);
  border-radius: 11px;
  color: #f0d9ad;
  font-family: "Playfair Display", serif;
  font-size: 15px;
  letter-spacing: -.04em;
}
.brand-logo-mark { position: relative; overflow: hidden; flex: 0 0 auto; border: 0; border-radius: 0; color: transparent; }
.brand-logo-mark img { position: absolute; top: 0; left: 50%; display: block; width: auto; max-width: none; height: 58px; transform: translateX(-50%); }
.brand > .brand-logo-mark { width: 46px; height: 44px; }
.auth-brand .brand-logo-mark { width: 50px; height: 62px; }
.auth-brand .brand-logo-mark img { height: 82px; }
.auth-mobile-brand .brand-logo-mark img { height: 56px; }
.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-family: "Playfair Display", serif; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.brand-copy small { margin-top: 4px; color: #9da0a4; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.main-nav { flex: 1; padding: 17px 12px; }
.nav-label { margin: 19px 11px 7px; color: #7e8286; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav-label:first-child { margin-top: 2px; }
.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 12px;
  margin: 2px 0;
  padding: 0 11px;
  border-radius: 10px;
  color: #aeb1b4;
  font-size: 13px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.055); transform: translateX(2px); }
.main-nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.main-nav a.active .nav-icon { color: #dfc28d; }
.nav-icon { display: grid; width: 20px; flex: 0 0 20px; place-items: center; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-badge, .ai-pill { margin-left: auto; border-radius: 20px; padding: 2px 7px; background: rgba(255,255,255,.1); color: #dedfe1; font-size: 10px; font-weight: 700; }
.nav-badge.alert { background: #8e4545; color: #fff; }
.ai-pill { background: #7b6538; color: #f5dfb4; letter-spacing: .05em; }
.sidebar-footer { padding: 18px; border-top: 1px solid rgba(255,255,255,.08); }
.storage-line { display: flex; justify-content: space-between; color: #8f9397; font-size: 10px; }
.storage-line strong { color: #c6c8ca; }
.progress { height: 4px; margin: 8px 0 19px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.08); }
.progress span { display: block; height: 100%; border-radius: inherit; background: #c7a86c; }
.profile-mini { display: grid; grid-template-columns: 36px 1fr 28px; align-items: center; gap: 10px; }
.profile-mini > span:not(.avatar) { display: grid; min-width: 0; }
.profile-mini strong { overflow: hidden; color: #ececed; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.profile-mini small { margin-top: 2px; color: #85898d; font-size: 9px; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #cfb173; color: #292c2f; font-size: 10px; font-weight: 700; }

.app-main { min-height: 100vh; margin-left: var(--sidebar); transition: margin-left .25s ease; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: var(--topbar);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.global-search { position: relative; display: flex; width: min(560px, 56vw); align-items: center; gap: 10px; }
.global-search > svg { position: absolute; left: 14px; color: var(--soft); width: 17px; }
.global-search input {
  width: 100%;
  height: 42px;
  padding: 0 72px 0 42px;
  outline: none;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  transition: border .18s, background .18s, box-shadow .18s;
}
.global-search input:focus { background: var(--surface); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 0 0 3px var(--brand-soft); }
.global-search input::placeholder { color: var(--soft); }
.global-search kbd { position: absolute; right: 11px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--soft); font-family: inherit; font-size: 9px; }
.search-results { position: absolute; top: 49px; left: 0; right: 0; z-index: 60; overflow: hidden; padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
.search-result { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 9px; border-radius: 9px; cursor: pointer; }
.search-result:hover { background: var(--surface-2); }
.search-result-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.search-result-icon svg { width: 16px; }
.search-result strong { display: block; font-size: 12px; }
.search-result small { color: var(--muted); font-size: 10px; }
.search-result > small { padding: 3px 7px; border-radius: 20px; background: var(--surface-2); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { position: relative; display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; transition: background .16s, transform .16s, border .16s; }
.icon-button:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-button.subtle { width: 28px; height: 28px; color: #85898d; border: 0; background: transparent; }
.icon-button.subtle svg { width: 15px; }
.notification-button i { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 2px solid var(--surface); border-radius: 50%; background: var(--red); }
.mobile-menu { display: none; }
.sidebar-toggle { flex: 0 0 auto; }

@media (min-width: 901px) {
  body.sidebar-collapsed .sidebar { width: var(--sidebar-compact); overflow-x: hidden; }
  body.sidebar-collapsed .app-main { margin-left: var(--sidebar-compact); }
  body.sidebar-collapsed .loading-line { left: var(--sidebar-compact); }
  body.sidebar-collapsed .brand { justify-content: center; gap: 0; padding: 0; }
  body.sidebar-collapsed .brand-copy,
  body.sidebar-collapsed .nav-label,
  body.sidebar-collapsed .main-nav a > span:not(.nav-icon):not(.nav-badge),
  body.sidebar-collapsed .storage-line,
  body.sidebar-collapsed .sidebar-footer > .progress,
  body.sidebar-collapsed .profile-mini > span:not(.avatar) { display: none; }
  body.sidebar-collapsed .main-nav { padding: 14px 10px; }
  body.sidebar-collapsed .main-nav a { width: 52px; min-height: 46px; justify-content: center; gap: 0; margin: 3px 0; padding: 0; }
  body.sidebar-collapsed .main-nav a:hover { transform: none; }
  body.sidebar-collapsed .nav-icon { width: 22px; flex-basis: 22px; }
  body.sidebar-collapsed .nav-badge { position: absolute; top: 3px; right: 2px; min-width: 17px; padding: 1px 5px; text-align: center; }
  body.sidebar-collapsed .sidebar-footer { padding: 11px 10px 14px; }
  body.sidebar-collapsed .profile-mini { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 7px; }
  body.sidebar-collapsed .profile-mini .avatar { width: 34px; height: 34px; }
  body.sidebar-collapsed .profile-mini .icon-button { display: grid; }
}
.primary-button, .secondary-button, .ghost-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: transform .16s, box-shadow .16s, background .16s;
}
.primary-button { border: 1px solid var(--brand-deep); background: var(--brand-deep); color: var(--surface); box-shadow: 0 6px 15px color-mix(in srgb, var(--brand-deep) 18%, transparent); }
html[data-theme="dark"] .primary-button { color: #202225; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 8px 19px color-mix(in srgb, var(--brand-deep) 24%, transparent); }
.primary-button:disabled, .secondary-button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.primary-button.compact { min-height: 40px; }
.primary-button svg, .secondary-button svg, .ghost-button svg { width: 16px; height: 16px; }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.secondary-button:hover { background: var(--surface-2); }
.ghost-button { min-height: 36px; padding: 0 11px; border: 0; background: transparent; color: var(--brand); }
.ghost-button:hover { background: var(--brand-soft); }
.button-danger { color: var(--red); }

.page { max-width: 1560px; margin: 0 auto; padding: 34px 36px 64px; outline: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.page-head h1 { margin: 3px 0 5px; font-family: "Playfair Display", serif; font-size: clamp(28px, 3vw, 38px); line-height: 1.15; letter-spacing: -.025em; }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow { margin: 0; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.hero-card {
  position: relative;
  display: grid;
  min-height: 218px;
  grid-template-columns: 1.25fr .85fr;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 32px 35px;
  border-radius: 21px;
  background: #292c30;
  color: #f6f6f5;
  box-shadow: var(--shadow);
}
.hero-card::before { content: ""; position: absolute; top: -130px; right: -40px; width: 430px; height: 430px; border: 1px solid rgba(239,220,182,.14); border-radius: 50%; }
.hero-card::after { content: ""; position: absolute; top: -65px; right: 75px; width: 290px; height: 290px; border: 1px solid rgba(239,220,182,.1); border-radius: 50%; }
.hero-copy { position: relative; z-index: 2; min-width: 0; align-self: center; }
.hero-copy .eyebrow { color: #d3b778; }
.hero-copy h2 { max-width: 590px; margin: 8px 0 10px; font-family: "Playfair Display", serif; font-size: clamp(25px, 3.2vw, 38px); font-weight: 600; line-height: 1.15; }
.hero-copy p { max-width: 500px; margin: 0; overflow-wrap: anywhere; color: #c8cacc; line-height: 1.6; }
.hero-stats { position: relative; z-index: 2; display: grid; min-width: 0; align-content: center; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hero-stat { min-height: 76px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.06); backdrop-filter: blur(5px); }
.hero-stat strong { display: block; margin-bottom: 4px; color: #f5deb0; font-family: "Playfair Display", serif; font-size: 24px; }
.hero-stat span { color: #b7b9bc; font-size: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { position: relative; overflow: hidden; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.stat-icon.gold { background: var(--gold-soft); color: var(--gold); }
.stat-icon.red { background: var(--red-soft); color: var(--red); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon svg { width: 17px; }
.trend { display: inline-flex; align-items: center; gap: 3px; color: var(--brand); font-size: 10px; font-weight: 700; }
.trend.down { color: var(--red); }
.trend svg { width: 12px; }
.stat-card strong.value { display: block; margin: 15px 0 3px; font-family: "Playfair Display", serif; font-size: 29px; line-height: 1; }
.stat-card > span { color: var(--muted); font-size: 11px; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 18px; margin-bottom: 20px; }
.content-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.panel.pad { padding: 21px; }
.panel-head { display: flex; flex-wrap: wrap; min-height: 63px; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 15px 19px; border-bottom: 1px solid var(--line); }
.panel-head > div { min-width: 0; max-width: 100%; }
.panel-head h2 { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.panel-head p { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.panel-body { padding: 17px 19px; }
.section-title { margin: 0; font-size: 14px; }

.task-list { display: grid; }
.task-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; min-height: 67px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-item:last-child { border-bottom: 0; }
.task-check { display: grid; width: 20px; height: 20px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: transparent; cursor: pointer; }
.task-check:hover { border-color: var(--brand); }
.task-check.done { border-color: var(--brand); background: var(--brand); color: white; }
.task-check svg { width: 12px; }
.task-copy strong { display: block; font-size: 12px; }
.task-copy span { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.task-copy span svg { width: 12px; }
.task-item.completed .task-copy strong { color: var(--soft); text-decoration: line-through; }
.date-pill { padding: 5px 8px; border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 9px; white-space: nowrap; }
.date-pill.today { background: var(--gold-soft); color: var(--gold); }
.date-pill.late { background: var(--red-soft); color: var(--red); }

.agenda-strip { display: grid; gap: 11px; }
.agenda-item { display: grid; grid-template-columns: 47px 4px 1fr; gap: 12px; align-items: center; }
.agenda-time { color: var(--muted); font-size: 10px; text-align: right; }
.agenda-line { width: 4px; height: 45px; border-radius: 4px; background: var(--brand); }
.agenda-line.gold { background: var(--gold); }
.agenda-line.red { background: var(--red); }
.agenda-copy strong { display: block; font-size: 11px; }
.agenda-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }

.activity-chart { position: relative; height: 185px; padding: 5px 0 0; }
.chart-bars { position: absolute; inset: 8px 4px 27px 4px; display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 38px, var(--line) 39px); }
.bar-group { display: flex; height: 100%; align-items: flex-end; gap: 4px; }
.bar { width: 9px; min-height: 4px; border-radius: 5px 5px 0 0; background: var(--brand); transition: height .6s ease; }
.bar.alt { background: #c8aa70; }
.chart-labels { position: absolute; inset: auto 0 0; display: flex; justify-content: space-around; color: var(--muted); font-size: 9px; }
.legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 9px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.legend i.alt { background: #c8aa70; }

.segmented { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-2); }
.segmented button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-soft); }
.filter-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 17px; }
.filter-search { position: relative; flex: 1; min-width: 210px; }
.filter-search svg { position: absolute; top: 50%; left: 12px; width: 15px; color: var(--soft); transform: translateY(-50%); }
.filter-search input, .field input, .field select, .field textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  outline: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.filter-search input { padding-left: 37px; }
.filter-search input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: 0 0 0 3px var(--brand-soft); }
.select-control { min-height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 11px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 20px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 600; white-space: nowrap; }
.chip.green { background: var(--brand-soft); color: var(--brand); }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 13px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 13px; border-bottom: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 65%, transparent); }
.table-primary { display: block; max-width: 300px; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.table-secondary { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.row-actions { display: flex; justify-content: flex-end; gap: 3px; }
.row-actions .icon-button { width: 31px; height: 31px; border-color: transparent; background: transparent; }
.row-actions .icon-button:hover { border-color: var(--line); background: var(--surface); }
.favorite { color: var(--gold); }
.table-wrap { overflow-x: auto; }
.process-history-menu { position: relative; }
.process-history-menu > summary { display: inline-flex; min-height: 31px; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; font-weight: 700; list-style: none; white-space: nowrap; }
.process-history-menu > summary::-webkit-details-marker { display: none; }
.process-history-menu > summary svg { width: 12px; }
.process-history-menu > summary svg:last-child { width: 10px; transition: transform .18s ease; }
.process-history-menu > summary:hover, .process-history-menu[open] > summary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.process-history-menu[open] > summary svg:last-child { transform: rotate(90deg); }
.process-history-menu-list { position: absolute; z-index: 12; top: calc(100% + 5px); right: 0; display: grid; width: 205px; overflow: hidden; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.process-history-menu-list button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.process-history-menu-list button:hover { background: var(--surface-2); }
.process-history-menu-list button > svg { width: 14px; flex: 0 0 auto; color: var(--brand); }
.process-history-menu-list button > span { display: grid; gap: 2px; }
.process-history-menu-list strong { font-size: 9px; }
.process-history-menu-list small { color: var(--muted); font-size: 7px; }
.table-wrap:has(.process-history-menu[open]) { padding-bottom: 88px; }

.process-filter-row .filter-search { min-width: 290px; }
.process-filter-row .select-control { max-width: 230px; }
.process-table-summary { margin: -5px 0 11px; color: var(--muted); font-size: 9px; }
.process-table { min-width: 1180px; }
.process-table th:first-child, .process-table td:first-child { width: 29%; }
.process-table th:nth-child(2), .process-table td:nth-child(2) { width: 13%; }
.process-table th:nth-child(3), .process-table td:nth-child(3) { width: 20%; }
.process-table th:nth-child(4), .process-table td:nth-child(4) { width: 18%; }
.process-table th:last-child, .process-table td:last-child { min-width: 185px; }
.process-title-button { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.process-title-button:hover .table-primary { color: var(--brand); }
.process-parties-cell .table-primary { display: -webkit-box; max-width: 390px; line-height: 1.4; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.process-parties-cell .table-secondary { max-width: 390px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.process-parties-cell .table-secondary b { color: var(--ink); font-size: 8px; }
.process-number { max-width: 185px; overflow-wrap: anywhere; white-space: normal; }
.process-owner-list { display: flex; max-width: 260px; flex-wrap: wrap; gap: 5px; }
.process-owner-chip { display: inline-flex; max-width: 220px; overflow: hidden; padding: 5px 8px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 8px; font-weight: 650; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.process-row-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.process-row-tags .chip { padding: 3px 7px; font-size: 8px; }
.process-responsible-button { display: inline-flex; max-width: 255px; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--gold-soft) 78%, var(--surface)); color: var(--ink); cursor: pointer; font: inherit; text-align: left; }
.process-responsible-button:hover { border-color: var(--gold); box-shadow: 0 4px 13px color-mix(in srgb, var(--gold) 14%, transparent); }
.process-responsible-button:disabled { cursor: default; opacity: .65; }
.process-responsible-button > svg { width: 15px; flex: 0 0 auto; color: var(--gold); }
.process-responsible-button > span { display: grid; min-width: 0; gap: 1px; }
.process-responsible-button small { color: color-mix(in srgb, var(--gold) 80%, var(--ink)); font-size: 7px; font-style: normal; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.process-responsible-button strong { overflow: hidden; font-size: 9px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.process-responsible-button em { overflow: hidden; color: var(--muted); font-size: 7px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.process-responsible-button > svg:last-child { width: 11px; margin-left: auto; color: var(--muted); }
.process-responsible-button.compact { max-width: 300px; padding: 6px 9px; }
.process-tag-chip { display: inline-flex; max-width: 180px; align-items: center; gap: 4px; overflow: hidden; padding: 4px 7px; border-radius: 8px; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.process-tag-chip svg { width: 10px; flex: 0 0 auto; }
.process-tag-chip.gold { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 75%, #6e5419); }
.process-tag-chip.red { background: var(--red-soft); color: var(--red); }
.process-tag-chip.blue { background: var(--blue-soft); color: var(--blue); }
.process-tag-chip.green { background: var(--brand-soft); color: var(--brand); }
.process-table-footer { display: flex; justify-content: center; padding-top: 15px; }
.process-table-footer [hidden] { display: none; }

.process-sync-panel { margin-bottom: 18px; padding: 20px; }
.process-sync-panel.process-sync-highlight { border-color: color-mix(in srgb, var(--gold) 65%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 12%, transparent), var(--shadow-soft); }
.process-sync-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.process-sync-head h2 { margin: 4px 0 6px; font-family: "Playfair Display", serif; font-size: 20px; }
.process-sync-head p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.process-sync-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.process-sync-team-box { margin-top: 17px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.process-sync-team-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; align-items: center; gap: 12px; color: var(--muted); cursor: pointer; font-size: 9px; list-style: none; }
.process-sync-team-summary::-webkit-details-marker { display: none; }
.process-sync-team-title { display: grid; min-width: 0; gap: 2px; }
.process-sync-team-title strong { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.process-sync-team-title small { color: var(--muted); font-size: 8px; }
.process-sync-team-count { padding: 4px 8px; border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 8px; font-weight: 700; white-space: nowrap; }
.process-sync-toggle { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; color: var(--muted); transition: transform .18s ease, background .18s ease; }
.process-sync-toggle svg { width: 12px; }
.process-sync-team-summary:hover .process-sync-toggle { background: var(--surface); color: var(--ink); }
.process-sync-team-box[open] .process-sync-toggle { transform: rotate(90deg); }
.process-sync-roster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.process-sync-lawyer { display: grid; min-width: 0; grid-template-columns: 24px minmax(90px, 1fr) minmax(60px, 96px) minmax(110px, .75fr) 32px; align-items: center; gap: 8px; padding: 7px; border-radius: 9px; background: var(--surface); }
.process-sync-lawyer .icon-button { width: 32px; height: 32px; border-radius: 8px; }
.process-sync-lawyer-copy { display: grid; min-width: 0; gap: 2px; }
.process-sync-lawyer-copy strong { overflow: hidden; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.process-sync-lawyer-copy small { color: var(--muted); font-size: 7px; }
.process-sync-oabs { display: flex; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.process-sync-oabs span { padding: 3px 6px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 8px; font-weight: 700; white-space: nowrap; }
.process-sync-progress { display: grid; min-width: 0; gap: 4px; }
.process-sync-progress > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.process-sync-progress small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.process-sync-progress strong { color: var(--ink); font-size: 8px; }
.process-sync-progress > i { display: block; height: 4px; overflow: hidden; border-radius: 4px; background: var(--surface-3); }
.process-sync-progress > i > b { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .22s ease; }
.process-sync-empty { color: var(--muted); font-size: 9px; }
.process-sync-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 12px 1px 0; color: var(--muted); font-size: 8px; }
.process-sync-meta span { display: inline-flex; align-items: center; gap: 4px; }
.process-sync-meta svg { width: 12px; color: var(--soft); }
.process-sync-meta strong { color: var(--ink); font-weight: 650; }
.process-sync-meta .process-auto-sync-indicator { color: #32784e; }
.process-auto-sync-indicator > i { width: 7px; height: 7px; border-radius: 50%; background: #45a36a; box-shadow: 0 0 0 4px color-mix(in srgb, #45a36a 15%, transparent); }
.process-sync-panel .djen-import-status { margin: 13px 0 0; }

.kanban-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 15px; overflow-x: auto; padding-bottom: 12px; }
.kanban-column { min-width: 260px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); }
.column-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 12px; }
.column-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 11px; }
.column-title i { width: 8px; height: 8px; border-radius: 50%; background: var(--soft); }
.column-title i.progress-dot { background: var(--gold); }
.column-title i.done-dot { background: var(--brand); }
.column-count { padding: 2px 7px; border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 9px; }
.kanban-cards { display: grid; min-height: 100px; gap: 9px; }
.kanban-cards.drag-over { outline: 2px dashed var(--brand); outline-offset: 5px; border-radius: 9px; }
.kanban-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-soft); cursor: grab; }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .45; transform: rotate(1deg); }
.card-type { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-type > span:first-child { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.kanban-card h3 { margin: 0; font-size: 12px; line-height: 1.45; }
.kanban-card p { margin: 7px 0 12px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.card-meta { display: flex; align-items: center; justify-content: space-between; }
.card-meta span { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; }
.card-meta svg { width: 12px; }
.avatar.small { width: 24px; height: 24px; font-size: 8px; }
.add-card { width: 100%; min-height: 36px; margin-top: 9px; border: 1px dashed var(--line); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.add-card:hover { border-color: var(--brand); color: var(--brand); }

.calendar-shell { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
.calendar { padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.calendar-head h2 { margin: 0; font-family: "Playfair Display", serif; font-size: 20px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(80px, 1fr)); }
.weekday { padding: 9px; color: var(--muted); font-size: 9px; font-weight: 700; text-align: center; text-transform: uppercase; }
.calendar-day { position: relative; min-height: 104px; padding: 9px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-day:nth-child(7n+1) { border-left: 0; }
.calendar-day.muted { color: var(--soft); background: var(--surface-2); }
.calendar-day.today { background: var(--brand-soft); }
.day-number { display: grid; width: 24px; height: 24px; place-items: center; margin-left: auto; border-radius: 50%; font-size: 10px; }
.today .day-number { background: var(--brand); color: white; }
.calendar-event { display: block; overflow: hidden; width: 100%; margin-top: 5px; padding: 4px 6px; border: 0; border-left: 3px solid var(--brand); border-radius: 5px; background: var(--brand-soft); color: var(--brand); cursor: pointer; font: inherit; font-size: 8px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event.gold { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.calendar-event.red { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.upcoming { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.upcoming h2 { margin: 0 0 17px; font-size: 13px; }
.upcoming-date { margin: 17px 0 8px; color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }

.calendar-workspace { display: grid; min-height: 690px; grid-template-columns: 205px minmax(540px, 1fr) 255px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); }
.calendar-sidebar { padding: 14px 15px 18px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, var(--paper)); transition: padding .22s ease; }
.calendar-sidebar-head { display: flex; flex-direction: column; margin-bottom: 23px; }
.calendar-sidebar-toggle { display: inline-flex; min-height: 30px; align-items: center; align-self: flex-end; gap: 4px; margin: 0 0 8px; padding: 0 7px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 650; }
.calendar-sidebar-toggle:hover { background: var(--surface-2); color: var(--ink); }
.calendar-sidebar-toggle svg { width: 14px; height: 14px; }
.calendar-create { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; background: var(--brand-deep); color: var(--surface); box-shadow: var(--shadow-soft); cursor: pointer; font-size: 11px; font-weight: 700; }
.calendar-create svg { width: 17px; }
.calendar-workspace.calendar-side-collapsed { grid-template-columns: 52px minmax(540px, 1fr) 255px; }
.calendar-workspace.calendar-upcoming-collapsed { grid-template-columns: 205px minmax(540px, 1fr) 52px; }
.calendar-workspace.calendar-side-collapsed.calendar-upcoming-collapsed { grid-template-columns: 52px minmax(540px, 1fr) 52px; }
.calendar-side-collapsed .calendar-sidebar { padding: 14px 8px; }
.calendar-side-collapsed .calendar-sidebar-head { margin: 0; }
.calendar-side-collapsed .calendar-sidebar-head .calendar-create,
.calendar-side-collapsed .calendar-sidebar > :not(.calendar-sidebar-head) { display: none; }
.calendar-side-collapsed .calendar-sidebar-toggle { width: 34px; height: 34px; justify-content: center; align-self: center; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.calendar-side-collapsed .calendar-sidebar-toggle span { display: none; }
.mini-calendar > strong { display: block; margin: 0 5px 10px; font-family: "Playfair Display", serif; font-size: 13px; text-transform: capitalize; }
.mini-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.mini-calendar-grid > span { padding: 5px 0; color: var(--muted); font-size: 8px; font-weight: 700; }
.mini-calendar-day { position: relative; display: grid; aspect-ratio: 1; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; font-size: 9px; }
.mini-calendar-day:hover { background: var(--surface-3); }
.mini-calendar-day.muted { color: var(--soft); }
.mini-calendar-day.today { background: var(--brand-deep); color: var(--surface); font-weight: 700; }
.mini-calendar-day.has-events::after { content: ""; position: absolute; bottom: 2px; width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }
.calendar-side-section { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); }
.calendar-side-section h3 { margin: 0 4px 11px; color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.calendar-side-section label { display: flex; align-items: center; gap: 8px; padding: 7px 4px; cursor: pointer; font-size: 10px; }
.calendar-side-section input { width: 14px; height: 14px; accent-color: var(--brand); }
.calendar-color { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 3px; background: #4f7ecb; }
.calendar-color.local, .calendar-color.meeting { background: #5379aa; }
.calendar-color.google { background: #3d8b67; }
.calendar-color.hearing { background: var(--red); }
.calendar-color.deadline { background: var(--gold); }
.calendar-color.internal { background: #8065a8; }
.google-connect { display: flex; width: 100%; align-items: center; gap: 9px; margin-top: 22px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; }
.google-connect:hover:not(:disabled) { border-color: #3d8b67; }
.google-connect:disabled { cursor: not-allowed; opacity: .55; }
.google-connect.connected { border-color: color-mix(in srgb, #3d8b67 45%, var(--line)); background: color-mix(in srgb, #3d8b67 8%, var(--surface)); }
.google-connect svg { flex: 0 0 auto; width: 17px; color: #3d8b67; }
.google-connect span { display: grid; min-width: 0; }
.google-connect strong { font-size: 9px; }
.google-connect small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-disconnect { display: block; margin: 7px auto 0; padding: 2px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; }
.calendar-disconnect:hover { color: var(--red); }
.calendar-main { min-width: 0; background: var(--surface); }
.calendar-toolbar { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.calendar-nav, .calendar-toolbar-right { display: flex; align-items: center; gap: 7px; }
.calendar-nav h2 { min-width: 160px; margin: 0 0 0 7px; font-family: "Playfair Display", serif; font-size: 18px; text-transform: capitalize; }
.calendar-search { display: flex; width: 125px; align-items: center; gap: 5px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.calendar-search svg { width: 13px; color: var(--muted); }
.calendar-search input { width: 100%; height: 33px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 9px; }
.calendar-views button { min-width: 48px; }
.calendar-stage { overflow: auto; }
.calendar-workspace .calendar-grid { min-width: 630px; }
.calendar-workspace .weekday { padding: 12px 8px; border-bottom: 1px solid var(--line); }
.calendar-workspace .calendar-day { min-height: 102px; padding: 6px; cursor: pointer; }
.calendar-workspace .calendar-day:hover { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.calendar-workspace .calendar-day.muted { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.calendar-workspace .calendar-day.today { background: color-mix(in srgb, var(--brand-soft) 75%, var(--surface)); }
.calendar-workspace .day-number { border: 0; background: transparent; color: inherit; cursor: pointer; }
.calendar-workspace .today .day-number { background: var(--brand-deep); color: var(--surface); }
.calendar-event { border-left-width: 0; border-radius: 4px; background: #e7edf6; color: #365d8e; font-weight: 600; }
.calendar-event span { margin-right: 4px; font-weight: 400; opacity: .8; }
.calendar-event.meeting { background: #e7edf6; color: #365d8e; }
.calendar-event.google { background: #e2f2e9; color: #26714e; }
.calendar-event.hearing { background: var(--red-soft); color: var(--red); }
.calendar-event.deadline { background: var(--gold-soft); color: var(--gold); }
.calendar-event.internal { background: color-mix(in srgb, #8065a8 15%, var(--surface)); color: #705493; }
.calendar-more { margin: 3px 4px 0; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; }
.time-calendar { display: grid; min-width: 670px; grid-template-columns: 52px 1fr; }
.time-axis { display: grid; grid-template-rows: 53px repeat(14, 48px); border-right: 1px solid var(--line); }
.time-axis span { padding: 0 7px; color: var(--muted); font-size: 8px; text-align: right; transform: translateY(-5px); }
.time-columns { display: grid; grid-template-columns: repeat(7, minmax(95px, 1fr)); }
.time-calendar.single .time-columns { grid-template-columns: 1fr; }
.time-day-column { min-width: 0; border-right: 1px solid var(--line); }
.time-day-column.today { background: color-mix(in srgb, var(--brand-soft) 28%, transparent); }
.time-day-head { display: flex; width: 100%; height: 53px; align-items: center; justify-content: center; gap: 7px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.time-day-head span { font-size: 8px; text-transform: uppercase; }
.time-day-head strong { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: var(--ink); font-size: 11px; }
.time-day-column.today .time-day-head strong { background: var(--brand-deep); color: var(--surface); }
.time-day-body { position: relative; height: 672px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 47px, var(--line) 48px); }
.time-event { position: absolute; z-index: 2; right: 3px; left: 3px; overflow: hidden; padding: 5px 6px; border: 0; border-left: 3px solid currentColor; border-radius: 5px; background: #e7edf6; color: #365d8e; cursor: pointer; text-align: left; }
.time-event > * { display: block; overflow: hidden; font-size: 8px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.time-event.google { background: #e2f2e9; color: #26714e; }
.time-event.hearing { background: var(--red-soft); color: var(--red); }
.time-event.deadline { background: var(--gold-soft); color: var(--gold); }
.time-event.internal { background: color-mix(in srgb, #8065a8 15%, var(--surface)); color: #705493; }
.time-all-day { position: relative; z-index: 3; }
.calendar-workspace > .upcoming { overflow: auto; padding: 14px; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; transition: padding .22s ease; }
.upcoming-head { display: flex; min-height: 30px; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.upcoming-head h2 { margin: 0; }
.calendar-upcoming-toggle { display: inline-flex; min-height: 30px; align-items: center; gap: 4px; padding: 0 7px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 650; }
.calendar-upcoming-toggle:hover { background: var(--surface-2); color: var(--ink); }
.calendar-upcoming-toggle svg { width: 14px; height: 14px; }
.calendar-upcoming-collapsed > .upcoming { overflow: hidden; padding: 14px 8px; }
.calendar-upcoming-collapsed .upcoming-head { justify-content: center; margin: 0; }
.calendar-upcoming-collapsed .upcoming-head h2,
.calendar-upcoming-collapsed .upcoming-list,
.calendar-upcoming-collapsed .calendar-upcoming-toggle span { display: none; }
.calendar-upcoming-collapsed .calendar-upcoming-toggle { width: 34px; height: 34px; justify-content: center; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.upcoming-event { display: grid; width: 100%; grid-template-columns: 37px 4px minmax(0, 1fr); align-items: center; gap: 9px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.upcoming-event:hover { background: var(--surface-2); }
.upcoming-event > span:last-child { display: grid; min-width: 0; }
.upcoming-event > span:last-child strong, .upcoming-event > span:last-child small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-event > span:last-child strong { font-size: 9px; }
.upcoming-event > span:last-child small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.upcoming-date-box { display: grid; place-items: center; padding: 5px 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.upcoming-date-box strong { font-size: 13px; }
.upcoming-date-box small { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.calendar-empty { display: grid; min-height: 180px; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.calendar-empty span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--surface-2); }
.calendar-empty p { font-size: 9px; }
.calendar-all-day { align-self: end; min-height: 38px; }
.google-sync-option { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid color-mix(in srgb, #3d8b67 35%, var(--line)); border-radius: 11px; background: color-mix(in srgb, #3d8b67 7%, var(--surface)); cursor: pointer; }
.google-sync-option input { width: 16px; height: 16px; accent-color: #3d8b67; }
.google-sync-option > span:last-child { display: grid; }
.google-sync-option strong { font-size: 10px; }
.google-sync-option small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.calendar-modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.danger-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--red) 40%, var(--line)); border-radius: 9px; background: var(--red-soft); color: var(--red); cursor: pointer; font-size: 9px; font-weight: 700; }
.danger-button svg { width: 14px; }

.publication-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; }
.publication-card { padding: 18px; border-bottom: 1px solid var(--line); }
.publication-card:last-child { border-bottom: 0; }
.publication-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; }
.publication-card h3 { margin: 8px 0 7px; font-size: 12px; line-height: 1.45; }
.publication-card p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.publication-meta { display: flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--muted); font-size: 9px; }
.publication-meta svg { width: 12px; }
.insight-card { padding: 21px; border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); border-radius: var(--radius); background: linear-gradient(145deg, var(--surface), var(--gold-soft)); box-shadow: var(--shadow-soft); }
.insight-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 12px; background: var(--gold-soft); color: var(--gold); }
.insight-card h3 { margin: 15px 0 7px; font-family: "Playfair Display", serif; font-size: 18px; }
.insight-card p { margin: 0 0 16px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.source-card { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.source-card h3 { margin: 0 0 7px; font-size: 12px; }
.source-card p { margin: 0 0 14px; color: var(--muted); font-size: 10px; line-height: 1.55; }

.djen-search-panel, .djen-process-lookup { margin-bottom: 18px; }
.djen-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.djen-section-head h2 { margin: 4px 0 6px; font-family: "Playfair Display", serif; font-size: 22px; }
.djen-section-head p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.djen-oab-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.publication-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.publication-identity-compact { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.publication-identity-avatar { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.publication-identity-avatar svg { width: 14px; }
.publication-identity-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; min-width: 0; max-width: 100%; }
.publication-identity-copy .eyebrow { font-size: 11px; white-space: nowrap; }
.publication-identity-copy h2 { max-width: 100%; margin: 0; overflow: hidden; font-family: "Playfair Display", serif; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.select-control.publication-identity-select { overflow: hidden; max-width: 100%; margin: 0; padding: 2px 20px 2px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background-color: transparent; font-family: "Playfair Display", serif; font-size: 17px; font-weight: 600; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.publication-oab-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 0 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.djen-live-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.djen-live-badge i { width: 7px; height: 7px; border-radius: 50%; background: #45a36a; box-shadow: 0 0 0 3px color-mix(in srgb, #45a36a 15%, transparent); }
.djen-search-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.djen-search-actions .primary-button { min-height: 38px; padding: 0 15px; border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; box-shadow: none; }
.djen-search-actions .primary-button:hover { background: color-mix(in srgb, var(--brand) 14%, var(--brand-soft)); transform: none; box-shadow: none; }
.djen-search-actions .primary-button svg, .djen-search-actions .secondary-button svg { width: 14px; height: 14px; }
.djen-search-actions > .secondary-button { min-height: 38px; padding: 0 15px; font-size: 12px; font-weight: 700; box-shadow: none; }
.djen-period-fields { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; background: transparent; }
.djen-period-fields label { display: grid; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.djen-period-fields .secondary-button { min-height: 34px; padding: 0 13px; font-size: 12px; box-shadow: none; }
.djen-period-fields input { min-height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font: inherit; font-size: 11px; }
.djen-status { min-height: 20px; margin-top: 10px; padding: 9px 12px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 11px; line-height: 1.5; }
.djen-status.success { background: color-mix(in srgb, #45a36a 11%, var(--surface)); color: #32784e; }
.djen-status.error { background: var(--red-soft); color: var(--red); }
.djen-import-status { margin: 0 0 18px; border: 1px solid var(--line); background: var(--surface); }
.djen-import-status.success { border-color: color-mix(in srgb, #45a36a 30%, var(--line)); }
.djen-import-status.error { border-color: color-mix(in srgb, var(--red) 30%, var(--line)); }
.djen-stat-grid .stat-card { min-height: 132px; }
.djen-stat-grid .stat-card > .stat-icon { margin-bottom: 12px; }
.publication-stat-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.publication-stat-pill { display: flex; flex: 1 1 200px; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-soft); cursor: pointer; text-align: left; }
.publication-stat-pill:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.publication-stat-pill .stat-icon { width: 30px; height: 30px; flex: 0 0 auto; }
.publication-stat-pill .stat-icon svg { width: 14px; }
.publication-stat-pill strong.value { font-family: "Playfair Display", serif; font-size: 18px; line-height: 1; }
.publication-stat-pill > span:last-child { overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.djen-publications-panel { overflow: hidden; }
.djen-empty { display: grid; min-height: 230px; place-items: center; align-content: center; padding: 30px; color: var(--muted); text-align: center; }
.djen-empty > span { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--soft); }
.djen-empty > span svg { width: 20px; }
.djen-empty h3 { margin: 12px 0 4px; color: var(--ink); font-size: 13px; }
.djen-empty p { margin: 0; font-size: 10px; }
.djen-results-list { border-top: 1px solid var(--line); }
.djen-result-card { border-bottom: 1px solid var(--line); background: var(--surface); }
.djen-result-card summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; cursor: pointer; list-style: none; }
.djen-result-card summary::-webkit-details-marker { display: none; }
.djen-result-card[open] summary { background: var(--surface-2); }
.djen-result-main { display: grid; min-width: 0; gap: 6px; }
.djen-result-main .chip { width: fit-content; }
.djen-result-main strong { font-size: 12px; line-height: 1.4; }
.djen-result-main small { overflow-wrap: anywhere; color: var(--muted); font-size: 9px; }
.djen-result-open { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; color: var(--brand); font-size: 9px; font-weight: 700; }
.djen-result-open svg { width: 13px; transition: transform .18s; }
.djen-result-card[open] .djen-result-open svg { transform: rotate(90deg); }
.djen-result-body { padding: 12px 16px 16px; }
.djen-result-facts { display: grid; grid-template-columns: 1.2fr .65fr 1.5fr; gap: 8px; margin-bottom: 10px; }
.djen-result-facts span { padding: 8px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.djen-result-facts b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.djen-result-body > p { max-height: 420px; overflow: auto; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 10px; line-height: 1.6; white-space: pre-wrap; }
.djen-source-link { width: fit-content; margin-top: 12px; }
.djen-more { display: flex; margin: 16px auto; }
.djen-process-form { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.djen-process-input { min-width: min(520px, 100%); flex: 1; margin: 0; }
.djen-process-lookup #djenProcessOutput:not(:empty) { margin: 17px -22px -22px; border-top: 1px solid var(--line); }

.publication-triage-toolbar { margin-bottom: 18px; }
.publication-triage-toolbar .filter-row { margin: 0; }
.publication-triage-toolbar .filter-search { flex: 1; min-width: 260px; }
.publication-toolbar-group { display: flex; align-items: center; gap: 14px; margin-left: auto; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); flex-wrap: wrap; }
.publication-more-menu { position: relative; flex: 0 0 auto; }
.publication-more-menu > summary { display: inline-flex; min-height: 40px; align-items: center; gap: 7px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; list-style: none; white-space: nowrap; }
.publication-more-menu > summary::-webkit-details-marker { display: none; }
.publication-more-menu > summary svg { width: 14px; }
.publication-more-menu > summary:hover, .publication-more-menu[open] > summary { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); color: var(--ink); }
.publication-more-menu-list { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; display: grid; gap: 12px; width: min(420px, 90vw); padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: var(--shadow); }
.publication-bulk-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.publication-bulk-actions button { white-space: nowrap; }
.publication-selection-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.publication-view-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.publication-select-all { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.publication-select-all input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--red); }
#publicationBulkDiscardButton:not(:disabled) { color: var(--red); }
.publication-visible-count { color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.publication-card { display: flex; align-items: stretch; padding: 0; border-left: 3px solid var(--gold); background: var(--surface); }
.publication-card-body { flex: 1; min-width: 0; }
.publication-select { display: flex; align-items: flex-start; padding: 20px 4px 0 16px; cursor: pointer; }
.publication-select input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--red); }
.publication-select-all-inline { width: 15px; height: 15px; margin-right: 8px; vertical-align: -2px; cursor: pointer; accent-color: var(--red); }
.publication-card.is-selected { background: color-mix(in srgb, var(--red) 8%, var(--surface)); }
.publication-card.treated { border-left-color: var(--brand); }
.publication-card.discarded { border-left-color: var(--red); opacity: .82; }
.publication-content .djen-result-body > p { display: block; max-height: none; overflow: visible; overflow-wrap: anywhere; -webkit-box-orient: initial; -webkit-line-clamp: unset; }
.publication-card-head { padding: 12px 16px; }
.publication-card-title { display: grid; min-width: 0; flex: 1 1 240px; gap: 5px; }
.publication-card-title > div { display: flex; flex-wrap: wrap; gap: 5px; }
.publication-card-title > strong { font-size: 12px; line-height: 1.4; }
.publication-card-title > strong.publication-parties { font-size: 12px; font-weight: 800; letter-spacing: .01em; }
.publication-vs { color: var(--muted); font-weight: 600; }
.publication-card-title > p { -webkit-line-clamp: 1; }
.publication-treatment-actions { display: flex; flex: 0 0 auto; align-items: flex-end; justify-content: flex-end; gap: 6px; flex-wrap: wrap; max-width: 520px; margin-left: auto; }
.publication-treatment-actions label { display: grid; gap: 3px; color: var(--muted); font-size: 8px; font-weight: 700; }
.publication-treatment-actions .select-control { min-height: 34px; min-width: 130px; }
.djen-teores-button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 0 14px; min-height: 36px; border: 0; border-radius: 10px; background: var(--gold); color: #4a3400; cursor: pointer; font-size: 10px; font-weight: 700; white-space: nowrap; }
.djen-teores-button:hover { background: color-mix(in srgb, var(--gold) 85%, #000); }
.djen-teores-button:disabled { opacity: .5; cursor: not-allowed; }
.publication-process-link, .publication-process-missing, .publication-treatment-note { display: inline-flex; width: fit-content; align-items: center; gap: 6px; color: var(--brand); font-size: 9px; font-weight: 700; }
.publication-process-link { padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.publication-process-link:hover { text-decoration: underline; }
.publication-process-link svg, .publication-process-missing svg, .publication-treatment-note svg { width: 13px; }
.publication-process-missing { color: var(--gold); }
.publication-treatment-note { padding: 7px 9px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.publication-trash-note { display: inline-flex; width: fit-content; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 8px; background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); font-size: 9px; font-weight: 700; }
.publication-trash-note svg { width: 13px; }
.publication-trash-button[aria-pressed="true"] { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.publication-retention-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.publication-period-discard { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.publication-period-discard label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; font-weight: 700; }
.publication-period-discard input[type="date"] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 10px; }
.publication-content { border-top: 1px solid var(--line); }
.publication-content > summary { display: flex; width: fit-content; align-items: center; gap: 5px; padding: 8px 16px; color: var(--brand); cursor: pointer; font-size: 9px; font-weight: 700; list-style: none; }
.publication-content > summary::-webkit-details-marker { display: none; }
.publication-content > summary svg { width: 13px; transition: transform .18s; }
.publication-content[open] > summary svg { transform: rotate(90deg); }
.publication-content .djen-result-body { padding-top: 5px; }
.ghost-button.danger { color: var(--red); }
.ghost-button.danger:hover { background: var(--red-soft); }
.publication-modal-context { display: grid; grid-column: 1 / -1; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.publication-modal-context .chip { width: fit-content; }
.publication-modal-context strong { overflow-wrap: anywhere; font-size: 11px; }
.publication-modal-context small { color: var(--muted); font-size: 9px; }

.process-title-button { max-width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.process-title-button:hover .table-primary { color: var(--brand); text-decoration: underline; }
.process-row-tags { display: flex; margin-top: 5px; }
.process-table-summary { margin: 12px 0; color: var(--muted); font-size: 9px; font-weight: 700; }
.process-table-footer { display: flex; justify-content: center; padding-top: 15px; }
.process-detail-hero { margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.process-detail-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 15px 19px; }
.process-detail-meta > span:not(.chip) { display: inline-flex; max-width: 100%; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.process-detail-meta svg { width: 13px; color: var(--soft); }
.process-detail-tag-list { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.process-add-tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px dashed var(--line); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 8px; font-weight: 700; }
.process-add-tag svg { width: 11px; }
.process-detail-tabs { display: flex; gap: 3px; padding: 0 15px; border-top: 1px solid var(--line); }
.process-detail-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 12px 11px 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 10px; font-weight: 700; }
.process-detail-tabs button.active { border-bottom-color: var(--brand); color: var(--brand); }
.process-detail-tabs button span { display: inline-grid; min-width: 18px; height: 18px; padding: 0 5px; place-items: center; border-radius: 10px; background: var(--surface-2); font-size: 8px; }
.process-summary-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 18px; }
.process-detail-section { min-width: 0; }
.process-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.process-section-head h2 { margin: 0; font-size: 13px; }
.process-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.process-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.process-data-grid > div { min-width: 0; padding: 14px 10px; border-bottom: 1px solid var(--line); }
.process-data-grid dt { margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.process-data-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 10px; line-height: 1.45; }
.process-activity-list, .process-history-list { display: grid; gap: 9px; padding-top: 14px; }
.process-activity { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.process-activity strong { display: block; font-size: 10px; }
.process-activity p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.task-check { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--soft); cursor: pointer; }
.task-check svg { width: 12px; }
.task-check.done { border-color: transparent; background: var(--brand-soft); color: var(--brand); }
.process-history-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.process-history-item:last-child { border-bottom: 0; }
.process-history-item strong { font-size: 10px; }
.process-history-item p { margin: 4px 0; color: var(--muted); font-size: 9px; }
.process-history-item small { display: block; color: var(--muted); font-size: 8px; line-height: 1.55; }
.process-history-title, .process-movement-actions, .process-source-status > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.process-source-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); font-size: 8px; font-weight: 750; letter-spacing: .02em; }
.process-movement-item > div { min-width: 0; width: 100%; }
.process-movement-actions { margin-top: 12px; }
.secondary-button.small { min-height: 32px; padding: 6px 10px; font-size: 9px; }
.process-movement-comment { display: block; margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 8%, transparent); border-radius: 0 8px 8px 0; }
.process-history-loading { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 88px; color: var(--muted); }
.process-source-status { display: grid; gap: 5px; margin: 14px 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.process-source-status.success { border-color: color-mix(in srgb, var(--green) 35%, var(--line)); }
.process-source-status.error { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.process-source-status small, .process-source-status em { color: var(--muted); font-style: normal; }
.process-source-status em { color: var(--red); }
.history-dot { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--gold-soft); color: var(--gold); }
.history-dot.treated { background: var(--brand-soft); color: var(--brand); }
.history-dot.discarded { background: var(--red-soft); color: var(--red); }
.history-dot svg { width: 13px; }
.empty-state.compact { min-height: 150px; }
.task-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.contact-card, .document-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.document-card { padding: 18px; }
.contact-head { display: flex; align-items: center; gap: 12px; }
.contact-card .avatar { width: 42px; height: 42px; background: var(--brand-soft); color: var(--brand); }
.contact-card h3, .document-card h3 { margin: 0; font-size: 12px; }
.contact-card p, .document-card p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.contact-details { display: grid; gap: 7px; margin: 17px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.contact-details span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.contact-details svg { width: 13px; color: var(--soft); }
.contact-search-panel { margin-bottom: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-soft); }
.contact-filter-row { margin-bottom: 8px; }
.contact-filter-row .filter-search { flex: 1; max-width: none; }
.contact-search-status { color: var(--muted); font-size: 9px; }
.contact-lawyer-filter-loading { display: block; padding: 8px 2px 2px; color: var(--muted); font-size: 8px; }
.contact-lawyer-filter { margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.contact-lawyer-filter > summary { display: flex; align-items: center; gap: 7px; padding: 9px 11px; cursor: pointer; list-style: none; color: var(--ink); font-size: 9px; font-weight: 800; }
.contact-lawyer-filter > summary::-webkit-details-marker { display: none; }
.contact-lawyer-filter > summary svg { width: 13px; color: var(--brand); }
.contact-lawyer-filter > summary svg:last-child { margin-left: auto; transition: transform .18s ease; }
.contact-lawyer-filter[open] > summary svg:last-child { transform: rotate(90deg); }
.contact-lawyer-filter-body { padding: 0 11px 11px; border-top: 1px solid var(--line); }
.contact-lawyer-filter-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; padding: 10px 0; }
.contact-lawyer-filter-options label { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 6px 7px; border-radius: 7px; cursor: pointer; }
.contact-lawyer-filter-options label:hover { background: var(--surface-3); }
.contact-lawyer-filter-options span { font-size: 8px; font-weight: 700; }
.contact-lawyer-filter-options small { color: var(--muted); font-size: 7px; }
.contact-lawyer-filter-actions { display: flex; align-items: end; justify-content: space-between; gap: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.contact-lawyer-filter-actions label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.contact-review-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--gold-soft) 55%, var(--surface)); }
.contact-review-bar strong { display: block; margin-top: 3px; font-size: 11px; }
.contact-review-bar p { max-width: 720px; margin-top: 4px; font-size: 8px; }
.contact-review-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.contact-card { overflow: hidden; padding: 0; }
.contact-card[open] { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: var(--shadow); }
.contact-summary { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 22px; align-items: center; gap: 8px 13px; padding: 15px 18px; cursor: pointer; list-style: none; }
.contact-summary::-webkit-details-marker { display: none; }
.contact-summary-copy { min-width: 0; }
.contact-title-line { display: flex; align-items: center; gap: 8px; }
.contact-title-line strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.contact-title-line em { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 7px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.contact-summary-copy > small { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.contact-summary-count { display: grid; min-width: 70px; justify-items: end; }
.contact-summary-count strong { font-family: "Playfair Display", serif; font-size: 19px; line-height: 1; }
.contact-summary-count small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.contact-chevron { color: var(--muted); transition: transform .18s ease; }
.contact-chevron svg { width: 15px; }
.contact-card[open] .contact-chevron { transform: rotate(90deg); }
.contact-role-row { display: flex; grid-column: 2; flex-wrap: wrap; gap: 5px; }
.contact-lawyer-preview { display: flex; min-width: 0; grid-column: 3 / 5; align-items: center; justify-content: flex-end; gap: 6px; color: var(--muted); font-size: 8px; text-align: right; }
.contact-lawyer-preview svg { flex: 0 0 13px; width: 13px; }
.contact-lawyer-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-client-suggestion { display: grid; grid-column: 2 / 5; grid-template-columns: minmax(0, auto) auto minmax(160px, 1fr) auto; align-items: center; gap: 8px 12px; padding: 9px 10px; border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line)); border-radius: 9px; background: var(--gold-soft); cursor: default; }
.contact-client-score { padding: 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }
.contact-client-suggestion.strong .contact-client-score { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--brand); }
.contact-client-suggestion.strong { border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); background: var(--brand-soft); }
.contact-client-suggestion label { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-size: 8px; font-weight: 800; cursor: pointer; }
.contact-client-suggestion input { width: 15px; height: 15px; accent-color: var(--brand); }
.contact-client-suggestion > small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.contact-client-suggestion .secondary-button { justify-self: end; }
.contact-dossier { padding: 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.contact-dossier-loading { padding: 18px; color: var(--muted); font-size: 9px; text-align: center; }
.contact-dossier-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.contact-dossier-head > div { min-width: 0; max-width: 100%; }
.contact-dossier-head h3 { margin: 3px 0 0; overflow-wrap: anywhere; font-family: "Playfair Display", serif; font-size: 19px; }
.contact-dossier-head p { margin-top: 4px; }
.contact-dossier-roles, .contact-lawyer-list { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-role-editor { display: grid; gap: 6px; margin-top: 14px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.contact-role-editor > label { font-size: 9px; font-weight: 800; }
.contact-role-editor > div { display: flex; align-items: center; gap: 8px; }
.contact-role-editor .select-control { min-width: 250px; }
.contact-role-editor > small { color: var(--muted); font-size: 8px; }
.contact-identity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 15px 0 0; }
.contact-identity-grid div { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.contact-identity-grid dt { color: var(--muted); font-size: 8px; }
.contact-identity-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 9px; font-weight: 700; }
.contact-dossier-section { margin-top: 16px; }
.contact-dossier-section > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.contact-dossier-section h4 { margin: 0; font-size: 10px; }
.contact-dossier-section > header > span { display: grid; min-width: 23px; height: 23px; place-items: center; border-radius: 50%; background: var(--surface-3); font-size: 8px; font-weight: 800; }
.contact-lawyer-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 8px; font-weight: 700; }
.contact-lawyer-chip svg { width: 12px; color: var(--brand); }
.contact-lawyer-list p, .contact-process-list > p { margin: 0; color: var(--muted); font-size: 9px; }
.contact-process-list { display: grid; gap: 7px; }
.contact-process-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, .42fr); gap: 14px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.contact-process-row strong, .contact-process-row small { display: block; }
.contact-process-row strong { font-size: 9px; }
.contact-process-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.contact-process-row > div > span { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.contact-process-main { min-width: 0; }
.contact-process-against { margin: 9px 0 0; padding: 8px 10px; border-left: 3px solid var(--red); border-radius: 0 7px 7px 0; background: var(--red-soft); color: var(--ink); font-size: 9px; line-height: 1.45; }
.contact-process-against b { color: var(--red); }
.contact-process-meta { display: grid; justify-items: end; align-content: start; gap: 4px; text-align: right; }
.contact-process-meta > span { margin: 0; color: var(--muted); font-size: 8px; }
.contact-process-meta .secondary-button { margin-top: 4px; }
.contact-process-relations { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.contact-process-relations > summary { display: flex; align-items: center; gap: 7px; padding: 9px 2px 0; color: var(--brand); cursor: pointer; font-size: 8px; font-weight: 800; list-style: none; }
.contact-process-relations > summary::-webkit-details-marker { display: none; }
.contact-process-relations > summary svg { width: 13px; }
.contact-process-relations > summary svg:last-child { margin-left: auto; transition: transform .18s ease; }
.contact-process-relations[open] > summary svg:last-child { transform: rotate(90deg); }
.contact-process-relations-body { display: grid; gap: 12px; padding: 12px 0 2px; }
.contact-party-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contact-party-groups > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 8px; }
.contact-party-group { padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.contact-party-group h6, .contact-process-lawyers h6 { margin: 0; font-size: 8px; text-transform: uppercase; letter-spacing: .035em; }
.contact-party-group ul, .contact-process-lawyers ul { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.contact-party-group li { padding-top: 6px; border-top: 1px solid var(--line); }
.contact-party-group li:first-child { padding-top: 0; border-top: 0; }
.contact-party-group strong { font-size: 8px; }
.contact-party-group small { overflow-wrap: anywhere; }
.contact-process-lawyers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.contact-process-lawyers > section { padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.contact-process-lawyers header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.contact-process-lawyers header > span { display: grid; min-width: 21px; height: 21px; place-items: center; border-radius: 50%; background: var(--surface-3); font-size: 7px; font-weight: 800; }
.contact-lawyer-history-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; padding-top: 7px; border-top: 1px solid var(--line); }
.contact-lawyer-history-row:first-child { padding-top: 0; border-top: 0; }
.contact-lawyer-history-row strong { font-size: 8px; }
.contact-lawyer-relation { padding: 3px 5px; border-radius: 999px; font-size: 6px; font-weight: 900; white-space: nowrap; }
.contact-lawyer-relation.office { background: var(--blue-soft); color: var(--blue); }
.contact-lawyer-relation.adverse { background: var(--red-soft); color: var(--red); }
.contact-lawyer-relation.external { background: var(--gold-soft); color: var(--gold); }
.contact-relation-empty { color: var(--muted); font-size: 8px; }
.contact-lawyer-history-note { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-3); color: var(--muted); font-size: 8px; line-height: 1.45; }
.contact-lawyer-history-note svg { flex: 0 0 13px; width: 13px; color: var(--brand); }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.doc-icon { display: grid; width: 42px; height: 42px; margin-bottom: 16px; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.doc-icon.pdf { background: var(--red-soft); color: var(--red); }
.doc-icon.docx { background: var(--blue-soft); color: var(--blue); }
.doc-icon.sheet { background: var(--brand-soft); color: var(--brand); }
.doc-meta { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }

.indicator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.metric-panel { min-height: 290px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.metric-panel.wide { grid-column: 1 / -1; }
.metric-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 15px; }
.metric-head > div { min-width: 0; max-width: 100%; }
.metric-head h2 { margin: 0; overflow-wrap: anywhere; font-size: 13px; }
.metric-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 28px; min-height: 205px; }
.donut { position: relative; display: grid; width: 145px; height: 145px; place-items: center; border-radius: 50%; background: conic-gradient(var(--brand) 0 58%, var(--gold) 58% 78%, var(--red) 78% 89%, var(--surface-3) 89%); }
.donut::after { content: ""; position: absolute; width: 96px; height: 96px; border-radius: 50%; background: var(--surface); }
.donut strong { position: relative; z-index: 1; font-family: "Playfair Display", serif; font-size: 26px; }
.donut-legend { display: grid; gap: 12px; }
.donut-legend span { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.donut-legend i { width: 8px; height: 8px; border-radius: 50%; }
.donut-legend strong { color: var(--ink); font-size: 10px; }
.line-chart { width: 100%; height: 210px; margin-top: 16px; }
.line-chart .grid { stroke: var(--line); stroke-width: 1; }
.line-chart .area { fill: url(#areaGradient); stroke: none; }
.line-chart .main-line { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.line-chart text { fill: var(--muted); font-family: "DM Sans"; font-size: 9px; }

.assistant-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); gap: 17px; }
.assistant-chat { overflow: hidden; min-height: 540px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-soft); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 18px 21px; border-bottom: 1px solid var(--line); }
.chat-head .insight-icon { width: 36px; height: 36px; }
.chat-head h2 { margin: 0; font-size: 13px; }
.chat-head p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.chat-body { display: flex; min-height: 400px; flex-direction: column; justify-content: flex-end; gap: 13px; padding: 23px; }
.message { max-width: 78%; padding: 13px 15px; border-radius: 14px 14px 14px 4px; background: var(--surface-2); font-size: 11px; line-height: 1.55; }
.message.user { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--brand-deep); color: var(--surface); }
.message small { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; }
.message.user small { color: color-mix(in srgb, var(--surface) 65%, transparent); }
.chat-compose { display: flex; gap: 9px; padding: 14px; border-top: 1px solid var(--line); }
.chat-compose input { flex: 1; min-width: 0; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); outline: none; }
.prompt-list { display: grid; gap: 10px; }
.prompt-card { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; }
.prompt-card:hover { border-color: var(--brand); background: var(--brand-soft); }
.prompt-card svg { flex: 0 0 16px; color: var(--brand); }
.prompt-card strong { display: block; margin-bottom: 3px; font-size: 10px; }
.prompt-card span { color: var(--muted); font-size: 9px; line-height: 1.4; }

.task-open-button { width: 100%; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.task-focus-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.task-focus-bar .filter-search { flex: 1; min-width: 180px; }
.task-focus-bar .compact { min-height: 36px; }
.task-view-tabs { flex: 0 0 auto; }
.kanban-card { cursor: pointer; }
.kanban-card.deadline-late, .kanban-card.deadline-critical { border-left: 3px solid var(--red); }
.kanban-card.deadline-attention { border-left: 3px solid var(--gold); }
.task-labels { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 2px; }
.task-labels span { padding: 3px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 8px; }
.task-advanced, .task-collaboration { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.task-advanced summary, .task-collaboration summary { padding: 13px 0 3px; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; list-style-position: inside; }
.task-advanced-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding-top: 13px; }
.field label small { color: var(--soft); font-weight: 400; }
.task-checklist-editor { display: grid; gap: 6px; margin-bottom: 7px; }
.task-checklist-editor label { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; }
.task-checklist-editor input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); }
.task-checklist-editor input[type="text"] { min-width: 0; }
.comment-list { display: grid; max-height: 230px; gap: 8px; margin-top: 12px; overflow: auto; }
.comment-list article { padding: 11px; border-radius: 10px; background: var(--surface-2); }
.comment-list strong { font-size: 9px; }
.comment-list p { margin: 4px 0; font-size: 10px; line-height: 1.5; }
.comment-list small, .task-history small { color: var(--muted); font-size: 8px; }
.comment-compose { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; margin-top: 10px; }
.comment-compose textarea { min-height: 58px; }
.task-history { display: grid; gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.task-history span { display: flex; gap: 5px; color: var(--muted); font-size: 8px; }
.task-history small { margin-left: auto; }
.notification-summary { display: flex; align-items: baseline; gap: 8px; }
.notification-summary strong { font-family: "Playfair Display", serif; font-size: 30px; }
.notification-summary span { color: var(--muted); font-size: 10px; }
.notification-list { display: grid; gap: 7px; }
.notification-list > button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; }
.notification-list > button:hover { border-color: var(--brand); background: var(--brand-soft); }
.notification-list strong, .notification-list small { display: block; }
.notification-list strong { font-size: 10px; }
.notification-list small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.notification-tone { display: grid; flex: 0 0 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--gold-soft); color: var(--gold); }
.notification-tone.overdue { background: var(--red-soft); color: var(--red); }
.notification-tone.publication { background: var(--blue-soft); color: var(--blue); }
.notification-tone svg { width: 14px; }
.notification-permission { justify-content: center; }
.workload-list { display: grid; gap: 8px; margin-top: 22px; }
.workload-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.workload-list strong, .workload-list small { display: block; }
.workload-list strong { font-size: 10px; }
.workload-list small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.workload-list b { color: var(--muted); font-size: 9px; }
.workload-list b.has-overdue { color: var(--red); }
.muted-copy { color: var(--muted); font-size: 9px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; padding: 20px; place-items: center; background: rgba(20, 22, 24, .56); backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(740px, 100%); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 25px 70px rgba(0,0,0,.24); animation: modal-in .2s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 22px 23px 17px; border-bottom: 1px solid var(--line); }
.modal-header > div { min-width: 0; max-width: 100%; }
.modal-header h2 { margin: 4px 0 0; overflow-wrap: anywhere; font-family: "Playfair Display", serif; font-size: 23px; }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 22px 23px; }
.modal-body > .full { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--muted); font-size: 10px; font-weight: 600; }
.field textarea { min-height: 90px; padding-top: 10px; resize: vertical; }
.assignee-field { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.assignee-field.full { grid-column: 1 / -1; }
.assignee-field legend { padding: 0 5px; color: var(--ink); font-size: 10px; font-weight: 700; }
.assignee-field > p { margin: 0 0 11px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.assignee-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.assignee-option { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 9px; }
.assignee-option input { flex: 0 0 auto; width: 14px; height: 14px; accent-color: var(--brand); }
.assignee-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.process-choice-search { margin: 0; }
.process-single-owner-note { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-radius: 10px; background: color-mix(in srgb, var(--gold-soft) 72%, var(--surface)); color: var(--muted); font-size: 9px; }
.process-single-owner-note svg { width: 14px; color: var(--gold); }
.process-choice-list { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.process-responsible-option { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; }
.process-responsible-option:hover { background: var(--surface-2); }
.process-responsible-option:has(input:checked) { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: color-mix(in srgb, var(--gold-soft) 72%, var(--surface)); }
.process-responsible-option input { width: 15px; height: 15px; accent-color: var(--gold); }
.process-responsible-option > span:nth-of-type(2) { display: grid; min-width: 0; gap: 3px; }
.process-responsible-option strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.process-responsible-option small { color: var(--muted); font-size: 8px; }
.process-responsible-option > i { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--gold); color: #fff; opacity: 0; }
.process-responsible-option:has(input:checked) > i { opacity: 1; }
.process-responsible-option > i svg { width: 12px; }
.process-tag-choice-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; border: 0; }
.process-tag-option { position: relative; cursor: pointer; }
.process-tag-option input { position: absolute; opacity: 0; pointer-events: none; }
.process-tag-option span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 700; }
.process-tag-option span svg { width: 11px; }
.process-tag-option:has(input:checked) span { border-color: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 10%, transparent); }
.process-tag-option.gold:has(input:checked) span { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 75%, #6e5419); }
.process-tag-option.red:has(input:checked) span { background: var(--red-soft); color: var(--red); }
.process-tag-option.blue:has(input:checked) span { background: var(--blue-soft); color: var(--blue); }
.process-tag-option.green:has(input:checked) span { background: var(--brand-soft); color: var(--brand); }
.process-new-tag { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(190px, 1fr) 120px; align-items: end; gap: 10px; margin-top: 3px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.process-new-tag > div { display: grid; gap: 3px; align-self: center; }
.process-new-tag strong { font-size: 10px; }
.process-new-tag small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 23px; border-top: 1px solid var(--line); }

.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: grid; width: min(360px, calc(100vw - 44px)); gap: 9px; }
.toast { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); animation: toast-in .25s ease; }
.toast.out { opacity: 0; transform: translateX(20px); transition: .2s ease; }
.toast > span:first-child { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.toast svg { width: 14px; }
.toast strong { display: block; font-size: 11px; }
.toast small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.empty-state { display: grid; min-height: 260px; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.empty-state > span { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--soft); }
.empty-state h3 { margin: 13px 0 4px; color: var(--ink); font-size: 13px; }
.empty-state p { margin: 0; font-size: 10px; }

/* E-mail */
.mail-welcome { min-height: 360px; }
.mail-onboarding { display: flex; min-height: 390px; align-items: center; justify-content: center; gap: 28px; padding: 42px; }
.mail-onboarding > div { max-width: 520px; }
.mail-onboarding h2 { margin: 5px 0 10px; font-family: "Playfair Display", serif; font-size: 28px; }
.mail-onboarding p:not(.eyebrow) { margin: 0 0 22px; color: var(--muted); line-height: 1.7; }
.mail-onboarding-icon { display: grid; width: 82px; height: 82px; flex: 0 0 auto; place-items: center; border-radius: 24px; background: var(--brand-soft); color: var(--brand-deep); }
.mail-onboarding-icon svg { width: 34px; height: 34px; }
.mail-layout { display: grid; min-height: 650px; grid-template-columns: 220px minmax(300px, 355px) minmax(420px, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.mail-folders-panel { display: flex; min-width: 0; flex-direction: column; padding: 16px 13px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 48%, var(--surface)); }
.mail-account-select { display: grid; gap: 6px; padding: 2px 4px 14px; }
.mail-account-select > span { color: var(--soft); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mail-account-select select { width: 100%; min-height: 38px; padding: 0 31px 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 10px; }
.mail-folder-nav { display: grid; gap: 3px; }
.mail-folder-nav button, .mail-other-folders button { display: flex; width: 100%; min-height: 40px; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.mail-folder-nav button:hover, .mail-other-folders button:hover { background: var(--surface); color: var(--ink); }
.mail-folder-nav button.active, .mail-other-folders button.active { background: var(--surface); color: var(--brand-deep); box-shadow: var(--shadow-soft); font-weight: 700; }
.mail-folder-nav svg, .mail-other-folders svg { width: 16px; height: 16px; }
.mail-other-folders { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.mail-other-folders summary { padding: 8px 10px; color: var(--soft); cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.mail-account-management { display: grid; gap: 7px; margin-top: auto; padding: 15px 4px 0; border-top: 1px solid var(--line); }
.mail-account-management > strong { color: var(--soft); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.mail-account-management > div { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 5px; }
.mail-account-management > div > span { display: grid; min-width: 0; }
.mail-account-management b, .mail-account-management small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-account-management b { font-size: 10px; }
.mail-account-management small { color: var(--muted); font-size: 8px; }
.mail-account-management .icon-button { width: 28px; height: 28px; flex: 0 0 auto; }
.mail-account-management .icon-button.danger { background: var(--red-soft); color: var(--red); }
.mail-account-management .ghost-button { justify-content: flex-start; margin-top: 2px; padding-left: 0; font-size: 9px; }
.mail-list-panel { min-width: 0; border-right: 1px solid var(--line); background: var(--surface); }
.mail-list-head { display: grid; min-height: 92px; align-content: center; gap: 10px; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.mail-list-head > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mail-list-head h2 { margin: 0; font-size: 13px; }
.mail-list-head small { color: var(--soft); font-size: 9px; }
.mail-list-head label { display: flex; height: 35px; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--muted); }
.mail-list-head label svg { width: 14px; }
.mail-list-head input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; }
.mail-message-list { max-height: calc(100vh - 255px); overflow-y: auto; }
.mail-message-row { position: relative; display: grid; width: 100%; grid-template-columns: 4px minmax(0,1fr) auto; align-items: stretch; gap: 10px; padding: 13px 14px 13px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; text-align: left; }
.mail-message-row:hover { background: var(--surface-2); }
.mail-message-row.selected { background: var(--brand-soft); }
.mail-message-mark { width: 3px; border-radius: 5px; background: transparent; }
.mail-message-row.unread .mail-message-mark { background: var(--gold); }
.mail-message-copy { display: grid; min-width: 0; gap: 3px; }
.mail-message-top { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 8px; }
.mail-message-top strong, .mail-message-copy b, .mail-message-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-message-top strong { font-size: 10px; font-weight: 600; }
.mail-message-top time { flex: 0 0 auto; color: var(--soft); font-size: 8px; }
.mail-message-copy b { font-size: 10px; font-weight: 500; }
.mail-message-copy small { color: var(--soft); font-size: 8px; }
.mail-message-row.unread .mail-message-top strong, .mail-message-row.unread .mail-message-copy b { font-weight: 700; }
.mail-row-star { align-self: center; color: var(--gold); }
.mail-row-star svg { width: 14px; fill: currentColor; }
.mail-reader { display: flex; min-width: 0; flex-direction: column; background: var(--surface); }
.mail-reader-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 25px 18px; border-bottom: 1px solid var(--line); }
.mail-reader-head > div:first-child { min-width: 0; }
.mail-reader-head h2 { margin: 8px 0 17px; overflow-wrap: anywhere; font-family: "Playfair Display", serif; font-size: 22px; line-height: 1.25; }
.mail-account-chip { display: inline-flex; max-width: 100%; padding: 3px 8px; overflow: hidden; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.mail-sender { display: flex; min-width: 0; align-items: center; gap: 9px; }
.mail-sender .avatar { width: 33px; height: 33px; flex: 0 0 auto; }
.mail-sender > span:nth-child(2) { display: grid; min-width: 0; }
.mail-sender strong, .mail-sender small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-sender strong { font-size: 10px; }
.mail-sender small { color: var(--muted); font-size: 8px; }
.mail-sender time { margin-left: auto; color: var(--soft); font-size: 8px; white-space: nowrap; }
.mail-recipients { margin: 8px 0 0 42px; color: var(--soft); font-size: 8px; }
.mail-recipients summary { cursor: pointer; }
.mail-recipients p { line-height: 1.6; }
.mail-reader-actions { display: flex; flex: 0 0 auto; gap: 4px; }
.mail-reader-actions .active { color: var(--gold); }
.mail-reader-actions .active svg { fill: currentColor; }
.mail-reader-body { flex: 1; padding: 24px 27px; overflow-wrap: anywhere; color: var(--ink); font-size: 11px; line-height: 1.7; }
.mail-html-body { max-width: 780px; }
.mail-html-body img { max-width: 100%; }
.mail-html-body table { max-width: 100%; border-collapse: collapse; }
.mail-html-body a { color: var(--blue); text-decoration: underline; }
.mail-attachments { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.mail-attachments h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 10px; }
.mail-attachments h3 svg { width: 14px; }
.mail-attachments > div { display: flex; flex-wrap: wrap; gap: 8px; }
.mail-attachment { display: flex; min-width: 180px; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.mail-attachment > span { display: grid; min-width: 0; }
.mail-attachment strong { max-width: 220px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mail-attachment small { color: var(--soft); font-size: 8px; }
.mail-reader-footer { display: flex; align-items: center; gap: 8px; padding: 14px 25px; border-top: 1px solid var(--line); }
.mail-reader-footer .ghost-button { margin-left: auto; }
.mail-loading { display: grid; min-height: 230px; place-items: center; align-content: center; gap: 12px; color: var(--muted); font-size: 10px; }
.mail-loading > span { width: 25px; height: 25px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: mail-spin .8s linear infinite; }
@keyframes mail-spin { to { transform: rotate(360deg); } }
.mail-inline-warning { display: flex; align-items: center; gap: 7px; padding: 9px 13px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); background: var(--gold-soft); color: var(--gold); font-size: 8px; }
.mail-inline-warning svg { width: 13px; }
.mail-security-note { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); border-radius: 11px; background: var(--brand-soft); }
.mail-security-note > svg { width: 19px; color: var(--brand-deep); }
.mail-security-note > span { display: grid; gap: 2px; }
.mail-security-note strong { font-size: 10px; }
.mail-security-note small, .field-help { color: var(--muted); font-size: 8px; line-height: 1.5; }
.mail-compose-body textarea { min-height: 150px; resize: vertical; }
.mail-workspace { min-height: 720px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-soft); }
.mail-workspace-toolbar { display: grid; min-height: 82px; grid-template-columns: minmax(250px, 330px) auto minmax(250px, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.mail-active-account { position: relative; display: grid; min-width: 0; grid-template-columns: 38px minmax(0, 1fr) 9px; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.mail-active-account > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.mail-active-account strong, .mail-active-account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-active-account strong { font-size: 11px; }
.mail-active-account small { color: var(--muted); font-size: 9px; }
.mail-active-account > i { width: 7px; height: 7px; border-radius: 50%; background: #399870; box-shadow: 0 0 0 4px color-mix(in srgb, #399870 13%, transparent); }
.mail-active-account select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.mail-account-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 10px; font-style: normal; font-weight: 800; }
.mail-manage-button { min-height: 43px; white-space: nowrap; }
.mail-workspace-search { display: flex; min-width: 0; height: 48px; align-items: center; gap: 9px; padding: 0 15px; border: 1px solid transparent; border-radius: 12px; background: var(--surface-2); color: var(--muted); transition: .2s ease; }
.mail-workspace-search:focus-within { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-soft); }
.mail-workspace-search svg { width: 16px; }
.mail-workspace-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.mail-sync-status { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.mail-sync-status > i { width: 9px; height: 9px; border-radius: 50%; background: #399870; }
.mail-workspace.is-syncing .mail-sync-status > i { background: var(--gold); animation: mail-pulse 1s ease infinite; }
.mail-sync-status > span { display: grid; gap: 2px; }
.mail-sync-status small { color: var(--soft); font-size: 8px; }
.mail-sync-status strong { font-size: 9px; }
.mail-total-pill { display: grid; min-width: 112px; min-height: 48px; place-items: center; padding: 0 14px; border-radius: 12px; background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 78%, var(--ink)); font-size: 10px; font-weight: 800; }
@keyframes mail-pulse { 50% { opacity: .35; transform: scale(.8); } }
.mail-workspace .mail-layout { min-height: 638px; grid-template-columns: 250px minmax(330px, 390px) minmax(430px, 1fr); overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
.mail-workspace .mail-folders-panel { padding: 22px 18px 16px; }
.mail-panel-label { margin: 0 8px 12px; color: var(--soft); font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.mail-workspace .mail-folder-nav { gap: 5px; }
.mail-workspace .mail-folder-nav button, .mail-workspace .mail-other-folders button { min-height: 45px; padding: 0 13px; border-radius: 11px; font-size: 11px; }
.mail-sidebar-account { display: grid; gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.mail-sidebar-account .mail-panel-label { margin-bottom: 0; }
.mail-account-card { display: grid; min-width: 0; grid-template-columns: 40px minmax(0, 1fr) 30px; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.mail-account-card > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.mail-account-card strong, .mail-account-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-account-card strong { font-size: 10px; }
.mail-account-card small { color: var(--muted); font-size: 8px; }
.mail-account-card em, .mail-management-card em { display: flex; width: fit-content; align-items: center; gap: 5px; margin-top: 4px; padding: 3px 7px; border-radius: 10px; background: color-mix(in srgb, #399870 12%, var(--surface)); color: #287957; font-size: 7px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.mail-account-card em i, .mail-management-card em i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.mail-account-primary { display: flex; width: 100%; min-height: 39px; align-items: center; justify-content: center; gap: 7px; padding: 7px 9px; border: 0; border-radius: 10px; background: var(--ink); color: var(--surface); cursor: pointer; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.mail-account-primary svg { width: 13px; }
.mail-workspace .mail-list-head { min-height: 70px; padding: 17px 18px; }
.mail-workspace .mail-list-head h2 { font-size: 15px; }
.mail-workspace .mail-message-list { max-height: calc(100vh - 300px); min-height: 568px; }
.mail-workspace .mail-message-row { padding: 16px 17px 16px 12px; }
.mail-workspace .mail-message-top strong, .mail-workspace .mail-message-copy b { font-size: 11px; }
.mail-workspace .mail-message-copy small, .mail-workspace .mail-message-top time { font-size: 9px; }
.mail-refresh-line { height: 2px; overflow: hidden; background: var(--surface-2); }
.mail-refresh-line i { display: block; width: 35%; height: 100%; background: var(--gold); animation: loading 1s ease infinite; }
.mail-workspace .mail-reader-head { padding: 28px 30px 22px; }
.mail-workspace .mail-reader-head h2 { font-size: 26px; }
.mail-workspace .mail-reader-body { padding: 28px 31px; font-size: 12px; }
.mail-workspace .mail-reader-footer { padding: 16px 30px; }
.mail-management-intro { display: flex; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); border-radius: 13px; background: var(--brand-soft); }
.mail-management-intro > span { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--surface); color: var(--brand-deep); }
.mail-management-intro svg { width: 17px; }
.mail-management-intro > div { display: grid; gap: 3px; }
.mail-management-intro strong { font-size: 11px; }
.mail-management-intro small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.mail-management-list { display: grid; gap: 10px; }
.mail-management-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.mail-management-card > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.mail-management-card strong, .mail-management-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-management-card strong { font-size: 11px; }
.mail-management-card small { color: var(--muted); font-size: 9px; }
.mail-management-card > div { display: flex; align-items: center; gap: 7px; }
.mail-management-card button { min-height: 36px; font-size: 9px; }
.mail-management-card .danger { color: var(--red); }
.mail-management-card .danger[data-confirmed] { background: var(--red-soft); }
.mail-management-add { display: flex; min-height: 64px; align-items: center; gap: 13px; padding: 13px 16px; border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: 14px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.mail-management-add > svg { width: 21px; color: var(--brand); }
.mail-management-add > span { display: grid; gap: 3px; }
.mail-management-add strong { font-size: 11px; }
.mail-management-add small { color: var(--muted); font-size: 9px; }
.mobile-overlay { display: none; }
.loading-line { position: fixed; top: 0; left: var(--sidebar); right: 0; z-index: 80; height: 2px; overflow: hidden; }
.loading-line::after { content: ""; display: block; width: 35%; height: 100%; background: var(--gold); animation: loading 1s ease infinite; }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(380%); } }

@media (max-width: 1400px) {
  .mail-workspace-toolbar { grid-template-columns: minmax(220px, 280px) auto minmax(210px, 1fr) auto; }
  .mail-total-pill { display: none; }
  .mail-layout, .mail-workspace .mail-layout { grid-template-columns: 225px minmax(300px, 350px) minmax(360px, 1fr); }
  .calendar-workspace { grid-template-columns: 190px minmax(520px, 1fr); }
  .calendar-workspace.calendar-side-collapsed { grid-template-columns: 52px minmax(520px, 1fr); }
  .calendar-workspace.calendar-upcoming-collapsed { grid-template-columns: 190px minmax(520px, 1fr); }
  .calendar-workspace.calendar-side-collapsed.calendar-upcoming-collapsed { grid-template-columns: 52px minmax(520px, 1fr); }
  .calendar-workspace > .upcoming { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
  .calendar-workspace > .upcoming .upcoming-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
  .calendar-workspace.calendar-upcoming-collapsed > .upcoming .upcoming-list { display: none; }
}

@media (max-width: 1120px) {
  .mail-workspace-toolbar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .mail-workspace-search { grid-column: 1 / -1; grid-row: 2; }
  .mail-layout, .mail-workspace .mail-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .mail-reader { min-height: 440px; grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .mail-message-list { max-height: 440px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-layout { grid-template-columns: 1fr; }
  .publication-side { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .source-card { margin-top: 0; }
  .calendar-workspace { grid-template-columns: 190px minmax(520px, 1fr); }
  .calendar-workspace.calendar-side-collapsed { grid-template-columns: 52px minmax(520px, 1fr); }
  .calendar-workspace.calendar-upcoming-collapsed { grid-template-columns: 190px minmax(520px, 1fr); }
  .calendar-workspace.calendar-side-collapsed.calendar-upcoming-collapsed { grid-template-columns: 52px minmax(520px, 1fr); }
  .calendar-workspace > .upcoming { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
  .calendar-workspace > .upcoming .upcoming-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
  .calendar-workspace.calendar-upcoming-collapsed > .upcoming .upcoming-list { display: none; }
}

@media (max-width: 900px) {
  :root { --sidebar: 254px; }
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 50px rgba(0,0,0,.22); }
  body.menu-open .sidebar { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .mobile-menu { display: grid; }
  .sidebar-toggle { display: none; }
  .mobile-overlay { position: fixed; inset: 0; z-index: 35; background: rgba(20,22,24,.46); }
  body.menu-open .mobile-overlay { display: block; }
  .loading-line { left: 0; }
  .hero-card { grid-template-columns: 1fr; gap: 23px; }
  .content-grid, .calendar-shell, .assistant-hero { grid-template-columns: 1fr; }
  .calendar-shell { overflow: hidden; }
  .calendar { overflow-x: auto; }
  .calendar-grid { min-width: 690px; }
  .calendar-workspace { grid-template-columns: 185px minmax(500px, 1fr); }
  .calendar-workspace.calendar-side-collapsed { grid-template-columns: 52px minmax(500px, 1fr); }
  .calendar-workspace.calendar-upcoming-collapsed { grid-template-columns: 185px minmax(500px, 1fr); }
  .calendar-workspace.calendar-side-collapsed.calendar-upcoming-collapsed { grid-template-columns: 52px minmax(500px, 1fr); }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { padding: 35px 20px; }
  .auth-mobile-brand { display: flex; }
}

@media (max-width: 650px) {
  .topbar { height: 66px; gap: 10px; padding: 0 15px; }
  .global-search { min-width: 0; flex: 1 1 0; width: 0; }
  .global-search kbd, .top-actions .icon-button:not(.mobile-menu), .primary-button.compact span:last-child { display: none; }
  .global-search input { height: 39px; padding-right: 12px; font-size: 12px; }
  .page { padding: 24px 15px 50px; }
  .app-main, .page, .hero-card, .hero-copy, .hero-stats, .stat-grid, .content-grid, .panel { min-width: 0; max-width: 100%; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 21px; }
  .page-head h1 { font-size: 28px; }
  .page-head p { font-size: 11px; }
  .mail-onboarding { align-items: flex-start; flex-direction: column; padding: 28px 22px; }
  .mail-onboarding-icon { width: 60px; height: 60px; border-radius: 18px; }
  .mail-workspace { min-height: 0; overflow: visible; border-radius: 15px; }
  .mail-workspace-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 12px; }
  .mail-active-account { grid-column: 1; }
  .mail-manage-button { width: 43px; min-width: 43px; padding: 0; font-size: 0; }
  .mail-manage-button svg { width: 17px; }
  .mail-workspace-search { grid-column: 1 / -1; grid-row: auto; }
  .mail-sync-status { grid-column: 1 / -1; }
  .mail-layout, .mail-workspace .mail-layout { display: block; min-height: 0; overflow: visible; }
  .mail-folders-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .mail-folder-nav { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .mail-folder-nav button { width: auto; flex: 0 0 auto; white-space: nowrap; }
  .mail-other-folders { display: none; }
  .mail-account-management { margin-top: 13px; }
  .mail-sidebar-account { margin-top: 16px; }
  .mail-list-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .mail-message-list { max-height: 420px; }
  .mail-reader { min-height: 420px; border-top: 0; }
  .mail-reader-head { align-items: stretch; flex-direction: column; padding: 20px 18px 16px; }
  .mail-reader-actions { justify-content: flex-end; }
  .mail-reader-body { padding: 20px 18px; }
  .mail-reader-footer { align-items: stretch; flex-wrap: wrap; padding: 13px 18px; }
  .mail-reader-footer .ghost-button { width: 100%; margin-left: 0; }
  .mail-management-card { grid-template-columns: 42px minmax(0, 1fr); }
  .mail-management-card > div { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .head-actions { width: 100%; }
  .head-actions > * { min-width: 0; flex: 1; white-space: nowrap; }
  .process-new-tag { grid-template-columns: 1fr; align-items: stretch; }
  .process-responsible-option { grid-template-columns: auto auto minmax(0, 1fr); }
  .process-responsible-option > i { display: none; }
  .calendar-workspace { display: block; min-height: 0; }
  .calendar-sidebar, .calendar-workspace > .upcoming { display: none; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .calendar-nav, .calendar-toolbar-right { width: 100%; flex-wrap: wrap; }
  .calendar-nav h2 { min-width: 0; flex: 1; font-size: 16px; }
  .calendar-toolbar-right { justify-content: space-between; }
  .calendar-search { flex: 1; width: auto; }
  .calendar-workspace .calendar-grid { min-width: 620px; }
  .hero-card { display: block; width: 100%; padding: 25px 22px; }
  .hero-stats { width: 100%; margin-top: 23px; }
  .hero-stat, .stat-card { min-width: 0; overflow: hidden; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stat { min-height: 65px; padding: 11px; }
  .hero-stat strong { font-size: 20px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-card strong.value { font-size: 24px; }
  .content-grid.equal, .indicator-grid, .document-grid, .publication-side { grid-template-columns: 1fr; }
  .contact-summary { grid-template-columns: 42px minmax(0, 1fr) 20px; }
  .contact-summary-count { display: none; }
  .contact-chevron { grid-column: 3; grid-row: 1; }
  .contact-role-row { grid-column: 2 / 4; }
  .contact-lawyer-preview { grid-column: 2 / 4; justify-content: flex-start; text-align: left; }
  .contact-review-bar, .contact-review-actions { align-items: stretch; flex-direction: column; }
  .contact-lawyer-filter-options { grid-template-columns: 1fr; }
  .contact-lawyer-filter-actions { align-items: stretch; flex-direction: column; }
  .contact-client-suggestion { grid-column: 2 / 4; grid-template-columns: 1fr; }
  .contact-client-suggestion > small { white-space: normal; }
  .contact-client-suggestion .secondary-button { width: 100%; justify-self: stretch; }
  .contact-identity-grid, .contact-process-row, .contact-party-groups, .contact-process-lawyers { grid-template-columns: 1fr; }
  .contact-role-editor > div { align-items: stretch; flex-direction: column; }
  .contact-role-editor .select-control { width: 100%; min-width: 0; }
  .contact-process-meta { justify-items: start; text-align: left; }
  .table-primary { max-width: 180px; }
  .process-filter-row .filter-search, .process-filter-row .select-control { max-width: none; width: 100%; }
  .process-sync-head { flex-direction: column; }
  .process-sync-actions { width: 100%; }
  .process-sync-actions > button { flex: 1; }
  .process-sync-roster { grid-template-columns: 1fr; }
  .process-summary-grid, .process-data-grid { grid-template-columns: 1fr; }
  .process-detail-tabs { overflow-x: auto; }
  .process-detail-tabs button { flex: 1 0 auto; }
  .panel-head { padding: 13px 15px; }
  .panel-body { padding: 14px 15px; }
  .modal-body { grid-template-columns: 1fr; }
  .task-focus-bar { align-items: stretch; flex-direction: column; }
  .task-view-tabs { width: 100%; overflow-x: auto; }
  .task-view-tabs button { flex: 1 0 auto; }
  .task-advanced-grid { grid-template-columns: 1fr; }
  .task-advanced, .task-collaboration { grid-column: 1; }
  .comment-compose { grid-template-columns: 1fr; }
  .field.full { grid-column: 1; }
  .assignee-field.full { grid-column: 1; }
  .assignee-grid { grid-template-columns: 1fr; }
  .calendar { padding: 12px; }
  .donut-wrap { gap: 17px; }
  .auth-panel { padding: 20px 15px; }
  .auth-card { padding: 28px 23px; border-radius: 18px; }
  .auth-options { align-items: flex-start; flex-direction: column; }
  .djen-section-head { align-items: flex-start; flex-direction: column; }
  .publication-toolbar { flex-direction: column; align-items: stretch; }
  .djen-search-actions, .djen-period-fields, .djen-process-form { align-items: stretch; flex-direction: column; width: 100%; }
  .djen-search-actions > button, .djen-period-fields > button, .djen-process-form > button { width: 100%; }
  .djen-period-fields label { width: 100%; }
  .djen-result-card summary { align-items: flex-start; flex-direction: column; gap: 10px; padding: 15px; }
  .djen-result-facts { grid-template-columns: 1fr; }
  .djen-result-body { padding: 15px; }
  .djen-process-input { min-width: 0; width: 100%; }
  .process-sync-panel { padding: 15px; }
  .process-sync-actions { align-items: stretch; flex-direction: column; }
  .process-sync-actions > button { width: 100%; }
  .process-sync-team-summary { grid-template-columns: minmax(0, 1fr) auto 22px; }
  .process-sync-team-title small { display: none; }
  .process-sync-team-count { padding: 3px 6px; }
  .process-sync-lawyer { grid-template-columns: 24px minmax(0, 1fr) 32px; }
  .process-sync-oabs { grid-column: 2; justify-content: flex-start; }
  .process-sync-progress { grid-column: 2; }
  .process-sync-lawyer .icon-button { grid-row: 1; grid-column: 3; }
  .publication-triage-toolbar .filter-search { min-width: 0; width: 100%; }
  .publication-toolbar-group { width: 100%; margin-left: 0; flex-direction: column; align-items: stretch; }
  .publication-visible-count { width: 100%; text-align: center; }
  .publication-trash-button { width: 100%; justify-content: center; }
  .publication-more-menu, .publication-more-menu > summary { width: 100%; justify-content: center; }
  .publication-retention-toolbar { flex-direction: column; align-items: stretch; }
  .publication-period-discard { flex-direction: column; align-items: stretch; }
  .publication-period-discard input[type="date"] { width: 100%; }
  #publicationDiscardAllExceptTodayButton { justify-content: center; }
  .publication-card-head { align-items: stretch; flex-direction: column; padding: 15px; }
  .publication-treatment-actions { display: grid; grid-template-columns: 1fr 1fr; max-width: none; }
  .publication-treatment-actions label { grid-column: 1 / -1; }
  .publication-treatment-actions .select-control { width: 100%; }
  .publication-content > summary { padding-right: 15px; padding-left: 15px; }
  .publication-bulk-actions { align-items: stretch; flex-direction: column; }
  .publication-bulk-actions button { justify-content: center; }
  .publication-view-controls { flex-direction: column; margin-left: 0; }
  .publication-selection-controls { justify-content: space-between; }
  .process-summary-grid { grid-template-columns: 1fr; }
  .process-detail-meta { align-items: flex-start; flex-direction: column; }
  .process-detail-tabs { overflow-x: auto; }
  .process-detail-tabs button { white-space: nowrap; }
  .process-data-grid { grid-template-columns: 1fr; }
  .process-section-head { align-items: stretch; flex-direction: column; }
  .process-activity { grid-template-columns: auto minmax(0, 1fr); }
  .process-activity > .chip { grid-column: 2; width: fit-content; }
}

.agenda-version-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.agenda-version-switch button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; }
.agenda-version-switch button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-soft); }
.agenda-version-switch svg { width: 15px; }
.todoist-card { display: flex; align-items: center; gap: 14px; margin-bottom: 17px; padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-soft); }
.todoist-card.connected { border-color: color-mix(in srgb, #dc4c3e 28%, var(--line)); }
.todoist-mark { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #dc4c3e; color: white; font-size: 19px; font-weight: 800; }
.todoist-card > div { min-width: 0; }
.todoist-card strong, .todoist-card small { display: block; }
.todoist-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.todoist-card > .chip, .todoist-card > button, .todoist-card-actions { margin-left: auto; }
.todoist-card-copy { flex: 1; }
.todoist-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.todoist-preview-summary { margin: 8px 0 0; color: var(--blue); font-size: 10px; }
.todoist-workspace { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 620px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.todoist-sidebar { padding: 19px 12px; border-right: 1px solid var(--line); background: var(--surface-2); }
.todoist-sidebar h3 { margin: 0 9px 12px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.todoist-sidebar > button { display: grid; grid-template-columns: 19px minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; min-height: 39px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.todoist-sidebar > button:hover, .todoist-sidebar > button.active { background: var(--surface); color: var(--ink); }
.todoist-sidebar > button.active { font-weight: 700; box-shadow: var(--shadow-soft); }
.todoist-sidebar > button svg { width: 16px; }
.todoist-sidebar > button b { color: var(--soft); font-size: 9px; }
.todoist-sidebar-note { margin: 22px 7px 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.todoist-sidebar-note strong { font-size: 10px; }
.todoist-sidebar-note p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.todoist-task-main { min-width: 0; }
.todoist-task-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 82px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.todoist-task-toolbar h2 { margin: 0; font-family: "Playfair Display", serif; font-size: 24px; }
.todoist-task-toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.agenda-task-groups { padding: 7px 22px 28px; }
.agenda-task-group { margin-top: 18px; }
.agenda-task-group > header { display: flex; align-items: center; gap: 8px; padding: 0 2px 8px; border-bottom: 1px solid var(--line); }
.agenda-task-group > header h3 { margin: 0; font-size: 12px; }
.agenda-task-group > header span { display: grid; min-width: 19px; height: 19px; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 9px; }
.agenda-task-row { display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; align-items: start; gap: 11px; padding: 12px 3px; border-bottom: 1px solid var(--line); }
.agenda-task-row.completed { opacity: .68; }
.agenda-task-check { display: grid; width: 20px; height: 20px; place-items: center; margin-top: 1px; padding: 0; border: 1.5px solid var(--soft); border-radius: 50%; background: transparent; color: var(--surface); cursor: pointer; }
.agenda-task-check[aria-pressed="true"] { border-color: #5b996b; background: #5b996b; }
.agenda-task-check svg { width: 13px; }
.agenda-task-copy { min-width: 0; }
.agenda-task-title { display: block; max-width: 100%; padding: 0; overflow: hidden; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 650; text-align: left; text-overflow: ellipsis; }
.agenda-task-title:hover { color: var(--blue); }
.agenda-task-row.completed .agenda-task-title { text-decoration: line-through; }
.agenda-task-meta { display: flex; align-items: center; gap: 7px; min-width: 0; margin-top: 7px; color: var(--muted); font-size: 8px; flex-wrap: wrap; }
.agenda-task-process { display: inline-flex; align-items: center; gap: 5px; max-width: 430px; padding: 0; overflow: hidden; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.agenda-task-process.muted { color: var(--soft); cursor: default; }
.agenda-task-process svg { width: 12px; flex: 0 0 auto; }
.agenda-task-side { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-left: 9px; }
.agenda-task-side .task-date { white-space: nowrap; font-size: 9px; }
.task-sync-state { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 8px; font-weight: 700; }
.task-sync-state.synced { background: #e7f4e9; color: #397348; }
.task-sync-state.pending { background: var(--gold-soft); color: var(--gold); }
.task-sync-state.error { background: var(--red-soft); color: var(--red); }
.task-sync-state svg { width: 10px; }

@media (max-width: 900px) {
  .agenda-version-switch { width: 100%; }
  .agenda-version-switch button { flex: 1; justify-content: center; }
  .todoist-card { align-items: flex-start; flex-wrap: wrap; }
  .todoist-card > .chip, .todoist-card > button, .todoist-card-actions { width: 100%; margin-left: 52px; justify-content: flex-start; }
  .todoist-workspace { grid-template-columns: 1fr; }
  .todoist-sidebar { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .todoist-sidebar h3, .todoist-sidebar-note { display: none; }
  .todoist-sidebar > button { flex: 0 0 auto; width: auto; grid-template-columns: 17px auto auto; }
  .todoist-task-toolbar { align-items: stretch; flex-direction: column; }
  .todoist-task-toolbar .calendar-search { width: 100%; }
  .agenda-task-groups { padding: 5px 14px 22px; }
  .agenda-task-row { grid-template-columns: 23px minmax(0, 1fr); }
  .agenda-task-side { grid-column: 2; justify-content: flex-start; padding-left: 0; }
}

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