/* ==========================================================================
   오토매틱스튜디오 Design System
   Source: Figma — "Frame 200" (node 111:150, admin UI)
                    "Frame 240" (node 108:191, homepage)
   Tokens and component classes only. Page-level layout lives in style.css.

   Terminology: avoid "조판" in any copy — use "배치"/"배치하기" instead.
   See html/design-system.html#terminology for the full list and rationale.
   ========================================================================== */

:root {
  /* Brand */
  --ds-primary-500: #000000;
  --ds-primary-600: #1a1a1a; /* hover state for solid-black surfaces */
  --ds-primary-100: #fafafa;

  /* Grayscale */
  --ds-gray-100: #f6f6f6;
  --ds-gray-200: #e3e3e3;
  --ds-gray-300: #cccccc;
  --ds-gray-400: #b3b3b3;
  --ds-gray-500: #888888;
  --ds-gray-600: #333333;

  /* Warn (badge.amber와 동일 색상 — 토스트 등 경고 표시용, REQ-37) */
  --ds-warn-500: #a8590a;
  --ds-warn-100: #fdf1de;

  /* Line rule: every border/divider in the product uses this value. No exceptions. */
  --ds-line: var(--ds-gray-200);

  /* Semantic aliases */
  --ds-surface: #ffffff;
  --ds-border: var(--ds-line);
  --ds-text: var(--ds-gray-600);
  --ds-text-muted: var(--ds-gray-500);

  /* Additional neutrals observed on the homepage frame (108:191) — not part
     of the 6-step Gray scale from Frame 200, kept as their own tokens. */
  --ds-ink: #404040;
  --ds-ink-muted: #9a9a9a;

  /* Type */
  --ds-font-display: 'Noto Sans KR', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --ds-font-ui: 'Noto Sans KR', 'SUIT', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --ds-font-label: 'Noto Sans KR', 'Inter', 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --ds-font-mono: ui-monospace, 'SF Mono', Consolas, 'Liberation Mono', monospace;
}

/* ---------- Button ---------- */
.ds-btn {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 10px 20px;
  font-family: var(--ds-font-ui);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.03em;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.ds-btn--outline {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  color: var(--ds-gray-600);
}
.ds-btn--outline:hover {
  background: var(--ds-gray-100);
  border-color: var(--ds-gray-300);
}
.ds-btn--primary {
  background: var(--ds-primary-500);
  color: #ffffff;
}
.ds-btn--primary:hover {
  background: var(--ds-primary-600);
}
.ds-btn--muted {
  background: #eeeff0;
  color: var(--ds-gray-600);
}
.ds-btn--muted:hover {
  background: #e2e4e6;
}

/* ---------- Tab ---------- */
.ds-tabs {
  display: flex;
}
.ds-tab {
  padding: 14px 28px;
  font-family: var(--ds-font-label);
  font-size: 14px;
  letter-spacing: -0.02em;
  background: none;
  border: none;
  border-bottom: 1px solid var(--ds-border);
  color: var(--ds-gray-500);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.ds-tab.is-active {
  border-bottom: 1.5px solid var(--ds-gray-600);
  color: var(--ds-gray-600);
  font-weight: 500;
}
.ds-tab:hover {
  color: var(--ds-gray-600);
}

/* ---------- Input ---------- */
.ds-input {
  display: block;
  width: 100%;
  border: 1px solid var(--ds-border);
  background: var(--ds-surface);
  padding: 14px 16px;
  font-family: var(--ds-font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.03em;
  color: var(--ds-gray-600);
}
.ds-input::placeholder {
  color: var(--ds-gray-500);
}

/* ---------- Select / Date field ---------- */
.ds-field {
  width: 100%;
  height: 48px;
  border: 1px solid var(--ds-border);
  background: var(--ds-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-family: var(--ds-font-ui);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.03em;
  color: var(--ds-gray-600);
  cursor: pointer;
}
.ds-field__icon {
  flex-shrink: 0;
}

/* ---------- Table ---------- */
.ds-table {
  width: 100%;
  border-collapse: collapse;
}
.ds-table th,
.ds-table td {
  height: 64px;
  text-align: center;
  font-family: var(--ds-font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.03em;
  color: var(--ds-gray-600);
  border-bottom: 1px solid var(--ds-border);
  padding: 0 12px;
  white-space: nowrap;
}
.ds-table th:first-child,
.ds-table td:first-child {
  text-align: left;
}
.ds-table th {
  background: var(--ds-gray-100);
}
.ds-table td {
  background: var(--ds-surface);
}

/* ---------- CTA button (solid black, marketing surfaces) ----------
   Distinct from .ds-btn (44px admin button from Frame 200) — this is the
   larger CTA style used across the homepage (Frame 240 / node 108:191). */
.ds-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background: var(--ds-primary-500);
  color: #ffffff;
  padding: 10px 14px;
  font-family: var(--ds-font-ui);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.03em;
  text-decoration: none;
  border: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.ds-cta:hover {
  background: var(--ds-primary-600);
}
@media (max-width: 480px) {
  .ds-cta {
    gap: 12px;
  }
}
.ds-cta--block {
  display: flex;
  width: 100%;
  justify-content: space-between;
}
.ds-cta img {
  flex-shrink: 0;
}
.ds-cta.is-disabled {
  background: var(--ds-gray-200);
  color: var(--ds-gray-500);
}
.ds-cta.is-disabled:hover {
  background: var(--ds-gray-200);
}

/* ---------- Banner (Primary 100 surface + line box) ---------- */
.ds-banner {
  background: var(--ds-primary-100);
  border: 1px solid var(--ds-line);
  padding: 40px 52px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}
.ds-banner__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 16px;
  line-height: 1;
  color: var(--ds-gray-500);
  cursor: pointer;
}
.ds-banner__close:hover {
  color: var(--ds-gray-600);
}
@media (max-width: 720px) {
  .ds-banner {
    padding: 28px 24px;
  }
}
.ds-banner__title {
  font-family: var(--ds-font-ui);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ds-primary-500);
  margin: 0 0 8px;
}
.ds-banner__desc {
  font-family: var(--ds-font-ui);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--ds-gray-500);
  margin: 0 0 40px;
}

/* ---------- Card (white surface + line only) ---------- */
.ds-card {
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}
.ds-card__title .badge {
  position: absolute;
  top: 24px;
  right: 32px;
}
.ds-card__title {
  font-family: var(--ds-font-ui);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ds-primary-500);
  margin: 0 0 8px;
}
.ds-card__desc {
  font-family: var(--ds-font-ui);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--ds-gray-500);
  margin: 0 0 40px;
}
.ds-card .ds-cta {
  margin-top: auto;
}
.ds-card--empty {
  border-style: dashed;
  align-items: center;
  justify-content: center;
  min-height: 168px;
}
.ds-card--empty .ds-card__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-gray-400);
  margin: 0;
}

/* ---------- Step (black badge pill + Primary 100 body, centered) ---------- */
.ds-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.ds-step__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ds-primary-500);
  color: #ffffff;
  padding: 6px 16px;
}
.ds-step__label {
  font-family: var(--ds-font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.03em;
}
.ds-step__body {
  width: 100%;
  background: var(--ds-primary-100);
  border: 1px solid var(--ds-line);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ds-step__icon {
  display: flex;
  margin-bottom: 24px;
}
.ds-step__title {
  font-family: var(--ds-font-ui);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ds-primary-500);
  margin: 0 0 4px;
}
.ds-step__desc {
  font-family: var(--ds-font-ui);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--ds-gray-500);
  margin: 0;
}
.ds-step--empty .ds-step__badge {
  background: var(--ds-gray-400);
}
.ds-step--empty .ds-step__body {
  min-height: 84px;
  justify-content: center;
}
.ds-step--empty .ds-step__icon,
.ds-step--empty .ds-step__desc {
  display: none;
}
.ds-step--empty .ds-step__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-gray-400);
  margin: 0;
}

/* ---------- Color swatch (for documentation/theming screens) ---------- */
.ds-swatch {
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ds-swatch__chip {
  width: 100%;
  height: 45px;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.ds-swatch__name {
  font-family: var(--ds-font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ds-gray-600);
}
.ds-swatch__hex {
  font-family: var(--ds-font-mono);
  font-size: 11.5px;
  color: var(--ds-gray-500);
}
