:root {
  --bg: #f3f6fa;
  --panel: #ffffff;
  --line: #dbe3ed;
  --text: #17212f;
  --muted: #64748b;
  --brand: #073763;
  --blue: #2563eb;
  --red: #dc2626;
  --green: #047857;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0b1726;
  color: #ffffff;
  padding: 22px 18px;
}

.brand {
  display: grid;
  gap: 3px;
  margin-bottom: 24px;
}

.brand strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
}

.brand span {
  color: #a7b5c8;
  font-size: 13px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 22px;
}

.mode-button,
.nav-button,
.text-button {
  border: 0;
  cursor: pointer;
}

.mode-button {
  min-height: 36px;
  border-radius: 6px;
  background: #18263a;
  color: #cbd5e1;
  font-size: 13px;
}

.mode-button.active {
  background: #ffffff;
  color: #0b1726;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-button {
  width: 100%;
  min-height: 38px;
  border-radius: 6px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  padding: 0 12px;
  font-size: 14px;
}

.nav-button:hover,
.nav-button.active {
  background: #18263a;
  color: #ffffff;
}

.main {
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

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

h1 {
  margin-bottom: 0;
  font-size: 26px;
  font-weight: 600;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
  font-weight: 600;
}

.account {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.account-role {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #ffffff;
  color: var(--brand);
}

.notice {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid #c8d7ea;
  border-radius: 8px;
  background: #eef6ff;
  padding: 12px 14px;
  color: #244565;
  font-size: 14px;
}

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

.upload-panel {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.upload-copy h2 {
  margin: 0;
}

.upload-copy p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.upload-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.help-button {
  width: 22px;
  height: 22px;
  border: 1px solid #bfd0e2;
  border-radius: 50%;
  background: #eef6ff;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  cursor: pointer;
}

.help-bubble {
  position: relative;
  margin: 10px 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.help-bubble::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 118px;
  width: 12px;
  height: 12px;
  border-left: 1px solid #cbd5e1;
  border-top: 1px solid #cbd5e1;
  background: #ffffff;
  transform: rotate(45deg);
}

.help-bubble strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 14px;
}

.help-bubble dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 6px 12px;
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.help-bubble dt {
  color: #17212f;
  font-weight: 600;
}

.help-bubble dd {
  margin: 0;
}

.upload-copy code {
  color: var(--brand);
  font-weight: 600;
}

.upload-copy pre {
  margin: 0 0 12px;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px;
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
}

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

.upload-button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #ffffff;
  padding: 0 14px;
  cursor: pointer;
}

.upload-result {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 25px;
  font-weight: 600;
}

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

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.panel-header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.text-button {
  background: transparent;
  color: var(--brand);
  font-size: 14px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

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

.table th {
  color: var(--muted);
  font-weight: 500;
  background: #f8fafc;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
}

.status.green {
  background: #dcfce7;
  color: var(--green);
}

.status.red {
  background: #fee2e2;
  color: var(--red);
}

.status.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.memo-list {
  list-style: none;
  margin: 0;
  padding: 10px 16px 16px;
}

.memo-list li {
  border-bottom: 1px solid #edf1f6;
  padding: 12px 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
}

.memo-list li:last-child {
  border-bottom: 0;
}

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

  .sidebar {
    position: static;
  }

  .metrics,
  .content-grid {
    grid-template-columns: 1fr;
  }
}
