:root {
  color-scheme: light;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color: #14243a;
  background: #f3f6fa;
  line-height: 1.55;
  font-synthesis: none;
  --blue: #1454c1;
  --border: #d8e1ed;
  --muted: #4e607a;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, .role-switch { cursor: pointer; }
button:disabled { cursor: default; opacity: .65; }
button, input, select, textarea, a { outline-offset: 3px; }
:focus-visible { outline: 2px solid #1b71e8; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
button {
  color: #243951; border: 1px solid var(--border); background: #fff;
  border-radius: 8px; padding: 8px 13px; font-weight: 650;
}
button:hover:not(:disabled) { background: #f4f8fd; }
.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.primary:hover:not(:disabled) { background: #103f91; }
.danger { color: #fff; background: #9c2929; border-color: #9c2929; }
.danger:hover:not(:disabled) { background: #7e2222; }
.entry { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.entry-card {
  width: min(100%, 460px); background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 30px; box-shadow: 0 14px 36px #1b406b12;
}
.logo {
  display: inline-grid; width: 42px; height: 42px; place-items: center;
  color: #fff; background: var(--blue); border-radius: 12px; font-weight: 780; letter-spacing: -.04em;
}
.entry-card h1 { font-size: 1.55rem; margin: 15px 0 5px; }
.entry-card p { color: var(--muted); }
.entry-card p[role="alert"] { color: #9c2929; margin-top: 8px; }
.roles { display: grid; gap: 9px; margin-top: 20px; }
.role-entry { text-align: left; display: grid; gap: 2px; padding: 12px 14px; }
.role-entry span { color: var(--muted); font-size: .9rem; font-weight: 450; }
.workspace { min-height: 100vh; display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.sidebar { background: #fff; border-right: 1px solid var(--border); padding: 20px 13px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 22px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; }
.brand small { color: var(--muted); font-size: .86rem; }
#nav { display: grid; gap: 3px; }
#nav button { text-align: left; width: 100%; border: 0; background: transparent; }
#nav button[aria-current] { color: #10459c; background: #eaf2ff; }
.role-switch { display: block; color: var(--muted); font-size: .92rem; margin: 16px 10px 0; }
.main { padding: 24px clamp(14px, 3vw, 38px); min-width: 0; }
.top { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.top h1 { font-size: clamp(1.45rem, 3.1vw, 2rem); letter-spacing: -.04em; }
#actor { font-size: .9rem; color: var(--muted); font-weight: 670; }
.actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.status { margin-block: 0 11px; color: #20477b; min-height: 1.4rem; }
.status:empty, .error:empty { display: none; }
.error { color: #9d2525 !important; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric { min-width: 0; text-align: left; display: grid; gap: 7px; padding: 16px; border-radius: 12px; }
.metric span { font-size: .92rem; color: var(--muted); }
.metric strong { font-size: 1.75rem; font-variant-numeric: tabular-nums; color: #14243a; }
.metric small { margin-left: 4px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.surface { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.surface-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; gap: 8px; }
.surface-head h2, .modal-head h2 { font-size: 1.12rem; }
.scroll-table { overflow: auto; }
table { border-collapse: collapse; width: 100%; min-width: 590px; }
th { color: #435677; background: #f4f7fb; font-weight: 680; text-align: left; font-size: .9rem; }
td, th { padding: 9px 13px; border-block-start: 1px solid #e8edf5; }
td { font-size: .95rem; }
td:first-child { font-weight: 650; }
td small { display: block; color: var(--muted); font-weight: 450; font-size: .8rem; white-space: nowrap; }
.text-button { border: 0; color: #123e85; text-align: left; font-weight: 700; padding: 0; background: transparent; }
.text-button:hover { text-decoration: underline; }
.pill { display: inline-block; background: #edf1f7; color: #344963; border-radius: 6px; padding: 2px 7px; font-size: .85rem; white-space: nowrap; }
.pill.fresh { background: #dbeafe; color: #16418b; }
.toolbar { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 13px; }
label { display: grid; gap: 4px; color: #415674; font-size: .9rem; font-weight: 660; }
.search { flex: 1 1 230px; }
input, select, textarea { min-width: 0; width: 100%; border: 1px solid var(--border); padding: 9px 10px; border-radius: 7px; color: #14243a; background: white; font-weight: 450; }
.list-label, .empty { padding: 13px 16px; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); padding: 10px 13px; font-size: .88rem; color: var(--muted); }
dialog { padding: 0; width: min(94vw, 540px); max-height: 90vh; border: 1px solid var(--border); border-radius: 14px; color: #14243a; }
dialog::backdrop { background: #14243a70; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 16px 17px; }
.modal-body > p { color: var(--muted); margin-bottom: 14px; }
.modal-body dl { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 15px; margin: 0 0 16px; }
.modal-body dt { color: var(--muted); font-size: .86rem; }
.modal-body dd { margin: 0; overflow-wrap: anywhere; }
form { display: grid; gap: 10px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.detail-note { white-space: pre-wrap; }
@media (max-width: 770px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { border: 0; border-bottom: 1px solid var(--border); padding: 12px 12px 8px; }
  .brand { padding-bottom: 10px; }
  #nav { display: flex; overflow-x: auto; }
  #nav button { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .role-switch { margin: 8px 8px 3px; }
  .main { padding-top: 15px; }
}
@media (max-width: 590px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { padding: 11px; }
  .entry-card { padding: 22px; }
}
