:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --ink: #19201d;
  --muted: #69726d;
  --line: #dce2dc;
  --accent: #276f55;
  --accent-strong: #164936;
  --danger: #a33a35;
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--accent-strong);
}

.topbar,
.dashboard-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 32px 0 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ghost-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 16px;
}

.ghost-button:hover {
  background: #edf2ee;
}

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

.summary-grid article,
.panel,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary-grid article {
  padding: 18px;
}

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

.summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.cafe24-panel {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(0, 1.8fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

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

.status-list div {
  min-width: 0;
}

.status-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-list dd {
  margin: 5px 0 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#cafe24-status {
  grid-column: 1 / -1;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.trend-chart {
  display: block;
  width: 100%;
  height: 320px;
  border-radius: 8px;
  background: #fbfcfa;
}

.login-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-panel input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2) {
  text-align: left;
}

.login-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 20px;
}

.login-panel {
  width: min(420px, 100%);
  padding: 28px;
}

.login-panel form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.form-error {
  color: var(--danger);
  font-size: 14px;
}

@media (max-width: 860px) {
  .summary-grid,
  .workspace-grid,
  .cafe24-panel,
  .status-list {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .topbar,
  .dashboard-shell {
    width: min(100vw - 20px, 1180px);
  }

}
