:root {
  --navy-950: #0b1220;
  --navy-900: #111c33;
  --navy-800: #172554;
  --ink-950: #101828;
  --ink-800: #1d2939;
  --ink-700: #344054;
  --ink-600: #475467;
  --ink-500: #667085;
  --ink-400: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-blue: #eff6ff;
  --primary: #2457d6;
  --primary-dark: #1744b2;
  --primary-light: #dbeafe;
  --teal: #0f766e;
  --green: #079455;
  --amber: #dc6803;
  --red: #d92d20;
  --violet: #7c3aed;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .1), 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-md: 0 12px 32px rgba(16, 24, 40, .1);
  --shadow-lg: 0 24px 64px rgba(16, 24, 40, .16);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --sidebar: 248px;
  --topbar: 70px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 14px;
  background: #f4f6fa;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink-800);
  background: #f4f6fa;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: var(--primary);
  text-decoration: none;
}

svg {
  display: inline-block;
  flex: none;
}

.boot-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 75% 20%, rgba(59, 130, 246, .28), transparent 28%),
    linear-gradient(135deg, var(--navy-950), var(--navy-800));
}

.boot-screen .brand-mark {
  animation: breathe 1.8s ease-in-out infinite;
}

.boot-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.boot-copy strong {
  font-size: 18px;
  letter-spacing: .04em;
}

.boot-copy span {
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
}

@keyframes breathe {
  50% { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(37, 99, 235, .38); }
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  border-radius: 11px;
  box-shadow: 0 9px 24px rgba(37, 99, 235, .24);
  font-size: 17px;
  font-weight: 800;
}

.brand-logo {
  width: 214px;
  height: auto;
  display: block;
}

.brand-logo.large {
  width: 246px;
  height: auto;
}

.brand-symbol {
  width: 40px;
  height: 40px;
  flex: none;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .16);
}

.brand-symbol.large {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

.brand-mark.large {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 25px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.04fr) minmax(440px, .96fr);
  background: #fff;
}

.login-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 46px 58px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 15% 82%, rgba(14, 165, 233, .26), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(96, 165, 250, .24), transparent 26%),
    linear-gradient(145deg, #081226 0%, #102a56 58%, #123b71 100%);
}

.login-visual::before,
.login-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  pointer-events: none;
}

.login-visual::before {
  width: 620px;
  height: 620px;
  right: -250px;
  bottom: -280px;
  box-shadow:
    0 0 0 52px rgba(255, 255, 255, .025),
    0 0 0 104px rgba(255, 255, 255, .018);
}

.login-visual::after {
  width: 260px;
  height: 260px;
  left: -100px;
  top: 18%;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .05em;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-wordmark strong {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .06em;
}

.brand-wordmark small {
  color: rgba(255, 255, 255, .5);
  font-size: 9px;
  letter-spacing: .1em;
}

.login-system-name {
  padding-left: 13px;
  border-left: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .03em;
}

.login-brand small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.login-hero {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: auto 0;
  padding: 70px 0;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(147, 197, 253, .22);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, .1);
  font-size: 12px;
}

.login-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 0 5px rgba(96, 165, 250, .12);
}

.login-hero h1 {
  margin: 24px 0 20px;
  font-size: clamp(38px, 4.2vw, 62px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 700;
}

.login-hero h1 em {
  color: #7dd3fc;
  font-style: normal;
}

.login-hero > p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-size: 16px;
  line-height: 1.9;
}

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

.login-feature {
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(8px);
}

.login-feature svg {
  margin-bottom: 12px;
  color: #93c5fd;
}

.login-feature strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.login-feature span {
  color: rgba(255, 255, 255, .46);
  font-size: 11px;
  line-height: 1.6;
}

.login-footnote {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, .3);
  font-size: 11px;
}

.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 50px;
  background:
    radial-gradient(circle at 100% 0, #f2f7ff 0, transparent 30%),
    #fff;
}

.login-card {
  width: min(100%, 410px);
}

.login-card h2 {
  margin: 0 0 10px;
  color: var(--ink-950);
  font-size: 31px;
  letter-spacing: -.035em;
}

.login-card > p {
  margin: 0 0 34px;
  color: var(--ink-500);
  line-height: 1.7;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 17px;
}

.field > label,
.field-label {
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 600;
}

.field-hint {
  color: var(--ink-400);
  font-size: 11px;
  line-height: 1.5;
}

.input-wrap {
  position: relative;
}

.input-wrap > svg {
  position: absolute;
  left: 13px;
  top: 50%;
  color: var(--ink-400);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-wrap input {
  padding-left: 41px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-800);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input,
select {
  min-height: 41px;
  padding: 9px 12px;
}

textarea {
  min-height: 96px;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #b7c1d0;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #6a97ef;
  box-shadow: 0 0 0 3px rgba(36, 87, 214, .1);
}

input::placeholder,
textarea::placeholder {
  color: #a6afbd;
}

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

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink-700);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
}

.btn:hover {
  background: var(--surface-soft);
}

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

.btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 3px 8px rgba(36, 87, 214, .2);
}

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

.btn-outline {
  border-color: var(--line-strong);
}

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

.btn-danger:hover {
  background: #fef3f2;
}

.btn-ghost {
  min-height: 34px;
  padding: 6px 9px;
  color: var(--ink-600);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--ink-800);
  background: #f2f4f7;
}

.btn-lg {
  min-height: 45px;
  padding: 11px 20px;
  font-size: 13px;
}

.btn-icon {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.btn-block {
  width: 100%;
}

.login-submit {
  height: 46px;
  margin-top: 5px;
  font-size: 14px;
}

.login-error {
  display: none;
  padding: 10px 12px;
  margin: -5px 0 15px;
  border: 1px solid #fecdca;
  border-radius: 8px;
  color: #b42318;
  background: #fef3f2;
  font-size: 12px;
  line-height: 1.5;
}

.login-error.show {
  display: block;
}

.demo-box {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.demo-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--ink-500);
  font-size: 11px;
}

.demo-label span:last-child {
  color: var(--ink-400);
}

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

.demo-account {
  padding: 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-700);
  background: #fff;
}

.demo-account:hover {
  border-color: #b9cdf5;
  background: var(--surface-blue);
}

.demo-account strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.demo-account span {
  color: var(--ink-400);
  font-size: 10px;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  color: var(--ink-400);
  font-size: 10px;
  line-height: 1.6;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: var(--topbar) auto 0 0;
  z-index: 40;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, .68);
  background:
    radial-gradient(circle at 40% 100%, rgba(37, 99, 235, .18), transparent 35%),
    linear-gradient(180deg, var(--navy-950), #0d172a);
  border-right: 1px solid rgba(255, 255, 255, .05);
}

.sidebar-brand {
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 21px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.sidebar-brand .brand-logo {
  width: 184px;
  height: auto;
}

.sidebar-brand-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand-wrap .brand-symbol {
  width: 35px;
  height: 35px;
  border-radius: 9px;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .22);
}

.sidebar-brand-wrap > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-brand-wrap strong {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand-wrap small {
  color: rgba(255, 255, 255, .4);
  font-size: 9px;
  letter-spacing: .04em;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 22px 12px;
}

.nav-section {
  margin-bottom: 25px;
}

.nav-section-title {
  padding: 0 11px 8px;
  color: rgba(255, 255, 255, .28);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 3px 0;
  padding: 0 12px;
  border-radius: 9px;
  color: rgba(255, 255, 255, .62);
  font-size: 13px;
  font-weight: 500;
  transition: color .15s, background .15s;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, .05);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(37, 99, 235, .35), rgba(37, 99, 235, .13));
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #60a5fa;
}

.nav-item svg {
  color: rgba(255, 255, 255, .45);
}

.nav-item.active svg,
.nav-item:hover svg {
  color: #93c5fd;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(59, 130, 246, .24);
  font-size: 9px;
}

.sidebar-user {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, .055);
}

.sidebar-user-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  color: inherit;
  text-align: left;
  background: transparent;
}

.sidebar-user-card:hover {
  background: rgba(255, 255, 255, .05);
}

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

.sidebar-user-copy strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255, 255, 255, .35);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-shell {
  min-height: calc(100vh - var(--topbar));
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
}

.topbar-brand {
  width: calc(var(--sidebar) - 22px);
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 14px;
}

.topbar-brand .brand-symbol {
  width: 35px;
  height: 35px;
  border-radius: 9px;
  box-shadow: none;
}

.topbar-brand .brand-wordmark strong {
  color: var(--ink-900, #101828);
  font-size: 13px;
}

.topbar-brand .brand-wordmark small {
  color: var(--ink-400);
  font-size: 8px;
}

.topbar-title {
  min-width: 180px;
}

.topbar-title h1 {
  margin: 0;
  color: var(--ink-950);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.015em;
}

.topbar-title p {
  margin: 3px 0 0;
  color: var(--ink-400);
  font-size: 10px;
}

.global-search {
  position: relative;
  width: min(380px, 42vw);
}

.global-search .search-input {
  height: 36px;
  padding: 7px 42px 7px 37px;
  border-color: transparent;
  background: #f2f4f7;
  font-size: 12px;
}

.global-search .search-input:focus {
  border-color: #b9cdf5;
  background: #fff;
}

.global-search-icon {
  position: absolute;
  left: 12px;
  top: 10px;
  color: var(--ink-400);
}

.global-search kbd {
  position: absolute;
  right: 10px;
  top: 9px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-400);
  background: #fff;
  font-family: inherit;
  font-size: 9px;
}

.search-results {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  max-height: 430px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  color: var(--ink-700);
}

.search-result:hover {
  background: var(--surface-soft);
}

.search-result-icon {
  width: 31px;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-light);
}

.search-result strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.search-result span {
  color: var(--ink-400);
  font-size: 10px;
}

.search-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--ink-400);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.topbar-user-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 7px 3px 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.topbar-user-btn:hover {
  background: #f2f4f7;
}

.topbar-user-name {
  color: var(--ink-600);
  font-size: 10px;
  font-weight: 600;
}

.topbar-date {
  margin-right: 9px;
  color: var(--ink-500);
  font-size: 11px;
}

.mobile-menu {
  display: none;
}

.page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 30px 50px;
  animation: page-in .25s ease-out;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.page-heading h2 {
  margin: 0;
  color: var(--ink-950);
  font-size: 23px;
  letter-spacing: -.025em;
}

.page-heading p {
  margin: 7px 0 0;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.6;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.welcome-panel {
  position: relative;
  overflow: hidden;
  min-height: 158px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 34px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 78% 12%, rgba(125, 211, 252, .26), transparent 27%),
    radial-gradient(circle at 90% 120%, rgba(37, 99, 235, .5), transparent 42%),
    linear-gradient(115deg, #10234a, #174b89);
  box-shadow: 0 18px 42px rgba(23, 37, 84, .16);
}

.welcome-panel::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: 20px;
  top: -150px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(255, 255, 255, .025), 0 0 0 70px rgba(255, 255, 255, .016);
}

.welcome-copy {
  position: relative;
  z-index: 1;
}

.welcome-kicker {
  margin-bottom: 9px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
}

.welcome-copy h2 {
  margin: 0 0 9px;
  font-size: 26px;
  letter-spacing: -.03em;
}

.welcome-copy p {
  margin: 0;
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
  line-height: 1.7;
}

.welcome-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 9px;
}

.welcome-actions .btn {
  color: #fff;
  border-color: rgba(255, 255, 255, .17);
  background: rgba(255, 255, 255, .09);
  backdrop-filter: blur(8px);
}

.welcome-actions .btn:hover {
  background: rgba(255, 255, 255, .15);
}

.welcome-actions .btn-white {
  color: #173d75;
  border-color: #fff;
  background: #fff;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 106px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.stat-card::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  right: -25px;
  bottom: -30px;
  border-radius: 50%;
  background: currentColor;
  opacity: .045;
}

.stat-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 9px;
  color: var(--primary);
  background: #edf3ff;
}

.stat-card:nth-child(2) .stat-icon { color: var(--teal); background: #eaf9f7; }
.stat-card:nth-child(3) .stat-icon { color: var(--violet); background: #f3edff; }
.stat-card:nth-child(4) .stat-icon { color: var(--amber); background: #fff6e8; }

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.stat-value strong {
  color: var(--ink-950);
  font-size: 25px;
  line-height: 1;
}

.stat-value span {
  color: var(--ink-400);
  font-size: 10px;
}

.stat-label {
  margin-top: 7px;
  color: var(--ink-500);
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .9fr);
  gap: 17px;
}

.dashboard-main,
.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 17px;
  min-width: 0;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.card-header {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #eef0f4;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.card-title h3 {
  margin: 0;
  color: var(--ink-800);
  font-size: 14px;
}

.card-title svg {
  color: var(--ink-400);
}

.card-link {
  color: var(--primary);
  font-size: 11px;
  font-weight: 500;
}

.card-body {
  padding: 18px;
}

.schedule-list,
.task-list,
.policy-list-compact,
.activity-list {
  display: flex;
  flex-direction: column;
}

.schedule-item {
  position: relative;
  display: grid;
  grid-template-columns: 70px 3px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: flex-start;
  padding: 13px 16px;
  border-bottom: 1px solid #f1f3f6;
}

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

.schedule-time {
  padding-top: 2px;
  text-align: right;
}

.schedule-time strong {
  display: block;
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 600;
}

.schedule-time span {
  display: block;
  margin-top: 3px;
  color: var(--ink-400);
  font-size: 9px;
}

.schedule-color {
  align-self: stretch;
  min-height: 35px;
  border-radius: 3px;
}

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

.schedule-main strong {
  display: block;
  overflow: hidden;
  color: var(--ink-800);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-main span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: var(--ink-400);
  font-size: 10px;
}

.schedule-person {
  align-self: center;
}

.calendar-task-section {
  margin-top: 17px;
}

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

.calendar-task-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.calendar-task-panel header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 15px;
  border-bottom: 1px solid #eef0f4;
}

.calendar-task-panel header h3 {
  margin: 0;
  color: var(--ink-800);
  font-size: 12px;
}

.calendar-task-panel header .count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--ink-500);
  background: var(--surface-soft);
  font-size: 9px;
}

.calendar-task-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid #f1f3f6;
  cursor: pointer;
}

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

.calendar-task-item:hover {
  background: #fbfcfe;
}

.calendar-task-item .task-copy {
  min-width: 0;
}

.calendar-task-item .task-copy strong {
  white-space: normal;
  line-height: 1.55;
}

.calendar-task-item.overdue .task-copy strong {
  color: #b42318;
}

.calendar-task-empty {
  padding: 24px 14px;
  color: var(--ink-400);
  font-size: 10px;
  text-align: center;
}

.assignee-picker {
  max-height: 180px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
}

.assignee-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 10px;
}

.assignee-option input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.assignee-list {
  display: flex;
  align-items: center;
  padding-left: 6px;
}

.assignee-list .avatar {
  margin-left: -6px;
}

.task-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px;
  border-bottom: 1px solid #f1f3f6;
}

.task-row:last-child {
  border-bottom: 0;
}

.task-check {
  width: 17px;
  height: 17px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid #c7ced8;
  border-radius: 5px;
  color: #fff;
  background: #fff;
}

.task-submit-btn {
  min-height: 27px;
  flex: none;
  padding: 3px 8px;
  font-size: 8px;
}

.task-row:hover .task-check {
  border-color: var(--primary);
}

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

.task-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-copy span {
  display: block;
  margin-top: 4px;
  color: var(--ink-400);
  font-size: 9px;
}

.due-badge {
  flex: none;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--ink-500);
  background: var(--surface-soft);
  font-size: 9px;
}

.due-badge.urgent {
  color: #b42318;
  background: #fef3f2;
}

.priority-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--ink-400);
}

.priority-dot.high { background: var(--red); }
.priority-dot.medium { background: var(--amber); }
.priority-dot.low { background: var(--green); }

.project-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid #f1f3f6;
}

.project-compact:last-child {
  border-bottom: 0;
}

.project-symbol {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 9px;
  color: var(--project-color, var(--primary));
  background: color-mix(in srgb, var(--project-color, var(--primary)) 11%, white);
}

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

.project-compact-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-700);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-compact-copy span {
  display: block;
  margin-top: 4px;
  color: var(--ink-400);
  font-size: 9px;
}

.mini-progress {
  width: 66px;
  flex: none;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--ink-500);
  font-size: 10px;
}

.mini-progress span {
  display: block;
  margin-top: 5px;
  color: var(--ink-400);
  text-align: right;
  font-size: 9px;
}

.policy-compact {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f3f6;
}

.policy-compact:last-child {
  border-bottom: 0;
}

.policy-compact strong {
  display: block;
  overflow: hidden;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.policy-compact-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--ink-400);
  font-size: 9px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--ink-600);
  background: #f2f4f7;
  font-size: 9px;
  white-space: nowrap;
}

.tag-blue { color: #1849a9; background: #eff4ff; }
.tag-green { color: #067647; background: #ecfdf3; }
.tag-amber { color: #b54708; background: #fffaeb; }
.tag-violet { color: #6941c6; background: #f4f3ff; }
.tag-red { color: #b42318; background: #fef3f2; }

.activity-item {
  position: relative;
  display: flex;
  gap: 11px;
  padding: 11px 16px;
}

.activity-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 32px;
  top: 40px;
  bottom: -7px;
  width: 1px;
  background: #eaecf0;
}

.activity-copy {
  min-width: 0;
  flex: 1;
  padding-top: 2px;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.6;
}

.activity-copy strong {
  color: var(--ink-700);
  font-weight: 600;
}

.activity-copy time {
  display: block;
  margin-top: 2px;
  color: var(--ink-400);
  font-size: 9px;
}

.avatar {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--avatar-color, var(--primary));
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .08);
}

.avatar.sm {
  width: 25px;
  height: 25px;
  border-width: 1px;
  font-size: 8px;
}

.avatar.lg {
  width: 42px;
  height: 42px;
  border-width: 2px;
  font-size: 13px;
}

.avatar-stack {
  display: flex;
  padding-left: 6px;
}

.avatar-stack .avatar {
  margin-left: -6px;
}

.empty-state {
  padding: 45px 20px;
  text-align: center;
  color: var(--ink-400);
}

.empty-state svg {
  margin-bottom: 12px;
  color: #c7ced8;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-600);
  font-size: 13px;
}

.empty-state p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.empty-state.compact {
  padding: 26px 16px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.toolbar-search {
  position: relative;
  width: min(330px, 100%);
}

.toolbar-search input {
  padding-left: 37px;
  background: #fff;
}

.toolbar-search svg {
  position: absolute;
  left: 12px;
  top: 12px;
  color: var(--ink-400);
}

.toolbar select {
  width: auto;
  min-width: 120px;
}

.toolbar-spacer {
  flex: 1;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 17px;
  align-items: start;
}

.calendar-card {
  overflow: hidden;
}

.calendar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}

.calendar-head h3 {
  min-width: 120px;
  margin: 0;
  color: var(--ink-800);
  font-size: 16px;
}

.calendar-head-spacer {
  flex: 1;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink-400);
  font-size: 9px;
}

.legend-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 50%;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.calendar-weekdays div {
  padding: 9px 4px;
  text-align: center;
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 600;
}

.calendar-weekdays div:nth-child(6),
.calendar-weekdays div:nth-child(7) {
  color: var(--ink-400);
}

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

.calendar-day {
  position: relative;
  min-height: 112px;
  padding: 8px;
  border: 0;
  border-right: 1px solid #eef0f4;
  border-bottom: 1px solid #eef0f4;
  text-align: left;
  color: var(--ink-700);
  background: #fff;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day:hover {
  background: #fbfcfe;
}

.calendar-day.other-month {
  color: #c1c7d0;
  background: #fafbfc;
}

.calendar-day.selected {
  background: #f2f7ff;
  box-shadow: inset 0 0 0 1.5px #8bb3f8;
}

.calendar-day.today .day-number {
  color: #fff;
  background: var(--primary);
}

.day-number {
  width: 23px;
  height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
}

.day-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}

.day-event {
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  border-radius: 4px;
  color: var(--event-color, var(--primary));
  background: color-mix(in srgb, var(--event-color, var(--primary)) 8%, white);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-event::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.day-more {
  padding-left: 3px;
  color: var(--ink-400);
  font-size: 8px;
}

.day-panel {
  position: sticky;
  top: calc(var(--topbar) + 18px);
}

.day-panel-head {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.day-panel-date {
  color: var(--primary);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.04em;
}

.day-panel-head h3 {
  margin: 4px 0 0;
  color: var(--ink-600);
  font-size: 12px;
  font-weight: 500;
}

.day-panel-list {
  padding: 6px 14px 14px;
}

.day-panel-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 6px;
  color: var(--ink-500);
  font-size: 9px;
  font-weight: 600;
}

.day-panel-section-title span:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
}

.day-panel-event {
  display: flex;
  gap: 10px;
  padding: 13px 5px;
  border-bottom: 1px solid #f1f3f6;
}

.day-panel-event:last-child {
  border-bottom: 0;
}

.day-panel-line {
  width: 3px;
  min-height: 32px;
  flex: none;
  border-radius: 3px;
  background: var(--event-color, var(--primary));
}

.day-panel-event strong {
  display: block;
  color: var(--ink-700);
  font-size: 11px;
}

.day-panel-event span {
  display: block;
  margin-top: 5px;
  color: var(--ink-400);
  font-size: 9px;
  line-height: 1.5;
}

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

.project-card {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}

.project-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  background: var(--project-color, var(--primary));
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: #d3dcea;
  box-shadow: var(--shadow-md);
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.project-card-head .project-symbol {
  width: 40px;
  height: 40px;
}

.project-card-title {
  min-width: 0;
  flex: 1;
}

.project-card-title h3 {
  margin: 1px 0 4px;
  overflow: hidden;
  color: var(--ink-800);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-title span {
  color: var(--ink-400);
  font-size: 9px;
}

.project-description {
  height: 39px;
  overflow: hidden;
  margin: 14px 0 16px;
  color: var(--ink-500);
  font-size: 11px;
  line-height: 1.65;
}

.project-progress {
  margin-bottom: 15px;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid #f1f3f6;
}

.project-footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-400);
  font-size: 9px;
}

.project-footer-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 15px;
  color: var(--ink-400);
  font-size: 10px;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.project-hero {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 95% 10%, color-mix(in srgb, var(--project-color, var(--primary)) 12%, transparent), transparent 34%),
    #fff;
}

.project-hero .project-symbol {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}

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

.project-hero-copy h2 {
  margin: 1px 0 8px;
  color: var(--ink-950);
  font-size: 23px;
  letter-spacing: -.03em;
}

.project-hero-copy p {
  max-width: 800px;
  margin: 0;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.7;
}

.project-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  color: var(--ink-500);
  font-size: 10px;
}

.project-hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 17px;
  align-items: start;
}

.project-content {
  min-width: 0;
}

.project-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.tab {
  min-height: 34px;
  padding: 6px 14px;
  border: 0;
  border-radius: 7px;
  color: var(--ink-500);
  background: transparent;
  font-size: 11px;
  font-weight: 500;
}

.tab:hover {
  color: var(--ink-700);
  background: #f7f9fb;
}

.tab.active {
  color: var(--primary);
  background: #edf3ff;
  font-weight: 600;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 11px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.task-group {
  margin-bottom: 22px;
}

.task-board-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.task-board-toolbar .toolbar-search {
  flex: 1;
}

.task-group:last-child {
  margin-bottom: 0;
}

.task-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--ink-700);
  font-size: 12px;
  font-weight: 600;
}

.task-group-title > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}

.task-publisher {
  margin: -3px 0 9px;
  color: var(--ink-400);
  font-size: 8px;
}

.project-schedule-item.related {
  margin: 3px 0;
  padding-left: 10px !important;
  padding-right: 10px !important;
  border-radius: 8px;
  background: #f0f7ff;
  box-shadow: inset 3px 0 0 #3b82f6;
}

.key-schedule-card {
  border-color: #fed7d7;
}

.key-schedule-item {
  width: 100%;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid #f1f3f6;
  color: var(--ink-700);
  text-align: left;
  background: transparent;
}

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

.key-schedule-item:hover {
  color: var(--primary);
}

.key-countdown {
  padding: 5px;
  border-radius: 6px;
  color: #b42318;
  background: #fef3f2;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.key-schedule-item strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-schedule-item small {
  display: block;
  margin-top: 4px;
  color: var(--ink-400);
  font-size: 8px;
}

.new-event-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  color: #fff;
  background: #e11d48;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .06em;
  vertical-align: middle;
}

.archived-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 5px;
  padding: 9px 10px;
  border-top: 1px dashed #cbd5e1;
  color: var(--ink-400);
  font-size: 9px;
}

.archived-divider span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-schedule-item.archived {
  opacity: .72;
}

.schedule-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 17px 2px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.schedule-filter-bar .toolbar-search {
  flex: 1;
}

.schedule-filter-bar > input[type="date"] {
  width: 138px;
}

.project-notes {
  margin-top: 17px;
}

.project-notes-list {
  padding: 8px 18px 18px;
}

.project-note {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 4px;
  border: 0;
  border-bottom: 1px solid #f1f3f6;
  color: var(--ink-600);
  text-align: left;
  background: transparent;
}

.project-note:last-child {
  border-bottom: 0;
}

.project-note:hover {
  background: #fbfcfe;
}

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

.project-note-copy > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.project-note-copy > span time {
  margin-left: auto;
  color: var(--ink-400);
  font-size: 8px;
}

.project-note-copy p {
  margin: 7px 0 5px;
  color: var(--ink-700);
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.project-note-copy small {
  color: var(--ink-400);
  font-size: 8px;
}

.task-discussion {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.task-comments-list {
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.task-comment {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f3f6;
}

.task-comment > div {
  min-width: 0;
  flex: 1;
}

.task-comment > div > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-comment time {
  margin-left: auto;
  color: var(--ink-400);
  font-size: 8px;
}

.task-comment p {
  margin: 5px 0 0;
  color: var(--ink-600);
  font-size: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.task-comment-form {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 12px;
}

.task-assignee-statuses {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 19px;
}

.task-assignee-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.task-assignee-status > span {
  min-width: 0;
  flex: 1;
}

.task-assignee-status strong {
  display: block;
  color: var(--ink-700);
  font-size: 10px;
}

.task-assignee-status small {
  display: block;
  margin-top: 2px;
  color: var(--ink-400);
  font-size: 8px;
}

.comment-type-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 7px;
  background: var(--surface-soft);
}

.comment-type-toggle button {
  min-height: 30px;
  padding: 4px 8px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-500);
  background: transparent;
  font-size: 9px;
}

.comment-type-toggle button.active {
  color: var(--primary);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.task-comment-form textarea {
  min-height: 58px;
}

.board-column {
  min-height: 320px;
  padding: 10px;
  border-radius: 11px;
  background: #f4f6f9;
}

.board-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 3px 11px;
  color: var(--ink-600);
  font-size: 10px;
  font-weight: 600;
}

.board-count {
  margin-left: auto;
  color: var(--ink-400);
  font-size: 9px;
}

.task-card {
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid #e5e8ed;
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.task-card:hover {
  border-color: #c7d4e7;
}

.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.task-card h4 {
  margin: 0 0 7px;
  color: var(--ink-700);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
}

.task-card p {
  margin: 0 0 11px;
  color: var(--ink-400);
  font-size: 9px;
  line-height: 1.5;
}

.task-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid #f1f3f6;
}

.task-card-date {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-400);
  font-size: 8px;
}

.status-select {
  min-height: 27px;
  width: auto;
  padding: 3px 24px 3px 7px;
  border: 0;
  color: var(--primary);
  background-color: #edf3ff;
  font-size: 8px;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.project-overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.overview-kpi {
  min-height: 152px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fff, #f8fbff);
  box-shadow: var(--shadow-sm);
}

.overview-kpi-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  border-radius: 12px;
  color: var(--primary);
  background: #eaf1ff;
}

.overview-kpi strong {
  color: var(--ink-950);
  font-size: 30px;
  line-height: 1;
}

.overview-kpi > span:not(.overview-kpi-icon) {
  margin-top: 7px;
  color: var(--ink-600);
  font-size: 12px;
}

.overview-kpi small {
  margin-top: auto;
  padding-top: 12px;
  color: var(--ink-400);
  font-size: 9px;
}

.overview-large .card-body {
  min-height: 240px;
  padding: 24px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.info-item span {
  color: var(--ink-400);
  font-size: 10px;
}

.info-item strong {
  color: var(--ink-700);
  font-size: 10px;
  text-align: right;
}

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

.project-file-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.project-file-toolbar .toolbar-search {
  width: 220px;
}

.project-file-toolbar select {
  width: auto;
  min-width: 105px;
}

.folder-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 13px;
}

.project-folder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 17px;
}

.project-folder-card {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dce6f4;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f5f9ff);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}

.project-folder-card:hover,
.project-folder-card.active {
  transform: translateY(-1px);
  border-color: var(--folder-color, var(--primary));
  box-shadow: var(--shadow-md);
}

.project-folder-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 13px;
  color: var(--folder-color, #2563eb);
  background: color-mix(in srgb, var(--folder-color, #2563eb) 11%, white);
}

.project-folder-card strong {
  display: block;
  color: var(--ink-800);
  font-size: 12px;
}

.project-folder-card small {
  display: block;
  margin-top: 5px;
  color: var(--ink-400);
  font-size: 9px;
}

.project-folder-card.unfiled .project-folder-icon {
  color: var(--ink-500);
  background: #f2f4f7;
}

.folder-open-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid #dbe6f5;
  border-radius: 8px;
  background: #f7faff;
}

.folder-open-bar strong {
  color: var(--ink-700);
  font-size: 11px;
}

.folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-600);
  background: #fff;
  font-size: 9px;
}

.folder-chip small {
  color: var(--ink-400);
}

.project-file-group {
  margin-bottom: 20px;
}

.project-file-group-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--ink-700);
  font-size: 11px;
}

.project-file-group-head strong {
  font-weight: 600;
}

.document-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}

.document-card:hover {
  transform: translateY(-1px);
  border-color: #cad7e9;
  box-shadow: var(--shadow-sm);
}

.doc-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 10px;
  color: #1849a9;
  background: #eff4ff;
}

.doc-icon.drawio {
  color: #b54708;
  background: #fffaeb;
}

.doc-icon.excel {
  color: #067647;
  background: #ecfdf3;
}

.doc-icon.docx {
  color: #175cd3;
  background: #eaf1ff;
}

.document-card h3 {
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--ink-800);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-meta {
  color: var(--ink-400);
  font-size: 9px;
  line-height: 1.55;
}

.document-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--ink-400);
  font-size: 9px;
}

.document-footer .avatar {
  margin-left: auto;
}

.personal-tabs {
  width: fit-content;
}

.personal-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.personal-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.personal-filter-bar .toolbar-search {
  flex: 1;
  min-width: 220px;
}

.personal-filter-bar > input[type="date"] {
  width: 138px;
}

.personal-filter-bar > span {
  color: var(--ink-400);
  font-size: 9px;
}

.work-record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-record-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.work-record-main {
  min-width: 0;
  flex: 1;
}

.work-record-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.work-record-title strong {
  color: var(--ink-800);
  font-size: 13px;
}

.work-record-main p {
  margin: 8px 0 0;
  color: var(--ink-500);
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.work-record-time {
  margin-top: 9px;
  color: var(--ink-400);
  font-size: 8px;
}

.work-record-actions {
  flex: none;
}

.policy-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 17px;
  align-items: start;
}

.policy-card-list {
  display: flex;
  flex-direction: column;
}

.policy-list-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #eef0f4;
  background: #fff;
}

.policy-list-item:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.policy-list-item:last-child {
  border-bottom: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.policy-list-item:hover {
  background: #fbfcfe;
}

.policy-file-icon {
  width: 42px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9e3f4;
  border-radius: 7px;
  color: #175cd3;
  background: #f5f8ff;
}

.policy-list-copy {
  min-width: 0;
}

.policy-list-copy h3 {
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--ink-800);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.policy-list-copy p {
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--ink-500);
  font-size: 10px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.policy-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--ink-400);
  font-size: 9px;
}

.policy-list-side {
  text-align: right;
}

.policy-list-side time {
  display: block;
  margin-top: 8px;
  color: var(--ink-400);
  font-size: 9px;
}

.policy-filter-card {
  padding: 16px;
}

.policy-filter-card h3 {
  margin: 0 0 12px;
  color: var(--ink-700);
  font-size: 12px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--ink-500);
  background: transparent;
  font-size: 10px;
  text-align: left;
}

.category-item:hover,
.category-item.active {
  color: var(--primary);
  background: #eff5ff;
}

.category-item span {
  color: var(--ink-400);
  font-size: 9px;
}

.reader-card {
  padding: 34px 42px;
}

.reader-head {
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.reader-head h1 {
  margin: 0 0 13px;
  color: var(--ink-950);
  font-size: 27px;
  line-height: 1.35;
  letter-spacing: -.025em;
}

.reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--ink-400);
  font-size: 10px;
}

.reader-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.reader-content {
  max-width: 850px;
  margin: 28px auto 10px;
  color: var(--ink-700);
  font-size: 13px;
  line-height: 2;
}

.reader-content h1,
.reader-content h2,
.reader-content h3 {
  color: var(--ink-900, #101828);
  line-height: 1.5;
}

.reader-content h1 {
  margin: 34px 0 16px;
  font-size: 24px;
}

.reader-content h2 {
  margin: 30px 0 13px;
  font-size: 18px;
}

.reader-content h3 {
  margin: 24px 0 10px;
  font-size: 15px;
}

.reader-content p {
  margin: 11px 0;
}

.reader-content ul,
.reader-content ol {
  padding-left: 24px;
}

.reader-content blockquote {
  margin: 18px 0;
  padding: 13px 18px;
  border-left: 3px solid #84adf2;
  color: var(--ink-600);
  background: #f7faff;
}

.policy-sidebar {
  position: sticky;
  top: calc(var(--topbar) + 18px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.related-policy {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid #f1f3f6;
}

.related-policy:last-child {
  border-bottom: 0;
}

.related-policy strong {
  display: block;
  color: var(--ink-700);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.55;
}

.related-policy span {
  display: block;
  margin-top: 4px;
  color: var(--ink-400);
  font-size: 8px;
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  white-space: nowrap;
}

.data-table th {
  padding: 11px 14px;
  color: var(--ink-500);
  background: var(--surface-soft);
  font-size: 9px;
  font-weight: 600;
  text-align: left;
}

.data-table td {
  padding: 12px 14px;
  border-top: 1px solid #eef0f4;
  color: var(--ink-600);
}

.data-table tr:hover td {
  background: #fcfdff;
}

.table-person {
  display: flex;
  align-items: center;
  gap: 9px;
}

.table-person-copy strong {
  display: block;
  color: var(--ink-700);
  font-size: 10px;
}

.table-person-copy span {
  display: block;
  margin-top: 2px;
  color: var(--ink-400);
  font-size: 8px;
}

.status-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--green);
}

.status-dot.off {
  background: var(--ink-400);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 16, 29, .55);
  backdrop-filter: blur(3px);
  animation: fade-in .15s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
}

.modal {
  width: min(100%, 560px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: modal-in .18s ease-out;
}

.modal.lg {
  width: min(100%, 760px);
}

.modal.xl {
  width: min(100%, 980px);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
}

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

.modal-head h3 {
  margin: 0;
  color: var(--ink-900, #101828);
  font-size: 17px;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--ink-400);
  font-size: 10px;
  line-height: 1.5;
}

.modal-body {
  overflow-y: auto;
  padding: 22px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
  border-radius: 0 0 15px 15px;
}

.modal-foot .danger-zone {
  margin-right: auto;
}

.toast-root {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  max-width: 380px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  color: var(--ink-700);
  background: #fff;
  box-shadow: var(--shadow-md);
  font-size: 11px;
  line-height: 1.6;
  pointer-events: auto;
  animation: toast-in .22s ease-out;
}

.toast-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  color: var(--green);
  background: #ecfdf3;
}

.toast.error .toast-icon {
  color: var(--red);
  background: #fef3f2;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.document-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #eef1f5;
}

.doc-topbar {
  height: 61px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.doc-topbar-title {
  min-width: 0;
  flex: 1;
}

.doc-topbar-title h1 {
  margin: 0;
  overflow: hidden;
  color: var(--ink-800);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-topbar-title span {
  display: block;
  margin-top: 3px;
  color: var(--ink-400);
  font-size: 9px;
}

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

.save-status.saving {
  color: var(--amber);
}

.save-status.saved {
  color: var(--green);
}

.doc-people {
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-layout {
  min-height: 0;
  flex: 1;
  display: flex;
}

.document-page.drawio-mode .doc-layout {
  height: calc(100vh - 61px);
}

.drawio-wide .doc-side-panel {
  display: none;
}

.drawio-wide .doc-main,
.drawio-wide .doc-frame-wrap {
  width: 100%;
  height: 100%;
}

.doc-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.doc-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 5px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  margin: 0 6px;
  background: var(--line);
}

.format-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  color: var(--ink-600);
  background: transparent;
  font-size: 11px;
}

.format-btn:hover,
.format-btn.active {
  color: var(--primary);
  background: #eff5ff;
}

.format-select {
  width: 90px;
  min-height: 30px;
  padding: 3px 8px;
  border-color: transparent;
  font-size: 10px;
}

.format-select.font-family {
  width: 116px;
}

.format-select.font-size {
  width: 74px;
}

.text-color-control {
  position: relative;
  display: inline-flex;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.text-color-control:hover {
  border-color: var(--line);
  background: #f8fafc;
}

.text-color-apply,
.text-color-toggle {
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--ink-600);
  background: transparent;
}

.text-color-apply {
  position: relative;
  width: 27px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
}

.text-color-apply::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 2px;
  height: 3px;
  border-radius: 2px;
  background: var(--color, #d92d20);
}

.text-color-toggle {
  width: 18px;
  padding: 0;
  border-left: 1px solid #eef0f4;
}

.text-color-menu {
  position: absolute;
  z-index: 20;
  top: 34px;
  left: 0;
  width: 160px;
  display: grid;
  grid-template-columns: repeat(4, 26px);
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.text-color-menu[hidden] {
  display: none;
}

.text-color-menu button,
.text-color-menu label {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(16, 24, 40, .1);
  border-radius: 7px;
  background: var(--swatch);
  cursor: pointer;
}

.text-color-menu label {
  position: relative;
  color: var(--ink-500);
  background: #fff;
  font-size: 13px;
}

.text-color-menu input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.format-color {
  position: relative;
  width: 31px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  color: var(--ink-600);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.format-color input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.format-color::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 4px;
  height: 3px;
  border-radius: 3px;
  background: var(--color, #111827);
  pointer-events: none;
}

.format-color:hover {
  background: #eff5ff;
}

.format-btn.active {
  color: var(--primary);
  background: #eaf1ff;
}

.doc-canvas {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 34px 30px 70px;
}

.find-replace-panel {
  position: sticky;
  top: 12px;
  z-index: 8;
  width: min(430px, calc(100% - 28px));
  margin: 0 14px -28px auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.find-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.find-row + .find-row {
  margin-top: 6px;
}

.find-row input {
  min-height: 32px;
  height: 32px;
  font-size: 10px;
}

.find-row span {
  min-width: 42px;
  color: var(--ink-400);
  font-size: 8px;
  text-align: center;
}

.paper table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.paper th,
.paper td {
  min-width: 60px;
  padding: 8px 10px;
  border: 1px solid #9aa4b2;
  vertical-align: top;
}

.paper th {
  background: #f2f4f7;
  font-weight: 700;
}

.paper {
  width: min(100%, 840px);
  min-height: calc(100vh - 215px);
  margin: 0 auto;
  padding: 70px 82px;
  border: 1px solid #dfe3e8;
  border-radius: 2px;
  color: #28323f;
  background: #fff;
  box-shadow: 0 3px 15px rgba(16, 24, 40, .08);
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.95;
  outline: none;
}

.paper h1 {
  margin: .4em 0 .8em;
  color: #172033;
  font-size: 25px;
  line-height: 1.4;
}

.paper h2 {
  margin: 1.4em 0 .6em;
  color: #172033;
  font-size: 18px;
  line-height: 1.5;
}

.paper h3 {
  margin: 1.2em 0 .5em;
  font-size: 15px;
}

.paper p {
  margin: .55em 0;
}

.paper ul,
.paper ol {
  padding-left: 24px;
}

.paper:empty::before {
  content: "从这里开始记录内容…";
  color: #aeb6c1;
}

.paper img {
  max-width: 100%;
  height: auto;
}

.paper hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid #cbd5e1;
}

.word-count {
  color: var(--ink-400);
  font-size: 9px;
  white-space: nowrap;
}

.table-command {
  width: auto;
  padding: 0 6px;
  font-size: 9px;
}

.doc-side-panel {
  width: 270px;
  flex: none;
  overflow-y: auto;
  padding: 16px;
  border-left: 1px solid var(--line);
  background: #fff;
}

.doc-side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--ink-700);
  font-size: 11px;
  font-weight: 600;
}

.version-item {
  position: relative;
  padding: 11px 4px 11px 14px;
  border-left: 1px solid #e1e5eb;
}

.version-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 16px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c0c7d1;
  box-shadow: 0 0 0 1px #d8dde4;
}

.version-item.current::before {
  background: var(--primary);
}

.version-item strong {
  display: block;
  color: var(--ink-700);
  font-size: 10px;
}

.version-item span {
  display: block;
  margin-top: 4px;
  color: var(--ink-400);
  font-size: 8px;
  line-height: 1.5;
}

.doc-frame-wrap {
  position: relative;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.drawio-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: var(--ink-500);
  background: #f8fafc;
  font-size: 11px;
  text-align: center;
}

.drawio-loading .empty-state {
  max-width: 470px;
}

.drawio-loading .empty-state p {
  line-height: 1.8;
}

.doc-frame {
  width: 100%;
  height: 100%;
  display: block;
  min-height: 0;
  flex: 1;
  border: 0;
  background: #fff;
}

.unavailable-panel {
  max-width: 620px;
  margin: 80px auto;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.unavailable-panel .doc-icon {
  margin: 0 auto 18px;
}

.unavailable-panel h2 {
  margin: 0 0 10px;
  color: var(--ink-800);
  font-size: 20px;
}

.unavailable-panel p {
  margin: 0 auto 20px;
  color: var(--ink-500);
  font-size: 11px;
  line-height: 1.8;
}

.code-inline {
  padding: 3px 6px;
  border-radius: 5px;
  color: #344054;
  background: #f2f4f7;
  font-family: Consolas, monospace;
  font-size: .9em;
}

.upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px;
  border: 1.5px dashed #cdd5e0;
  border-radius: 11px;
  color: var(--ink-500);
  background: #fafbfc;
  text-align: center;
}

.upload-drop:hover,
.upload-drop.dragging {
  border-color: #7ea5e8;
  background: #f5f9ff;
}

.upload-drop strong {
  color: var(--ink-700);
  font-size: 12px;
}

.upload-drop span {
  color: var(--ink-400);
  font-size: 9px;
}

.secret-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f3f6;
}

.secret-row:last-child {
  border-bottom: 0;
}

.secret-row span {
  color: var(--ink-500);
  font-size: 10px;
}

.secret-row strong {
  color: var(--ink-700);
  font-size: 11px;
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton {
  overflow: hidden;
  position: relative;
  border-radius: 6px;
  background: #eef1f5;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@media (max-width: 1180px) {
  .project-grid,
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .calendar-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .calendar-day {
    min-height: 100px;
  }

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

@media (max-width: 960px) {
  :root {
    --sidebar: 0px;
  }

  .sidebar {
    width: 248px;
    top: var(--topbar);
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(9,16,29,.45);
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar-brand {
    width: auto;
  }

  .topbar-brand .brand-wordmark {
    display: none;
  }

  .topbar-title {
    min-width: 120px;
    flex: 1;
  }

  .dashboard-grid,
  .project-main-grid,
  .policy-workspace {
    grid-template-columns: 1fr;
  }

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

  .day-panel {
    position: static;
  }

  .policy-sidebar,
  .project-aside {
    position: static;
  }

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

  .doc-side-panel {
    display: none;
  }
}

@media (max-width: 720px) {
  .login-page {
    display: block;
  }

  .login-visual {
    min-height: auto;
    padding: 26px 24px 34px;
  }

  .login-hero {
    margin: 44px 0 8px;
    padding: 0;
  }

  .login-hero h1 {
    font-size: 34px;
  }

  .login-hero > p {
    font-size: 13px;
  }

  .login-features,
  .login-footnote {
    display: none;
  }

  .login-form-side {
    min-height: auto;
    padding: 34px 24px 50px;
  }

  .login-card h2 {
    font-size: 26px;
  }

  .topbar {
    padding: 0 16px;
    gap: 11px;
  }

  .topbar-brand {
    width: auto;
  }

  .topbar-brand .brand-wordmark {
    display: none;
  }

  .topbar-title {
    min-width: 0;
    flex: 1;
  }

  .topbar-title h1 {
    font-size: 15px;
  }

  .topbar-date {
    display: none;
  }

  .topbar-user-name {
    display: none;
  }

  .global-search {
    display: none;
  }

  .page {
    padding: 20px 16px 38px;
  }

  .page-header {
    flex-direction: column;
    gap: 14px;
  }

  .page-actions {
    width: 100%;
  }

  .welcome-panel {
    display: block;
    padding: 25px;
  }

  .welcome-copy h2 {
    font-size: 23px;
  }

  .welcome-actions {
    margin-top: 22px;
  }

  .stat-grid,
  .project-grid,
  .document-grid,
  .project-aside {
    grid-template-columns: 1fr;
  }

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

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

  .stat-card {
    min-height: 92px;
  }

  .calendar-day {
    min-height: 74px;
    padding: 5px;
  }

  .day-event {
    width: 7px;
    padding: 2px;
    border-radius: 50%;
    font-size: 0;
  }

  .day-event::before {
    display: none;
  }

  .day-more {
    display: none;
  }

  .calendar-legend {
    display: none;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .toolbar-search {
    width: 100%;
  }

  .project-hero {
    padding: 19px;
  }

  .project-hero .project-symbol {
    width: 42px;
    height: 42px;
  }

  .project-hero-copy h2 {
    font-size: 19px;
  }

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

  .tabs {
    overflow-x: auto;
  }

  .tab {
    white-space: nowrap;
  }

  .policy-list-item {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 15px;
  }

  .policy-list-side {
    display: none;
  }

  .reader-card {
    padding: 24px 20px;
  }

  .reader-head h1 {
    font-size: 22px;
  }

  .paper {
    min-height: calc(100vh - 175px);
    padding: 40px 26px;
  }

  .doc-canvas {
    padding: 15px 0 40px;
  }

  .doc-toolbar {
    overflow-x: auto;
    padding: 5px 10px;
  }

  .doc-topbar {
    padding: 0 10px;
  }

  .doc-topbar .btn span {
    display: none;
  }

  .doc-people {
    display: none;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }

  .modal-foot {
    border-radius: 0;
  }

  .demo-accounts {
    grid-template-columns: 1fr;
  }

  .assignee-picker {
    grid-template-columns: 1fr;
  }

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

  .project-file-toolbar .toolbar-search {
    width: 100%;
  }
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar,
  .page-header,
  .policy-sidebar,
  .reader-card .btn,
  .toast-root {
    display: none !important;
  }

  .main-shell {
    margin-left: 0;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  .policy-workspace {
    display: block;
  }

  .reader-card {
    border: 0;
    box-shadow: none;
  }
}
