:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #657184;
  --line: #d8e0e8;
  --soft: #f3f7fa;
  --paper: #ffffff;
  --brand: #1d4f68;
  --brand-2: #277c7f;
  --warn: #8a5a13;
  --ok: #176b4d;
  --error: #9b2c2c;
  --shadow: 0 18px 42px rgba(23, 32, 51, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #edf3f7;
  color: var(--ink);
  font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
  line-height: 1.55;
}

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

button,
a.button {
  border: 0;
  background: var(--brand);
  color: #fff;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}

button:hover,
a.button:hover {
  background: #173f54;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.secondary {
  background: #dfe8ee;
  color: var(--ink);
}

button.secondary:hover {
  background: #cedbe4;
}

button.ghost,
.operator-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 700;
}

.text-button {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
}

.text-button:hover {
  background: transparent;
  text-decoration: underline;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

label {
  display: block;
  margin: 4px 0 6px;
  font-weight: 700;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

.checkline input {
  width: auto;
}

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

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand h1,
.signin h2,
.panel-title h2,
.history h2 {
  margin: 0;
}

.brand h1 {
  font-size: clamp(22px, 3vw, 32px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

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

.signin,
.workspace {
  margin-bottom: 40px;
}

.signin {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.signin-copy,
.signin-form,
.card,
.rail {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.signin-copy {
  padding: 36px;
}

.signin-copy h2 {
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.16;
  max-width: 680px;
}

.signin-copy p:last-child {
  max-width: 620px;
  color: var(--muted);
}

.signin-form,
.card {
  padding: 24px;
}

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

.rail {
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 16px;
}

.user-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e2f0f0;
  color: var(--brand-2);
  font-weight: 800;
}

.user-email {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.user-card .muted {
  margin: 0;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 8px;
}

.steps li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.steps li.active {
  border-color: var(--brand);
  color: var(--brand);
  background: #edf6f7;
}

.history {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.history h2 {
  font-size: 17px;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.history-item {
  text-align: left;
  width: 100%;
  min-height: auto;
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.history-item:hover {
  background: var(--soft);
}

.history-item span {
  color: var(--muted);
  font-size: 12px;
}

.content {
  display: grid;
  gap: 16px;
}

.owner-panel {
  border-left: 5px solid var(--brand-2);
}

.notice {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 7px;
  background: #e8f4ef;
  color: var(--ok);
  border: 1px solid #c8e4d7;
  font-weight: 700;
}

.notice.error {
  background: #fff0f0;
  color: var(--error);
  border-color: #efcaca;
}

.notice.warn {
  background: #fff8e9;
  color: var(--warn);
  border-color: #f0d9a8;
}

.panel-title {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.panel-title p:last-child {
  margin: 0;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 10px;
}

.callout {
  border-left: 4px solid var(--brand-2);
  background: #eef7f7;
  color: #254d50;
  padding: 12px 14px;
  border-radius: 6px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 12px;
}

.button-row.split {
  justify-content: space-between;
}

.proposal-view {
  display: grid;
  gap: 16px;
}

.section-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfe;
}

.section-box h3 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 19px;
}

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

.row-grid,
.triple-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.row-grid {
  grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1.4fr);
}

.triple-grid {
  grid-template-columns: minmax(100px, 0.5fr) minmax(140px, 0.7fr) minmax(0, 1.8fr);
}

.readonly-field {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.pricing-table,
.simple-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.pricing-table th,
.pricing-table td,
.simple-table th,
.simple-table td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.pricing-table th,
.simple-table th {
  background: var(--brand);
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e9eef4;
  color: var(--muted);
  font-weight: 800;
}

.badge.done {
  background: #e8f4ef;
  color: var(--ok);
}

.badge.failed {
  background: #fff0f0;
  color: var(--error);
}

.file-status {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.file-status p {
  margin: 0;
}

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

.downloads a {
  display: grid;
  place-items: center;
  min-height: 56px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: #edf6f7;
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .signin,
  .workspace {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
  }

  .inline-grid,
  .row-grid,
  .triple-grid,
  .downloads {
    grid-template-columns: 1fr;
  }
}
