/* K-Crash 계정·관리자·대시보드 화면 (Figma v0.0.9 KC03~KC09, AD01~AD07, DB01~DB02).
   색은 site.css 토큰(--ink, --steel, --blue, --line, --paper)을 그대로 쓴다. */
:root {
  --warn-bg: #fff6e0;
  --warn-line: #f2cf7a;
  --warn-ink: #7a4b00;
  --danger-bg: #fdecec;
  --danger-line: #f1b3b3;
  --danger-ink: #a11b1b;
  --ok-bg: #e9f7ef;
  --ok-line: #a8dcbc;
  --ok-ink: #17663a;
  --night: #101623;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--steel);
  font-size: 13px;
}
.site-nav a {
  white-space: nowrap;
}
.site-nav .nav-login {
  min-height: 0;
  padding: 8px 16px;
  border-radius: 7px;
  background: var(--blue);
  color: white;
}
.site-nav .nav-login:hover,
.site-nav .nav-login[aria-current="page"] {
  color: white;
  background: #1c43c9;
}

/* 로그인·신청 카드 */
.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-block: 56px 72px;
}
.auth-card {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.auth-card.wide {
  width: min(560px, 100%);
}
.auth-card h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
}
.auth-card .eyebrow {
  margin: 0;
}
.auth-card p {
  margin: 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.field input,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  background: white;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: -1px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
}
.check input {
  margin-top: 4px;
}
.button.block {
  width: 100%;
}
.button[disabled] {
  opacity: 0.6;
  cursor: wait;
}
.divider {
  text-align: center;
  font-size: 13px;
  color: var(--steel);
}
.google-slot {
  display: flex;
  justify-content: center;
  min-height: 44px;
}
.alert {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}
.alert strong {
  display: block;
  font-size: 14px;
}
.alert.warning {
  background: var(--warn-bg);
  border-color: var(--warn-line);
  color: var(--warn-ink);
}
.alert.danger {
  background: var(--danger-bg);
  border-color: var(--danger-line);
  color: var(--danger-ink);
}
.alert.success {
  background: var(--ok-bg);
  border-color: var(--ok-line);
  color: var(--ok-ink);
}
.alert.info {
  background: var(--paper);
}
.link-row {
  font-size: 13px;
  color: var(--steel);
}
.link-row a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

/* 내 계정 */
.account-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 520px);
  justify-content: center;
  gap: 24px;
  padding-block: 48px 72px;
}
.account-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.account-grid .auth-card {
  width: auto;
}
.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pill-badge {
  display: inline-block;
  white-space: nowrap;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--paper);
  color: var(--steel);
}
.pill-badge.approved {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.pill-badge.pending {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.pill-badge.rejected {
  background: var(--danger-bg);
  color: var(--danger-ink);
}
.kv {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 6px 12px;
  margin: 0;
  font-size: 14px;
}
.kv dt {
  color: var(--steel);
  font-size: 13px;
}
.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.link-code {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.link-code small {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--steel);
}
.rules {
  margin: 0;
  padding: 12px 14px 12px 30px;
  border-radius: 8px;
  background: var(--paper);
  font-size: 13px;
}
.text-button {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
}

/* 관리자·대시보드 */
.console {
  min-height: 100vh;
  background: var(--paper);
}
.console-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding: 16px 40px;
  background: var(--night);
  color: #e6edf3;
}
.console-header .brand-text {
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}
.console-nav {
  display: flex;
  gap: 22px;
  flex: 1;
  font-size: 14px;
  font-weight: 650;
}
.console-nav a {
  color: #9babba;
  text-decoration: none;
  white-space: nowrap;
}
.console-nav a[aria-current="page"],
.console-nav a:hover {
  color: white;
}
.console-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
  gap: 8px 18px;
  align-items: center;
  font-size: 13px;
  color: #9babba;
}
.console-meta a,
.console-meta button,
.console-meta span {
  white-space: nowrap;
}
.console-meta a,
.console-meta button {
  color: #c7d2dd;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.console-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1360px;
  margin-inline: auto;
  padding: 28px 40px 56px;
}
.console-body h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.3;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.toolbar .spacer {
  flex: 1;
}
.pill {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.pill[aria-pressed="true"] {
  background: var(--night);
  border-color: var(--night);
  color: white;
}
.search {
  width: 280px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
}
.panel {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
}
/* v0.0.10 AD08·AD09 관리자용 포터블 */
.portable-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
}
.portable-panel h2 {
  margin: 0;
  font-size: 20px;
}
.portable-facts {
  grid-template-columns: 90px 1fr;
}
.portable-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.console-body > h2 {
  margin: 8px 0 0;
  font-size: 18px;
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th {
  padding: 12px 16px;
  background: var(--paper);
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}
table.data td {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
table.data td.wrap {
  min-width: 150px;
  white-space: normal;
  overflow-wrap: anywhere;
}
table.data tr.clickable {
  cursor: pointer;
}
table.data tr.clickable:hover td {
  background: #fbfcfe;
}
table.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.small-button {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.small-button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.small-button.danger {
  border-color: var(--danger-line);
  color: var(--danger-ink);
}
.small-button.danger-solid {
  background: var(--danger-ink);
  border-color: var(--danger-ink);
  color: white;
}
.detail-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.empty {
  padding: 18px;
  color: var(--steel);
  font-size: 14px;
}
.dialog-scrim {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(15 23 33 / 45%);
}
.dialog {
  width: min(520px, 100%);
  padding: 26px 28px 22px;
  border-radius: 14px;
  background: white;
  box-shadow: 0 12px 32px rgb(0 0 0 / 18%);
}
.dialog h2 {
  margin: 0 0 10px;
  font-size: 19px;
}
.dialog ul {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 14px;
}
.dialog .row-actions {
  justify-content: flex-end;
}

/* 대시보드 */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.kpi .label {
  font-size: 13px;
  font-weight: 700;
  color: var(--steel);
}
.kpi .value {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
}
.status-tag {
  display: inline-flex;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.status-tag.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.status-tag.ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.charts {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 16px;
}
.lists {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.chart {
  position: relative;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart .bar {
  fill: var(--blue);
}
.chart .bar:hover,
.chart .bar:focus {
  fill: #1c43c9;
  outline: none;
}
.chart .grid {
  stroke: var(--line);
}
.chart .tick {
  fill: var(--steel);
  font-size: 12px;
}
.tooltip {
  position: absolute;
  pointer-events: none;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--night);
  color: white;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 8px));
}
.hbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.hbar .labels {
  display: flex;
  gap: 8px;
  font-size: 14px;
}
.hbar .labels b {
  font-weight: 800;
}
.hbar .track {
  height: 12px;
}
.hbar .fill {
  height: 12px;
  border-radius: 4px;
  background: var(--blue);
}
.item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.item-list li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-wrap: anywhere;
}
.item-list small {
  color: var(--steel);
  font-size: 12px;
}
/* 디자인 0.2.78 AD11·AD12 버전 기록 */
.pill-badge.release-production {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.pill-badge.release-stage {
  background: #e8eeff;
  color: var(--blue);
}
.pill-badge.release-candidate {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.pill-badge.release-field {
  background: #f1eafe;
  color: #5b2bb5;
}
.pill-badge.release-development {
  background: #eef1f5;
  color: var(--steel);
}
.release-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.release-title h1 {
  margin: 0;
}
.release-title .spacer {
  flex: 1;
}
.release-title .release-source {
  margin-left: auto;
  font-size: 13px;
}
.release-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.release-timeline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.release-timeline .release-step {
  flex: 1;
  min-width: 0;
}
.release-tile,
.release-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.release-tile .label,
.release-step .label {
  font-size: 12px;
  font-weight: 800;
  color: var(--steel);
}
.release-step .label.info {
  color: var(--blue);
}
.release-step .label.ok,
.release-tile strong.ok {
  color: var(--ok-ink);
}
.release-tile strong {
  font-size: 24px;
}
.release-tile .muted,
.release-step .muted {
  font-size: 12px;
}
.release-step strong {
  font-size: 16px;
}
.release-arrow {
  color: #94a3b8;
  font-weight: 800;
}
table.data td.release-what-cell {
  width: 100%;
  max-width: 0;
}
.release-what {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.release-open,
.release-crumb a,
.release-title a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.release-crumb {
  margin: 0;
  font-size: 13px;
}
.release-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 20px;
  align-items: start;
}
.release-main,
.release-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.release-request {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}
.release-notes h3 {
  margin: 14px 0 6px;
  font-size: 14px;
}
.release-notes h3.feature {
  color: var(--blue);
}
.release-notes h3.improvement {
  color: var(--ok-ink);
}
.release-notes h3.fix {
  color: var(--danger-ink);
}
.release-notes ul,
.release-mrs,
.release-docs {
  margin: 0;
  padding-left: 18px;
}
.release-notes li,
.release-mrs li,
.release-docs li {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.6;
}
.release-notes .note-ko {
  display: block;
  margin-top: 2px;
  color: var(--steel);
  font-size: 13px;
}
.release-mrs {
  padding-left: 0;
  list-style: none;
}
.release-mrs li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
}
.release-docs li {
  overflow-wrap: anywhere;
}
.release-mr {
  font-weight: 800;
  color: var(--blue);
}
.release-kv {
  grid-template-columns: 76px 1fr;
}
.release-hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}
.release-evidence {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}
.release-evidence summary {
  cursor: pointer;
  list-style: none;
  font-weight: 400;
}
.release-evidence[open] summary {
  margin-bottom: 0;
}
.release-evidence summary::-webkit-details-marker {
  display: none;
}
.release-evidence summary,
.release-evidence p,
.release-evidence-text {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.release-more,
.release-less {
  color: var(--blue);
  font-weight: 700;
  white-space: nowrap;
}
.release-less,
.release-evidence[open] .release-short,
.release-evidence[open] .release-more {
  display: none;
}
.release-evidence[open] .release-less {
  display: inline;
}
.release-evidence[open] p {
  margin-top: 6px;
}
@media (max-width: 1100px) {
  .console-header {
    flex-wrap: wrap;
    gap: 12px 20px;
  }
  .console-nav {
    order: 3;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 8px 18px;
  }
  .console-meta {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 18px;
  }
  .kpis,
  .lists,
  .release-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
  .release-timeline {
    flex-wrap: wrap;
  }
  .release-timeline .release-step {
    flex: 1 1 40%;
  }
  .release-arrow {
    display: none;
  }
  .charts,
  .detail-grid,
  .account-grid,
  .release-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 440px) {
  .site-nav .nav-login {
    padding: 7px 12px;
  }
}
@media (max-width: 760px) {
  .field-row,
  .kpis,
  .lists,
  .release-tiles {
    grid-template-columns: 1fr;
  }
  .console-header {
    padding: 14px 16px;
  }
  .console-meta {
    margin-left: 0;
    justify-content: flex-start;
  }
  .console-body {
    padding: 22px 16px 40px;
  }
  .search {
    width: 100%;
  }
  .auth-card {
    padding: 24px;
  }
}
