:root {
  --brand: #ff7a2f;
  --brand-strong: #e85d0f;
  --brand-soft: #fff1e6;
  --accent: #2f6fd0;
  --accent-soft: #e8f1ff;
  --page: #fdf6f1;
  --surface: #ffffff;
  --surface-soft: #fffaf4;
  --surface-quiet: #f7ede2;
  --line: #f3e4d8;
  --line-strong: #ead2bf;
  --text: #2b2018;
  --muted: #9a8b7d;
  --muted-soft: #b8aa9e;
  --success: #2e7d32;
  --success-bg: #e8f5e9;
  --warn: #b26a00;
  --warn-bg: #fdf3e0;
  --danger: #c0392b;
  --danger-bg: #fdeaea;
  --cost: #e8442c;
  --shadow: 0 2px 6px rgba(78, 52, 33, .04), 0 8px 24px rgba(78, 52, 33, .07);
  --shadow-soft: 0 2px 6px rgba(78, 52, 33, .035), 0 8px 18px rgba(78, 52, 33, .05);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
h1, h2, h3, p { margin-top: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: Consolas, "SFMono-Regular", "Microsoft YaHei", monospace; }

input, select, textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

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

input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 122, 47, .13);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 56px;
  background: linear-gradient(135deg, #100d0b 0%, #17110d 48%, #25170f 100%);
  color: #fff;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .024) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 80px),
    linear-gradient(120deg, rgba(255, 122, 47, .12), transparent 38%, rgba(255, 122, 47, .055));
  pointer-events: none;
}

.login-layout {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .8fr);
  gap: 80px;
  align-items: center;
}

.login-intro {
  max-width: 620px;
}

.login-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 44px;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand strong {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.login-brand span {
  margin-top: 4px;
  color: rgba(255, 255, 255, .58);
  font-size: 13px;
  font-weight: 700;
}

.login-panel {
  width: 100%;
  padding: 38px;
  border: 1px solid rgba(255, 221, 198, .12);
  border-radius: 16px;
  background: rgba(28, 25, 23, .9);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .3);
  backdrop-filter: blur(18px);
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #ff8c42, #ffb37a);
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(232, 93, 15, .18);
}

.brand-mark.small {
  width: 36px;
  height: 36px;
  font-size: 12px;
  box-shadow: none;
}

.login-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(232, 93, 15, .28);
}

.eyebrow {
  margin: 22px 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 32px;
  line-height: 1.15;
}

.login-copy {
  max-width: 560px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, .58);
  color: rgba(255, 255, 255, .55);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
}

.login-screen .eyebrow {
  margin: 0 0 16px;
  color: var(--brand);
}

.login-screen h1 {
  max-width: 640px;
  margin-bottom: 20px;
  color: #fff;
  font-size: 42px;
  font-weight: 900;
  line-height: 1.28;
}

.login-screen h1 span {
  display: block;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 52px;
}

.login-metrics div {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .11);
}

.login-metrics span,
.login-metrics strong {
  display: block;
}

.login-metrics span {
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.login-metrics strong {
  margin-top: 7px;
  color: rgba(255, 255, 255, .43);
  font-size: 13px;
  font-weight: 800;
}

.login-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .075);
}

.login-panel-head div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.login-panel-head strong {
  color: #fff;
  font-size: 21px;
  font-weight: 900;
}

.login-panel-head em {
  color: rgba(255, 255, 255, .42);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.login-entry-icon {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 150, 86, .28);
  border-radius: 10px;
  background: rgba(255, 122, 47, .11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 7px 18px rgba(0, 0, 0, .14);
}

.login-entry-icon::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 8px;
  width: 10px;
  height: 18px;
  border: 2px solid #ff9a5a;
  border-left: 0;
  border-radius: 0 4px 4px 0;
}

.login-entry-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 12px;
  width: 17px;
  height: 12px;
  background: #ff9a5a;
  clip-path: polygon(0 40%, 55% 40%, 55% 8%, 100% 50%, 55% 92%, 55% 60%, 0 60%);
}

.login-form { display: grid; gap: 16px; }

.login-field {
  gap: 10px;
  color: rgba(255, 255, 255, .86);
  font-size: 14px;
  font-weight: 800;
}

.login-field input {
  min-height: 52px;
  border-color: rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .045);
  color: #fff;
  font-size: 15px;
}

.login-field input::placeholder {
  color: rgba(255, 255, 255, .32);
}

.login-field input:focus {
  border-color: rgba(255, 122, 47, .78);
  background: rgba(255, 255, 255, .075);
  box-shadow: 0 0 0 4px rgba(255, 122, 47, .15);
}

.login-screen .login-field input:-webkit-autofill,
.login-screen .login-field input:-webkit-autofill:hover,
.login-screen .login-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  box-shadow: 0 0 0 1000px #292522 inset, 0 0 0 4px rgba(255, 122, 47, .15);
  transition: background-color 9999s ease-out;
}

.login-submit {
  min-height: 50px;
  margin-top: 4px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(232, 93, 15, .24);
}

.password-field-wrap {
  position: relative;
  display: block;
}

.password-field-wrap input {
  padding-right: 62px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 9px;
  background: transparent;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: rgba(255, 122, 47, .12);
}

.login-status {
  min-height: 20px;
  margin: -2px 0 0;
  color: #ff9185;
  font-size: 12px;
  font-weight: 700;
}

.caps-lock-hint {
  min-height: 16px;
  color: #ffc978;
  font-size: 11px;
  font-weight: 700;
}

.form-status {
  min-height: 18px;
  margin: 2px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

button:focus-visible,
a:focus-visible,
[role="option"]:focus-visible {
  outline: 3px solid rgba(47, 111, 208, .34);
  outline-offset: 2px;
}

.refresh-notice {
  position: fixed;
  right: 22px;
  top: 18px;
  z-index: 90;
  min-height: 38px;
  border: 1px solid #ffd0ad;
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 246px 1fr;
  transition: grid-template-columns .22s cubic-bezier(.2, .8, .2, 1);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 58px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px 14px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
  color: var(--text);
  backdrop-filter: blur(18px);
  transition: padding .22s cubic-bezier(.2, .8, .2, 1);
}

.sidebar-toggle {
  position: absolute;
  top: 24px;
  right: -15px;
  z-index: 12;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  padding: 0;
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 5px 14px rgba(78, 52, 33, .12);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.sidebar-toggle span {
  display: block;
  margin-top: -2px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.sidebar-toggle:hover {
  border-color: #ffbd91;
  background: var(--brand-soft);
  box-shadow: 0 7px 18px rgba(232, 93, 15, .17);
  transform: scale(1.04);
}

.sidebar-toggle:focus-visible {
  outline: 3px solid rgba(255, 122, 47, .22);
  outline-offset: 2px;
}

.app-shell.sidebar-collapsed .sidebar {
  gap: 0;
  padding: 18px 8px;
}

.app-shell.sidebar-collapsed .sidebar > :not(.sidebar-toggle) {
  display: none;
}

.sidebar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(120px 70px at 100% 0%, rgba(255, 179, 122, .24), transparent 70%),
    rgba(255, 250, 244, .72);
  box-shadow: var(--shadow-soft);
}

.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong {
  font-size: 15px;
  line-height: 1.2;
}
.sidebar-brand span {
  margin-top: 2px;
  color: var(--muted-soft);
  font-size: 12px;
}

.nav-list {
  position: relative;
  display: grid;
  gap: 4px;
}

.nav-indicator {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 0;
  height: 34px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 122, 47, .10);
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition:
    transform .22s cubic-bezier(.2, .8, .2, 1),
    height .22s cubic-bezier(.2, .8, .2, 1),
    opacity .16s ease,
    width .22s cubic-bezier(.2, .8, .2, 1);
  will-change: transform, height, width, opacity;
}

.nav-indicator::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .sidebar,
  .sidebar-toggle,
  .nav-indicator {
    transition: none;
  }
}

.nav-group-label {
  position: relative;
  z-index: 1;
  margin: 12px 12px 4px;
  color: var(--muted-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.nav-group-label:first-child {
  margin-top: 2px;
}

.nav-list button {
  position: relative;
  z-index: 1;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px 0 16px;
  text-align: left;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  transition: color .16s ease, transform .16s ease;
}

.nav-list button::before {
  display: none;
}

.nav-list button:hover {
  color: var(--brand-strong);
}

.nav-list button:hover {
  transform: none;
}

.nav-list button.active {
  color: var(--brand-strong);
}

.nav-list button.nav-subitem {
  min-height: 34px;
  margin-left: 12px;
  padding-left: 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.nav-list button.nav-subitem::before {
  display: none;
}

.sidebar-note {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.sidebar-note strong, .sidebar-note span { display: block; }
.sidebar-note span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 14px 10px 2px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.user-card div { min-width: 0; }

.user-card strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card .ghost-button {
  min-width: 52px;
  min-height: 30px;
  padding: 0 10px;
  border-color: var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 12px;
}

.user-card .ghost-button:hover {
  color: var(--brand-strong);
  border-color: #ffd9b8;
  background: var(--brand-soft);
}

.main {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(253, 246, 241, .82);
  backdrop-filter: blur(18px);
}

.breadcrumb {
  color: var(--muted-soft);
  font-size: 12px;
}

.topbar h2 {
  margin: 3px 0 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.topbar-actions, .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.topbar-actions button, .row-actions button, .modal-footer button {
  min-width: 70px;
  white-space: nowrap;
}

.page-root {
  width: min(1680px, 100%);
  flex: 1;
  margin: 0 auto;
  padding: 26px 40px 64px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .17s ease, transform .17s ease;
}

.page-root.analysis-root {
  padding-top: 16px;
  padding-bottom: 28px;
}

.page-root.permission-root {
  padding-top: 18px;
  padding-bottom: 28px;
}

.page-root.page-transitioning {
  will-change: opacity, transform;
}

.page-root.page-fading-out {
  opacity: 0;
  transform: translateY(8px);
}

.page-root.page-fading-in {
  opacity: 1;
  transform: translateY(0);
}

.page-root.dashboard-root {
  display: flex;
  flex-direction: column;
  padding-bottom: 26px;
}

.page-root.import-root {
  display: flex;
  flex-direction: column;
  padding-top: 18px;
  padding-bottom: 8px;
}

.page-root.platform-root {
  display: flex;
  flex-direction: column;
  padding-top: 18px;
  padding-bottom: 8px;
}

.page-root.user-list-root {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 18px;
  padding-bottom: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .page-root {
    transition: none;
  }
}

.primary-button, .secondary-button, .ghost-button, .danger-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}

.primary-button {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 122, 47, .35);
}

.primary-button:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.secondary-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(232, 93, 15, .04);
}

.secondary-button:hover {
  border-color: #ffd9b8;
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.theme-outline-button {
  min-width: 98px;
  min-height: 42px;
  padding: 0 20px;
  border-color: #ffd0ad;
  border-radius: 10px;
  background: #fff;
  color: var(--brand-strong);
  box-shadow: var(--shadow-soft);
}

.theme-outline-button:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.theme-outline-button.compact {
  min-width: 92px;
  min-height: 40px;
  padding: 0 16px;
}

.ghost-button {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--muted);
}

.ghost-button:hover {
  color: var(--text);
  background: #fff6ec;
}

.danger-button {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 8px 18px rgba(192, 57, 43, .14);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(480px, .9fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: radial-gradient(circle at 94% 6%, rgba(255, 138, 67, .09), transparent 28%), linear-gradient(135deg, #fff9f3, #fff);
  box-shadow: var(--shadow);
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
}

.hero .eyebrow {
  margin: 0 0 8px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: end;
}

.hero-stat {
  position: relative;
  overflow: hidden;
  min-height: 58px;
  display: grid;
  align-content: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.hero-stat::after {
  content: "";
  position: absolute;
  top: -34px;
  right: -20px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #fff5ed;
}

.hero-stat strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.hero-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(360px, .42fr); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  flex: 1 0 auto;
  align-items: stretch;
}

.dashboard-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-panel > .note-list,
.dashboard-panel > .empty-state {
  flex: 1;
}

.dashboard-panel > .empty-state {
  display: grid;
  align-content: center;
}

.dashboard-work-panel {
  min-height: 0;
}

.dashboard-detail-header {
  align-items: flex-start;
}

.dashboard-detail-header > div:first-child {
  display: grid;
  gap: 5px;
}

.dashboard-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff7ef;
}

.dashboard-view-tabs button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.dashboard-view-tabs button:hover {
  color: var(--brand-strong);
  background: rgba(255, 122, 47, .08);
}

.dashboard-view-tabs button.active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 6px 14px rgba(255, 122, 47, .22);
}

.dashboard-owner-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  padding: 0 0 12px;
}

.dashboard-owner-filter label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-owner-filter label span {
  flex: none;
  white-space: nowrap;
}

.dashboard-owner-filter select {
  width: 188px;
  min-width: 170px;
  max-width: 250px;
  min-height: 34px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.dashboard-load-more {
  display: flex;
  justify-content: center;
  padding: 16px;
}

.dashboard-project-map {
  display: grid;
  gap: 16px;
  padding: 8px 0 2px;
}

.project-tree,
.owner-project-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.project-root-node,
.owner-node,
.project-node {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.project-root-node {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #ff9a5c);
  box-shadow: 0 10px 22px rgba(255, 122, 47, .22);
}

.project-root-node strong,
.owner-node strong,
.project-node strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-root-node span,
.owner-node em,
.project-node span {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 13px;
}

.manager-root-node {
  align-self: start;
}

.owner-project-list {
  display: grid;
  gap: 18px;
}

.owner-project-row {
  min-width: 0;
}

.owner-node {
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 84px;
  border: 1px solid #ffd9b8;
  background: #fffaf6;
  color: var(--text);
}

.owner-node span {
  color: var(--muted);
  font-size: 12px;
}

.owner-node-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.owner-node-name strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-node em {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 850;
}

.project-branches {
  position: relative;
  display: grid;
  gap: 12px;
  padding-left: 18px;
}

.project-branches::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 1px;
  background: #ffd9b8;
}

.project-branch {
  position: relative;
  display: grid;
  gap: 8px;
}

.project-branch::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 24px;
  width: 18px;
  height: 1px;
  background: #ffd9b8;
}

.project-node {
  width: min(360px, 100%);
  border: 1px solid #ffd9b8;
  background: #fff;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(232, 93, 15, .06);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.project-node:hover {
  border-color: #ffbf91;
  background: #fff7ef;
  box-shadow: 0 8px 18px rgba(255, 122, 47, .13);
  transform: translateY(-1px);
}

.project-node span {
  color: var(--brand-strong);
}

.project-task-links {
  display: none;
  gap: 8px;
  padding-left: 14px;
}

.project-branch.expanded .project-task-links {
  display: grid;
}

.dashboard-root .panel-header .secondary-button,
.dashboard-root .task-row > .row-actions button {
  min-width: 64px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
}

.dashboard-root .task-row > .row-actions {
  min-width: 136px;
  gap: 7px;
}

.dashboard-root .task-row > .row-actions .primary-button {
  min-width: 72px;
  box-shadow: 0 5px 14px rgba(255, 122, 47, .22);
}

.analysis-hero {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 8px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(260px 160px at 100% 0%, rgba(255, 122, 47, .16), transparent 68%),
    linear-gradient(135deg, #fffaf5, #fff 72%);
  box-shadow: var(--shadow);
}

.analysis-hero .eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  line-height: 1.2;
}

.analysis-hero h1 {
  margin: 2px 0 4px;
  font-size: 22px;
  line-height: 1.25;
}

.analysis-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.analysis-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid #ffd2b3;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 850;
}

.analysis-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) minmax(150px, 1.15fr) minmax(135px, .9fr) minmax(145px, .95fr) minmax(135px, .9fr) auto auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.analysis-toolbar label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.analysis-toolbar input,
.analysis-toolbar select {
  min-height: 34px;
  margin-top: 3px;
  padding: 7px 10px;
  border-radius: 10px;
}

.analysis-toolbar button {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.analysis-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.analysis-answer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.analysis-answer-grid .analysis-metric {
  min-height: 64px;
  box-shadow: var(--shadow-soft);
}

.analysis-answer-grid .analysis-metric strong {
  font-size: 22px;
}

.analysis-metric {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.analysis-metric strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.analysis-metric span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.analysis-metric em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.analysis-board {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(430px, .64fr);
  gap: 10px;
  align-items: stretch;
  margin-bottom: 8px;
}

.analysis-board-main,
.analysis-board-side {
  min-width: 0;
}

.analysis-board-side {
  display: grid;
  gap: 10px;
}

.analysis-board-main,
.analysis-board-side,
.analysis-board-side .workflow-funnel-panel,
.analysis-board-main .publish-calendar-panel {
  height: 100%;
}

.analysis-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.analysis-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .56fr);
  gap: 14px;
}

.analysis-panel {
  min-width: 0;
}

.workflow-funnel-panel,
.member-breakdown-panel {
  margin-bottom: 0;
}

.workflow-funnel-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.workflow-funnel {
  display: grid;
  gap: 8px;
  align-content: space-between;
}

.workflow-funnel-row {
  display: grid;
  grid-template-columns: minmax(154px, .42fr) minmax(160px, 1fr);
  gap: 8px;
  align-items: center;
}

.workflow-funnel-copy {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.workflow-funnel-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 900;
}

.workflow-funnel-title {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.3;
}

.workflow-funnel-note {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.workflow-funnel-track {
  overflow: hidden;
  height: 28px;
  border-radius: 10px;
  background: #f4f1ee;
}

.workflow-funnel-bar {
  min-width: 58px;
  height: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 10px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(226, 128, 48, var(--bar-opacity, 1)), rgba(245, 181, 111, var(--bar-opacity, 1)));
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 122, 47, .10);
}

.workflow-funnel-bar em {
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(97, 52, 25, .18);
}

.business-flow-panel {
  margin-bottom: 10px;
}

.business-flow-nodes {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
}

.business-flow-node {
  flex: 1 0 136px;
  min-height: 142px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 3px solid #ef944d;
  border-radius: 8px;
  background: #fff;
}

.business-flow-node.has-risk {
  border-top-color: #d94a43;
  background: #fff9f8;
}

.business-flow-node.is-done {
  border-top-color: #3e9a70;
  background: #f7fcf9;
}

.business-flow-node-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.business-flow-node-head > span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 900;
}

.business-flow-node-head strong {
  font-size: 13px;
}

.business-flow-node-value {
  color: var(--text);
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.business-flow-node-value em {
  margin-left: 3px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.business-flow-node p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.business-flow-node-meta {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.danger-text {
  color: #bd3f38;
}

.business-flow-arrow {
  flex: 0 0 14px;
  display: grid;
  place-items: center;
  color: #d98644;
  font-size: 18px;
  font-weight: 900;
}

.business-flow-returns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
}

.business-flow-returns strong,
.business-flow-returns span {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
}

.business-flow-returns strong {
  background: var(--brand);
  color: #fff;
}

.business-flow-returns span {
  background: #f5f2ef;
  color: #665d56;
}

.analysis-flow-insights {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.analysis-flow-insights .flow-conversion-panel {
  grid-column: 1 / -1;
}

.flow-conversion-list {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
}

.flow-conversion-item {
  flex: 1 0 170px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.flow-conversion-item > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.flow-conversion-item strong {
  color: var(--brand-strong);
  font-size: 24px;
}

.flow-conversion-item span {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.flow-conversion-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.flow-conversion-arrow {
  flex: 0 0 14px;
  display: grid;
  place-items: center;
  color: #d98644;
  font-weight: 900;
}

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

.flow-loop-grid article {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf6;
}

.flow-loop-grid article > div {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.flow-loop-grid article strong {
  color: var(--brand-strong);
  font-size: 22px;
}

.flow-loop-grid article span,
.flow-loop-grid article p {
  color: var(--muted);
  font-size: 10px;
}

.flow-loop-grid article h4 {
  margin: 4px 0 0;
  font-size: 12px;
}

.flow-loop-grid article p {
  margin: 3px 0 0;
  line-height: 1.45;
}

.flow-bottleneck-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 9px;
}

.flow-bottleneck-summary > div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.flow-bottleneck-summary span,
.flow-bottleneck-summary strong {
  display: block;
}

.flow-bottleneck-summary span {
  color: var(--muted);
  font-size: 10px;
}

.flow-bottleneck-summary strong {
  margin-top: 3px;
  font-size: 12px;
}

.flow-longest-list {
  display: grid;
  gap: 6px;
}

.flow-longest-task {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.flow-longest-task:hover {
  border-color: #efaa73;
  background: #fffaf6;
}

.flow-longest-task.urgent {
  border-left: 3px solid #d94a43;
  background: #fff8f7;
}

.flow-longest-task strong,
.flow-longest-task small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-longest-task strong {
  font-size: 11px;
}

.flow-longest-task small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.flow-longest-task em {
  color: var(--brand-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.analysis-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, .48fr) minmax(160px, 1fr) 42px;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  margin: 8px 0;
}

.analysis-bar-row span {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-bar-row div {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-quiet);
}

.analysis-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #ffb37a);
}

.analysis-bar-row strong {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.analysis-placeholder {
  min-height: 166px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px dashed #efcdb5;
  border-radius: 14px;
  background: #fffaf6;
  text-align: center;
}

.analysis-placeholder strong {
  font-size: 16px;
}

.analysis-placeholder span {
  max-width: 420px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.analysis-member-grid {
  display: grid;
  gap: 10px;
}

.analysis-member-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf6;
}

.analysis-member-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.analysis-member-head strong {
  font-size: 14px;
}

.analysis-member-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.analysis-member-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.analysis-member-numbers div {
  padding: 8px;
  border-radius: 12px;
  background: var(--surface);
}

.analysis-member-numbers strong,
.analysis-member-numbers span {
  display: block;
}

.analysis-member-numbers strong {
  font-size: 18px;
  line-height: 1;
}

.analysis-member-numbers span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.analysis-progress-line {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-quiet);
}

.analysis-progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #ffb37a);
}

.analysis-member-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.analysis-risk-list,
.analysis-priority-list {
  display: grid;
  gap: 10px;
}

.analysis-risk-card,
.analysis-priority-card {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf6;
}

.analysis-risk-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.analysis-risk-card.warn {
  border-color: #f4d3a0;
  background: #fff9ed;
}

.analysis-risk-card.danger {
  border-color: #f3beb8;
  background: #fff5f3;
}

.analysis-risk-card strong,
.analysis-risk-card span,
.analysis-priority-card strong,
.analysis-priority-card span {
  display: block;
}

.analysis-risk-card strong,
.analysis-priority-card strong {
  font-size: 14px;
}

.analysis-risk-card span,
.analysis-priority-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.analysis-risk-card em {
  color: var(--brand-strong);
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.analysis-priority-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.analysis-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.analysis-priority-card em {
  padding: 4px 8px;
  border: 1px solid #ffd2b3;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.analysis-progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.analysis-progress-step {
  min-height: 148px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf6;
}

.analysis-progress-step strong,
.analysis-progress-step span {
  display: block;
}

.analysis-progress-step strong {
  font-size: 24px;
  line-height: 1;
}

.analysis-progress-step span {
  margin-top: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.analysis-progress-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.urgent-progress-panel {
  margin-bottom: 14px;
  background:
    radial-gradient(360px 150px at 100% 0%, rgba(255, 122, 47, .12), transparent 70%),
    var(--surface);
}

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

.urgent-progress-grid .analysis-metric {
  min-height: 86px;
  box-shadow: none;
}

.urgent-progress-grid .analysis-metric strong {
  font-size: 24px;
}

.urgent-funnel {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf6;
}

.urgent-funnel div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
}

.urgent-funnel div::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-quiet);
}

.urgent-funnel span {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #ffb37a);
}

.urgent-funnel strong {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.publish-calendar-panel {
  margin-bottom: 0;
}

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

.calendar-controls input {
  width: 132px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

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

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

.calendar-weekdays {
  margin-bottom: 5px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.calendar-cell {
  min-height: 48px;
  display: grid;
  align-content: space-between;
  gap: 4px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdfa;
}

.calendar-cell.empty {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
}

.calendar-cell.light {
  background: #fffaf6;
}

.calendar-cell.busy {
  border-color: #ffd2b3;
  background: #fff5eb;
}

.calendar-cell.hot {
  border-color: #ffb178;
  background: linear-gradient(180deg, #fff0e4, #fffaf6);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 47, .14);
}

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

.calendar-day-head strong {
  font-size: 13px;
}

.calendar-day-head span {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.calendar-day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.calendar-day-meta span,
.calendar-cell p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.calendar-day-progress {
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: #f2e2d4;
}

.calendar-day-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #ffb37a);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.calendar-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.calendar-legend i {
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffaf6;
}

.calendar-legend i.busy {
  border-color: #ffd2b3;
  background: #fff5eb;
}

.calendar-legend i.hot {
  border-color: #ffb178;
  background: #fff0e4;
}

.analysis-table th,
.analysis-table td {
  padding: 8px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.analysis-root .analysis-panel {
  padding: 10px;
}

.analysis-root .panel-header {
  gap: 8px;
  margin-bottom: 9px;
}

.analysis-root .panel-header h3 {
  flex: 0 0 auto;
  font-size: 14px;
  white-space: nowrap;
}

.analysis-root .panel-header h3::before {
  height: 14px;
}

.panel-action-button {
  min-width: 82px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 5px 14px rgba(255, 122, 47, .22);
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel.soft {
  background: linear-gradient(180deg, #fff, #fffaf4);
}

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

.panel-header h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.panel-header h3::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: var(--brand);
}

.settings-create {
  margin-bottom: 16px;
}

.settings-page-stack {
  display: grid;
  gap: 16px;
}

.user-list-page {
  flex: 1;
  min-height: 0;
  display: flex;
}

.platform-settings-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, .72fr);
  gap: 18px;
}

.platform-cookie-panel,
.platform-guide-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.platform-cookie-panel {
  background:
    radial-gradient(320px 180px at 100% 0%, rgba(255, 241, 230, .72), transparent 64%),
    var(--surface);
}

.platform-cookie-form {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  margin-top: 12px;
}

.platform-cookie-input {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.platform-cookie-input textarea {
  flex: 1;
  min-height: 100%;
  resize: none;
  line-height: 1.7;
}

.platform-cookie-actions {
  margin-top: 0;
}

.platform-guide-panel .guide-list {
  flex: 1;
  min-height: 0;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.platform-guide-panel .guide-list div {
  display: grid;
  align-content: center;
}

.settings-create {
  max-width: 980px;
}

.permission-root .settings-page-stack {
  gap: 0;
}

.permission-root .settings-create {
  width: 100%;
  max-width: none;
  margin-bottom: 0;
  padding: 22px 28px;
}

.permission-create-header {
  margin-bottom: 4px;
}

.permission-create-header h3 {
  font-size: 17px;
}

.permission-form {
  display: grid;
}

.permission-form-section {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.permission-section-label {
  display: grid;
  align-content: start;
  gap: 5px;
  padding-top: 2px;
}

.permission-section-label strong {
  font-size: 14px;
  font-weight: 800;
}

.permission-section-label span {
  color: var(--muted);
  font-size: 12px;
}

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

.permission-field-grid input,
.permission-field-grid select {
  min-height: 44px;
  border-radius: 8px;
}

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

.permission-role-options:has(> :only-child) {
  grid-template-columns: minmax(0, 360px);
}

.permission-role-option {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.permission-role-option:has(input:checked) {
  border-color: #ffad77;
  background: #fff7f0;
}

.permission-role-option:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.permission-role-option input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.permission-role-option span {
  font-size: 13px;
  font-weight: 700;
}

.permission-form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.permission-form-footer .primary-button {
  min-width: 160px;
  min-height: 42px;
}

.settings-users .account-table {
  font-size: 13px;
}

.user-list-page .settings-users {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.settings-users .table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.settings-users > .empty-state {
  flex: 1;
  min-height: 0;
  display: grid;
  align-content: center;
  justify-items: center;
}

.settings-users .account-table td:last-child {
  min-width: 248px;
  max-width: 280px;
}

.user-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, .7fr) minmax(130px, .6fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(260px 90px at 0% 0%, rgba(255, 122, 47, .08), transparent 70%),
    var(--surface-soft);
}

.user-filter-bar label {
  font-size: 12px;
}

.user-filter-bar input,
.user-filter-bar select {
  min-height: 40px;
  border-radius: 12px;
  background: var(--surface);
}

.user-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.user-filter-actions .secondary-button {
  min-height: 40px;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.toolbar input {
  width: min(390px, 100%);
  min-height: 44px;
  padding-left: 38px;
  background:
    linear-gradient(90deg, transparent 0, transparent 34px, var(--surface) 34px),
    radial-gradient(circle at 19px 50%, var(--brand) 0 3px, transparent 4px),
    var(--surface);
}
.toolbar select { width: auto; }

.batch-bar {
  position: sticky;
  top: 73px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid #ffd9b8;
  border-radius: 16px;
  background: var(--brand-soft);
  box-shadow: var(--shadow-soft);
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(232, 93, 15, .035);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}

.task-row.no-select { grid-template-columns: minmax(0, 1fr) auto; }
.task-row > .row-actions {
  min-width: 124px;
  gap: 6px;
}

.task-row > .row-actions button {
  min-width: 58px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 750;
}

.task-row > .row-actions .primary-button {
  min-width: 66px;
  box-shadow: 0 4px 12px rgba(255, 122, 47, .22);
}

.task-row > .row-actions .urgent-action-button {
  min-width: 58px;
  border-color: #ffd1aa;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.task-row > .row-actions .urgent-action-button:hover {
  background: #fff1e5;
}

.task-row:hover {
  border-color: #ffd9b8;
  border-left-color: var(--brand);
  background: #fffaf4;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.task-row.media-confirm-task-row {
  border-color: #e4a600;
  border-left-color: #c98400;
  background: linear-gradient(105deg, #fff5b8 0%, #ffe989 100%);
  box-shadow: inset 0 0 0 1px rgba(180, 120, 0, .08), 0 8px 20px rgba(180, 120, 0, .14);
}

.task-row.media-confirm-task-row:hover {
  border-color: #c98400;
  border-left-color: #ad6f00;
  background: linear-gradient(105deg, #ffef9a 0%, #ffdf62 100%);
  box-shadow: inset 0 0 0 1px rgba(160, 103, 0, .12), 0 10px 24px rgba(180, 120, 0, .2);
}

.task-row.urgent-task-row {
  border-color: #b80020;
  border-left-color: #850016;
  background: linear-gradient(100deg, #ff2442 0%, #ec1232 58%, #d90025 100%);
  box-shadow: inset 0 0 0 1px rgba(116, 0, 20, .24), 0 10px 26px rgba(184, 0, 32, .3);
}

.task-row.urgent-task-row:hover {
  border-color: #940019;
  border-left-color: #690011;
  background: linear-gradient(100deg, #ed1735 0%, #d90025 58%, #c40021 100%);
  box-shadow: inset 0 0 0 1px rgba(92, 0, 16, .3), 0 12px 30px rgba(145, 0, 25, .38);
}

.compact-task-list {
  gap: 8px;
}

.dashboard-urgency-list {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 16px;
}

.dashboard-task-card {
  display: grid;
  grid-template-rows: auto minmax(28px, 1fr) auto;
  gap: 12px;
  min-height: 142px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(232, 93, 15, .08);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}

.dashboard-task-card:hover {
  border-color: #ffd9b8;
  background: #fffaf4;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.dashboard-task-card.media-confirm-task-row {
  border-color: #e4a600;
  border-left-color: #c98400;
  background: linear-gradient(135deg, #fff5b8 0%, #ffe989 100%);
  box-shadow: inset 0 0 0 1px rgba(180, 120, 0, .08), 0 10px 25px rgba(180, 120, 0, .16);
}

.dashboard-task-card.media-confirm-task-row:hover {
  border-color: #c98400;
  border-left-color: #ad6f00;
  background: linear-gradient(135deg, #ffef9a 0%, #ffdf62 100%);
  box-shadow: inset 0 0 0 1px rgba(160, 103, 0, .12), 0 12px 28px rgba(180, 120, 0, .22);
}

.dashboard-task-card.urgent-task-row {
  border-color: #b80020;
  border-left-color: #850016;
  background: linear-gradient(135deg, #ff2442 0%, #ec1232 58%, #d90025 100%);
  box-shadow: inset 0 0 0 1px rgba(116, 0, 20, .24), 0 11px 30px rgba(184, 0, 32, .32);
}

.dashboard-task-card.urgent-task-row:hover {
  border-color: #940019;
  border-left-color: #690011;
  background: linear-gradient(135deg, #ed1735 0%, #d90025 58%, #c40021 100%);
  box-shadow: inset 0 0 0 1px rgba(92, 0, 16, .3), 0 14px 34px rgba(145, 0, 25, .4);
}

.urgent-task-row .dashboard-task-card-title,
.urgent-task-row .task-info-line,
.urgent-task-row .task-stay {
  color: #fff;
  font-weight: 900;
}

.urgent-task-row .pill:not(.urgent-pill) {
  border-color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .94);
  color: #9f1024;
}

.urgent-task-row .row-actions button,
.urgent-task-row .row-actions .primary-button {
  border-color: #fff;
  background: #fff;
  color: #b00020;
  box-shadow: 0 4px 12px rgba(88, 0, 15, .2);
}

.urgent-task-row .row-actions button:hover,
.urgent-task-row .row-actions .primary-button:hover {
  border-color: #ffe1e6;
  background: #ffecef;
  color: #8c0018;
}

.dashboard-root .urgent-task-row .urgent-pill {
  border-color: #c93229;
  background: #c93229;
  color: #fff;
  box-shadow: 0 4px 10px rgba(192, 57, 43, .2);
}

.dashboard-task-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.dashboard-task-card-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.dashboard-task-card-footer .row-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.dashboard-task-card-footer .row-actions button {
  min-width: 64px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
}

.dashboard-task-card-footer .row-actions .primary-button {
  min-width: 72px;
  box-shadow: 0 5px 14px rgba(255, 122, 47, .22);
}

.dashboard-task-card-footer .urgent-action-button {
  border-color: #ffd1aa;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.compact-task-row {
  min-height: 62px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 11px 14px;
}

.compact-task-row .task-title {
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 0;
}

.compact-task-row .pill {
  flex: 0 0 auto;
}

.task-check {
  width: 17px;
  height: 17px;
  min-height: 17px;
  padding: 0;
}

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

.task-title {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 0;
}

.task-title strong {
  min-width: 0;
  font-size: 15px;
}

.task-info-line {
  min-width: 0;
  flex: 1 1 auto;
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-stay {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.task-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.task-subtitle span {
  display: inline-flex;
  align-items: center;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.task-meta span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.pill {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.success {
  background: var(--success-bg);
  border-color: #c8e6c9;
  color: var(--success);
}

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

.pill.danger, .pill.brand {
  background: var(--brand-soft);
  border-color: #ffd9b8;
  color: var(--brand-strong);
}

.pill.danger {
  background: var(--danger-bg);
  border-color: #eb9c9c;
  color: var(--danger);
}

.pill.urgent-pill {
  background: #760014;
  border-color: #5d0010;
  color: #fff;
  font-weight: 850;
  box-shadow: 0 4px 10px rgba(76, 0, 13, .4);
}

.task-detail { display: grid; gap: 14px; }

.detail-summary {
  padding: 14px 16px;
}

.detail-summary .panel-header {
  margin-bottom: 0;
  align-items: center;
}

.detail-summary-header {
  min-height: 40px;
}

.detail-summary-line {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
}

.detail-summary-title {
  flex: 0 1 auto;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-summary-meta {
  min-width: 0;
  display: inline-flex;
  flex: 1 1 auto;
  gap: 10px;
  align-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.detail-summary-meta > span {
  flex: 0 0 auto;
}

.detail-summary-meta > span:not(.pill) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.detail-summary-meta .pill {
  min-height: 22px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 800;
}

.detail-summary-link {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 17px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}

.detail-summary-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.detail-summary-edit-link {
  min-height: 38px;
  padding: 0 15px;
}

.manuscript-url-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.manuscript-url-editor.hidden {
  display: none;
}

.manuscript-url-editor label {
  margin: 0;
}

.manuscript-url-editor-actions {
  display: flex;
  gap: 8px;
}

.log-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.attachment-button {
  min-height: 30px;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-button:hover {
  border-color: #ffbf8f;
  background: var(--brand-soft);
}

.action-form input[type="file"] {
  min-height: 42px;
  padding: 8px 10px;
  background: var(--surface);
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff6ec;
}

.detail-tabs button {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.detail-tabs button:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.detail-tabs button.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 122, 47, .28);
}

.detail-panel-stage {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.detail-tab-panel {
  display: none;
  gap: 14px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}

.detail-tab-panel.active,
.detail-tab-panel.pre-enter,
.detail-tab-panel.leaving {
  display: grid;
  grid-area: 1 / 1;
}

.detail-tab-panel.active {
  opacity: 1;
  transform: translateY(0);
}

.detail-tab-panel.pre-enter {
  pointer-events: none;
}

.detail-tab-panel.leaving {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
  .detail-tab-panel {
    transition: none;
  }
}

.modal.wide .task-detail {
  height: 100%;
  min-height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.modal.wide .detail-panel-stage {
  min-height: 0;
  height: 100%;
}

.modal.wide .detail-tab-panel:is(.active, .pre-enter, .leaving) {
  min-height: 0;
}

.modal.wide .detail-tab-panel[data-detail-panel="overview"]:is(.active, .pre-enter, .leaving) {
  align-content: start;
  align-items: start;
  padding-bottom: 12px;
}

.modal.wide .detail-tab-panel.query-overview-panel:is(.active, .pre-enter, .leaving) {
  height: 100%;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  align-items: stretch;
}

.modal.wide .detail-tab-panel:not([data-detail-panel="overview"]):is(.active, .pre-enter, .leaving) {
  align-content: start;
  align-items: start;
}

.modal.wide .detail-tab-panel:not([data-detail-panel="overview"]):is(.active, .pre-enter, .leaving) > .panel {
  align-self: start;
}

.modal.wide .detail-tab-panel[data-detail-panel="times"]:is(.active, .pre-enter, .leaving) {
  align-content: start;
  align-items: start;
}

.modal.wide .detail-tab-panel[data-detail-panel="times"]:is(.active, .pre-enter, .leaving) > .time-record-panel {
  align-self: start;
}

.detail-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: 14px;
  align-items: start;
}

.detail-overview-main {
  min-height: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.query-overview-grid {
  grid-template-columns: minmax(0, .92fr) minmax(380px, 1.08fr);
}

.modal.wide .detail-tab-panel.query-overview-panel .detail-overview-grid.query-overview-grid {
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.modal.wide .detail-overview-grid.query-overview-grid .detail-overview-main {
  grid-template-rows: minmax(0, 1fr);
}

.modal.wide .detail-overview-grid.query-overview-grid .detail-action-area {
  grid-template-rows: auto minmax(0, 1fr);
}

.modal.wide .detail-overview-grid.query-overview-grid .detail-action-grid {
  height: 100%;
}

.modal.wide .detail-overview-grid.query-overview-grid .detail-action-grid > .panel {
  height: 100%;
}

.modal.wide .detail-overview-grid {
  height: auto;
  min-height: 0;
  align-items: stretch;
}

.modal.wide .detail-overview-main {
  min-height: 0;
  grid-template-rows: auto auto;
  gap: 10px;
}

.detail-action-area {
  display: grid;
  gap: 10px;
}

.modal.wide .detail-action-area {
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.detail-section-title {
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 0 4px;
}

.detail-section-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.detail-section-title h3::before {
  content: "";
  width: 4px;
  height: 16px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--brand);
  vertical-align: -2px;
}

.detail-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.detail-overview-grid .detail-action-grid {
  grid-template-columns: 1fr;
}

.modal.wide .detail-overview-grid .detail-action-grid {
  min-height: 0;
  height: 100%;
  gap: 10px;
}

.modal.wide .detail-overview-grid .detail-action-grid > .panel {
  height: 100%;
}

.modal.wide .detail-overview-grid .detail-section-title {
  min-height: 34px;
}

.modal.wide .detail-overview-grid .detail-section-title h3 {
  font-size: 14px;
}

.modal.wide .detail-overview-grid .detail-section-title span {
  font-size: 11px;
}

.action-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(255, 122, 47, .08), transparent 70%),
    var(--surface);
}

.action-form .panel-header {
  min-height: 30px;
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.action-form .panel-header h3 {
  font-size: 15px;
  font-weight: 800;
}

.action-form > p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf4;
  color: var(--muted);
  line-height: 1.65;
}

.action-form label {
  margin: 0;
}

.action-form .action-fill-field {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.action-form .action-fill-field textarea {
  height: 100%;
  min-height: 128px;
  resize: none;
}

.action-form > .primary-button,
.action-form > .secondary-button {
  align-self: flex-start;
  min-width: 154px;
  min-height: 42px;
  margin-top: 0;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
}

.platform-upload-form {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-content: stretch;
}

.platform-upload-form .panel-header,
.platform-upload-form .action-fill-field,
.platform-upload-form > .primary-button {
  grid-column: 1 / -1;
}

.platform-upload-form .action-fill-field textarea {
  min-height: 76px;
}

.platform-upload-form > .primary-button {
  justify-self: start;
}

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

.modal.wide .detail-overview-grid .detail-info-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  padding: 14px;
}

.modal.wide .detail-overview-grid .detail-info-panel .panel-header {
  min-height: 26px;
  margin-bottom: 8px;
}

.modal.wide .detail-overview-grid .detail-info-panel .detail-facts {
  height: auto;
  grid-auto-rows: minmax(52px, auto);
  gap: 8px;
}

.modal.wide .detail-overview-grid .detail-info-panel .detail-fact {
  min-height: 52px;
  padding: 8px 10px;
}

.modal.wide .detail-overview-grid .detail-info-panel .detail-fact span {
  margin-bottom: 4px;
  font-size: 11px;
}

.modal.wide .detail-overview-grid .detail-info-panel .detail-fact strong {
  font-size: 13px;
  line-height: 1.38;
}

.communication-panel {
  padding: 14px;
  background:
    radial-gradient(220px 110px at 100% 0%, rgba(255, 122, 47, .08), transparent 72%),
    var(--surface);
}

.communication-panel .panel-header {
  min-height: 28px;
  margin-bottom: 10px;
}

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

.communication-card {
  min-height: 92px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 244, .72);
}

.communication-card > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.communication-card strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.communication-card span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.communication-card p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.62;
  word-break: break-word;
}

.communication-card.empty {
  min-height: 74px;
  align-content: center;
  background: var(--surface-soft);
}

.communication-card.empty span {
  white-space: normal;
}

.modal.wide .detail-overview-grid .communication-panel {
  padding: 12px;
}

.modal.wide .detail-overview-grid .communication-panel .panel-header {
  min-height: 24px;
  margin-bottom: 8px;
}

.modal.wide .detail-overview-grid .communication-grid {
  gap: 8px;
}

.modal.wide .detail-overview-grid .communication-card {
  min-height: 72px;
  gap: 6px;
  padding: 10px;
}

.modal.wide .detail-overview-grid .communication-card.empty {
  min-height: 58px;
}

.modal.wide .detail-overview-grid .communication-card strong {
  font-size: 12.5px;
}

.modal.wide .detail-overview-grid .communication-card p {
  font-size: 12px;
  line-height: 1.45;
}

.modal.wide .detail-overview-grid .action-form,
.modal.wide .detail-overview-grid .platform-query-card {
  gap: 10px;
  padding: 14px;
}

.modal.wide .detail-overview-grid .action-form .panel-header,
.modal.wide .detail-overview-grid .platform-query-card .panel-header {
  min-height: 26px;
  padding-bottom: 8px;
}

.modal.wide .detail-overview-grid .action-form > p {
  padding: 8px 10px;
  line-height: 1.45;
}

.modal.wide .detail-overview-grid .action-form .action-fill-field {
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr);
}

.modal.wide .detail-overview-grid .action-form .action-fill-field textarea {
  height: 100%;
  min-height: 118px;
}

.modal.wide .detail-overview-grid .platform-upload-form .action-fill-field textarea {
  height: 72px;
  min-height: 72px;
}

.modal.wide .query-overview-grid .platform-query-card {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.modal.wide .query-overview-grid .query-action-copy {
  align-content: center;
}

.modal.wide .query-overview-grid .platform-query-actions {
  align-self: end;
}

.modal.wide .detail-overview-grid .action-form > .primary-button,
.modal.wide .detail-overview-grid .action-form > .secondary-button {
  min-height: 38px;
  padding: 0 16px;
}

.modal.wide .detail-overview-grid .query-action-copy {
  padding: 10px;
}

.modal.wide .detail-overview-grid .query-action-copy span {
  line-height: 1.45;
}

.modal.wide .detail-overview-grid .query-target-strip {
  gap: 5px;
  padding: 8px 10px;
}

.modal.wide .detail-overview-grid .detail-action-grid > .empty-state {
  padding: 20px;
}

.detail-fact {
  min-height: 62px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 244, .72);
}

.detail-fact span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.detail-fact strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.62;
  word-break: break-word;
}

.detail-fact .detail-code {
  color: #3b3028;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) {
  gap: 10px;
  align-content: start;
  align-items: start;
  padding-bottom: 0;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) > .panel {
  min-height: 0;
  align-self: start;
  padding: 14px;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) > .panel .panel-header {
  min-height: 26px;
  margin-bottom: 8px;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) .detail-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) .detail-fact {
  min-height: 54px;
  padding: 8px 10px;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) .detail-fact span {
  margin-bottom: 4px;
  font-size: 11px;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) .detail-fact strong {
  font-size: 12.5px;
  line-height: 1.35;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) .timeline {
  min-height: 0;
  gap: 7px;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) > .panel:last-child {
  min-height: 250px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) .timeline-item {
  padding: 8px 10px;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) .timeline-item strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) .timeline-item .muted {
  font-size: 11px;
  line-height: 1.45;
}

.modal.wide .detail-tab-panel[data-detail-panel="platform"]:is(.active, .pre-enter, .leaving) .empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 14px;
}

.query-summary-panel {
  background:
    radial-gradient(260px 110px at 0% 0%, rgba(255, 122, 47, .09), transparent 72%),
    var(--surface);
}

.query-id-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.modal.wide .query-overview-grid .query-id-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 8px;
}

.modal.wide .query-overview-grid .query-id-card {
  padding: 10px;
}

.modal.wide .query-overview-grid .query-summary-panel {
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.modal.wide .query-overview-grid .query-summary-list {
  height: 100%;
  grid-auto-rows: minmax(34px, 1fr);
}

.modal.wide .query-overview-grid .query-summary-row {
  min-height: 34px;
  padding: 7px 10px;
}

.query-id-card {
  padding: 12px;
  border: 1px solid #ffd9b8;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--brand-soft), #fff);
}

.query-id-card span,
.query-id-card strong {
  display: block;
}

.query-id-card span {
  margin-bottom: 5px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 850;
}

.query-id-card strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  word-break: break-word;
}

.query-summary-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.query-summary-row {
  min-height: 38px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px 11px;
  background: rgba(255, 250, 244, .82);
}

.query-summary-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.query-summary-row strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.platform-query-card {
  display: grid;
  gap: 12px;
  background:
    radial-gradient(280px 130px at 100% 0%, rgba(255, 122, 47, .10), transparent 72%),
    var(--surface);
}

.query-action-copy {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 244, .74);
}

.query-action-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.query-action-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
}

.query-target-strip {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px dashed #ffd0ad;
  border-radius: 14px;
  background: #fffaf4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.query-target-strip strong {
  color: var(--text);
  font-weight: 800;
}

.platform-query-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.platform-query-actions button {
  min-height: 44px;
}

.query-result-box {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
}

.query-result-box:empty {
  display: none;
}

.platform-correction-panel {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 14px;
  align-items: start;
  padding: 14px;
  background:
    radial-gradient(260px 120px at 100% 0%, rgba(178, 106, 0, .10), transparent 72%),
    var(--surface);
}

.platform-correction-panel .panel-header,
.platform-correction-panel .inline-alert,
.platform-correction-panel > p,
.platform-correction-panel .correction-reason {
  grid-column: 1 / -1;
}

.platform-correction-panel .panel-header,
.platform-correction-panel .inline-alert,
.platform-correction-panel > p {
  margin-bottom: 0;
}

.correction-header-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.correction-edit-button {
  min-width: 66px;
  min-height: 32px;
  padding: 0 12px;
  border-color: #ffd9b8;
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.correction-edit-button:disabled {
  opacity: 1;
  color: var(--muted);
  background: var(--surface-soft);
  box-shadow: none;
}

.platform-correction-panel .inline-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
}

.platform-correction-panel .inline-alert span {
  text-align: right;
  word-break: break-word;
}

.platform-correction-panel > p {
  line-height: 1.6;
}

.platform-correction-panel label {
  min-width: 0;
  gap: 6px;
}

.platform-correction-panel input {
  min-height: 38px;
}

.platform-correction-panel textarea {
  min-height: 74px;
  resize: none;
}

.platform-correction-panel input[readonly],
.platform-correction-panel textarea[readonly] {
  border-color: var(--line);
  background: #fffaf4;
  color: #4a3a2f;
  cursor: default;
}

.platform-correction-panel input[readonly]:focus,
.platform-correction-panel textarea[readonly]:focus {
  border-color: var(--line);
  box-shadow: none;
}

.platform-correction-panel.is-editing input,
.platform-correction-panel.is-editing textarea {
  background: var(--surface);
}

.platform-correction-panel .primary-button {
  width: min(280px, 100%);
  min-height: 42px;
}

.platform-correction-panel .primary-button:disabled {
  box-shadow: none;
  transform: none;
}

.flow-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
}

.flow-stats .detail-fact {
  min-height: 52px;
  padding: 8px 11px;
  background: linear-gradient(180deg, #fff, #fffaf4);
}

.time-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.time-record-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 10px;
  padding: 16px;
}

.time-record-panel .panel-header {
  margin-bottom: 0;
}

.time-section + .time-section {
  margin-top: 12px;
}

.time-record-panel .time-section + .time-section {
  margin-top: 0;
}

.time-summary-section {
  background:
    radial-gradient(220px 80px at 0% 0%, rgba(255, 122, 47, .10), transparent 68%),
    #fffaf4;
}

.time-detail-section {
  min-height: 0;
  background: linear-gradient(180deg, #fff, rgba(255, 250, 244, .72));
}

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

.time-section-head strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.time-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.danger-note {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  color: var(--danger);
  text-align: left;
}

.danger-note strong {
  font-size: 14px;
}

.empty-state.danger-note.platform-reject-alert {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #efb8b8;
  border-radius: 10px;
  background: #fff8f7;
  color: var(--text);
  text-align: left;
}

.platform-reject-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(180, 42, 42, .18);
}

.platform-reject-content {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.platform-reject-heading {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.platform-reject-heading strong {
  color: var(--danger);
  font-size: 15px;
  font-weight: 900;
}

.platform-reject-note-id {
  min-width: 0;
  display: inline-flex;
  gap: 7px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
}

.platform-reject-note-id em {
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 700;
}

.platform-reject-note-id code {
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-family: inherit;
  font-size: 12px;
}

.platform-reject-reason {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 9px;
  border-top: 1px solid rgba(190, 65, 65, .14);
}

.platform-reject-reason > span {
  color: var(--danger);
  font-size: 12px;
  font-weight: 850;
}

.platform-reject-reason p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.inline-alert {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--text);
  line-height: 1.6;
}

.inline-alert strong {
  font-size: 13px;
}

.inline-alert span {
  color: var(--muted);
  font-size: 12px;
}

.inline-alert.warn {
  border-color: #f4d6a5;
  background: var(--warn-bg);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 244, .72);
}

.timeline-item strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.timeline-item .muted {
  color: #8f8174;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
  word-break: break-word;
}

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

.form-grid .full { grid-column: 1 / -1; }

.collaboration-field {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.collaboration-field legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.collaboration-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.collaboration-option {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.collaboration-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.collaboration-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.collaboration-option span,
.collaboration-option small {
  display: block;
}

.collaboration-option small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(52px, auto);
  gap: 7px;
}

.time-cell {
  min-height: 52px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.time-cell span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.time-cell strong {
  font-size: 12.5px;
  line-height: 1.3;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(43, 32, 24, .42);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.confirm-root {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(43, 32, 24, .42);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.confirm-root.confirm-visible {
  opacity: 1;
  pointer-events: auto;
}

.confirm-dialog {
  width: min(440px, 100%);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(43, 32, 24, .18);
  opacity: 0;
  transform: translateY(10px) scale(.985);
  transition: opacity .18s ease, transform .18s ease;
}

.confirm-visible .confirm-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.confirm-dialog-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 22px;
  font-weight: 900;
}

.confirm-dialog-content h3 {
  margin: 1px 0 8px;
  color: var(--text);
  font-size: 18px;
}

.confirm-dialog-content p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.confirm-dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.confirm-discard-button {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.confirm-discard-button:hover {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
}

@media (prefers-reduced-motion: reduce) {
  .confirm-root,
  .confirm-dialog {
    transition: none;
  }
}

.modal-root.modal-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-root.modal-closing {
  opacity: 0;
  pointer-events: none;
}

.modal {
  width: min(1020px, 100%);
  max-height: min(88vh, 940px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px) scale(.985);
  transition: opacity .18s ease, transform .18s ease;
}

.modal-root.modal-visible .modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-root.modal-closing .modal {
  opacity: 0;
  transform: translateY(10px) scale(.985);
}

@media (prefers-reduced-motion: reduce) {
  .modal-root,
  .modal {
    transition: none;
  }
}

.modal.wide {
  width: min(1120px, calc(100vw - 44px));
  height: min(820px, calc(100vh - 44px));
  max-height: calc(100vh - 44px);
}

.modal.small { width: min(560px, 100%); }

.modal-header, .modal-footer {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fffaf4);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h3 { margin: 0; }

.modal-close {
  width: 34px;
  height: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  background: #fffaf4;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.modal.wide .modal-body {
  padding-bottom: 18px;
}

.modal.wide .modal-body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal.wide .modal-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: grid;
  gap: 10px;
}

.toast {
  width: min(420px, calc(100vw - 44px));
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.toast.error {
  border-color: #eb9c9c;
  background: var(--danger-bg);
  color: var(--danger);
}

.toast.success {
  border-color: #c8e6c9;
  background: var(--success-bg);
  color: var(--success);
}

.empty-state {
  padding: 32px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

.empty-rich {
  min-height: 180px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #fff, var(--surface-soft));
}

.result-notice {
  min-height: 112px;
  display: grid;
  place-items: center;
  text-align: center;
}

.result-notice strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.5;
}

.empty-rich strong {
  color: var(--text);
  font-size: 17px;
}

.empty-rich span {
  max-width: 520px;
  line-height: 1.7;
}

.empty-actions {
  justify-content: center;
  margin-top: 6px;
}

.table-scroll { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 12px;
  border-bottom: 1px solid #f9f1e8;
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(180deg, #fff6ec, #fdeeda);
}

.table tr:hover td { background: #fffaf4; }
.account-table th, .account-table td { white-space: nowrap; }

.project-table th,
.project-table td {
  padding: 14px 12px;
}

.project-table th {
  font-size: 13px;
  font-weight: 900;
}

.project-table td {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.project-table td strong {
  font-size: 14px;
  font-weight: 850;
}

.project-table td:last-child {
  font-weight: 800;
}

.project-table .pill {
  min-height: 24px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.account-password {
  min-width: 86px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.compact-actions {
  gap: 6px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.compact-actions button {
  min-width: 52px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.compact-actions [data-reset-password] {
  min-width: 72px;
}

.credential-view {
  display: grid;
  gap: 12px;
}

.credential-view div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.credential-view span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.credential-view strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.4;
  word-break: break-all;
}

.muted-row { opacity: .64; }

.chart-bar {
  display: grid;
  grid-template-columns: 122px 1fr 44px;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-quiet);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #ffb37a);
}

.upload-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.import-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.import-workflow {
  padding: 28px;
}

.import-root .import-workflow {
  flex: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 18px 24px;
}

.import-head {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.import-root .import-head {
  padding-bottom: 14px;
}

.import-head .eyebrow {
  margin: 0 0 8px;
}

.import-root .import-head .eyebrow {
  margin-bottom: 5px;
  font-size: 11px;
}

.import-head h3 {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 800;
}

.import-root .import-head h3 {
  margin-bottom: 5px;
  font-size: 22px;
}

.import-root .import-head p:last-child {
  margin-bottom: 0;
}

#downloadTemplateButton {
  align-self: flex-start;
  margin-top: 28px;
}

.import-root #downloadTemplateButton {
  min-height: 40px;
  margin-top: 22px;
}

.import-root #refreshCreateTaskOptionsButton {
  min-height: 40px;
  margin-top: 22px;
}

.import-form {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.import-root .import-form {
  min-height: 0;
  gap: 14px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin-top: 16px;
}

.import-root .single-task-form {
  grid-template-rows: auto auto;
}

.import-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
}

.import-root .import-step {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
}

.import-root .import-step:nth-of-type(2) {
  min-height: 0;
}

.step-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #ffb37a);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(255, 122, 47, .28);
}

.import-root .step-badge {
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.step-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.import-root .step-main {
  gap: 8px;
}

.import-root .import-step:nth-of-type(2) .step-main {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

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

.single-task-grid .full {
  grid-column: 1 / -1;
}

.single-task-grid label {
  min-width: 0;
  font-weight: 750;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.single-task-grid input,
.single-task-grid select {
  min-height: 46px;
  font-weight: 750;
}

.date-field {
  position: relative;
  cursor: pointer;
}

.date-field input[type="date"] {
  width: 100%;
  color: transparent;
  cursor: pointer;
}

.date-field input[type="date"]::-webkit-datetime-edit,
.date-field input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.date-field input[type="date"]::-webkit-datetime-edit-text,
.date-field input[type="date"]::-webkit-datetime-edit-month-field,
.date-field input[type="date"]::-webkit-datetime-edit-day-field,
.date-field input[type="date"]::-webkit-datetime-edit-year-field {
  color: transparent;
}

.date-field input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

.date-field-display {
  position: absolute;
  left: 14px;
  right: 42px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  pointer-events: none;
}

.date-field.has-value .date-field-display {
  color: var(--text);
}

.step-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}

.step-title strong {
  font-size: 18px;
  font-weight: 800;
}

.import-root .step-title strong {
  font-size: 17px;
}

.project-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

#refreshProjectsButton {
  height: 46px;
  min-height: 46px;
  align-self: end;
}

.project-search-field {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-search-box {
  position: relative;
  min-width: 0;
}

.project-search-field input[type="search"] {
  min-height: 46px;
  padding-left: 38px;
  background:
    radial-gradient(circle at 19px 50%, var(--brand) 0 3px, transparent 4px),
    var(--surface);
}

.project-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 30;
  display: none;
  gap: 8px;
  max-height: 236px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #ffd0ad;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(129, 74, 31, .14);
}

.project-search-results.open {
  display: grid;
}

.import-root .project-search-results {
  max-height: 218px;
}

.project-result-title {
  padding: 2px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.project-result-card {
  width: 100%;
  min-height: 50px;
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 250, 244, .72);
  color: var(--text);
  text-align: left;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.project-result-card strong {
  font-size: 13px;
  font-weight: 750;
}

.project-result-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.project-result-card:hover,
.project-result-card.selected,
.project-result-card.keyboard-active {
  border-color: #ffd0ad;
  background: var(--brand-soft);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.project-result-card.selected {
  box-shadow: inset 3px 0 0 var(--brand), var(--shadow-soft);
}

.project-result-card.keyboard-active {
  outline: 2px solid rgba(47, 111, 208, .32);
  outline-offset: -2px;
}

.project-search-empty {
  padding: 11px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 250, 244, .56);
  color: var(--muted);
  font-size: 12px;
}

.import-root .project-search-empty {
  padding: 8px 12px;
}

.upload-dropzone {
  position: relative;
  min-height: 210px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 30px;
  border: 1px dashed #ffd0ad;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 241, 230, .64), rgba(255, 255, 255, .96));
  color: var(--text);
  text-align: center;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.import-root .upload-dropzone {
  min-height: 86px;
  height: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  justify-items: start;
  align-items: center;
  align-content: center;
  gap: 4px 12px;
  padding: 13px 16px;
  text-align: left;
}

.upload-dropzone:hover,
.upload-dropzone.dragging {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 47, .12), var(--shadow-soft);
}

.upload-dropzone.has-error {
  border-color: #ff9dac;
  background:
    linear-gradient(180deg, rgba(255, 232, 238, .72), rgba(255, 255, 255, .96));
  box-shadow: inset 0 0 0 1px rgba(255, 36, 66, .10), 0 8px 18px rgba(255, 36, 66, .08);
}

.upload-dropzone.has-error .upload-icon {
  border-color: #ff9dac;
  color: #ff2442;
  box-shadow: 4px 5px 0 rgba(255, 36, 66, .08);
}

.upload-dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  width: 50px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid #ff9b62;
  border-radius: 12px;
  background: #fff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 6px 8px 0 rgba(255, 122, 47, .10);
}

.import-root .upload-icon {
  grid-row: 1 / span 2;
  width: 40px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 4px 5px 0 rgba(255, 122, 47, .09);
}

.import-root .upload-dropzone strong {
  grid-column: 2;
  line-height: 1.3;
}

.import-root .upload-dropzone .small {
  grid-column: 2;
}

.import-root .upload-selected {
  grid-column: 3;
  grid-row: 1 / span 2;
  white-space: nowrap;
}

.upload-selected {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-selected.has-file {
  border-color: #bbf7d0;
  background: var(--success-bg);
  color: var(--success);
}

.upload-selected.error {
  border-color: #ffc4cc;
  background: #fff1f4;
  color: #e3183a;
}

.import-submit-step {
  align-items: start;
}

.import-root .import-submit-step .step-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.import-submit {
  width: min(360px, 100%);
  min-height: 46px;
  font-size: 16px;
}

.import-root .import-submit {
  width: min(220px, 100%);
  min-height: 42px;
  font-size: 14px;
}

.import-root .import-submit-step p {
  margin: 0;
}

.import-progress {
  flex: 1 1 260px;
  min-width: 240px;
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 250, 244, .72);
}

.import-progress-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.import-progress-head strong {
  color: var(--brand-strong);
  font-size: 12px;
}

.import-progress-track {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #f4eadf;
}

.import-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #ffb37a);
  transition: width .28s ease;
}

.import-progress.success .import-progress-track span {
  background: linear-gradient(90deg, #4f9f5d, #86d993);
}

.import-progress.error .import-progress-head strong,
.import-progress.error .import-progress-head span {
  color: #e3183a;
}

.import-progress.error .import-progress-track span {
  background: linear-gradient(90deg, #ff2442, #ff9dac);
}

.project-choice {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #ffd9b8;
  border-left: 4px solid var(--brand);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--brand-soft), #fff);
}

.project-choice select {
  min-height: 48px;
  font-weight: 850;
}

.project-choice p { margin: 0; }

.upload-box {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
}

.upload-box input { background: var(--surface-soft); }

.upload-box span {
  font-weight: 600;
  line-height: 1.6;
}

.template-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.import-root .template-grid {
  gap: 6px;
  margin-top: 0;
}

.template-grid span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.import-root .template-grid span {
  padding: 4px 8px;
  font-weight: 750;
}

.guide-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.guide-list div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.guide-list strong, .guide-list span { display: block; }
.guide-list strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.guide-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1160px) {
  .permission-form-section { grid-template-columns: 130px minmax(0, 1fr); gap: 18px; }
  .permission-role-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-screen {
    padding: 40px;
  }
  .login-layout {
    width: min(720px, 100%);
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .login-brand {
    margin-bottom: 30px;
  }
  .login-screen h1 {
    font-size: 38px;
  }
  .login-metrics {
    margin-top: 36px;
  }
  .login-panel {
    max-width: 620px;
  }
  .app-shell { grid-template-columns: 190px 1fr; }
  .sidebar { padding: 16px 10px; }
  .sidebar-brand { padding: 10px; }
  .sidebar-brand strong { font-size: 13px; }
  .sidebar-brand span { font-size: 11px; }
  .nav-group-label { margin-left: 10px; }
  .nav-indicator {
    left: 0;
  }
  .nav-list button.nav-subitem { margin-left: 4px; padding-left: 12px; font-size: 12px; }
  .hero, .grid.two, .detail-action-grid, .detail-overview-grid, .communication-grid, .analysis-layout, .analysis-support-grid { grid-template-columns: 1fr; }
  .hero { gap: 16px; }
  .analysis-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .platform-settings-layout { grid-template-columns: 1fr; }
  .analysis-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-answer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analysis-flow-insights { grid-template-columns: 1fr; }
  .analysis-flow-insights .flow-conversion-panel { grid-column: auto; }
  .workflow-funnel-row { grid-template-columns: minmax(260px, .42fr) minmax(340px, 1fr); }
}

@media (max-width: 760px) {
  .hero { padding: 16px 18px; }
  .hero h1 { font-size: 24px; }
  .permission-root .settings-create { padding: 18px; }
  .permission-form-section { grid-template-columns: 1fr; gap: 12px; padding: 18px 0; }
  .permission-field-grid { grid-template-columns: 1fr; gap: 12px; }
  .permission-form-footer { align-items: stretch; flex-direction: column; }
  .permission-form-footer .primary-button { width: 100%; }
  .login-screen {
    padding: 20px;
  }
  .login-layout {
    gap: 22px;
  }
  .login-brand {
    margin-bottom: 22px;
  }
  .login-brand strong {
    font-size: 20px;
  }
  .login-screen h1 {
    font-size: 30px;
  }
  .login-copy {
    font-size: 14px;
  }
  .login-metrics {
    gap: 10px;
    margin-top: 26px;
  }
  .login-metrics div {
    padding-top: 10px;
  }
  .login-metrics span {
    font-size: 24px;
  }
  .login-panel {
    padding: 20px;
  }
  .login-panel-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 20px;
  }
  .app-shell { display: block; }
  .sidebar-toggle { display: none; }
  .app-shell.sidebar-collapsed .sidebar > .sidebar-brand { display: flex; }
  .app-shell.sidebar-collapsed .sidebar > .nav-list { display: grid; }
  .app-shell.sidebar-collapsed .sidebar > .user-card { display: grid; }
  .sidebar {
    position: static;
    height: auto;
  }
  .nav-list { grid-template-columns: repeat(3, 1fr); }
  .nav-group-label { display: none; }
  .nav-list button {
    padding: 0 6px;
    text-align: center;
    font-size: 12px;
    border-color: transparent;
  }
  .nav-list button::before { display: none; }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-left: 18px;
    padding-right: 18px;
  }
  .page-root {
    padding-left: 18px;
    padding-right: 18px;
  }
  .page-root.platform-root {
    min-height: auto;
    padding-bottom: 18px;
  }
  .platform-settings-layout {
    display: grid;
  }
  .platform-cookie-input textarea {
    min-height: 180px;
  }
  .analysis-hero {
    flex-direction: column;
  }
  .analysis-toolbar {
    grid-template-columns: 1fr;
  }
  .analysis-metrics,
  .analysis-answer-grid,
  .analysis-progress-steps,
  .analysis-member-numbers,
  .grid.three, .form-grid, .time-grid, .detail-facts, .flow-stats {
    grid-template-columns: 1fr;
  }
  .calendar-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .calendar-controls input {
    width: 100%;
  }
  .calendar-weekdays,
  .publish-calendar-grid {
    min-width: 760px;
  }
  .calendar-main {
    overflow-x: auto;
  }
  .analysis-priority-card,
  .analysis-risk-card {
    grid-template-columns: 1fr;
  }
  .flow-loop-grid,
  .flow-bottleneck-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .business-flow-panel .panel-header,
  .flow-conversion-panel .panel-header,
  .flow-loop-panel .panel-header,
  .flow-bottleneck-panel .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-detail-header {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-view-tabs {
    align-self: flex-start;
  }
  .dashboard-urgency-list {
    grid-template-columns: 1fr;
  }
  .dashboard-task-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .project-tree,
  .owner-project-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .project-branches {
    padding-left: 12px;
  }
  .project-branch::before {
    left: -12px;
    width: 12px;
  }
  .project-task-link-row {
    grid-template-columns: 1fr;
  }
  .workflow-funnel-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .workflow-funnel-track {
    height: 36px;
  }
  .platform-query-actions,
  .query-summary-row {
    grid-template-columns: 1fr;
  }
  .detail-summary .panel-header,
  .detail-summary-line {
    align-items: flex-start;
    flex-direction: column;
  }
  .detail-summary-line {
    gap: 8px;
  }
  .detail-summary-meta {
    flex-wrap: wrap;
    white-space: normal;
  }
  .detail-summary-actions,
  .detail-summary-link,
  .detail-summary-edit-link {
    width: 100%;
  }
  .manuscript-url-editor {
    grid-template-columns: 1fr;
  }
  .manuscript-url-editor-actions > button {
    flex: 1 1 0;
  }
  .platform-upload-form {
    grid-template-columns: 1fr;
  }
  .platform-correction-panel {
    grid-template-columns: 1fr;
  }
  .platform-correction-panel .primary-button {
    width: 100%;
  }
  .user-filter-bar {
    grid-template-columns: 1fr;
  }
  .user-filter-actions {
    justify-content: stretch;
  }
  .user-filter-actions .secondary-button {
    flex: 1;
  }
  .import-workflow {
    padding: 18px;
  }
  .import-head {
    align-items: stretch;
    flex-direction: column;
  }
  #downloadTemplateButton {
    margin-top: 10px;
  }
  #refreshCreateTaskOptionsButton {
    width: 100%;
    margin-top: 10px;
  }
  .import-step {
    grid-template-columns: 1fr;
  }
  .single-task-grid {
    grid-template-columns: 1fr;
  }
  .project-select-row {
    grid-template-columns: 1fr;
  }
  #refreshProjectsButton {
    width: 100%;
  }
  .upload-dropzone {
    min-height: 180px;
    padding: 22px;
  }
  .import-submit {
    width: 100%;
  }
  .task-row {
    grid-template-columns: 1fr;
  }
  .task-row.no-select {
    grid-template-columns: 1fr;
  }
  .row-actions {
    justify-content: flex-start;
  }
}
