:root {
  color-scheme: light;
  font-family: "Inter", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: #203447;
  background: #f3f6f8;
  --navy: #172f49;
  --muted: #526577;
  --line: #d9e1e7;
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 1rem; line-height: 1.55; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2384c2; outline-offset: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.page-width {
  width: calc(100% - 2 * clamp(1rem, 3.7vw, 4rem));
  max-width: 92rem;
  margin-inline: auto;
}

.topbar { color: white; background: var(--navy); }
.topbar-inner, .app-title, .assignee-picker, .list-title, .list-meta {
  display: flex;
  align-items: center;
}
.topbar-inner { min-height: 4.75rem; justify-content: space-between; gap: 1rem; }
.app-title { gap: 1.375rem; }
.wordmark {
  padding-right: 1.375rem;
  border-right: 1px solid #526478;
  font-family: "Inter", Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -.025em;
  line-height: 1.1;
}
h1 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.045em; }
.assignee-picker { gap: .75rem; }
.assignee-picker label { color: #d2dce6; font-size: .875rem; font-weight: 600; }
.select-wrap { position: relative; }
.select-wrap::after {
  position: absolute;
  content: "";
  top: calc(50% - .28rem);
  right: 1rem;
  width: .45rem;
  height: .45rem;
  border: solid #dce7f0;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
}
#assignee {
  appearance: none;
  min-height: 2.625rem;
  padding: .45rem 2.6rem .45rem 1rem;
  border: 1px solid #647688;
  border-radius: .5rem;
  background: #263f59;
  color: #fff;
  font-size: .9375rem;
  font-weight: 600;
}
#assignee:hover { background: #304b65; }
#assignee option { background: white; color: var(--navy); }
#assignee:focus-visible { outline-color: #88d4ef; }

.workspace { padding-block: clamp(1.25rem, 2.5vw, 2.25rem) 3rem; }
.toolbar, .inquiry-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: .875rem;
  box-shadow: 0 3px 14px -8px rgba(20, 45, 66, .18);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: .9375rem 1.25rem;
  margin-bottom: 1.5rem;
}
.search-box {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: min(100%, 28rem);
  min-width: 0;
  min-height: 2.75rem;
  padding-inline: .9rem .35rem;
  border: 1px solid #bdcbd7;
  border-radius: .5rem;
  background: #fff;
}
.search-box:focus-within { border-color: #39749d; box-shadow: 0 0 0 3px #e0edf5; }
.search-icon {
  position: relative;
  display: inline-block;
  width: .92rem;
  height: .92rem;
  flex: none;
  border: 1.7px solid currentColor;
  border-radius: 50%;
  color: #60768a;
}
.search-icon::after {
  content: "";
  position: absolute;
  width: .43rem;
  height: 1.7px;
  right: -.32rem;
  bottom: -.13rem;
  border-radius: 1rem;
  background: currentColor;
  transform: rotate(45deg);
}
#search {
  flex: 1;
  min-width: 0;
  height: 2.625rem;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--navy);
}
#search::-webkit-search-cancel-button { appearance: none; }
#search::placeholder { color: #607285; opacity: 1; }
.clear-search {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: .35rem;
  color: var(--muted);
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
}
.clear-search:hover { background: #edf2f6; }
.filters {
  display: flex;
  flex: none;
  gap: .2rem;
  padding: .2rem;
  border: 1px solid #dee5ea;
  border-radius: .625rem;
  background: #f1f4f6;
}
.filters button {
  flex: 1;
  min-width: 3.65rem;
  min-height: 2.25rem;
  padding: .35rem .75rem;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 600;
  white-space: nowrap;
}
.filters button:hover { background: #e1e8ee; }
.filters button[aria-pressed="true"] { background: var(--navy); color: #fff; }

.inquiry-panel { overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.5rem; }
.list-title { gap: .65rem; }
h2 { font-size: 1.375rem; letter-spacing: -.05em; }
.result-count {
  padding: .125rem .55rem;
  border-radius: .375rem;
  background: #e8f1f5;
  color: #24536d;
  font-size: .875rem;
  font-weight: 700;
}
.list-meta { gap: .6rem; color: var(--muted); font-size: .875rem; }
.list-meta time, .result-count, .detail-value { font-variant-numeric: tabular-nums; }
.calendar-icon {
  position: relative;
  display: inline-block;
  width: .92rem;
  height: .85rem;
  border: 1.5px solid currentColor;
  border-radius: .18rem;
}
.calendar-icon::before {
  content: "";
  position: absolute;
  top: .18rem;
  width: 100%;
  border-top: 1px solid currentColor;
}
.calendar-icon::after {
  content: "";
  position: absolute;
  top: -.21rem;
  left: .13rem;
  width: .08rem;
  height: .26rem;
  background: currentColor;
  box-shadow: .39rem 0 currentColor;
}

.inquiry-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.col-status { width: 12%; }
.col-customer { width: 18%; }
.col-summary { width: 31%; }
.col-deadline { width: 15%; }
.col-amount { width: 14%; }
.col-owner { width: 10%; }
.inquiry-table th, .inquiry-table td { padding-inline: 1rem; text-align: left; }
.inquiry-table :is(th, td):first-child { padding-left: 1.5rem; }
.inquiry-table th {
  padding-block: .72rem;
  border-block: 1px solid var(--line);
  background: #eef3f6;
  color: #40566a;
  font-size: .875rem;
  font-weight: 650;
}
.inquiry { height: 6rem; }
.inquiry + .inquiry { border-top: 1px solid #e1e7ec; }
.inquiry td { padding-block: 1.1rem; vertical-align: middle; overflow-wrap: anywhere; word-break: keep-all; }
.urgent-row .status-cell { box-shadow: inset 3px 0 #df8581; }
.badges { display: flex; align-items: flex-start; flex-direction: column; gap: .35rem; }
.status-badge, .extra-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  white-space: nowrap;
  font-weight: 650;
}
.status-badge { gap: .4rem; padding: .16rem .58rem; border-radius: .35rem; font-size: .875rem; }
.status-badge::before { content: ""; width: .39rem; height: .39rem; border-radius: 50%; background: currentColor; }
.urgent { color: #a33037; background: #fde9e8; }
.ongoing { color: #92500c; background: #fff0d9; }
.new { color: #216746; background: #e2f4e9; }
.extra-badges { display: flex; flex-wrap: wrap; gap: .25rem; }
.extra-badges:empty { display: none; }
.extra-badge { padding: .04rem .4rem; border-radius: .25rem; font-size: .8125rem; }
.again { color: #385c7b; background: #eaf1f7; }
.unread { color: #53606e; background: #edf0f3; }
.customer-name, .subject, .detail-label, .detail-value { display: block; }
.customer-name, .detail-label { margin-bottom: .2rem; color: var(--muted); font-size: .875rem; }
.subject { color: var(--navy); font-size: 1.045rem; font-weight: 700; letter-spacing: -.035em; }
.summary-cell { color: #33495b; line-height: 1.65; }
.detail-value { font-size: .975rem; font-weight: 600; }
.pending, .missing .detail-value { color: var(--muted); font-weight: 400; }
.missing .detail-label { display: none; }
.inquiry-table .empty-cell { height: 14rem; text-align: center; color: var(--muted); }
.empty-symbol {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: .75rem;
  border-radius: 50%;
  background: #eef3f6;
}

@media (max-width: 65rem) {
  .inquiry-table th, .inquiry-table td { padding-inline: .7rem; }
  .inquiry-table :is(th, td):first-child { padding-left: 1rem; }
}

@media (max-width: 54rem) {
  .inquiry-table, .inquiry-table tbody { display: block; }
  .inquiry-table colgroup { display: none; }
  .inquiry-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .inquiry {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem 1rem;
    height: auto;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--line);
  }
  .inquiry-table .inquiry td { padding: 0; }
  .inquiry .status-cell, .inquiry .customer-cell, .inquiry .summary-cell { grid-column: 1 / -1; }
  .urgent-row .status-cell { box-shadow: none; }
  .urgent-row { box-shadow: inset 3px 0 #df8581; }
  .badges { flex-direction: row; align-items: center; gap: .45rem; }
  .inquiry-table .inquiry .summary-cell { padding-bottom: .3rem; }
  .inquiry-table .inquiry :is(.deadline-cell, .amount-cell, .owner-cell) { border-top: 1px solid #e6ecf0; padding-top: .6rem; }
  .missing .detail-label { display: block; }
  .empty-row { display: block; }
  .inquiry-table .empty-cell {
    display: grid;
    align-content: center;
    justify-items: center;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 44rem) {
  .topbar-inner { min-height: 4.25rem; gap: .5rem; }
  .wordmark { display: none; }
  h1 { font-size: 1.1rem; }
  .assignee-picker { gap: .4rem; }
  #assignee { padding-left: .65rem; padding-right: 2rem; }
  .select-wrap::after { right: .7rem; }
  .toolbar { flex-direction: column; align-items: stretch; gap: .7rem; padding: .75rem; margin-bottom: 1rem; }
  .search-box { width: 100%; }
  .filters button { min-width: 0; min-height: 2.5rem; padding-inline: .35rem; }
  .panel-heading { align-items: flex-start; flex-direction: column; gap: .45rem; padding: 1rem; }
  .inquiry { padding: 1rem; gap: .55rem .65rem; }
}

@media (max-width: 28rem) {
  .assignee-picker label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .detail-value { font-size: .9rem; }
}
