:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f1f6fb;
  --surface-blue: #eaf5ff;
  --text: #0f1720;
  --muted: #72808f;
  --muted-2: #9aa6b2;
  --line: #dce4ec;
  --line-soft: #edf1f5;
  --primary: #2aabee;
  --primary-dark: #168acd;
  --safe: #30b566;
  --safe-bg: #eaf8f0;
  --warn: #d88918;
  --warn-bg: #fff6e6;
  --danger: #d84242;
  --danger-bg: #fff0f0;
  --shadow: 0 10px 28px rgba(20, 48, 77, 0.08);
  --shadow-soft: 0 1px 2px rgba(20, 48, 77, 0.06);
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 58px;
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 16px;
  font-weight: 800;
}

h2 {
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
  margin-bottom: 10px;
  font-weight: 760;
}

h3 {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 8px;
  font-weight: 740;
}

p {
  line-height: 1.55;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.page {
  min-height: 100vh;
}

.public-nav {
  min-height: 72px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.wordmark {
  display: inline-block;
  font-family: "Avenir Next", "SF Pro Display", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 28px;
  line-height: 1;
  font-weight: 860;
  letter-spacing: 0;
  color: var(--text);
}

.wordmark span {
  color: var(--primary);
  font-weight: 900;
  font-style: italic;
  margin-right: 1px;
}

.nav-links,
.nav-actions,
.actions,
.trust-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links {
  justify-content: center;
}

.nav-actions {
  justify-content: flex-end;
}

.nav-link {
  color: var(--muted);
  font-weight: 680;
  padding: 8px 9px;
  border-radius: var(--radius);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-dark);
  background: var(--surface-blue);
}

.btn {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--primary-dark);
  padding: 9px 14px;
  font-weight: 720;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  border-color: #b9dff5;
  background: var(--surface-blue);
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 8px 18px rgba(42, 171, 238, 0.22);
}

.btn.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn.danger {
  color: var(--danger);
  border-color: #ffd2d2;
  background: var(--danger-bg);
}

.btn.danger:hover {
  border-color: #ffb7b7;
  background: #ffe7e7;
}

.btn.ghost {
  background: transparent;
  box-shadow: none;
}

.lang-toggle {
  min-width: 78px;
}

.public-home {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.hero-center {
  text-align: center;
  padding: 16px 0 26px;
}

.hero-logo {
  margin: 0 auto 22px;
}

.hero-logo .wordmark {
  font-size: clamp(62px, 10vw, 112px);
  text-shadow: 0 12px 34px rgba(42, 171, 238, 0.16);
}

.hero-tagline {
  color: var(--primary-dark);
  font-size: 23px;
  font-weight: 720;
  margin-bottom: 14px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
  max-width: 740px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.phone-preview {
  display: grid;
  place-items: center;
  margin: 18px 0 34px;
}

.phone-shell {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #f8fbfd;
  box-shadow: var(--shadow);
  padding: 16px;
}

.phone-top {
  min-height: 42px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.phone-top span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
}

.phone-top b {
  color: var(--text);
}

.phone-top small,
.candidate-mini small,
.stat-card small {
  color: var(--muted);
}

.bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 18px;
  margin-bottom: 10px;
  line-height: 1.4;
  box-shadow: var(--shadow-soft);
}

.bubble.incoming {
  background: white;
  border: 1px solid var(--line-soft);
}

.bubble.outgoing {
  margin-left: auto;
  color: white;
  background: var(--primary);
}

.candidate-mini {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid #cfe9fa;
  background: var(--surface-blue);
  border-radius: var(--radius);
  padding: 12px;
}

.mini-icon,
.feature span,
.panel-icon,
.action-tile > span,
.empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--primary-dark);
  background: var(--surface-blue);
  flex: 0 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.value-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 980px;
  margin: 10px auto 28px;
}

.value-flow div,
.legal-summary div,
.consent-panel,
.attention-strip,
.decision-strip,
.trust-panel,
.danger-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.value-flow div {
  padding: 18px;
}

.value-flow span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 50%;
  color: var(--primary-dark);
  background: var(--surface-blue);
  font-weight: 900;
}

.value-flow b {
  display: block;
  margin-bottom: 6px;
}

.value-flow p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.feature {
  text-align: center;
  padding: 18px 14px;
}

.feature span {
  margin: 0 auto 12px;
}

.feature p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

.sections {
  max-width: 1100px;
  margin: 0 auto;
  padding: 42px 24px 70px;
}

.sections.narrow {
  max-width: 820px;
}

.legal-head {
  text-align: center;
  margin-bottom: 22px;
}

.legal {
  font-size: 16px;
  line-height: 1.7;
}

.legal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.legal-summary div {
  padding: 14px;
}

.legal-summary b {
  display: block;
  margin-bottom: 6px;
}

.legal-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px 70px;
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1fr);
  gap: 28px;
  align-items: start;
}

.auth-copy {
  padding-top: 14px;
}

.auth-panel {
  display: grid;
  gap: 14px;
}

.panel,
.panel-list,
.manual-task,
.calendar-board,
.onboarding-card,
.connect-code,
.action-tile,
.empty-state,
.agreement-card,
.chat-row,
.event-row,
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 24px;
}

.field-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  margin: 14px 0 7px;
}

.input {
  width: min(520px, 100%);
  min-height: 44px;
  border: 1px solid var(--line);
  background: #f7f9fb;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
}

.input:focus {
  outline: 2px solid rgba(42, 171, 238, 0.24);
  border-color: #a7d9f7;
  background: white;
}

.input.wide {
  width: 100%;
  display: block;
  margin-bottom: 10px;
}

.consent-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  margin-top: 14px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.consent-panel h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.consent-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.input.compact-input {
  width: min(260px, 100%);
}

.consent-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
}

.consent-list label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.consent-list input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.form-note {
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 12px 0 16px;
  font-size: 15px;
}

.auth-switch {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
}

.auth-switch a {
  color: var(--primary-dark);
  font-weight: 740;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-link-fallback {
  margin-top: 10px;
  width: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-link {
  min-height: 48px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-weight: 720;
}

.side-link:hover,
.side-link.active {
  color: var(--primary-dark);
  background: var(--surface-blue);
}

.side-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f0f3f6;
}

.side-link.active .side-icon {
  color: white;
  background: var(--primary);
}

.side-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--primary-dark);
  background: white;
  border: 1px solid #cfe9fa;
  font-size: 12px;
}

.side-logout {
  margin-top: auto;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 720;
  padding: 0 8px;
}

.side-logout:hover {
  color: var(--primary-dark);
}

.app-main {
  min-width: 0;
}

.app-top {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 30px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-chip span:last-child {
  display: grid;
  gap: 2px;
}

.account-chip b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chip small {
  color: var(--primary-dark);
  font-weight: 720;
}

.account-avatar,
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--primary);
  font-weight: 760;
  flex: 0 0 auto;
}

.avatar .icon {
  width: 19px;
  height: 19px;
}

.pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.pill .icon {
  width: 15px;
  height: 15px;
}

.pill.primary {
  color: var(--primary-dark);
  background: var(--surface-blue);
  border-color: #cfe9fa;
}

.pill.safe {
  color: #20844b;
  background: var(--safe-bg);
  border-color: #bee8ce;
}

.pill.warn {
  color: #9b650b;
  background: var(--warn-bg);
  border-color: #f6d99c;
}

.app-content {
  max-width: 1160px;
  margin: 0 auto;
  padding: 34px 30px 72px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-title {
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.section-kicker {
  display: inline-flex;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 16px;
  display: grid;
  gap: 6px;
  min-height: 120px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 720;
}

.stat-card b {
  font-size: 34px;
  line-height: 1;
}

.stat-card.primary b {
  color: var(--primary-dark);
}

.stat-card.safe b {
  color: var(--safe);
}

.stat-card.warn b {
  color: var(--warn);
}

.onboarding-card {
  margin-top: 18px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 24px;
  align-items: start;
  background: linear-gradient(180deg, #fffefb 0%, #fffdf8 100%);
  border-color: #f5ddb0;
}

.onboarding-copy h2 {
  max-width: 920px;
}

.onboarding-copy > .muted {
  max-width: 940px;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 18px;
  overflow: visible;
}

.setup-steps span {
  min-height: 86px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #f0d3a0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf2 100%);
  color: var(--muted);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.setup-steps b {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  background: var(--warn);
  font-size: 16px;
  font-weight: 760;
  line-height: 1;
  box-shadow: 0 7px 16px rgba(216, 135, 16, 0.18);
}

.setup-steps em {
  min-width: 0;
  font-style: normal;
  font-size: 16px;
  font-weight: 760;
  line-height: 1.28;
  color: #627284;
  white-space: normal;
  overflow-wrap: anywhere;
}

.onboarding-action {
  display: grid;
  justify-items: stretch;
  gap: 10px;
  align-content: start;
  padding-top: 50px;
}

.onboarding-action small {
  color: var(--muted);
  text-align: center;
}

.onboarding-details {
  margin-top: 18px;
  border-top: 1px solid #f2d6a4;
  padding-top: 16px;
}

.onboarding-details h3 {
  margin-bottom: 10px;
}

.onboarding-details ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  line-height: 1.45;
}

.official-links {
  margin-top: 14px;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.official-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfe9fa;
  border-radius: 999px;
  background: white;
  color: var(--primary-dark);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 720;
}

.setup-progress {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #cfe9fa;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  box-shadow: var(--shadow-soft);
}

.setup-progress h2 {
  margin: 0 0 6px;
}

.setup-progress p {
  margin: 0;
}

.setup-progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.setup-progress-steps span {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.3;
}

.setup-progress-steps b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  background: #edf3f8;
  color: var(--muted);
  font-size: 13px;
}

.setup-progress-steps span.done {
  border-color: #bee8ce;
  background: var(--safe-bg);
  color: #247548;
}

.setup-progress-steps span.done b {
  background: var(--safe);
  color: white;
}

.official-link .icon {
  width: 14px;
  height: 14px;
}

.connect-code {
  scroll-margin-top: 94px;
  margin-top: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  border-color: #cfe9fa;
  background: linear-gradient(180deg, #eef8ff 0%, #ffffff 100%);
}

.connect-code:focus {
  outline: 3px solid rgba(42, 171, 238, 0.18);
  outline-offset: 3px;
}

.connect-code-head h3 {
  margin: 3px 0 6px;
}

.connect-code-head p {
  margin-bottom: 0;
}

.connect-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.connect-command code {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid #cfe9fa;
  border-radius: var(--radius);
  background: white;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  padding: 13px 15px;
}

.connect-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.connect-actions span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 680;
}

.bot-link-box {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dbe8f4;
  border-radius: var(--radius);
  background: white;
}

.bot-link-box b {
  display: block;
  margin-bottom: 7px;
}

.bot-link-box code {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--primary-dark);
  font-weight: 800;
}

.business-guide {
  padding-top: 14px;
  border-top: 1px solid #d8ebfa;
}

.business-guide ol {
  margin: 10px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.permission-note {
  margin-top: 12px;
  padding: 12px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  border: 1px solid #d7efdf;
  border-radius: var(--radius);
  color: #3f7b4e;
  background: #f5fff7;
}

.permission-note .icon {
  margin-top: 2px;
  flex: 0 0 auto;
}

.inline-status {
  margin-top: 14px;
}

.panel-list {
  margin-top: 18px;
  padding: 18px;
}

.attention-strip,
.decision-strip {
  margin-top: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.attention-strip h2,
.decision-strip h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.attention-strip p,
.decision-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.work-queue {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
}

.spaces-panel {
  margin-top: 18px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.spaces-disclosure summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}

.spaces-disclosure summary::-webkit-details-marker {
  display: none;
}

.spaces-disclosure summary h2 {
  margin: 0 0 5px;
}

.spaces-body {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.space-create {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto;
  gap: 10px;
  align-items: center;
}

.space-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.space-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #f8fbfe;
}

.space-row .input {
  min-height: 40px;
  width: 220px;
}

.space-row small {
  color: var(--muted);
}

.space-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.empty-space {
  color: var(--muted);
}

.space-select {
  display: grid;
  gap: 6px;
  max-width: 360px;
}

.space-select span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work-queue-head {
  align-items: flex-start;
}

.work-queue-head h2 {
  margin: 0 0 5px;
}

.queue-tools {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.space-filter {
  min-width: 220px;
  display: grid;
  gap: 6px;
}

.space-filter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compact-space-filter {
  min-width: 190px;
}

.filter-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #cfe9fa;
  border-radius: var(--radius-sm);
  background: #f7fbff;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-note b {
  color: var(--text);
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  padding: 0;
  font: inherit;
  font-weight: 860;
  line-height: 1.25;
  cursor: pointer;
}

.link-button:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  text-decoration: none;
}

.danger-link {
  color: var(--danger);
}

.view-switch {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f6f9fc;
  gap: 4px;
}

.view-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  font-weight: 860;
  cursor: pointer;
}

.view-switch button.active {
  background: white;
  color: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(26, 53, 76, 0.08);
}

.stage-list {
  display: grid;
  gap: 14px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 14px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-board .stage-column {
  min-width: 250px;
  padding: 10px;
}

.kanban-board .stage-head {
  min-height: 96px;
}

.kanban-board .stage-head h3 {
  font-size: 17px;
}

.kanban-board .stage-head p {
  font-size: 12px;
}

.stage-column {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #f8fbfe;
  padding: 12px;
}

.stage-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.stage-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.stage-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.stage-items {
  display: grid;
  gap: 10px;
}

.work-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: white;
}

.work-card.archive {
  opacity: 0.78;
}

.work-card-head,
.work-card-meta,
.training-actions,
.work-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.work-card-head {
  justify-content: space-between;
}

.work-card h3 {
  margin: 0;
  font-size: 20px;
}

.work-card.compact {
  gap: 9px;
  padding: 12px;
}

.work-card.compact .work-card-head {
  gap: 6px;
}

.work-card-main {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.work-card-main b {
  display: -webkit-box;
  color: var(--text);
  font-size: 17px;
  line-height: 1.18;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card-main span {
  display: -webkit-box;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card-meta {
  color: var(--muted);
  font-size: 13px;
}

.work-card-meta b {
  color: var(--text);
}

.compact-meta {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
}

.compact-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-btn {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
}

.training-strip {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cfe9fa;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #f5fbff 0%, #ffffff 100%);
}

.compact-training {
  padding: 0;
  overflow: hidden;
}

.compact-training summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--primary-dark);
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}

.compact-training summary::-webkit-details-marker {
  display: none;
}

.compact-training[open] {
  padding-bottom: 12px;
}

.compact-training[open] > div,
.compact-training[open] .training-actions {
  padding: 0 12px;
}

.training-strip b {
  display: block;
  margin-bottom: 3px;
}

.training-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.training-rules {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.training-rules span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.training-rules ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.training-rules li::marker {
  color: var(--primary);
}

.feedback-btn.active {
  border-color: #a8dcc0;
  background: #effaf4;
  color: var(--safe);
}

.kanban-board .work-card h3 {
  font-size: 18px;
}

.kanban-board .work-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.kanban-board .work-actions .btn {
  width: 100%;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.empty-state {
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-style: dashed;
}

.empty-state p {
  margin-bottom: 0;
}

.chat-list,
.event-list {
  display: grid;
  gap: 12px;
}

.chat-help {
  padding: 18px;
  border: 1px solid #cfe9fa;
  background: linear-gradient(180deg, #f4fbff 0%, #ffffff 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.chat-help h2 {
  margin-bottom: 14px;
}

.chat-help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chat-help-grid div {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: white;
}

.chat-help-grid b {
  display: block;
  margin-bottom: 6px;
}

.chat-help-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.chat-row {
  padding: 14px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(360px, auto);
  gap: 16px;
  align-items: center;
}

.chat-main {
  min-width: 0;
}

.chat-main b,
.event-row b {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-meta,
.event-row p {
  margin-bottom: 0;
}

.chat-meta {
  color: var(--muted);
}

.chat-state {
  margin: 8px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.chat-state b {
  width: auto;
  color: var(--safe);
  font-size: 14px;
}

.chat-state.off b {
  color: var(--muted);
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toggle-action,
.danger-action {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.toggle-action small,
.danger-action small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.switch {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  padding: 3px;
  border: 0;
  background: #c9d3dc;
  display: inline-flex;
  justify-content: flex-start;
}

.switch.on {
  background: var(--safe);
  justify-content: flex-end;
}

.switch span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
}

.agreement-card {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.agreement-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agreement-card h3 {
  margin: 0;
}

.agreement-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.agreement-title-row h3 {
  min-width: 0;
}

.decision-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid #f3d191;
  border-radius: var(--radius);
  background: var(--warn-bg);
}

.decision-actions b {
  display: block;
  margin-bottom: 4px;
}

.decision-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.edit-task-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe9fa;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.edit-task-panel label {
  display: grid;
  gap: 7px;
}

.edit-task-panel label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.45;
}

.agreement-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.agreement-facts div,
.agreement-context,
.source-details {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fbfdff;
}

.agreement-facts div {
  padding: 11px 12px;
  min-width: 0;
}

.agreement-facts span,
.agreement-context span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

.agreement-facts b {
  display: block;
  color: var(--text);
  overflow-wrap: anywhere;
}

.agreement-context {
  padding: 12px;
}

.agreement-context p,
.agreement-context blockquote {
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.agreement-context blockquote {
  color: var(--text);
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  white-space: pre-wrap;
}

.source-details {
  padding: 0;
  overflow: hidden;
}

.source-details summary {
  cursor: pointer;
  padding: 12px;
  color: var(--primary-dark);
  font-weight: 800;
}

.source-list {
  display: grid;
  gap: 10px;
  padding: 0 12px 12px;
}

.source-message {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: white;
}

.source-message.warn {
  border-color: #f6d99c;
  background: var(--warn-bg);
}

.source-message-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  margin-bottom: 8px;
}

.source-message-head b {
  color: var(--text);
}

.source-message p {
  white-space: pre-wrap;
  margin: 0 0 8px;
  line-height: 1.45;
}

.source-message small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.schedule-panel {
  border: 1px solid #bfe5fb;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f4fbff 0%, #ffffff 100%);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.schedule-panel h4 {
  margin: 4px 0 4px;
  font-size: 20px;
}

.schedule-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 12px;
}

.schedule-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 780;
}

.time-slots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.slot {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--primary-dark);
  padding: 0 16px;
  font-weight: 820;
  cursor: pointer;
}

.slot:hover,
.slot.active {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}

.agreement-card .actions {
  margin-top: 2px;
}

.event-row {
  padding: 14px;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.event-date {
  min-height: 48px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--primary-dark);
  background: var(--surface-blue);
  font-weight: 800;
  text-align: center;
}

.calendar-board {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.calendar-main,
.calendar-agenda {
  min-width: 0;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.calendar-toolbar h2,
.calendar-agenda h2 {
  margin: 2px 0 0;
}

.calendar-tools {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
  text-align: center;
  padding: 4px 0;
}

.calendar-day {
  min-height: 104px;
  border: 1px solid var(--line-soft);
  background: #fbfdff;
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  text-align: left;
  overflow: hidden;
}

.calendar-day.empty {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.calendar-day:not(.empty):hover {
  border-color: #b8dcf7;
  background: #f3faff;
}

.calendar-day.today {
  border-color: #9bd4f7;
}

.calendar-day.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(42, 171, 238, 0.12);
}

.calendar-day.busy {
  color: var(--text);
}

.calendar-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-day-head b {
  color: var(--text);
  font-size: 18px;
}

.calendar-day-head em {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--primary-dark);
  font-style: normal;
  font-size: 12px;
  font-weight: 820;
}

.calendar-load {
  height: 8px;
  border-radius: 999px;
  background: #edf3f8;
  overflow: hidden;
}

.calendar-load span {
  display: block;
  width: var(--load);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary) 0%, var(--safe) 100%);
}

.calendar-day small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.calendar-agenda {
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  border-radius: var(--radius);
  padding: 16px;
}

.agenda-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.agenda-timeline {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  min-height: var(--timeline-height, 520px);
  margin-top: 18px;
  padding-top: 6px;
}

.timeline-hours,
.timeline-lane {
  position: relative;
  min-height: var(--timeline-height, 520px);
}

.timeline-hours span {
  position: absolute;
  top: var(--hour-top);
  right: 0;
  transform: translateY(-50%);
  color: #8a96a3;
  font-size: 14px;
  font-weight: 820;
  white-space: nowrap;
}

.timeline-lane {
  border-left: 2px solid #dbe6ef;
}

.timeline-line {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--hour-top);
  height: 1px;
  background: #dbe6ef;
}

.timeline-event {
  position: absolute;
  top: var(--event-top);
  left: calc(var(--lane-left) + 10px);
  width: calc(var(--lane-width) - 14px);
  min-height: 44px;
  height: max(var(--event-height), 44px);
  padding: 8px 12px;
  border: 1px solid #bfe0f6;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fcff 0%, #eef8ff 100%);
  box-shadow: 0 10px 24px rgba(37, 118, 176, 0.1);
  color: var(--text);
  overflow: hidden;
}

.timeline-event b {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
}

.timeline-event p {
  display: none;
}

.timeline-event .agenda-time {
  display: block;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 860;
}

.timeline-event .agenda-open {
  display: none;
}

.timeline-event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
}

.timeline-event-actions .link-button {
  font-size: 12px;
  font-weight: 850;
}

.timeline-event:hover {
  border-color: #8ccaf0;
  border-left-color: var(--primary-dark);
  background: linear-gradient(180deg, #ffffff 0%, #eaf7ff 100%);
  box-shadow: 0 12px 26px rgba(37, 118, 176, 0.16);
}

.timeline-event:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.agenda-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: white;
}

.agenda-button {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.agenda-button:hover {
  border-color: #b8dcf7;
  background: #f6fbff;
  box-shadow: 0 0 0 3px rgba(42, 171, 238, 0.08);
}

.agenda-button:focus-visible {
  outline: 3px solid rgba(42, 171, 238, 0.24);
  outline-offset: 2px;
}

.timeline-event.agenda-button {
  width: calc(var(--lane-width) - 14px);
}

.timeline-event.agenda-button:hover {
  border-color: #8ccaf0;
  border-left-color: var(--primary-dark);
  background: linear-gradient(180deg, #ffffff 0%, #eaf7ff 100%);
  box-shadow: 0 12px 26px rgba(37, 118, 176, 0.16);
}

.agenda-time {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 820;
}

.agenda-item b {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.agenda-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.agenda-open {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 820;
}

.agenda-empty {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed #cfe2f3;
  border-radius: var(--radius);
  background: white;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.agenda-empty .icon {
  color: var(--primary-dark);
}

.task-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.task-detail {
  max-width: 980px;
}

.manual-task {
  margin-top: 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
}

.manual-fields {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.trust-panel {
  padding: 18px;
}

.danger-panel {
  margin-top: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: #ffd2d2;
  background: #fffafa;
}

.danger-panel > div {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.danger-panel > div > span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--danger);
  background: var(--danger-bg);
  flex: 0 0 auto;
}

.danger-panel h2 {
  margin: 0 0 6px;
}

.danger-panel p {
  margin: 0;
}

.delete-confirm-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #ffd2d2;
  border-radius: var(--radius);
  background: #fffafa;
  box-shadow: var(--shadow-soft);
}

.delete-confirm-panel h3 {
  margin: 0 0 8px;
}

.delete-confirm-panel ul {
  margin: 12px 0;
  padding-left: 20px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  line-height: 1.45;
}

.confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 12px 0 14px;
  color: var(--text);
  font-weight: 720;
  line-height: 1.35;
}

.confirm-check input {
  margin-top: 3px;
}

.action-tile {
  padding: 18px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.action-tile p {
  min-height: 50px;
  margin-bottom: 2px;
}

.danger-zone {
  border-color: #ffd2d2;
  background: #fffafa;
}

.danger-zone > span {
  color: var(--danger);
  background: var(--danger-bg);
}

.alert {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: white;
  color: var(--text);
  margin-top: 14px;
}

.alert.success {
  color: #20844b;
  background: var(--safe-bg);
  border-color: #bee8ce;
}

.alert.warn {
  color: #9b650b;
  background: var(--warn-bg);
  border-color: #f6d99c;
}

.alert.compact {
  margin: 10px 0;
  padding: 9px 10px;
}

.invite-result {
  margin-top: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid #bee8ce;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f6fff9 0%, #ffffff 100%);
  box-shadow: var(--shadow);
}

.invite-result-icon {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--safe);
  background: var(--safe-bg);
}

.invite-result-body h3 {
  margin: 0 0 8px;
}

.invite-result-body p {
  max-width: 880px;
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.invite-result-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.invite-result-meta span {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: white;
  display: grid;
  gap: 5px;
}

.invite-result-meta b {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.invite-result-meta code,
.invite-result-meta a {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.invite-result-next {
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--safe);
  font-weight: 680;
  line-height: 1.35;
}

.code-block {
  max-height: 360px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid #263544;
  border-radius: var(--radius);
  background: #101923;
  color: #e7eef7;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.privacy-note {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  background: var(--safe-bg);
  border: 1px solid #bee8ce;
  border-radius: var(--radius);
  padding: 10px 12px;
  line-height: 1.45;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: white;
}

.admin-table th,
.admin-table td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #f8fbfd;
}

.admin-table td {
  font-size: 14px;
}

.admin-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-table code {
  font-size: 12px;
  color: var(--primary-dark);
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .public-nav {
    grid-template-columns: auto 1fr auto;
    padding: 0 18px;
  }

  .nav-links {
    gap: 2px;
  }

  .feature-grid,
  .value-flow,
  .legal-summary,
  .setup-progress-steps,
  .grid.cols-3,
  .grid.cols-4,
  .chat-help-grid,
  .calendar-board,
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-board {
    grid-template-columns: 1fr;
  }

  .invite-result-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  h1 {
    font-size: 44px;
  }

  .public-nav {
    min-height: 66px;
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .auth-page,
  .manual-task,
  .onboarding-card {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side-link {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    min-height: 44px;
    padding: 6px 8px;
  }

  .side-icon {
    width: 30px;
    height: 30px;
  }

  .side-icon .icon {
    width: 17px;
    height: 17px;
  }

  .side-logout {
    display: none;
  }

  .app-top {
    position: static;
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .trust-row {
    width: 100%;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .app-content {
    padding: 26px 16px 60px;
  }

  .page-head {
    flex-direction: column;
  }

  .work-queue-head {
    flex-direction: column;
  }

  .queue-tools,
  .calendar-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .space-filter {
    width: 100%;
  }

  .attention-strip,
  .decision-strip,
  .danger-panel,
  .decision-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .space-create {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .space-row {
    width: 100%;
  }

  .space-row .input {
    width: 100%;
  }

  .view-switch {
    width: 100%;
  }

  .view-switch button {
    flex: 1;
  }

  .onboarding-action,
  .manual-fields {
    justify-items: start;
    justify-content: flex-start;
  }

  .onboarding-action {
    padding-top: 0;
  }

  .calendar-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-grid {
    gap: 6px;
  }

  .calendar-day {
    min-height: 88px;
    padding: 8px;
  }

  .agenda-timeline {
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 10px;
  }

  .timeline-hours span {
    font-size: 12px;
  }

  .connect-code,
  .connect-command,
  .bot-link-box,
  .agreement-facts,
  .space-select,
  .agreement-title-row,
  .schedule-fields,
  .chat-row {
    grid-template-columns: 1fr;
  }

  .agreement-title-row {
    display: grid;
  }

  .chat-actions {
    justify-content: flex-start;
  }

  .chat-help-grid {
    grid-template-columns: 1fr;
  }

  .toggle-action,
  .danger-action {
    justify-items: start;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 36px;
  }

  .page-title {
    font-size: 34px;
  }

  .wordmark {
    font-size: 18px;
  }

  .public-home,
  .auth-page,
  .sections {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-logo .wordmark {
    font-size: 54px;
  }

  .hero-tagline {
    font-size: 20px;
  }

  .lead {
    font-size: 16px;
  }

  .feature-grid,
  .value-flow,
  .legal-summary,
  .setup-progress-steps,
  .grid.cols-3,
  .grid.cols-4,
  .action-grid {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    grid-template-columns: repeat(4, minmax(240px, 78vw));
  }

  .calendar-board {
    padding: 12px;
  }

  .calendar-nav {
    width: 100%;
  }

  .calendar-nav .btn:not(.icon-btn) {
    flex: 1;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-weekday {
    font-size: 11px;
  }

  .calendar-day {
    min-height: 72px;
    padding: 6px;
  }

  .calendar-day-head b {
    font-size: 15px;
  }

  .calendar-day-head em {
    min-width: 19px;
    height: 19px;
    font-size: 11px;
  }

  .calendar-day small {
    font-size: 11px;
  }

  .calendar-load {
    height: 6px;
  }

  .agenda-timeline {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .timeline-event {
    left: calc(var(--lane-left) + 7px);
    width: calc(var(--lane-width) - 9px);
    min-height: 44px;
    height: max(var(--event-height), 44px);
    padding: 9px 10px;
  }

  .timeline-event.agenda-button {
    width: calc(var(--lane-width) - 9px);
  }

  .timeline-event b {
    font-size: 14px;
  }

  .timeline-event .agenda-open {
    font-size: 12px;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-link {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .btn {
    width: 100%;
  }

  .public-nav .btn,
  .top-actions .btn {
    width: auto;
  }

  .hero-actions,
  .nav-actions,
  .manual-fields,
  .chat-actions,
  .actions {
    width: 100%;
  }

  .phone-shell {
    border-radius: 20px;
  }

  .account-chip {
    width: 100%;
  }

  .connect-code .btn,
  .connect-actions .btn,
  .bot-link-box .btn {
    width: 100%;
  }
}
