:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f5f6f8;
  --panel-3: #eceff3;
  --text: #111318;
  --muted: #69707d;
  --line: #d9dde5;
  --line-soft: rgba(17, 19, 24, 0.08);
  --accent: #111318;
  --accent-hover: #2a2e36;
  --accent-soft: rgba(17, 19, 24, 0.055);
  --positive: #00c087;
  --positive-soft: rgba(0, 192, 135, 0.12);
  --warn: #2563eb;
  --warn-soft: rgba(37, 99, 235, 0.1);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --shadow: 0 16px 42px rgba(17, 19, 24, 0.08);
  --font-sans:
    Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-display:
    "SF Pro Display", Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-number: "DIN Alternate", "Roboto Mono", "SFMono-Regular", Consolas, monospace;
  font-family: var(--font-sans);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

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

button,
select,
input[type="checkbox"],
input[type="range"] {
  cursor: pointer;
}

a {
  color: var(--accent);
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: 18px;
  width: min(900px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 19, 24, 0.04), transparent 36%),
    var(--panel);
  padding: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-visual {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f5f6f8;
}

.login-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.76) contrast(1.04) brightness(0.92);
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.86)),
    radial-gradient(circle at 40% 20%, rgba(0, 192, 135, 0.08), transparent 38%);
}

.login-content {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: clamp(18px, 4vw, 36px);
}

.login-content .brand-mark {
  width: 42px;
  height: 42px;
}

.login-content .brand-mark .ui-icon {
  width: 24px;
  height: 24px;
}

.login-card h1 {
  margin-bottom: 10px;
}

.login-submit {
  width: 100%;
  min-height: 42px;
}

.login-submit.loading {
  cursor: wait;
  opacity: 0.82;
}

.login-message {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
}

.login-message:empty {
  display: none;
}

.login-message[data-type="info"] {
  border-color: var(--line-soft);
  background: #f8f9fb;
  color: var(--muted);
}

.login-message[data-type="error"] {
  border-color: rgba(239, 68, 68, 0.2);
  background: var(--danger-soft);
  color: var(--danger);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 8px clamp(12px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.brand-mark .ui-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-btn {
  min-width: 62px;
}

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.btn:hover,
.icon-btn:hover {
  border-color: #b7beca;
  background: var(--panel-3);
}

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.btn .ui-icon {
  width: 14px;
  height: 14px;
}

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

.btn.subtle {
  border-color: var(--line-soft);
  background: #fff;
  color: var(--muted);
}

.btn.subtle:hover {
  border-color: rgba(17, 19, 24, 0.22);
  background: var(--accent-soft);
  color: var(--accent);
}

.btn.danger {
  border-color: rgba(255, 91, 91, 0.32);
  color: var(--danger);
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.text-btn:hover {
  color: var(--accent);
}

.text-btn.danger {
  color: var(--danger);
}

.icon-btn {
  width: 32px;
  padding: 0;
  font-size: 15px;
  line-height: 1;
}

.layout {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 10px clamp(10px, 2.4vw, 24px) 32px;
}

.kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 5px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

.summary-copy {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  gap: 6px;
  min-width: 336px;
}

.stat {
  min-height: 50px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  box-shadow: var(--shadow);
}

.stat strong {
  display: block;
  color: var(--accent);
  font-family: var(--font-number);
  font-size: 18px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 9px;
  outline: none;
}

textarea {
  min-height: 78px;
  padding: 9px;
  resize: vertical;
  line-height: 1.55;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 19, 24, 0.08);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.check-row input {
  width: auto;
  min-height: auto;
  accent-color: var(--accent);
}

input[type="range"] {
  accent-color: var(--accent);
}

.content {
  --console-width: minmax(230px, 270px);
  --list-width: minmax(300px, 360px);
  display: grid;
  grid-template-columns: var(--console-width) var(--list-width) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  transition: grid-template-columns 0.18s ease;
}

.content.console-collapsed {
  --console-width: 58px;
}

.content.list-collapsed {
  --list-width: 58px;
}

.side-panel,
.list-panel,
.detail-panel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.side-panel,
.list-panel {
  position: sticky;
  top: 66px;
  display: grid;
  max-height: calc(100vh - 76px);
  overflow: hidden;
}

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

.side-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
  padding: 12px;
}

.side-title h2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 850;
}

.rail-label {
  display: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  writing-mode: vertical-rl;
}

.collapse-btn {
  width: 28px;
  min-height: 28px;
  border-radius: 7px;
  font-size: 16px;
}

.collapse-btn .ui-icon {
  width: 15px;
  height: 15px;
}

.side-panel.collapsed,
.list-panel.collapsed {
  align-content: start;
}

.side-panel.collapsed .stats,
.side-panel.collapsed .filter-panel,
.list-panel.collapsed .event-list,
.list-panel.collapsed .panel-title-text,
.list-panel.collapsed .panel-count,
.side-panel.collapsed .panel-title-text {
  display: none;
}

.side-panel.collapsed .side-title,
.list-panel.collapsed .panel-head {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 10px;
  min-height: calc(100vh - 76px);
  border-bottom: 0;
  padding: 12px 7px;
}

.side-panel.collapsed .rail-label,
.list-panel.collapsed .rail-label {
  display: inline-block;
}

.side-panel.collapsed .collapse-btn,
.list-panel.collapsed .collapse-btn {
  order: -1;
}

.filter-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding: 12px;
}

.side-panel .stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  border-bottom: 1px solid var(--line-soft);
  padding: 10px;
}

.side-panel .stat {
  min-height: 52px;
  padding: 8px;
  box-shadow: none;
}

.event-list {
  display: grid;
  align-content: start;
  overflow: auto;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
}

.panel-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 850;
}

.panel-kicker {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-title-text .ui-icon,
.section-title .ui-icon {
  color: var(--positive);
}

.panel-count {
  border: 1px solid rgba(17, 19, 24, 0.16);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 8px;
  font-family: var(--font-number);
  font-size: 11px;
  font-weight: 800;
}

.event-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  padding: 12px;
  text-align: left;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

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

.event-card:hover {
  background: #f7f8fa;
}

.event-card.active {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--positive);
}

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

.event-card-main {
  display: grid;
  gap: 7px;
}

.event-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.event-card p,
.detail-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.event-card .impact {
  justify-content: flex-start;
}

.muted {
  color: var(--muted);
  font-family: var(--font-number);
  font-size: 12px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
}

.pill.accent {
  border-color: rgba(0, 192, 135, 0.32);
  background: var(--positive-soft);
  color: var(--positive);
}

.pill.warn {
  border-color: rgba(96, 165, 250, 0.32);
  background: var(--warn-soft);
  color: var(--warn);
}

.impact {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
  padding-top: 4px;
}

.impact i {
  width: 13px;
  height: 7px;
  border-radius: 999px;
  background: #d9dde5;
}

.impact i.on {
  background: var(--positive);
}

.detail-panel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: calc(100vh - 76px);
  padding: 22px clamp(16px, 2.6vw, 30px);
  background: var(--panel);
}

.detail-head {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 16px;
}

.detail-head h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 850;
  line-height: 1.28;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-edit {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(180px, 260px);
  gap: 8px;
  max-width: 520px;
}

.research-block {
  display: grid;
  gap: 10px;
}

.thesis-block {
  border: 1px solid rgba(0, 192, 135, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 192, 135, 0.07), #fff);
  padding: 12px;
}

.thesis-block p {
  color: var(--text);
  font-size: 13px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.timeline-form {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8f9fb;
  padding: 12px;
}

.timeline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 8px;
}

.timeline-form textarea {
  min-height: 118px;
}

.timeline-list {
  display: grid;
  gap: 0;
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  background: transparent;
  padding: 0 0 14px;
}

.timeline-entry:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 0;
  left: 11px;
  width: 1px;
  background: var(--line);
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 11px;
  height: 11px;
  margin: 9px auto 0;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--positive);
  box-shadow: 0 0 0 3px var(--positive-soft);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  border: 1px solid var(--line-soft);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f8f9fb;
  padding: 8px 10px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.timeline-meta .ui-icon {
  width: 12px;
  height: 12px;
}

.timeline-meta time {
  color: var(--text);
  font-family: var(--font-number);
  font-size: 13px;
  font-weight: 850;
}

.timeline-stamp,
.timeline-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.timeline-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(0, 192, 135, 0.28);
  border-radius: 999px;
  background: var(--positive-soft);
  color: var(--positive);
  padding: 0 8px;
  font-size: 11px;
  font-weight: 850;
}

.timeline-content.collapsed {
  position: relative;
  max-height: 72px;
  border: 1px solid var(--line-soft);
  border-radius: 0 0 8px 8px;
  background: #fff;
  padding: 10px;
  overflow: hidden;
}

.timeline-content.collapsed::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff);
}

.timeline-content.expanded {
  border: 1px solid var(--line-soft);
  border-radius: 0 0 8px 8px;
  background: #f8f9fb;
  padding: 12px;
}

.markdown-body {
  color: var(--text);
  line-height: 1.58;
}

.markdown-body > *:first-child {
  margin-top: 0;
}

.markdown-body > *:last-child {
  margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 12px 0 6px;
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.25;
}

.markdown-body h1 {
  font-size: 17px;
}

.markdown-body h2 {
  font-size: 15px;
}

.markdown-body h3 {
  font-size: 13px;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-size: 12px;
}

.markdown-body p {
  margin: 0 0 8px;
  color: var(--text);
}

.markdown-body ul,
.markdown-body ol {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  padding-left: 20px;
  color: var(--text);
}

.markdown-body .task-item {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
}

.markdown-body .task-item input {
  width: 13px;
  min-height: 13px;
  accent-color: var(--positive);
}

.markdown-body blockquote {
  margin: 0 0 8px;
  border-left: 3px solid var(--positive);
  color: var(--muted);
  padding: 7px 9px;
  background: var(--positive-soft);
}

.markdown-body code {
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #eef2f7;
  color: var(--positive);
  padding: 1px 5px;
  font-family: var(--font-number);
  font-size: 11px;
}

.markdown-body pre {
  overflow: auto;
  margin: 0 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #111318;
  padding: 10px;
}

.markdown-body pre code {
  border: 0;
  background: transparent;
  color: #f8fafc;
  padding: 0;
  white-space: pre;
}

.markdown-body del {
  color: var(--muted);
}

.markdown-body mark {
  border-radius: 4px;
  background: rgba(0, 192, 135, 0.18);
  color: var(--text);
  padding: 0 3px;
}

.markdown-body a {
  color: var(--accent);
  text-decoration: none;
}

.markdown-body a:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 36px 18px;
  color: var(--muted);
  text-align: center;
}

.dialog {
  width: min(780px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0;
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgba(17, 19, 24, 0.34);
}

.dialog form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head h2 {
  margin: 0;
  color: var(--text);
}

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

.dialog-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 920px) {
  .content {
    grid-template-columns: 1fr;
  }

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

  .login-card {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 180px;
  }

  .side-panel,
  .list-panel {
    position: static;
    max-height: none;
  }

  .filter-panel,
  .event-list {
    overflow: visible;
  }

  .side-panel.collapsed .side-title,
  .list-panel.collapsed .panel-head {
    grid-template-columns: auto 1fr;
    justify-items: start;
    min-height: 54px;
    padding: 12px 14px;
  }

  .side-panel.collapsed .rail-label,
  .list-panel.collapsed .rail-label {
    writing-mode: horizontal-tb;
  }

  .side-panel.collapsed .collapse-btn,
  .list-panel.collapsed .collapse-btn {
    order: 0;
  }

  .detail-panel {
    position: static;
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .topbar,
  .actions {
    align-items: stretch;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
  }

  .brand {
    width: 100%;
  }

  .actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .layout {
    padding: 10px 10px 24px;
  }

  h1 {
    font-size: 24px;
  }

  .summary-copy {
    font-size: 12px;
  }

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

  .event-card {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 12px;
  }

  .impact {
    justify-content: flex-start;
  }

  .stats,
  .form-grid,
  .dialog-actions,
  .timeline-fields,
  .quick-edit {
    grid-template-columns: 1fr;
  }

  .stats {
    gap: 6px;
  }

  .stat {
    min-height: 50px;
    padding: 8px;
  }

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

  .detail-panel {
    padding: 14px;
  }

  .detail-head h2 {
    font-size: 20px;
  }

  .dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .login-screen {
    align-items: start;
    padding: 18px 12px;
  }

  .login-card {
    margin-top: 10vh;
    padding: 20px;
  }

  .login-visual {
    display: none;
  }
}
