@charset "UTF-8";

:root {
  --brown-950: #1c1511;
  --brown-900: #281d17;
  --brown-850: #33241b;
  --brown-800: #422e21;
  --brown-700: #5b3c28;
  --brown-600: #7b5232;
  --brown-500: #a16d3e;
  --gold-500: #c39359;
  --gold-400: #d6a96c;
  --gold-200: #ead6b8;
  --cream-50: #fbf9f5;
  --cream-100: #f5f0e8;
  --cream-200: #ece2d4;
  --paper: #fffefa;
  --ink: #2d2722;
  --ink-soft: #6d645b;
  --ink-muted: #998f85;
  --line: #e8dfd3;
  --line-strong: #d9cab9;
  --green-600: #31745b;
  --green-100: #e6f3ec;
  --amber-600: #a3651a;
  --amber-100: #fbefdc;
  --red-600: #b04b41;
  --red-100: #fae9e6;
  --blue-600: #476f92;
  --blue-100: #e8f0f6;
  --shadow-sm: 0 1px 2px rgba(49, 36, 26, 0.04);
  --shadow-md: 0 12px 34px rgba(62, 41, 25, 0.08);
  --shadow-lg: 0 28px 70px rgba(35, 24, 16, 0.24);
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-sans: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC",
    "Noto Sans CJK SC", sans-serif;
  --font-serif: "Noto Serif SC", "STSong", "SimSun", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--cream-100);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.app-shell.is-hidden,
.login-screen.is-hidden {
  display: none;
}

.login-screen {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  flex-direction: column;
  color: #fff7eb;
  background:
    radial-gradient(circle at 18% 20%, rgba(200, 146, 79, 0.2), transparent 30%),
    radial-gradient(circle at 88% 84%, rgba(180, 126, 67, 0.13), transparent 28%),
    linear-gradient(135deg, #1c1511 0%, #302118 53%, #4b3323 100%);
}

.login-screen::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.027) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, black, transparent 78%);
}

.login-layout {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1220px, calc(100% - 56px));
  min-height: calc(100vh - 80px);
  grid-template-columns: minmax(0, 1.35fr) minmax(370px, 0.65fr);
  align-items: center;
  gap: clamp(46px, 8vw, 118px);
  margin: 0 auto;
  padding: 58px 0;
}

.login-brand-panel {
  max-width: 690px;
}

.login-brand-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  padding: 15px;
  color: var(--gold-200);
  background: linear-gradient(135deg, rgba(214, 169, 108, 0.19), rgba(214, 169, 108, 0.04));
  border: 1px solid rgba(227, 192, 141, 0.35);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-brand-mark svg {
  stroke-width: 1.6;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  color: var(--gold-400);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.login-eyebrow::before {
  width: 24px;
  height: 1px;
  content: "";
  background: currentColor;
}

.login-brand-panel h1 {
  max-width: 660px;
  margin: 15px 0 13px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.025em;
}

.login-brand-description {
  max-width: 580px;
  margin: 0;
  color: rgba(246, 234, 218, 0.56);
  font-size: 12px;
  line-height: 1.9;
}

.login-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.login-feature-list span {
  padding: 7px 10px;
  color: rgba(255, 244, 229, 0.7);
  font-size: 9px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
}

.login-card {
  width: 100%;
  padding: 31px;
  color: var(--ink);
  background: rgba(255, 254, 250, 0.985);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  box-shadow: 0 32px 80px rgba(20, 13, 9, 0.38);
}

.login-card-heading > span {
  color: var(--brown-500);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.17em;
}

.login-card-heading h2 {
  margin: 8px 0 4px;
  color: var(--brown-900);
  font-family: var(--font-serif);
  font-size: 25px;
}

.login-card-heading p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
}

.login-form {
  display: grid;
  gap: 13px;
  margin-top: 23px;
}

.login-form .form-field label {
  color: var(--ink-soft);
  font-size: 10px;
}

.login-form .form-field input {
  height: 44px;
  padding: 0 12px;
  background: #fcfaf6;
  border-color: var(--line-strong);
}

.login-submit {
  height: 44px;
  margin-top: 2px;
  color: #fff9f0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--brown-800);
  border: 1px solid var(--brown-800);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.login-submit:hover {
  background: var(--brown-700);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.login-error {
  min-height: 16px;
  margin: -3px 0 0;
  color: var(--red-600);
  font-size: 9px;
  line-height: 1.5;
}

.login-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  color: var(--ink-soft);
  font-size: 8px;
  border-top: 1px solid var(--line);
}

.login-help small {
  color: var(--ink-muted);
  text-align: right;
}

.login-footer {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1220px, calc(100% - 56px));
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 0 auto;
  padding: 18px 0 23px;
  color: rgba(245, 233, 217, 0.34);
  font-size: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.user-permission-note {
  margin: 0 0 14px;
  padding: 11px 12px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
  background: var(--cream-100);
  border: 1px solid var(--cream-200);
  border-radius: 8px;
}

.user-option-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.user-option-meta span {
  color: var(--ink-muted);
  font-size: 7px;
}

.user-role {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 2px 7px;
  color: var(--blue-600);
  font-size: 8px;
  background: var(--blue-100);
  border-radius: 20px;
}

.user-role.admin {
  color: var(--brown-700);
  background: var(--cream-200);
}

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

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff8ef;
  background: var(--brown-950);
  box-shadow: 0 8px 30px rgba(36, 25, 17, 0.16);
}

.primary-bar {
  display: flex;
  width: 100%;
  max-width: 1800px;
  height: 68px;
  align-items: center;
  gap: 28px;
  margin: 0 auto;
  padding: 0 27px;
}

.brand {
  display: flex;
  width: 310px;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  padding: 0;
  color: #fff9f1;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  padding: 7px;
  color: var(--gold-200);
  background:
    linear-gradient(135deg, rgba(212, 168, 105, 0.2), rgba(212, 168, 105, 0.05));
  border: 1px solid rgba(227, 192, 141, 0.34);
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-mark svg {
  stroke-width: 1.65;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 3px;
  color: rgba(235, 219, 198, 0.43);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.primary-nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 2px;
}

.primary-nav-item {
  position: relative;
  height: 100%;
  padding: 0 14px;
  color: rgba(246, 237, 225, 0.6);
  font-size: 12px;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.primary-nav-item::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 2px;
  content: "";
  background: transparent;
  border-radius: 3px 3px 0 0;
}

.primary-nav-item:hover {
  color: #fff8ed;
  background: rgba(255, 255, 255, 0.035);
}

.primary-nav-item.active {
  color: #fff8ed;
}

.primary-nav-item.active::after {
  background: var(--gold-400);
}

.header-actions {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.header-search {
  position: relative;
  display: flex;
  width: min(260px, 22vw);
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  color: rgba(255, 248, 238, 0.48);
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.header-search:focus-within {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(213, 169, 108, 0.45);
}

.header-search > span {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.header-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: #fff9f1;
  font-size: 11px;
  background: transparent;
  border: 0;
  outline: none;
}

.header-search input::placeholder {
  color: rgba(244, 234, 221, 0.37);
}

.search-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  left: 0;
  display: none;
  overflow: hidden;
  padding: 6px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}

.search-popover.show {
  display: block;
}

.search-popover button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 9px;
  font-size: 11px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.search-popover button:hover {
  background: var(--cream-100);
}

.search-popover button span:first-child {
  width: 14px;
  height: 14px;
  color: var(--brown-500);
}

.search-popover button > span:last-child {
  min-width: 0;
}

.search-popover button strong,
.search-popover button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-popover button strong {
  font-size: 10px;
  font-weight: 500;
}

.search-popover button small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
}

.search-empty {
  padding: 15px 10px;
  color: var(--ink-muted);
  font-size: 10px;
  text-align: center;
}

.header-icon-button,
.mobile-nav-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 9px;
  color: rgba(255, 248, 238, 0.7);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  cursor: pointer;
}

.header-icon-button:hover,
.mobile-nav-button:hover {
  color: #fff8ed;
  background: rgba(255, 255, 255, 0.1);
}

.header-icon-button i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  background: #dc8d76;
  border-radius: 50%;
}

.account-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 2px 2px 6px;
  color: #fff8ef;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.account-avatar {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff6ea;
  font-family: var(--font-serif);
  font-size: 12px;
  background: var(--brown-600);
  border: 1px solid rgba(230, 194, 143, 0.38);
  border-radius: 50%;
}

.account-copy strong,
.account-copy small {
  display: block;
}

.account-copy strong {
  font-size: 10px;
  font-weight: 500;
}

.account-copy small {
  margin-top: 2px;
  color: rgba(244, 232, 217, 0.38);
  font-size: 8px;
}

.account-chevron {
  width: 12px;
  height: 12px;
  color: rgba(255, 255, 255, 0.37);
}

.mobile-nav-button {
  display: none;
}

.task-bar {
  display: flex;
  width: 100%;
  max-width: 1800px;
  min-height: 51px;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
  padding: 0 27px;
  color: var(--ink);
  background: #f8f4ed;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid var(--line-strong);
}

.task-context {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 13px;
}

.project-switcher {
  display: flex;
  min-width: 175px;
  max-width: 250px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  text-align: left;
  background: #fffefa;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.project-switcher:hover {
  border-color: var(--line-strong);
}

.project-status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--brown-400, #b58b64);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(181, 139, 100, 0.12);
}

.project-switcher.has-project .project-status-dot {
  background: var(--green-600);
  box-shadow: 0 0 0 3px rgba(49, 116, 91, 0.1);
}

.project-switcher-copy {
  min-width: 0;
  flex: 1;
}

.project-switcher-copy small,
.project-switcher-copy strong {
  display: block;
}

.project-switcher-copy small {
  color: var(--ink-muted);
  font-size: 7px;
}

.project-switcher-copy strong {
  overflow: hidden;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-switcher > span:last-child {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--ink-muted);
}

.task-context-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 9px;
  white-space: nowrap;
}

.breadcrumb span:nth-child(2) {
  width: 11px;
  height: 11px;
}

.breadcrumb strong {
  color: var(--ink-soft);
  font-weight: 500;
}

.module-task-nav {
  display: flex;
  min-width: 0;
  flex: 1;
  align-self: stretch;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}

.module-task-nav::-webkit-scrollbar {
  display: none;
}

.module-task-button {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.module-task-button:hover {
  color: var(--brown-700);
  background: rgba(122, 81, 48, 0.04);
}

.module-task-button.active {
  color: var(--brown-800);
  font-weight: 600;
  background: rgba(122, 81, 48, 0.065);
}

.module-task-button.active::after {
  position: absolute;
  right: 11px;
  bottom: 0;
  left: 11px;
  height: 2px;
  content: "";
  background: var(--brown-600);
  border-radius: 2px 2px 0 0;
}

.module-task-button > span:first-child {
  width: 14px;
  height: 14px;
  color: var(--brown-500);
}

.quick-add-button {
  display: inline-flex;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 0 11px;
  color: #fffaf3;
  font-size: 9px;
  white-space: nowrap;
  background: var(--brown-800);
  border: 1px solid var(--brown-800);
  border-radius: 7px;
  cursor: pointer;
}

.quick-add-button:hover {
  background: var(--brown-700);
}

.quick-add-button span {
  width: 13px;
  height: 13px;
}

.page-shell {
  width: 100%;
  max-width: 1660px;
  min-height: calc(100vh - 119px);
  margin: 0 auto;
  padding: 27px 30px 48px;
}

.page-enter {
  animation: pageIn 0.35s ease both;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-heading-copy span {
  display: block;
  margin-bottom: 6px;
  color: var(--brown-500);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.page-heading h1 {
  margin: 0;
  color: var(--brown-900);
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.page-heading p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

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

.btn {
  display: inline-flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  color: var(--ink);
  font-size: 10px;
  white-space: nowrap;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  background: var(--cream-50);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.btn-primary {
  color: #fffaf3;
  background: var(--brown-800);
  border-color: var(--brown-800);
}

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

.btn-gold {
  color: var(--brown-950);
  font-weight: 600;
  background: var(--gold-400);
  border-color: var(--gold-400);
}

.btn-gold:hover {
  background: #dfb47b;
}

.btn-soft {
  color: var(--brown-700);
  background: var(--cream-100);
  border-color: var(--cream-200);
}

.btn-danger {
  color: var(--red-600);
  background: #fff;
  border-color: #ecc9c4;
}

.btn-sm {
  min-height: 29px;
  padding: 0 9px;
  font-size: 9px;
  border-radius: 6px;
}

.empty-workspace {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  min-height: 300px;
  background:
    radial-gradient(circle at 80% 15%, rgba(199, 151, 90, 0.13), transparent 26%),
    linear-gradient(125deg, #2b1e17 0%, #493225 62%, #5d3e29 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: 0 17px 42px rgba(46, 31, 20, 0.14);
}

.empty-workspace::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, black, transparent 78%);
}

.empty-workspace-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 38px;
  color: #fff8ef;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-400);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.eyebrow::before {
  width: 20px;
  height: 1px;
  content: "";
  background: currentColor;
}

.empty-workspace h2 {
  max-width: 620px;
  margin: 13px 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(27px, 3vw, 39px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.03em;
}

.empty-workspace p {
  max-width: 650px;
  margin: 0;
  color: rgba(246, 235, 221, 0.55);
  font-size: 11px;
  line-height: 1.8;
}

.empty-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.btn-light-outline {
  color: #f8ecdc;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.17);
}

.btn-light-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.empty-workspace-side {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  margin: 23px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}

.setup-list {
  width: 100%;
}

.setup-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setup-list-head strong {
  font-family: var(--font-serif);
  font-size: 14px;
}

.setup-list-head small {
  color: rgba(245, 234, 220, 0.42);
  font-size: 8px;
}

.setup-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.setup-step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.setup-step-number {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  color: rgba(247, 235, 221, 0.48);
  font-size: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.setup-step.done .setup-step-number {
  color: var(--brown-900);
  background: var(--gold-400);
  border-color: var(--gold-400);
}

.setup-step-copy {
  min-width: 0;
  flex: 1;
}

.setup-step-copy strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
}

.setup-step-copy small {
  display: block;
  margin-top: 3px;
  color: rgba(245, 234, 220, 0.4);
  font-size: 8px;
}

.setup-step-tag {
  color: var(--gold-400);
  font-size: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 15px;
}

.stat-card {
  display: flex;
  min-width: 0;
  min-height: 100px;
  align-items: center;
  gap: 13px;
  padding: 17px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  padding: 10px;
  color: var(--brown-500);
  background: var(--cream-100);
  border-radius: 10px;
}

.stat-copy {
  min-width: 0;
}

.stat-copy small {
  display: block;
  color: var(--ink-muted);
  font-size: 9px;
}

.stat-copy strong {
  display: block;
  margin-top: 7px;
  color: var(--brown-900);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.stat-copy strong.empty-value {
  color: #b8aea3;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
}

.stat-copy p {
  overflow: hidden;
  margin: 7px 0 0;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(300px, 0.72fr);
  gap: 15px;
  margin-top: 15px;
}

.panel {
  min-width: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  border-bottom: 1px solid #eee7dd;
}

.panel-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--brown-900);
  font-family: var(--font-serif);
  font-size: 14px;
}

.panel-head h3 span {
  width: 16px;
  height: 16px;
  color: var(--brown-500);
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 8px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  color: var(--brown-600);
  font-size: 9px;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.text-button:hover {
  color: var(--brown-800);
}

.text-button svg {
  width: 11px;
  height: 11px;
}

.empty-chart {
  position: relative;
  display: grid;
  min-height: 250px;
  place-items: center;
  padding: 25px;
  background:
    linear-gradient(#f2ece3 1px, transparent 1px),
    linear-gradient(90deg, #f2ece3 1px, transparent 1px);
  background-size: 100% 50px, 14.285% 100%;
}

.empty-chart::before {
  position: absolute;
  top: 17px;
  right: 18px;
  bottom: 30px;
  left: 18px;
  pointer-events: none;
  content: "";
  border-left: 1px solid #e6ddd2;
  border-bottom: 1px solid #e6ddd2;
}

.chart-empty-copy {
  position: relative;
  z-index: 1;
  padding: 16px 20px;
  text-align: center;
  background: rgba(255, 254, 250, 0.9);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.chart-empty-copy span {
  display: grid;
  width: 27px;
  height: 27px;
  margin: 0 auto 8px;
  place-items: center;
  color: var(--ink-muted);
  background: var(--cream-100);
  border-radius: 7px;
}

.chart-empty-copy strong {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
}

.chart-empty-copy small {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 8px;
}

.checklist-panel {
  padding: 16px 17px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #f0eae1;
}

.checklist-item:first-child {
  padding-top: 0;
}

.checklist-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.checklist-icon {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  padding: 6px;
  color: var(--ink-muted);
  background: var(--cream-100);
  border-radius: 7px;
}

.checklist-icon span {
  width: 12px;
  height: 12px;
}

.checklist-copy {
  min-width: 0;
  flex: 1;
}

.checklist-copy strong {
  display: block;
  color: var(--ink);
  font-size: 9px;
  font-weight: 500;
}

.checklist-copy p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.45;
}

.checklist-value {
  color: var(--ink-muted);
  font-size: 8px;
  white-space: nowrap;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin: 23px 0 12px;
}

.section-heading h2 {
  margin: 0;
  color: var(--brown-900);
  font-family: var(--font-serif);
  font-size: 18px;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--ink-muted);
  font-size: 9px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
}

.process-card {
  position: relative;
  min-height: 127px;
  padding: 15px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.process-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.process-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  padding: 7px;
  color: var(--brown-600);
  background: var(--cream-100);
  border-radius: 8px;
}

.process-card:nth-child(2) .process-icon {
  color: var(--blue-600);
  background: var(--blue-100);
}

.process-card:nth-child(3) .process-icon {
  color: var(--amber-600);
  background: var(--amber-100);
}

.process-card:nth-child(4) .process-icon {
  color: var(--red-600);
  background: var(--red-100);
}

.process-card:nth-child(5) .process-icon {
  color: var(--green-600);
  background: var(--green-100);
}

.process-card strong {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 600;
}

.process-card p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.45;
}

.process-card > span:last-child {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 12px;
  height: 12px;
  color: #b7aea4;
}

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

.project-card {
  min-width: 0;
  padding: 17px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-card-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 8px;
  color: var(--brown-600);
  background: var(--cream-100);
  border-radius: 8px;
}

.status-pill {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  color: var(--green-600);
  font-size: 8px;
  white-space: nowrap;
  background: var(--green-100);
  border-radius: 20px;
}

.status-pill::before {
  width: 4px;
  height: 4px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.status-pill.pending {
  color: var(--amber-600);
  background: var(--amber-100);
}

.status-pill.danger {
  color: var(--red-600);
  background: var(--red-100);
}

.status-pill.info {
  color: var(--blue-600);
  background: var(--blue-100);
}

.project-card h3 {
  overflow: hidden;
  margin: 12px 0 4px;
  font-family: var(--font-serif);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card > p {
  overflow: hidden;
  margin: 0;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f0e9e0;
}

.project-card-meta small,
.project-card-meta strong {
  display: block;
}

.project-card-meta small {
  color: var(--ink-muted);
  font-size: 7px;
}

.project-card-meta strong {
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
}

.project-card-empty {
  display: grid;
  min-height: 185px;
  place-items: center;
  padding: 20px;
  color: var(--ink-muted);
  text-align: center;
  background: rgba(255, 254, 250, 0.58);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
}

.project-card-empty:hover {
  color: var(--brown-600);
  border-color: var(--brown-400, #b58b64);
}

.project-card-empty span {
  display: grid;
  width: 34px;
  height: 34px;
  margin: 0 auto 9px;
  place-items: center;
  padding: 8px;
  background: var(--cream-100);
  border-radius: 9px;
}

.project-card-empty strong {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
}

.project-card-empty small {
  display: block;
  margin-top: 5px;
  font-size: 8px;
}

/* Module pages */
.module-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.data-panel {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.data-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.data-filter-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-chip {
  height: 29px;
  padding: 0 10px;
  color: var(--ink-muted);
  font-size: 9px;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  color: var(--brown-800);
  background: var(--cream-100);
}

.filter-chip.active {
  font-weight: 600;
}

.table-search {
  display: flex;
  width: 190px;
  height: 31px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  background: #fcfaf6;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.table-search span {
  width: 13px;
  height: 13px;
  color: var(--ink-muted);
}

.table-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  font-size: 9px;
  background: transparent;
  border: 0;
  outline: none;
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap table {
  min-width: max(760px, 100%);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  text-align: left;
}

thead {
  color: var(--ink-muted);
  font-size: 8px;
  background: #faf7f2;
}

th {
  padding: 10px 14px;
  font-weight: 500;
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
  border-top: 1px solid #f0eae2;
}

tbody tr:hover {
  background: #fdfaf5;
}

td strong {
  color: var(--ink);
  font-weight: 500;
}

.row-title {
  display: flex;
  min-width: 170px;
  align-items: center;
  gap: 8px;
}

.row-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  padding: 6px;
  color: var(--brown-500);
  background: var(--cream-100);
  border-radius: 7px;
}

.row-copy {
  min-width: 0;
}

.row-copy strong,
.row-copy small {
  display: block;
}

.row-copy small {
  overflow: hidden;
  max-width: 250px;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.table-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  color: var(--brown-600);
  font-size: 8px;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.table-link:hover {
  color: var(--brown-900);
}

.table-link svg {
  width: 10px;
  height: 10px;
}

.table-link.delete {
  color: var(--red-600);
}

.table-foot {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  color: var(--ink-muted);
  font-size: 8px;
  border-top: 1px solid var(--line);
}

.module-empty-state {
  display: grid;
  min-height: 340px;
  place-items: center;
  padding: 36px 20px;
  text-align: center;
}

.empty-state-graphic {
  position: relative;
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto 17px;
  place-items: center;
  color: var(--brown-500);
  background:
    radial-gradient(circle at 35% 30%, #fff, transparent 48%),
    var(--cream-100);
  border: 1px solid var(--cream-200);
  border-radius: 22px;
}

.empty-state-graphic::before,
.empty-state-graphic::after {
  position: absolute;
  content: "";
  background: var(--line);
}

.empty-state-graphic::before {
  top: -10px;
  left: 50%;
  width: 1px;
  height: 10px;
}

.empty-state-graphic::after {
  top: 50%;
  right: -10px;
  width: 10px;
  height: 1px;
}

.empty-state-graphic span {
  width: 28px;
  height: 28px;
}

.module-empty-state h3 {
  margin: 0;
  color: var(--brown-900);
  font-family: var(--font-serif);
  font-size: 17px;
}

.module-empty-state p {
  max-width: 440px;
  margin: 7px auto 15px;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.7;
}

.module-empty-state .btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.detail-item .status-pill {
  margin-top: 2px;
}

.record-form-note {
  padding: 10px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
  background: var(--cream-100);
  border-radius: 7px;
}

/* Modal */
.modal-root {
  position: relative;
  z-index: 100;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(26, 19, 14, 0.54);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.modal {
  width: min(600px, 100%);
  max-height: min(790px, calc(100vh - 40px));
  overflow: auto;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.24s ease both;
}

.modal.wide {
  width: min(850px, 100%);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.987);
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 19px 21px 15px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  color: var(--brown-900);
  font-family: var(--font-serif);
  font-size: 18px;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--ink-muted);
  font-size: 9px;
}

.modal-close {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  padding: 7px;
  color: var(--ink-muted);
  background: var(--cream-100);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-body {
  padding: 19px 21px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 21px 18px;
  border-top: 1px solid var(--line);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.form-field {
  display: grid;
  gap: 5px;
}

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

.form-field label {
  color: var(--ink-soft);
  font-size: 9px;
}

.form-field label em {
  color: var(--red-600);
  font-style: normal;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  color: var(--ink);
  font-size: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.form-field input,
.form-field select {
  height: 38px;
  padding: 0 10px;
}

.form-field textarea {
  min-height: 76px;
  padding: 10px;
  line-height: 1.6;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(195, 147, 89, 0.1);
}

.project-list-modal {
  display: grid;
  gap: 8px;
}

.project-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.project-option.active {
  background: #fbf7f1;
  border-color: var(--gold-500);
}

.project-option-icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  padding: 8px;
  color: var(--brown-600);
  background: var(--cream-100);
  border-radius: 8px;
}

.project-option-copy {
  min-width: 0;
  flex: 1;
}

.project-option-copy strong,
.project-option-copy small {
  display: block;
}

.project-option-copy strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-option-copy small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 8px;
}

.project-option-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.project-manager-empty {
  padding: 28px 20px;
  color: var(--ink-muted);
  text-align: center;
  background: var(--cream-50);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
}

.project-manager-empty span {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 auto 9px;
  place-items: center;
  padding: 9px;
  color: var(--brown-500);
  background: var(--cream-100);
  border-radius: 9px;
}

.project-manager-empty strong {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
}

.project-manager-empty p {
  margin: 5px 0 13px;
  font-size: 8px;
}

.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-item {
  padding: 10px;
  background: var(--cream-100);
  border-radius: 7px;
}

.detail-item small {
  display: block;
  color: var(--ink-muted);
  font-size: 8px;
}

.detail-item strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 4px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
}

.notice-list {
  padding: 3px 17px;
}

.notice-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0eae2;
}

.notice-item:last-child {
  border-bottom: 0;
}

.notice-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  padding: 6px;
  color: var(--brown-500);
  background: var(--cream-100);
  border-radius: 7px;
}

.notice-copy {
  min-width: 0;
  flex: 1;
}

.notice-copy strong {
  display: block;
  font-size: 9px;
  font-weight: 500;
}

.notice-copy small {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.45;
}

.toast-stack {
  position: fixed;
  z-index: 200;
  top: 132px;
  right: 21px;
  display: grid;
  width: min(350px, calc(100vw - 40px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 254, 250, 0.98);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.3s ease both;
}

.toast.removing {
  animation: toastOut 0.25s ease both;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(18px);
  }
}

.toast-icon {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--green-600);
  background: var(--green-100);
  border-radius: 6px;
}

.toast-icon span {
  width: 12px;
  height: 12px;
}

.toast.error .toast-icon {
  color: var(--red-600);
  background: var(--red-100);
}

.toast.info .toast-icon {
  color: var(--blue-600);
  background: var(--blue-100);
}

.toast-copy strong {
  display: block;
  font-size: 9px;
}

.toast-copy p {
  margin: 3px 0 0;
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.45;
}

@media (max-width: 1340px) {
  .primary-bar {
    gap: 16px;
  }

  .brand {
    width: 255px;
  }

  .primary-nav-item {
    padding: 0 10px;
    font-size: 11px;
  }

  .primary-nav-item::after {
    right: 10px;
    left: 10px;
  }

  .account-copy {
    display: none;
  }

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

@media (max-width: 1080px) {
  .brand {
    width: 235px;
  }

  .brand-copy strong {
    font-size: 12px;
  }

  .header-search {
    width: 170px;
  }

  .task-context .breadcrumb {
    display: none;
  }

  .empty-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .empty-workspace-side {
    margin-top: 0;
  }

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

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

@media (max-width: 860px) {
  .login-layout {
    width: min(620px, calc(100% - 36px));
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 42px 0 34px;
  }

  .login-brand-panel {
    max-width: none;
    text-align: center;
  }

  .login-brand-mark {
    margin: 0 auto;
  }

  .login-brand-description {
    max-width: 520px;
    margin-right: auto;
    margin-left: auto;
  }

  .login-feature-list {
    justify-content: center;
    margin-top: 21px;
  }

  .login-card {
    width: min(500px, 100%);
    margin: 0 auto;
  }

  .login-footer {
    width: min(620px, calc(100% - 36px));
  }

  .primary-bar {
    height: 62px;
    padding: 0 16px;
  }

  .brand {
    width: auto;
    flex: 1;
  }

  .mobile-nav-button {
    display: grid;
    order: 2;
  }

  .primary-nav {
    position: absolute;
    top: 62px;
    right: 12px;
    left: 12px;
    display: none;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 7px;
    background: var(--brown-900);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
  }

  .primary-nav.open {
    display: flex;
  }

  .primary-nav-item {
    height: 40px;
    padding: 0 12px;
    text-align: left;
    border-radius: 7px;
  }

  .primary-nav-item::after {
    display: none;
  }

  .primary-nav-item.active {
    background: rgba(212, 169, 108, 0.11);
  }

  .header-actions {
    flex: 0 0 auto;
    order: 3;
  }

  .header-search {
    width: 35px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.055);
  }

  .header-search input {
    display: none;
  }

  .header-search .search-popover {
    right: 0;
    left: auto;
    width: 240px;
  }

  .account-chevron,
  .account-copy {
    display: none;
  }

  .task-bar {
    min-height: 58px;
    gap: 10px;
    padding: 7px 16px;
  }

  .project-switcher {
    min-width: 150px;
    max-width: 180px;
    padding: 6px 8px;
  }

  .task-context-divider,
  .quick-add-button {
    display: none;
  }

  .module-task-nav {
    overflow-x: auto;
  }

  .page-shell {
    padding: 21px 17px 38px;
  }

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

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .table-search {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .login-layout {
    width: calc(100% - 28px);
    gap: 24px;
    padding: 28px 0 25px;
  }

  .login-brand-mark {
    width: 58px;
    height: 58px;
    padding: 12px;
    border-radius: 15px;
  }

  .login-eyebrow {
    margin-top: 19px;
    font-size: 8px;
    letter-spacing: 0.11em;
  }

  .login-brand-panel h1 {
    margin: 11px 0 9px;
    font-size: 27px;
    line-height: 1.3;
  }

  .login-brand-description {
    font-size: 10px;
    line-height: 1.7;
  }

  .login-feature-list {
    gap: 6px;
    margin-top: 16px;
  }

  .login-feature-list span {
    padding: 6px 8px;
    font-size: 8px;
  }

  .login-card {
    padding: 24px 20px;
    border-radius: 15px;
  }

  .login-form {
    margin-top: 19px;
  }

  .login-help {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    margin-top: 15px;
    padding-top: 13px;
  }

  .login-help small {
    text-align: left;
  }

  .login-footer {
    width: calc(100% - 28px);
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 14px 0 18px;
  }

  .project-option {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .project-option-actions {
    width: 100%;
    flex-wrap: wrap;
    padding-left: 44px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
  }

  .brand-copy strong {
    max-width: 190px;
    font-size: 11px;
  }

  .header-icon-button {
    display: none;
  }

  .account-avatar {
    width: 31px;
    height: 31px;
  }

  .project-switcher {
    min-width: 135px;
    max-width: 145px;
  }

  .module-task-button {
    padding: 0 9px;
    font-size: 9px;
  }

  .page-heading h1 {
    font-size: 22px;
  }

  .empty-workspace-main {
    padding: 27px 22px;
  }

  .empty-workspace h2 {
    font-size: 27px;
  }

  .empty-workspace-side {
    margin: 0 13px 13px;
    padding: 18px;
  }

  .stats-grid,
  .module-stats {
    gap: 9px;
  }

  .stat-card {
    min-height: 94px;
    align-items: flex-start;
    padding: 13px;
  }

  .stat-icon {
    width: 33px;
    height: 33px;
    padding: 8px;
  }

  .stat-copy strong {
    font-size: 18px;
  }

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

  .project-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field.full {
    grid-column: auto;
  }

  .modal {
    max-height: calc(100vh - 24px);
  }

  .modal-head {
    padding: 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-foot {
    padding: 13px 16px 16px;
  }

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

  .toast-stack {
    top: 127px;
    right: 14px;
  }
}

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