:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #152033;
  --muted: #5f6b7a;
  --line: #d9e1ea;
  --accent: #2563eb;
  --accent-soft: #e8f0ff;
  --deep: #08111f;
  --deep-soft: #12213a;
  --sky: #0ea5e9;
  --panel-glass: rgba(255, 255, 255, .9);
  --shadow-soft: 0 18px 50px rgba(17, 24, 39, .08);
  --shadow-lift: 0 24px 70px rgba(37, 99, 235, .16);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(8, 17, 31, .04) 0%, rgba(37, 99, 235, .07) 34%, transparent 34%),
    linear-gradient(180deg, #f8fbff, #eef4fb 55%, #f4f7fb);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--deep) 0%, var(--deep-soft) 72%, #173b8f 100%);
  border-right: 1px solid rgba(255,255,255,.12);
  padding: 20px 16px;
  display: grid;
  gap: 18px;
  align-content: start;
  color: #fff;
  box-shadow: 18px 0 60px rgba(8, 17, 31, .12);
}
.content {
  padding: 28px;
  max-width: 1280px;
  width: 100%;
}
.auth-shell {
  display: block;
  min-height: 100vh;
}
.auth-shell .content {
  max-width: none;
  min-height: 100vh;
  padding: 0;
}
.brand-block { display: grid; gap: 4px; }
.brand { font-size: 22px; font-weight: 800; letter-spacing: .4px; }
.brand-sub { color: rgba(255,255,255,.68); font-size: 13px; }
.user-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  box-shadow: 0 18px 48px rgba(0,0,0,.12);
  backdrop-filter: blur(14px);
}
.user-role { font-size: 13px; color: rgba(255,255,255,.64); }
.side-nav { display: grid; gap: 8px; }
.side-nav a {
  position: relative;
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(255,255,255,.82);
  border: 1px solid transparent;
}
.side-nav a.active {
  background: linear-gradient(135deg, #ffffff, #dbeafe);
  border-color: rgba(255,255,255,.72);
  color: #173b8f;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}
.side-nav a.active::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: #38bdf8;
}
.side-nav a:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.16);
  color: #fff;
}
.sidebar-note {
  padding: 12px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 14px;
  color: rgba(255,255,255,.62);
  font-size: 13px;
}
.user-chip {
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  background: rgba(255,255,255,.1);
}
.hero, .card, .stats, .filters, .form {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.04);
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.card, .record { margin-bottom: 12px; }
.filters, .form { display: grid; gap: 12px; }
.filters { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
input, textarea, select, button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}
button { background: var(--accent); color: white; font-weight: 700; cursor: pointer; border: none; }
button:hover { opacity: .95; }
.hero-grid, .dashboard-grid, .two-col { display: grid; gap: 16px; }
.hero-grid { grid-template-columns: 1.4fr 1fr; align-items: stretch; }
.dashboard-grid, .two-col { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hero-metrics, .mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.hero-metrics div, .mini-stats div, .stat-card {
  background: var(--accent-soft);
  border: 1px solid #d5e3ff;
  border-radius: 14px;
  padding: 12px;
}
.hero-metrics span, .mini-stats span, .stat-card span { display: block; color: var(--muted); font-size: 13px; }
.hero-metrics strong, .mini-stats strong, .stat-card strong { display: block; margin-top: 6px; font-size: 24px; }
.hero-metrics p, .stat-card p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.stats-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.panel { background: var(--panel-glass); border: 1px solid rgba(217, 225, 234, .88); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-soft); backdrop-filter: blur(18px); }
.panel:first-of-type { margin-top: 0; }
.panel h2 { margin-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.section-head span, .section-head a { color: var(--muted); font-size: 14px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.quick-links a { background: var(--accent-soft); border: 1px solid #d5e3ff; padding: 8px 12px; border-radius: 999px; }
.list { display: grid; gap: 12px; }
.list.compact { gap: 8px; }
.issue-row, .card-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.issue-row {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}
.card-row { padding: 14px; }
.card-row h3, .card-row p { margin: 0; }
.card-meta { display: grid; gap: 6px; color: var(--muted); font-size: 13px; text-align: right; }
.empty { color: var(--muted); }
label { display: grid; gap: 6px; }

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  background:
    radial-gradient(circle at 20% 18%, rgba(37, 99, 235, .28), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(14, 165, 233, .22), transparent 28%),
    linear-gradient(135deg, #08111f 0%, #12213a 44%, #eef4fb 44%, #f8fbff 100%);
}
.login-brand-panel,
.login-form-panel {
  min-height: 100vh;
}
.login-brand-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  gap: 32px;
  padding: clamp(28px, 5vw, 64px);
  color: #fff;
}
.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  pointer-events: none;
}
.login-brand-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}
.login-logo {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #dbeafe);
  color: #173b8f;
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.login-brand {
  font-size: 24px;
  font-weight: 900;
}
.login-brand-sub {
  margin-top: 2px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
}
.login-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}
.login-window {
  width: min(560px, 100%);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 28px;
  background: rgba(255,255,255,.12);
  box-shadow: 0 34px 90px rgba(0,0,0,.36);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.login-window-head {
  display: flex;
  gap: 8px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.login-window-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.48);
}
.login-dashboard {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 14px;
  padding: 22px;
}
.login-stat,
.login-flow,
.login-bars {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  padding: 16px;
}
.login-stat span {
  display: block;
  color: rgba(255,255,255,.68);
  font-size: 13px;
}
.login-stat strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 40px;
  line-height: 1;
}
.login-stat-main {
  background: linear-gradient(135deg, rgba(96, 165, 250, .38), rgba(14, 165, 233, .18));
}
.login-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.login-flow span {
  height: 86px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.08));
}
.login-flow span:nth-child(2) { transform: translateY(12px); }
.login-flow span:nth-child(3) { transform: translateY(-8px); }
.login-bars {
  display: grid;
  align-content: center;
  gap: 12px;
}
.login-bars span {
  width: var(--w);
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #bfdbfe, #38bdf8);
}
.login-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}
.login-copy h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}
.login-copy p {
  max-width: 520px;
  margin: 18px 0 0;
  color: rgba(255,255,255,.72);
  font-size: 17px;
  line-height: 1.7;
}
.login-form-panel {
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 64px);
}
.login-form-card {
  width: min(420px, 100%);
  padding: 34px;
  border: 1px solid rgba(217, 225, 234, .9);
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 28px 80px rgba(17, 24, 39, .14);
}
.login-form-head span {
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
}
.login-form-head h2 {
  margin: 8px 0 0;
  font-size: 32px;
}
.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}
.login-form label span {
  color: var(--muted);
  font-size: 13px;
}
.login-form input {
  min-height: 48px;
  border-radius: 14px;
  background: #f7f9fc;
}
.login-form input:focus {
  outline: none;
  border-color: #9cc2ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
  background: #fff;
}
.login-form button {
  min-height: 50px;
  margin-top: 6px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 16px 34px rgba(37, 99, 235, .24);
}
.login-foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
}

.issue-composer-page {
  display: grid;
  gap: 16px;
}
.composer-topbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.composer-topbar h1 {
  margin: 4px 0 0;
}
.composer-kicker {
  color: var(--muted);
  font-size: 13px;
}
.issue-composer {
  display: grid;
  gap: 16px;
}
.issue-block-form {
  max-width: 980px;
}
.composer-block {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.04);
  display: grid;
  gap: 16px;
}
.composer-block-primary {
  border-color: #cfe0ff;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.composer-block-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.composer-block-head > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: #1e55d6;
  font-weight: 800;
  font-size: 13px;
}
.composer-block-head h2 {
  margin: 0;
  font-size: 20px;
}
.composer-block-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.composer-title-input {
  border-radius: 12px;
  padding: 16px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  background: #fff;
}
.composer-title-input:focus,
.composer-description:focus {
  outline: none;
  border-color: #9cc2ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}
.composer-fields {
  display: grid;
  gap: 12px;
}
.composer-fields-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.composer-fields-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.composer-field {
  display: grid;
  gap: 8px;
}
.composer-field > span {
  color: var(--muted);
  font-size: 12px;
}
.field-hint {
  color: var(--muted);
  font-size: 12px;
}
.composer-field input,
.composer-field textarea,
.composer-field select {
  background: #f7f9fc;
}
.composer-description {
  min-height: 220px;
  resize: vertical;
  line-height: 1.7;
}
.block-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.block-option {
  display: block;
  min-width: 0;
}
.block-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.block-option span {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.block-option strong {
  font-size: 15px;
}
.block-option small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.block-option input:focus + span,
.block-option input:checked + span {
  border-color: #9cc2ff;
}
.block-option input:checked + span {
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}
.block-option input:checked + span strong {
  color: #1e55d6;
}
.participant-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.participant-option {
  display: block;
  min-width: 0;
}
.participant-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.participant-option span {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.participant-option strong {
  font-size: 15px;
}
.participant-option small {
  color: var(--muted);
  font-size: 12px;
}
.participant-option input:focus + span,
.participant-option input:checked + span {
  border-color: #9cc2ff;
}
.participant-option input:checked + span {
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}
.participant-option input:checked + span strong {
  color: #1e55d6;
}
.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--muted);
  font-size: 13px;
}
.composer-submit {
  width: auto;
  min-width: 140px;
}

.workspace {
  width: 100%;
}
.workspace-main {
  display: grid;
  gap: 16px;
  position: relative;
}
.workspace-main::before {
  content: "";
  position: absolute;
  inset: -28px -28px auto -28px;
  height: 220px;
  background: linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(14, 165, 233, .08) 48%, rgba(255,255,255,0));
  pointer-events: none;
  z-index: -1;
}
.workspace-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px;
  min-width: min(620px, 100%);
}
.stats-strip div {
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(207, 224, 255, .9);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, .05);
  backdrop-filter: blur(14px);
}
.stats-strip span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.stats-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  color: #13264a;
}
.workspace-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
  overflow-x: auto;
  padding: 12px;
  border: 1px solid rgba(207, 224, 255, .82);
  border-radius: 18px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 14px 40px rgba(17, 24, 39, .05);
  backdrop-filter: blur(16px);
}
.quick-filters {
  display: flex;
  gap: 10px;
  width: 100%;
  min-width: max-content;
  align-items: end;
}
.quick-filters input[name="q"] {
  flex: 1 0 260px;
  min-width: 260px;
}
.quick-filters select {
  flex: 0 0 136px;
  min-width: 136px;
}
.quick-filters .filter-submit {
  flex: 0 0 82px;
  width: 82px;
}
.filter-submit {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
  border: 1px solid rgba(255,255,255,.32);
  box-shadow: 0 12px 26px rgba(37, 99, 235, .22);
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) minmax(340px, 420px);
  gap: 16px;
  align-items: start;
}
.project-list-panel, .project-detail-panel {
  min-height: 74vh;
}
.project-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding-right: 4px;
}
.project-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(217, 225, 234, .9);
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(17, 24, 39, .04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.project-card:hover {
  border-color: #bcd1ff;
  background: #fff;
  box-shadow: 0 16px 38px rgba(17, 24, 39, .08);
  transform: translateY(-1px);
}
.project-card-main {
  display: grid;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.project-card.active {
  border-color: #2563eb;
  background:
    linear-gradient(135deg, rgba(232, 240, 255, .98), rgba(255,255,255,.96) 54%),
    #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13), var(--shadow-lift);
  transform: translateY(-1px);
}
.project-card.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 5px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, #2563eb, #0ea5e9);
}
.project-card.active .project-card-head::before {
  content: "当前";
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #173b8f, #2563eb);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(23, 59, 143, .2);
}
.project-card.active .project-card-head strong {
  color: #173b8f;
}
.project-card-head, .project-card-sub, .project-card-foot, .timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.project-card-head {
  align-items: center;
  justify-content: flex-start;
}
.project-card-head strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}
.project-card-head .status-tag {
  margin-left: auto;
}
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-pending { background: #fff7e6; color: #b76a00; border-color: #ffd89a; }
.status-active { background: #e8f0ff; color: #1e55d6; border-color: #bcd1ff; }
.status-waiting { background: #eef6ff; color: #0070a8; border-color: #c8e3ff; }
.status-paused { background: #f3f4f6; color: #5f6b7a; border-color: #d9e1ea; }
.status-done { background: #e8f9ef; color: #0f8a4d; border-color: #b8ebcf; }
.status-archived { background: #f2ecff; color: #6b46c1; border-color: #dccdff; }
.status-default { background: #f4f7fb; color: var(--muted); border-color: var(--line); }
.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.meta-pill-accent {
  background: var(--accent-soft);
  border-color: #cfe0ff;
  color: #1e55d6;
}
.project-card-sub, .project-card-foot, .muted {
  color: var(--muted);
  font-size: 13px;
}
.project-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.share-link,
.share-copy-button {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff3e0;
  color: #a66300;
  border: 1px solid #ffd599;
  font-size: 12px;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}
.share-copy-button {
  cursor: pointer;
  width: auto;
  min-width: 0;
  height: auto;
}
.share-copy-button.is-copied {
  background: #e8f9ef;
  border-color: #b8ebcf;
  color: #0f8a4d;
}
.project-detail-panel {
  position: sticky;
  top: 16px;
}
.workspace-detail-head {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.workspace-detail-head h2 {
  margin: 0;
}
.detail-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.detail-links .button-inline {
  text-align: center;
  text-decoration: none;
}
.workspace-action-strip {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.compact-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.compact-form textarea {
  resize: vertical;
}
.timeline-block { margin-top: 16px; }
.timeline {
  display: grid;
  gap: 14px;
  max-height: 44vh;
  overflow: auto;
  padding-right: 4px;
  position: relative;
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 18px;
  bottom: -14px;
  width: 2px;
  background: #d5e3ff;
}
.timeline-marker {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  border-radius: 50%;
  border: 3px solid #dbe8ff;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}
.timeline-body {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}
.timeline-head {
  align-items: center;
}
.timeline-author {
  display: grid;
  gap: 4px;
}
.timeline-role, .timeline-time {
  color: var(--muted);
  font-size: 12px;
}
.timeline-content {
  margin: 10px 0 0;
  line-height: 1.6;
}
.timeline-next {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.timeline-next span {
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.timeline-next p {
  margin: 0;
  color: var(--text);
}
.empty-state {
  display: grid;
  gap: 10px;
  min-height: 50vh;
  align-content: center;
  text-align: center;
  color: var(--muted);
}
.shared-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 16px;
}
.shared-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.shared-header h1 {
  margin: 8px 0;
}
.shared-header p {
  margin: 0;
  color: var(--muted);
}
.shared-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}
.shared-meta div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.shared-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.detail-page {
  display: grid;
  gap: 16px;
}
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}
.detail-title-block {
  display: grid;
  gap: 8px;
}
.detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.detail-title-row h1 {
  margin: 0;
}
.detail-subtitle {
  margin: 0;
  color: var(--muted);
}
.detail-header-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.text-link {
  color: var(--muted);
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
  align-items: start;
}
.detail-side {
  display: grid;
  gap: 16px;
}
.detail-info-list {
  display: grid;
  gap: 10px;
}
.detail-highlight {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d5e3ff;
  background: linear-gradient(180deg, #f7fbff, #eef5ff);
  border-radius: 16px;
}
.detail-highlight-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
.detail-highlight-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.info-row {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.info-row span,
.detail-description span,
.timeline-attachment span {
  color: var(--muted);
  font-size: 12px;
}
.detail-description {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.detail-description p {
  margin: 8px 0 0;
  line-height: 1.7;
}
.inline-status-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.action-form {
  margin: 0;
}
.action-select {
  min-width: 0;
}
.button-inline {
  width: auto;
  min-width: 96px;
  padding: 10px 14px;
}
.button-soft {
  background: #eef4ff;
  color: #1e55d6;
  border: 1px solid #cfe0ff;
}
.detail-timeline {
  max-height: none;
}
.detail-editor-panel {
  position: sticky;
  top: 16px;
}
.editor-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.note-panel {
  background: linear-gradient(180deg, #fffdf4, #fff8df);
  border: 1px solid #f3e6b2;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(194, 162, 66, 0.12);
}
.note-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.note-panel-top h2 {
  margin: 6px 0 0;
}
.note-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8d6b00;
}
.note-pin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
  margin-top: 6px;
}
.note-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.note-tip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  border: 1px solid #f2df9a;
  color: #8d6b00;
  font-size: 12px;
}
.note-form textarea,
.note-form input {
  background: rgba(255,255,255,.88);
  border-color: #eadba7;
}
.home-note-panel {
  margin-top: 16px;
}
.home-note-panel h3 {
  margin: 6px 0 0;
}
.note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.note-actions-hint {
  color: #8d6b00;
  font-size: 12px;
}
.timeline-attachment {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 6px;
}
.timeline-item-status .timeline-marker,
.timeline-item-done .timeline-marker,
.timeline-item-archive .timeline-marker,
.timeline-item-restore .timeline-marker,
.timeline-item-meta .timeline-marker {
  background: #fff;
}
.timeline-item-status .timeline-marker {
  border-color: #bcd1ff;
  background: #2563eb;
}
.timeline-item-done .timeline-marker {
  border-color: #b8ebcf;
  background: #0f8a4d;
}
.timeline-item-archive .timeline-marker {
  border-color: #dccdff;
  background: #6b46c1;
}
.timeline-item-restore .timeline-marker {
  border-color: #c8e3ff;
  background: #0070a8;
}
.timeline-item-meta .timeline-marker {
  border-color: #d9e1ea;
  background: #5f6b7a;
}
.timeline-item-status .timeline-body,
.timeline-item-done .timeline-body,
.timeline-item-archive .timeline-body,
.timeline-item-restore .timeline-body,
.timeline-item-meta .timeline-body {
  border-left-width: 4px;
}
.timeline-item-status .timeline-body { border-left-color: #2563eb; }
.timeline-item-done .timeline-body { border-left-color: #0f8a4d; }
.timeline-item-archive .timeline-body { border-left-color: #6b46c1; }
.timeline-item-restore .timeline-body { border-left-color: #0070a8; }
.timeline-item-meta .timeline-body { border-left-color: #5f6b7a; }

.account-page {
  display: grid;
  gap: 16px;
}
.account-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.account-form {
  background: transparent;
  border: 0;
  padding: 0;
  margin-bottom: 0;
  box-shadow: none;
}
.form-error,
.form-success {
  padding: 10px 12px;
  border-radius: 12px;
  margin: 12px 0;
  font-size: 14px;
}
.form-error {
  background: #fff0f0;
  border: 1px solid #ffc7c7;
  color: #b42318;
}
.form-success {
  background: #e8f9ef;
  border: 1px solid #b8ebcf;
  color: #0f8a4d;
}
.account-list {
  display: grid;
  gap: 10px;
}
.account-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.account-row-main {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}
.account-row-main span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}
.account-row-main strong {
  display: block;
  overflow-wrap: anywhere;
}
.account-row-fields {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(120px, .8fr) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.account-row-fields input[readonly] {
  background: #f3f6fa;
  color: var(--muted);
}
.client-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
}
.client-row div {
  display: grid;
  gap: 5px;
}
.client-row span {
  color: var(--muted);
  font-size: 13px;
}
.profile-panel {
  max-width: 560px;
}
.profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.profile-summary p {
  margin: 4px 0 0;
}

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--line); }
  .content { padding: 16px; }
  .auth-shell .content { padding: 0; }
  .login-page {
    grid-template-columns: 1fr;
    background: linear-gradient(180deg, #08111f 0%, #12213a 46%, #f8fbff 46%, #eef4fb 100%);
  }
  .login-brand-panel {
    min-height: auto;
    padding: 24px;
    gap: 22px;
  }
  .login-brand-panel::before {
    inset: 12px;
    border-radius: 22px;
  }
  .login-visual {
    display: none;
  }
  .login-copy h1 {
    font-size: 38px;
  }
  .login-copy p {
    font-size: 15px;
  }
  .login-form-panel {
    min-height: auto;
    padding: 28px 16px 36px;
    place-items: start center;
  }
  .login-form-card {
    padding: 24px;
    border-radius: 20px;
  }
  .hero-grid { grid-template-columns: 1fr; }
  .workspace-top, .workspace-grid { grid-template-columns: 1fr; display: grid; }
  .quick-filters { width: max-content; }
  .project-detail-panel { position: static; }
  .timeline-item { grid-template-columns: 14px minmax(0, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
  .detail-header,
  .detail-grid { grid-template-columns: 1fr; display: grid; }
  .detail-editor-panel { position: static; }
  .inline-status-form { grid-template-columns: 1fr; }
  .shared-header,
  .shared-meta { grid-template-columns: 1fr; display: grid; }
  .composer-title-input { font-size: 22px; }
  .composer-fields-two,
  .composer-fields-three,
  .block-options { grid-template-columns: 1fr; }
  .composer-actions { align-items: stretch; display: grid; }
  .composer-submit { width: 100%; }
  .account-grid,
  .account-row-main,
  .account-row-fields { grid-template-columns: 1fr; display: grid; }
  .account-row-fields .button-inline { width: 100%; }
}
