/*
 * 서비스 기록·관리자 통합 스타일.
 * 과거 패치 CSS를 기능별 한 파일로 통합했으며 뒤쪽 규칙이 이전 호환 규칙을 보정한다.
 */

/* style.css */
:root {
  --ink: #111827;
  --muted: #697386;
  --line: #e4e9ef;
  --blue: #1264e3;
  --navy: #0b1d3a;
  --mint: #25b99a;
  --bg: #f3f5f8;
}
* {
  box-sizing: border-box;
}
html {
  background: #dfe4ea;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: auto;
  background: var(--bg);
  box-shadow: 0 0 40px #14203718;
}
.topbar {
  height: 58px;
  padding: 10px 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: #fff;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2c7cf2, #1fc4a3);
  font-weight: 900;
  font-size: 13px;
}
.brand-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  line-height: 1.1;
}
.brand-copy strong {
  font-size: 14px;
}
.brand-copy span {
  margin-top: 4px;
  color: #9fb0c9;
  font-size: 9px;
}
.admin-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #152d4f;
  color: #c4d2e5;
  text-decoration: none;
}
.hero {
  padding: 11px 18px 31px;
  background: var(--navy);
  color: #fff;
}
.hero p {
  margin: 0 0 6px;
  color: #52d5bd;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1.4px;
}
.hero h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.28;
  letter-spacing: -1px;
}
.hero em {
  color: #55d4bd;
  font-style: normal;
}
.search-dock {
  position: sticky;
  z-index: 20;
  top: 0;
  margin-top: -18px;
  padding: 0 13px 8px;
  background: linear-gradient(180deg, transparent 0 18px, var(--bg) 18px);
}
.search-box {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid #e6ebf1;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 22px #142c5721;
}
.search-box > span {
  margin-right: 9px;
  color: var(--blue);
  font-size: 25px;
  transform: rotate(-15deg);
}
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 13px;
}
.search-box button {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 50%;
  color: #657086;
  background: #edf0f4;
}
.synonym-switch {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 4px;
  color: #687487;
  font-size: 9px;
}
.synonym-switch input {
  width: 14px;
  height: 14px;
  accent-color: var(--blue);
}
.synonym-switch b {
  color: var(--blue);
}
.content {
  padding: 7px 14px 25px;
}
.result-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.result-tools > span {
  color: #7c8798;
  font-size: 10px;
}
.result-tools label {
  min-width: 190px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid #dfe5ec;
  border-radius: 11px;
  background: #fff;
}
.result-tools label b {
  color: #687487;
  font-size: 9px;
}
.result-tools select {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #263247;
  font-size: 11px;
  font-weight: 700;
}
.case-list {
  display: grid;
  gap: 11px;
}
.case-card {
  padding: 16px;
  border: 1px solid #e6ebf0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 4px 14px #17243a0b;
}
.case-card h3 {
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.42;
  letter-spacing: -0.3px;
}
.company,
.detail-company {
  margin: 0;
  color: #8490a2;
  font-size: 10px;
}
.equipment {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}
.equipment b {
  padding: 5px 7px;
  border-radius: 7px;
  color: #155fc9;
  background: #eaf2ff;
  font-size: 9px;
}
.equipment span {
  color: #3b4759;
  font: 700 10px monospace;
}
.action-preview {
  margin: 12px 0;
  padding: 10px 11px;
  border-radius: 10px;
  background: #f6f8fb;
}
.action-preview strong {
  display: block;
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 9px;
}
.action-preview ul,
.detail-block ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.action-preview li {
  overflow: hidden;
  color: #536073;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.action-preview li:before,
.detail-block li:before {
  content: "•";
  margin-right: 7px;
  color: #8794a7;
}
.empty-action {
  opacity: 0.68;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #f0f2f5;
  color: #8993a3;
  font-size: 8px;
  white-space: nowrap;
}
.card-meta > span + span:before,
.card-meta time:before {
  content: "·";
  margin-right: 6px;
  color: #c5cbd4;
}
.card-meta .engineer {
  display: flex;
  align-items: center;
}
.call {
  width: 20px;
  height: 20px;
  margin-left: 4px;
  border: 0;
  border-radius: 7px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 9px;
}
.card-meta time {
  margin-left: auto;
}
.card-meta > b {
  color: #9aa5b5;
  font-size: 19px;
  font-weight: 400;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 0;
}
.pagination > div {
  display: flex;
  gap: 4px;
}
.pagination button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #dfe4eb;
  border-radius: 9px;
  background: #fff;
  color: #657185;
  font-size: 9px;
  font-weight: 700;
}
.pagination button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.pagination button:disabled {
  opacity: 0.35;
}
.empty,
.loading {
  padding: 52px 18px;
  text-align: center;
  color: #748094;
  font-size: 11px;
}
.empty {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
dialog {
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
}
dialog::backdrop {
  background: #050e1c8f;
}
dialog article {
  position: relative;
  padding: 25px 19px;
}
.close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f0f2f5;
  color: #586476;
  font-size: 20px;
}
.case-number {
  margin: 0 0 11px;
  color: #8390a2;
  font-size: 9px;
}
dialog h2 {
  margin: 0 40px 8px 0;
  font-size: 21px;
  line-height: 1.35;
}
.detail-block {
  margin: 18px 0;
  padding: 15px;
  border-radius: 15px;
  background: #f5f8fc;
}
.detail-block h3 {
  margin: 0 0 11px;
  font-size: 12px;
}
.detail-block ul {
  gap: 8px;
}
.detail-block li {
  color: #4c596b;
  font-size: 11px;
  line-height: 1.5;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #e8ebef;
  border-radius: 12px;
  background: #e8ebef;
}
.detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  background: #fff;
}
.detail-grid span {
  color: #919aaa;
  font-size: 8px;
}
.detail-grid b {
  font-size: 10px;
}
.login-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(160deg, #08192f, #102b50);
}
.login-card {
  width: 100%;
  max-width: 390px;
  padding: 28px 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 70px #0005;
}
.login-card > p {
  margin: 20px 0 7px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.4px;
}
.login-card h1 {
  margin: 0 0 25px;
  font-size: 27px;
  line-height: 1.3;
}
.login-card h1 em {
  color: var(--blue);
  font-style: normal;
}
.login-card form,
.login-card label {
  display: grid;
  gap: 7px;
}
.login-card form {
  gap: 15px;
}
.login-card label {
  color: #586477;
  font-size: 10px;
  font-weight: 700;
}
.login-card input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid #dce2ea;
  border-radius: 11px;
  outline: 0;
}
.password-field {
  position: relative;
}
.password-field button {
  position: absolute;
  top: 7px;
  right: 7px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #eef3f8;
  color: #607087;
  font-size: 9px;
}
.remember {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center !important;
}
.remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}
.primary {
  height: 46px;
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.login-card > small {
  display: block;
  margin-top: 17px;
  text-align: center;
  color: #8b95a4;
  font-size: 9px;
}
.admin-shell {
  width: 100%;
  max-width: 760px;
  min-height: 100dvh;
  margin: auto;
  padding: 20px 15px 45px;
}
.admin-shell > header {
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-shell > header > a {
  padding: 9px 11px;
  border-radius: 9px;
  background: #e6edf7;
  color: #385270;
  text-decoration: none;
  font-size: 10px;
}
.admin-shell header p {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 8px;
  font-weight: 900;
}
.admin-shell header h1 {
  margin: 0;
  font-size: 22px;
}
.admin-tabs {
  display: flex;
  gap: 5px;
  margin: 20px 0 12px;
  padding: 5px;
  border-radius: 13px;
  background: #e7ebf1;
}
.admin-tabs button {
  flex: 1;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
}
.admin-tabs button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 3px 9px #17243a12;
}
.admin-panel {
  display: none;
  padding: 17px;
  border: 1px solid #e2e7ed;
  border-radius: 16px;
  background: #fff;
}
.admin-panel.active {
  display: block;
}
.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.panel-head h2 {
  margin: 0 0 4px;
  font-size: 15px;
}
.panel-head p {
  margin: 0;
  color: #7d8898;
  font-size: 9px;
}
.panel-head button {
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}
.contact-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px 2px;
  border: 0;
  border-bottom: 1px solid #eef1f4;
  background: #fff;
  text-align: left;
}
.contact-row span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.contact-row b {
  font-size: 11px;
}
.contact-row small,
.contact-row em {
  color: #778396;
  font-size: 9px;
  font-style: normal;
}
.contact-row i {
  padding: 5px 6px;
  border-radius: 6px;
  background: #f0f1f3;
  color: #8b94a2;
  font-size: 8px;
  font-style: normal;
}
.contact-row i.on {
  background: #e5f7f2;
  color: #16836f;
}
.json-editor {
  width: 100%;
  height: 330px;
  margin: 13px 0 9px;
  padding: 12px;
  border: 1px solid #dfe5ed;
  border-radius: 11px;
  resize: vertical;
  outline: 0;
  background: #101b2d;
  color: #d9e6f8;
  font: 10px/1.55 monospace;
}
.upload-box {
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 14px 0 9px;
  border: 1px dashed #b8c5d8;
  border-radius: 13px;
  background: #f8fafc;
  text-align: center;
}
.upload-box input {
  display: none;
}
.upload-box b {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 11px;
}
.upload-box span {
  color: #7b8798;
  font-size: 9px;
}
.success,
.error {
  margin-top: 12px;
  padding: 11px;
  border-radius: 10px;
  font-size: 10px;
}
.success {
  background: #e8f7f1;
  color: #18785f;
}
.error {
  background: #fff0ef;
  color: #b3423b;
}
#contact-dialog {
  margin: auto;
  border-radius: 18px;
}
#contact-dialog form {
  display: grid;
  gap: 12px;
  padding: 21px;
}
#contact-dialog h2 {
  font-size: 17px;
}
#contact-dialog label {
  display: grid;
  gap: 5px;
  color: #647084;
  font-size: 9px;
}
#contact-dialog input {
  height: 42px;
  padding: 0 10px;
  border: 1px solid #dfe4eb;
  border-radius: 9px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}
.dialog-actions button {
  height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 9px;
}
.cancel {
  background: #edf0f4;
  color: #667085;
}
.install-card {
  max-width: 520px;
  margin: 80px auto;
  padding: 25px;
  border: 1px solid #dfe5ec;
  border-radius: 18px;
  background: #fff;
}
.install-card h1 {
  font-size: 21px;
}
@media (min-width: 700px) {
  body {
    padding: 22px 0;
  }
  .app-shell {
    min-height: calc(100dvh - 44px);
    border-radius: 25px;
  }
  .topbar {
    border-radius: 25px 25px 0 0;
  }
  .search-dock {
    top: 22px;
  }
  dialog {
    margin: auto;
    border-radius: 24px;
  }
}
@media (max-width: 420px) {
  .result-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .result-tools label {
    width: 100%;
  }
  .admin-panel {
    padding: 14px;
  }
  .contact-row {
    grid-template-columns: 1fr auto;
  }
  .contact-row i {
    display: none;
  }
}

/* refinements.css */
.identity-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
}
.identity-row .company,
.identity-row .detail-company {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.identity-row .equipment {
  min-width: 0;
  flex: none;
  justify-content: flex-end;
  margin-top: 0;
}
.identity-row .equipment span {
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-meta {
  font-size: 10.5px;
  gap: 7px;
  line-height: 1.35;
}
.card-meta .call {
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.card-meta > b {
  font-size: 22px;
}
.search-hit {
  padding: 0 0.12em;
  border-radius: 3px;
  background: #ffe58a;
  color: #102f63;
  font-weight: 900;
}
.equipment .search-hit {
  background: #fff0a8;
  color: #0b4da6;
}
.detail-identity {
  margin: 2px 40px 0 0;
}
dialog {
  width: calc(100% - 28px);
  max-width: 452px;
  max-height: 86dvh;
  margin: auto;
  border-radius: 22px;
}
dialog article {
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding-bottom: 0;
}
.detail-nav {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 20px -19px 0;
  padding: 12px 19px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #e8ecf1;
  background: #fff;
}
.detail-nav button {
  height: 43px;
  border: 1px solid #dce3ec;
  border-radius: 11px;
  background: #f5f8fc;
  color: #34506f;
  font-size: 10px;
  font-weight: 800;
}
.detail-nav button:last-child {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.detail-nav button:disabled {
  opacity: 0.35;
}
.install-app {
  width: 100%;
  height: 44px;
  margin-top: 10px;
  border: 1px solid #cfd9e7;
  border-radius: 11px;
  background: #f6f9fd;
  color: #315271;
  font-size: 10px;
  font-weight: 800;
}
.install-help {
  margin: 10px 0 0;
  padding: 11px;
  border-radius: 10px;
  background: #eef5ff;
  color: #48627f;
  font-size: 9px;
  line-height: 1.5;
}
@media (min-width: 700px) {
  dialog {
    margin: auto;
    border-radius: 24px;
  }
}

/* patch-v005.css */
.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
}
.search-options {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
}
.search-options > button {
  height: 29px;
  padding: 0 9px;
  border: 1px solid #dce4ee;
  border-radius: 9px;
  background: #fff;
  color: #52637a;
  font-size: 9px;
  font-weight: 800;
}
.search-options > button.active {
  border-color: #20a99c;
  background: #e7faf7;
  color: #087f75;
}
.search-options .synonym-switch {
  height: 29px;
  margin-left: auto;
  padding: 0;
}
.search-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 7px 1px 0;
  scrollbar-width: none;
}
.search-chips:empty {
  display: none;
}
.query-chip {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 7px;
  border-radius: 8px;
  color: #24364f;
  font-size: 9px;
  font-weight: 800;
}
.query-chip button {
  width: 17px;
  height: 17px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffffaa;
  color: inherit;
}
.hit-0 {
  background: #ffe58a !important;
  color: #553b00 !important;
}
.hit-1 {
  background: #b9f1e8 !important;
  color: #075f59 !important;
}
.hit-2 {
  background: #ffd2a8 !important;
  color: #773a00 !important;
}
.hit-3 {
  background: #dfd0ff !important;
  color: #4b2581 !important;
}
.hit-4 {
  background: #cdeeb8 !important;
  color: #285c18 !important;
}
.search-hit {
  padding: 0 0.12em;
  border-radius: 3px;
  font-weight: 900;
}
.company,
.detail-company {
  color: #657287;
  font-size: 11px;
  font-weight: 600;
}
.card-meta {
  font-size: 10.5px;
  gap: 7px;
  line-height: 1.35;
}
.card-meta .call {
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.card-meta > b {
  font-size: 22px;
}
dialog {
  width: calc(100% - 28px);
  max-width: 452px;
  max-height: 86dvh;
  margin: auto;
  border-radius: 22px;
}
dialog article {
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding-bottom: 0;
}
.detail-nav {
  position: sticky;
  bottom: 0;
}
.identity-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.identity-row .company,
.identity-row .detail-company {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.identity-row .equipment {
  min-width: 0;
  flex: none;
  justify-content: flex-end;
  margin-top: 0;
}
@media (max-width: 380px) {
  .search-options > button {
    padding: 0 6px;
    font-size: 8px;
  }
  .search-options {
    gap: 4px;
  }
}

/* patch-v006.css */
.hero h1 > span {
  display: block;
}
.hero-service {
  display: flex !important;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.hero-service small {
  min-width: 0;
  overflow: hidden;
  color: #afc0d4;
  font-size: 65%;
  font-weight: 600;
  letter-spacing: -0.2px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-box input {
  width: 0;
  flex: 1 1 60%;
}
.search-box .search-chips {
  max-width: 40%;
  min-width: 0;
  flex: 0 1 40%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  overflow: hidden;
  padding: 0;
}
.search-box .search-chips[hidden] {
  display: none;
}
.search-box .query-chip {
  min-width: 0;
  max-width: 100%;
  height: 27px;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 4px 4px 6px;
}
.search-box .query-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-box .query-chip button {
  flex: none;
}
.search-box .query-chip.chip-long {
  font-size: 8px;
}
.search-box .query-chip.chip-xlong {
  font-size: 7px;
}
.search-box .query-chip + .query-chip {
  max-width: 50%;
}
.case-card .company {
  font-size: 13.2px;
}
.case-card .equipment b {
  font-size: 10.8px;
}
.case-card .equipment span {
  font-size: 12px;
}
.action-preview strong {
  font-size: 10.8px;
}
.action-preview li {
  font-size: 12px;
}
.case-card .card-meta {
  font-size: 12.6px;
  gap: 4px;
}
.card-meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta time {
  flex: none;
}
.detail-company {
  font-size: 13.2px;
}
.detail-identity .equipment b {
  font-size: 10.8px;
}
.detail-identity .equipment span {
  font-size: 12px;
}
.detail-block h3 {
  font-size: 14.4px;
}
.detail-block li {
  font-size: 13.2px;
}
.detail-grid span {
  font-size: 9.6px;
}
.detail-grid b {
  font-size: 12px;
}
.detail-nav button {
  font-size: 12px;
}
dialog {
  height: 74dvh;
  max-height: none;
  margin: 13dvh auto 0;
}
dialog article {
  height: 74dvh;
  max-height: none;
  overflow: hidden;
}
#detail-body {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#detail-body > h2,
#detail-body > .detail-identity,
#detail-body > .detail-grid {
  flex: none;
}
.detail-block {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.detail-nav {
  flex: none;
  margin-top: 0;
}
@media (max-width: 360px) {
  .hero-service small {
    max-width: 38%;
    font-size: 55%;
  }
  .search-box .query-chip {
    font-size: 7px;
  }
}

/* patch-v007.css */
.search-box input {
  flex: 1;
  width: auto;
}
.search-options {
  min-width: 0;
  overflow: hidden;
}
.search-options > button {
  flex: none;
}
.search-options > .search-chips {
  min-width: 0;
  max-width: none;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 0;
}
.search-options > .search-chips[hidden],
.search-options > .search-chips:empty {
  display: none;
}
.search-options .query-chip {
  min-width: 0;
  max-width: 50%;
  height: 27px;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 4px 4px 6px;
}
.search-options .query-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-options .query-chip button {
  flex: none;
}
.search-options .query-chip.chip-long {
  font-size: 8px;
}
.search-options .query-chip.chip-xlong {
  font-size: 7px;
}
.search-options .synonym-switch {
  flex: none;
  margin-left: 0;
}
.synonym-switch span {
  white-space: nowrap;
}
@media (max-width: 380px) {
  .search-options {
    gap: 3px;
  }
  .search-options > button {
    padding: 0 5px;
  }
  .search-options .query-chip {
    font-size: 7px;
    padding-left: 4px;
  }
  .synonym-switch {
    gap: 3px;
  }
  .synonym-switch input {
    width: 13px;
    height: 13px;
  }
}

/* patch-v008.css */
.search-options > .search-chips {
  justify-content: flex-end;
}
.search-options .query-chip {
  width: auto;
  min-width: 0;
  max-width: 112px;
  flex: 0 1 auto;
}
.search-options .query-chip.chip-long,
.search-options .query-chip.chip-xlong {
  font-size: 9px;
}
.search-options .synonym-switch {
  margin-left: auto;
}
.search-options > .search-chips:not([hidden]) + .synonym-switch {
  margin-left: 0;
}
@media (max-width: 380px) {
  .search-options .query-chip {
    max-width: 82px;
  }
  .search-options .query-chip.chip-long,
  .search-options .query-chip.chip-xlong {
    font-size: 8px;
  }
}

/* patch-v010.css */
.topbar {
  height: 66px;
  padding: 10px 17px;
  gap: 11px;
}
.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}
.brand-copy strong {
  font-size: 15.5px;
}
.brand-copy span {
  margin-top: 5px;
  font-size: 10px;
}
.hero-service small b {
  color: #f2c879;
  font-weight: 700;
}
.search-guide {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 4px 14px #17243a0b;
}
.guide-head {
  display: grid;
  gap: 5px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf0f4;
}
.guide-head strong {
  font-size: 15px;
}
.guide-head span {
  color: #738096;
  font-size: 10.5px;
  line-height: 1.5;
}
.guide-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 5px 8px;
  padding: 10px;
  border-radius: 11px;
  background: #f6f8fb;
}
.guide-item > b {
  padding: 4px 6px;
  border-radius: 6px;
  background: #e7effb;
  color: #145dbd;
  font-size: 9px;
}
.guide-item code {
  min-width: 0;
  overflow: hidden;
  color: #23334b;
  font:
    700 11px/1.35 Arial,
    "Noto Sans KR",
    sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guide-item p {
  grid-column: 1/-1;
  margin: 0;
  color: #637086;
  font-size: 10.5px;
  line-height: 1.45;
}
.guide-item em {
  color: #0b5fc8;
  font-style: normal;
  font-weight: 800;
}
.search-guide > small {
  color: #7b8798;
  font-size: 9.5px;
  line-height: 1.5;
}
.delete-case {
  margin-left: auto;
  padding: 2px 4px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: #cbd3df;
  text-underline-offset: 3px;
}
.delete-case:disabled {
  opacity: 0.45;
}
.detail-delete {
  margin: 0;
  padding: 0;
  color: #344b68;
  font-weight: 700;
  text-align: left;
}
.detail-grid .detail-delete {
  font-size: inherit;
}
@media (max-width: 360px) {
  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .brand-icon {
    width: 44px;
    height: 44px;
  }
  .brand-copy strong {
    font-size: 14px;
  }
  .brand-copy span {
    font-size: 9px;
  }
  .guide-item code {
    font-size: 10px;
  }
}

/* patch-v011.css */
:root {
  color-scheme: light dark;
}
.db-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 15px 0 10px;
}
.db-overview > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid #e3e8ef;
  border-radius: 11px;
  background: #f7f9fc;
}
.db-overview span {
  color: #7b8798;
  font-size: 9px;
}
.db-overview b {
  overflow: hidden;
  color: #26364c;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.db-cleanup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.db-cleanup button {
  min-width: 0;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #dbe3ed;
  border-radius: 10px;
  background: #fff;
  color: #40536b;
  font-size: 9px;
  font-weight: 700;
}
.db-cleanup button b {
  flex: none;
  color: #1264e3;
}
.db-cleanup button.danger {
  border-color: #f0cecb;
  background: #fff7f6;
  color: #9b4039;
}
.db-cleanup button.danger b {
  color: #b84038;
}
.db-cleanup button:disabled {
  opacity: 0.45;
}
html[data-theme="dark"] {
  color-scheme: dark;
}
html[data-theme="dark"],
html[data-theme="dark"] body {
  background: #0b111b;
  color: #e7edf6;
}
html[data-theme="dark"] .app-shell {
  background: #111925;
  box-shadow: 0 0 40px #0008;
}
html[data-theme="dark"] .search-dock {
  background: linear-gradient(180deg, transparent 0 18px, #111925 18px);
}
html[data-theme="dark"] .search-box,
html[data-theme="dark"] .case-card,
html[data-theme="dark"] .search-guide,
html[data-theme="dark"] .result-tools label,
html[data-theme="dark"] .pagination button,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .admin-panel,
html[data-theme="dark"] #contact-dialog form {
  border-color: #2b3747;
  background: #182230;
  color: #e7edf6;
}
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .result-tools select,
html[data-theme="dark"] .login-card input,
html[data-theme="dark"] #contact-dialog input {
  background: #182230;
  color: #edf3fa;
}
html[data-theme="dark"] .search-box input::placeholder,
html[data-theme="dark"] .login-card input::placeholder {
  color: #8290a2;
}
html[data-theme="dark"] .search-options > button,
html[data-theme="dark"] .install-app {
  border-color: #344154;
  background: #1a2635;
  color: #cbd6e4;
}
html[data-theme="dark"] .search-options > button.active {
  border-color: #2aa99c;
  background: #153b3a;
  color: #7be0d1;
}
html[data-theme="dark"] .synonym-switch,
html[data-theme="dark"] .result-tools > span,
html[data-theme="dark"] .company,
html[data-theme="dark"] .detail-company,
html[data-theme="dark"] .card-meta,
html[data-theme="dark"] .search-guide > small,
html[data-theme="dark"] .guide-head span,
html[data-theme="dark"] .guide-item p {
  color: #aab6c6;
}
html[data-theme="dark"] .action-preview,
html[data-theme="dark"] .detail-block,
html[data-theme="dark"] .guide-item {
  background: #202b3a;
}
html[data-theme="dark"] .action-preview li,
html[data-theme="dark"] .detail-block li {
  color: #c5cfdd;
}
html[data-theme="dark"] .guide-head {
  border-color: #303c4d;
}
html[data-theme="dark"] .guide-item > b {
  background: #203a5c;
  color: #8bbdff;
}
html[data-theme="dark"] .guide-item code {
  color: #e1e8f2;
}
html[data-theme="dark"] .card-meta {
  border-color: #2a3545;
}
html[data-theme="dark"] .equipment span {
  color: #c5d0de;
}
html[data-theme="dark"] .equipment b {
  background: #18385e;
  color: #8cc0ff;
}
html[data-theme="dark"] dialog {
  background: #182230;
  color: #e7edf6;
}
html[data-theme="dark"] dialog::backdrop {
  background: #02050acc;
}
html[data-theme="dark"] .close {
  background: #273444;
  color: #ced8e5;
}
html[data-theme="dark"] .detail-grid {
  border-color: #344050;
  background: #344050;
}
html[data-theme="dark"] .detail-grid > div,
html[data-theme="dark"] .detail-nav {
  background: #182230;
}
html[data-theme="dark"] .detail-grid span {
  color: #9daabc;
}
html[data-theme="dark"] .detail-grid b {
  color: #e8eef7;
}
html[data-theme="dark"] .detail-nav {
  border-color: #303b4b;
}
html[data-theme="dark"] .detail-nav button {
  border-color: #364456;
  background: #222f3f;
  color: #d0dae7;
}
html[data-theme="dark"] .pagination button.active,
html[data-theme="dark"] .detail-nav button:last-child,
html[data-theme="dark"] .primary {
  background: #2778e8;
  color: #fff;
}
html[data-theme="dark"] .login-body {
  background: linear-gradient(160deg, #050a12, #0a1524);
}
html[data-theme="dark"] .login-card label,
html[data-theme="dark"] .login-card > small {
  color: #aeb9c8;
}
html[data-theme="dark"] .password-field button {
  background: #263547;
  color: #c8d3df;
}
html[data-theme="dark"] .admin-shell > header > a {
  background: #1d2c3e;
  color: #b9c9dc;
}
html[data-theme="dark"] .admin-tabs {
  background: #111925;
}
html[data-theme="dark"] .admin-tabs button {
  color: #9eabbb;
}
html[data-theme="dark"] .admin-tabs button.active {
  background: #253244;
  color: #91c0ff;
}
html[data-theme="dark"] .panel-head p,
html[data-theme="dark"] .contact-row small,
html[data-theme="dark"] .contact-row em {
  color: #a5b1c0;
}
html[data-theme="dark"] .contact-row {
  border-color: #2c3745;
  background: #182230;
  color: #e7edf6;
}
html[data-theme="dark"] .json-editor {
  border-color: #354255;
}
html[data-theme="dark"] .upload-box {
  border-color: #43546b;
  background: #151f2c;
}
html[data-theme="dark"] .db-overview > div {
  border-color: #344154;
  background: #151f2c;
}
html[data-theme="dark"] .db-overview span {
  color: #9daabc;
}
html[data-theme="dark"] .db-overview b {
  color: #e7edf6;
}
html[data-theme="dark"] .db-cleanup button {
  border-color: #3a485b;
  background: #1b2736;
  color: #ced8e5;
}
html[data-theme="dark"] .db-cleanup button.danger {
  border-color: #6a3b3b;
  background: #321f22;
  color: #f0b9b5;
}
html[data-theme="dark"] .success {
  background: #153a31;
  color: #86dbc3;
}
html[data-theme="dark"] .error {
  background: #402326;
  color: #f0aaa4;
}
html[data-theme="dark"] .search-hit.hit-0 {
  background: #725d12 !important;
  color: #fff3b1 !important;
}
html[data-theme="dark"] .search-hit.hit-1 {
  background: #155f59 !important;
  color: #bff8ed !important;
}
html[data-theme="dark"] .search-hit.hit-2 {
  background: #724318 !important;
  color: #ffe0bc !important;
}
html[data-theme="dark"] .search-hit.hit-3 {
  background: #50347b !important;
  color: #eadcff !important;
}
html[data-theme="dark"] .search-hit.hit-4 {
  background: #315d27 !important;
  color: #d8f6c9 !important;
}

/* patch-v012.css */
@media (min-width: 700px) {
  .app-shell {
    max-width: 760px;
  }
}

/* patch-v013.css */
.company-link {
  max-width: 100%;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px dashed #9aa8ba;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.company-link:after {
  content: " ⓘ";
  color: #1264e3;
  font-size: 0.82em;
}
.customer-dialog {
  width: calc(100% - 28px);
  max-width: 452px;
  height: auto;
  max-height: 74dvh;
  margin: auto;
  border-radius: 22px;
}
.customer-dialog article {
  height: auto;
  max-height: 74dvh;
  overflow: auto;
  padding: 25px 19px;
}
.customer-dialog h2 {
  margin: 0 40px 5px 0;
  font-size: 20px;
}
.customer-dialog .customer-caption {
  margin: 0 0 16px;
  color: #7d8898;
  font-size: 10px;
}
.customer-list {
  display: grid;
  gap: 10px;
}
.customer-entry {
  padding: 13px;
  border: 1px solid #e1e7ef;
  border-radius: 13px;
  background: #f7f9fc;
}
.customer-entry > span {
  display: block;
  margin-bottom: 5px;
  color: #7d8898;
  font-size: 9px;
}
.customer-entry > p {
  margin: 0 0 10px;
  color: #26364c;
  font-size: 12px;
  line-height: 1.45;
}
.customer-contact {
  display: flex;
  align-items: center;
  gap: 8px;
}
.customer-contact b {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-contact a {
  margin-left: auto;
  padding: 7px 9px;
  border-radius: 8px;
  background: #e7f0ff;
  color: #1264e3;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}
.customer-empty {
  padding: 28px 10px;
  text-align: center;
  color: #758297;
  font-size: 11px;
}
.customer-import {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e2e7ed;
}
.customer-import .upload-box {
  margin-top: 12px;
}
html[data-theme="dark"] .company-link {
  border-color: #667489;
}
html[data-theme="dark"] .customer-entry {
  border-color: #344154;
  background: #151f2c;
}
html[data-theme="dark"] .customer-entry > p {
  color: #e7edf6;
}
html[data-theme="dark"] .customer-dialog .customer-caption,
html[data-theme="dark"] .customer-entry > span {
  color: #9daabc;
}
html[data-theme="dark"] .customer-contact a {
  background: #18385e;
  color: #8cc0ff;
}
html[data-theme="dark"] .customer-import {
  border-color: #344154;
}
.search-box .search-submit {
  width: 28px;
  height: 32px;
  margin-right: 7px;
  background: transparent;
  color: var(--blue);
  font-size: 25px;
  transform: rotate(-15deg);
}

/* patch-v015.css */
.brand-home {
  width: 43px;
  height: 43px;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 11px;
  text-decoration: none;
}
.brand-home .brand-icon {
  display: block;
}
.hero {
  padding-top: 11px;
}
.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 1.15fr);
  align-items: center;
  gap: 12px;
}
.hero-heading {
  min-width: 0;
}
.hero-heading p {
  margin-bottom: 5px;
}
.hero-heading h1 {
  font-size: 21px;
  white-space: nowrap;
}
.hero #record-message {
  display: block;
  min-width: 0;
  color: #aebdd0;
  font-size: 9.8px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.25px;
  text-align: right;
}
.hero #record-message[hidden] {
  visibility: hidden;
}
.hero #record-message strong {
  color: #f0b96a;
  font-size: 12.6px;
  font-weight: 900;
  letter-spacing: -0.2px;
}
.hero > .hero-service {
  margin-top: 10px;
}
.hero > .hero-service em {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -1px;
}
.hero-greeting {
  max-width: 45%;
  overflow: hidden;
  font-size: 13.5px !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-box #clear {
  flex: none;
  margin-right: 7px;
}
.search-box .search-submit {
  flex: none;
  margin: 0 0 0 7px;
}
.customer-dialog {
  width: calc(100% - 42px) !important;
  max-width: 380px !important;
  height: auto !important;
  margin: auto !important;
  border-radius: 18px !important;
}
.customer-dialog article {
  height: auto !important;
  padding: 20px 16px !important;
  overflow-y: auto !important;
}
.customer-dialog.customer-single,
.customer-dialog.customer-single article {
  max-height: 320px !important;
}
.customer-dialog.customer-multi,
.customer-dialog.customer-multi article {
  max-height: 55dvh !important;
}
.customer-dialog h2 {
  font-size: 17px !important;
}
.customer-dialog .customer-caption {
  margin-bottom: 11px;
}
.customer-list {
  gap: 7px;
}
.customer-entry {
  padding: 10px 11px;
}
.customer-entry > p {
  margin-bottom: 7px;
  font-size: 11px;
}
.customer-contact a {
  padding: 6px 8px;
}
@media (max-width: 380px) {
  .hero-top {
    grid-template-columns: minmax(0, 0.9fr) minmax(155px, 1.1fr);
    gap: 8px;
  }
  .hero-heading h1 {
    font-size: 18px;
  }
  .hero #record-message {
    font-size: 9.2px;
  }
  .hero #record-message strong {
    font-size: 12px;
  }
  .hero > .hero-service em {
    font-size: 21px;
  }
  .hero-greeting {
    max-width: 43%;
    font-size: 12.5px !important;
  }
}

/* patch-v016.css */
.factory-route {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}
.factory-route > p {
  min-width: 0;
  flex: 1;
  margin: 0;
  color: #26364c;
  font-size: 11px;
  line-height: 1.45;
}
.tmap-link {
  flex: none;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: #e7f0ff;
  color: #1264e3;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.tmap-link:active {
  transform: scale(0.96);
}
html[data-theme="dark"] .factory-route > p {
  color: #e7edf6;
}
html[data-theme="dark"] .tmap-link {
  background: #18385e;
  color: #8cc0ff;
}

/* patch-v017.css */
.hero-greeting {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.hero-greeting #password-open {
  width: 21px;
  height: 21px;
  display: grid;
  flex: none;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: #28415f;
  color: #dce8f6;
  font-size: 10px;
  line-height: 1;
}
.equipment-search {
  max-width: 118px;
  overflow: hidden;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px dashed #91a0b3;
  background: transparent;
  color: #3b4759;
  font: 700 10px monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.password-dialog {
  width: calc(100% - 36px) !important;
  max-width: 390px !important;
  height: auto !important;
  max-height: calc(100dvh - 32px) !important;
  margin: auto !important;
  border-radius: 20px !important;
}
.password-dialog form {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 22px 19px;
}
.password-dialog h2 {
  margin: 0 38px 2px 0;
  font-size: 19px;
}
.password-dialog label {
  display: grid;
  gap: 6px;
  color: #647084;
  font-size: 10px;
  font-weight: 700;
}
.password-dialog input {
  width: 100%;
  height: 43px;
  padding: 0 11px;
  border: 1px solid #dfe4eb;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #1f2937;
}
.password-dialog label small {
  color: #8a95a5;
  font-size: 8px;
  font-weight: 500;
}
.password-dialog #password-warning {
  margin: 0;
  padding: 11px;
  border-radius: 10px;
  background: #fff2d8;
  color: #8a5600;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
}
.password-error {
  padding: 9px;
  border-radius: 9px;
  background: #fff0ef;
  color: #b3423b;
  font-size: 9px;
  line-height: 1.4;
}
.password-dialog .primary:disabled {
  opacity: 0.55;
}
html[data-theme="dark"] .hero-greeting #password-open {
  background: #263f5c;
  color: #dce8f6;
}
html[data-theme="dark"] .equipment-search {
  border-color: #667489;
  color: #c5d0de;
}
html[data-theme="dark"] .password-dialog form {
  background: #182230;
  color: #e7edf6;
}
html[data-theme="dark"] .password-dialog label {
  color: #aeb9c8;
}
html[data-theme="dark"] .password-dialog input {
  border-color: #354255;
  background: #111a26;
  color: #edf3fa;
}
html[data-theme="dark"] .password-dialog #password-warning {
  background: #3e321d;
  color: #ffd58d;
}
html[data-theme="dark"] .password-error {
  background: #402326;
  color: #f0aaa4;
}

/* patch-v018.css */
.company-link:after {
  content: none !important;
}
.identity-row .equipment {
  min-width: 0;
  max-width: 52%;
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  text-align: right;
}
.identity-row .equipment b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.identity-row .equipment .equipment-search {
  flex: none;
  text-align: right;
}
.detail-identity {
  padding-right: 0;
}
.search-box .date-open {
  flex: none;
  margin-left: 5px;
  background: #eef3f8;
  color: #526b88;
  font-size: 15px;
}
.search-box .date-open.active {
  background: #dff5f0;
  color: #087f75;
}
.result-tools {
  flex-direction: row !important;
  align-items: center !important;
}
.result-filters {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.result-filters > #sort-direction {
  width: 34px;
  height: 40px;
  flex: none;
  border: 1px solid #dfe5ec;
  border-radius: 11px;
  background: #fff;
  color: #45617f;
  font-size: 16px;
  font-weight: 900;
}
.result-filters > label {
  min-width: 0;
  width: 190px;
}
.date-chip {
  background: #dceeff !important;
  color: #21527c !important;
}
.date-dialog {
  width: calc(100% - 32px) !important;
  max-width: 410px !important;
  height: auto !important;
  margin: auto !important;
  border-radius: 20px !important;
}
.date-dialog form {
  position: relative;
  display: grid;
  gap: 15px;
  padding: 22px 18px;
}
.date-dialog h2 {
  margin: 0 38px 0 0;
  font-size: 19px;
}
.date-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.date-presets button,
.date-actions > button:first-child {
  height: 38px;
  border: 1px solid #dce3ec;
  border-radius: 9px;
  background: #f5f8fc;
  color: #47617e;
  font-size: 9px;
  font-weight: 800;
}
.date-fields {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 7px;
}
.date-fields label {
  display: grid;
  gap: 5px;
  color: #657286;
  font-size: 9px;
}
.date-fields input {
  min-width: 0;
  width: 100%;
  height: 42px;
  padding: 0 8px;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  background: #fff;
  color: #26364c;
  font-size: 11px;
}
.date-fields > span {
  padding-bottom: 13px;
  color: #8995a5;
}
.date-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 7px;
}
.date-actions .primary {
  height: 40px;
}
.search-box .search-chips {
  max-width: 46%;
}
.search-box .date-chip {
  max-width: 100%;
}
@media (max-width: 420px) {
  .result-tools {
    gap: 6px;
  }
  .result-tools > span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .result-filters {
    flex: 0 1 58%;
    max-width: 58%;
  }
  .result-filters > label {
    width: auto;
    flex: 1;
    height: 38px;
    padding: 0 7px;
  }
  .result-filters > #sort-direction {
    width: 32px;
    height: 38px;
  }
  .result-tools label b {
    display: none;
  }
  .result-tools select {
    max-width: 100%;
    font-size: 10px;
  }
  .identity-row .equipment {
    max-width: 55%;
  }
}
html[data-theme="dark"] .search-box .date-open {
  background: #1f2c3c;
  color: #b8c7d9;
}
html[data-theme="dark"] .search-box .date-open.active {
  background: #153b3a;
  color: #7be0d1;
}
html[data-theme="dark"] .result-filters > #sort-direction,
html[data-theme="dark"] .date-presets button,
html[data-theme="dark"] .date-actions > button:first-child {
  border-color: #354255;
  background: #1a2635;
  color: #cbd6e4;
}
html[data-theme="dark"] .date-dialog form {
  background: #182230;
  color: #e7edf6;
}
html[data-theme="dark"] .date-fields label {
  color: #aab6c6;
}
html[data-theme="dark"] .date-fields input {
  border-color: #354255;
  background: #111a26;
  color: #edf3fa;
}
html[data-theme="dark"] .date-chip {
  background: #244563 !important;
  color: #c8e5ff !important;
}

/* patch-v018-admin.css */
.db-cleanup-single {
  grid-template-columns: 1fr;
}
.synonym-toolbar {
  display: flex;
  gap: 7px;
  margin: 15px 0 9px;
}
.synonym-toolbar input {
  min-width: 0;
  flex: 1;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #dfe5ed;
  border-radius: 10px;
  outline: 0;
}
.synonym-toolbar button {
  height: 40px;
  padding: 0 11px;
  border: 1px solid #dbe3ed;
  border-radius: 10px;
  background: #f5f8fc;
  color: #52667f;
  font-size: 9px;
  font-weight: 800;
}
#synonym-summary {
  min-height: 28px;
  color: #778396;
  font-size: 9px;
}
.synonym-errors {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
  padding: 9px;
  border-radius: 9px;
  background: #fff0ef;
  color: #a94740;
}
.synonym-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.synonym-card {
  padding: 12px;
  border: 1px solid #e1e7ee;
  border-radius: 13px;
  background: #f8fafc;
}
.synonym-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.synonym-card-head input {
  min-width: 0;
  flex: 1;
  height: 35px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: #24364f;
  font-size: 11px;
  font-weight: 900;
}
.synonym-card-head button {
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: #fff0ef;
  color: #a94740;
  font-size: 8px;
  font-weight: 800;
}
.synonym-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
.synonym-words > span {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 6px 6px 9px;
  border-radius: 9px;
  background: #e7f0ff;
  color: #28517e;
  font-size: 9px;
  font-weight: 800;
}
.synonym-words button {
  width: 17px;
  height: 17px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffffaa;
  color: inherit;
}
.synonym-word-form {
  display: flex;
  gap: 6px;
}
.synonym-word-form input {
  min-width: 0;
  flex: 1;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
}
.synonym-word-form button {
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #e6edf7;
  color: #385a7d;
  font-size: 8px;
  font-weight: 800;
}
.synonym-empty {
  padding: 30px;
  text-align: center;
  color: #8490a2;
  font-size: 10px;
}
#save-synonyms {
  width: 100%;
}
#save-synonyms:disabled {
  opacity: 0.4;
}
html[data-theme="dark"] .synonym-toolbar input,
html[data-theme="dark"] .synonym-card-head input,
html[data-theme="dark"] .synonym-word-form input {
  border-color: #354255;
  background: #111a26;
  color: #edf3fa;
}
html[data-theme="dark"] .synonym-toolbar button,
html[data-theme="dark"] .synonym-word-form button {
  border-color: #354255;
  background: #1a2635;
  color: #cbd6e4;
}
html[data-theme="dark"] .synonym-card {
  border-color: #344154;
  background: #151f2c;
}
html[data-theme="dark"] .synonym-card-head button {
  background: #402326;
  color: #f0aaa4;
}
html[data-theme="dark"] .synonym-words > span {
  background: #18385e;
  color: #b9dcff;
}
html[data-theme="dark"] .synonym-errors {
  background: #402326;
  color: #f0aaa4;
}

/* patch-v019.css */
.search-box .date-open,
.search-box .search-submit {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 10px;
  line-height: 1;
  transform: none;
}
.search-box .date-open {
  margin: 0 4px 0 0;
}
.search-box .search-submit {
  margin: 0;
  font-size: 25px;
}
.search-box .date-open svg {
  display: block;
}
.result-tools,
.result-filters {
  min-width: 0;
  max-width: 100%;
}
.result-tools {
  width: 100%;
  overflow: hidden;
}
.result-tools > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-filters {
  flex: 0 1 auto;
}
.result-filters > #sort-direction {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 10px;
}
.result-filters > label {
  width: min(190px, 45vw);
  height: 38px;
  overflow: hidden;
}
.result-filters select {
  width: 100%;
  max-width: 100%;
}
@media (max-width: 420px) {
  .content {
    overflow: hidden;
  }
  .result-tools {
    gap: 6px;
  }
  .result-tools > span {
    flex: 1 1 0;
  }
  .result-filters {
    flex: 0 1 58%;
    width: 58%;
    max-width: 58%;
    gap: 5px;
  }
  .result-filters > #sort-direction {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  .result-filters > label {
    width: auto;
    height: 36px;
    flex: 1 1 0;
    max-width: calc(100% - 41px);
  }
}

/* patch-v020.css */
.synonym-card.invalid {
  border-color: #efb4ad;
}
.synonym-card-guide {
  display: block;
  margin-top: 7px;
  color: #a45a52;
  font-size: 8px;
}
@media (max-width: 440px) {
  .content,
  .case-list,
  .case-card,
  .identity-row,
  .card-meta,
  .action-preview {
    min-width: 0;
    max-width: 100%;
  }
  .content,
  .case-card {
    overflow: hidden;
  }
  .result-tools {
    gap: 6px;
  }
  .result-tools > span {
    flex: 1 1 0;
  }
  .result-filters {
    flex: 0 1 60%;
    width: 60%;
    max-width: 60%;
    gap: 5px;
  }
  .result-filters > #sort-direction {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  .result-filters > label {
    width: auto;
    height: 36px;
    flex: 1 1 0;
    max-width: calc(100% - 41px);
    padding: 0 7px;
  }
  .result-tools label b {
    display: none;
  }
  .result-tools select {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    font-size: 10px;
  }
  .identity-row > * {
    min-width: 0;
  }
  .card-meta {
    overflow: hidden;
  }
}

html[data-theme="dark"] .synonym-card.invalid {
  border-color: #8d514d;
}
html[data-theme="dark"] .synonym-card-guide {
  color: #e4aaa5;
}

/* patch-v021.css */
.result-filters > #sort-direction svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.guide-ui-button,
.guide-synonym-ui,
.guide-calendar-ui,
.guide-sort-ui {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font:
    800 9px/1 Arial,
    "Noto Sans KR",
    sans-serif;
  vertical-align: middle;
}
.guide-ui-button {
  padding: 5px 7px;
  border: 1px solid #dfe5ed;
  background: #f5f8fc;
  color: #52667f;
}
.guide-synonym-ui {
  padding: 5px 7px;
  background: #e5f7f2;
  color: #16836f;
}
.guide-calendar-ui,
.guide-sort-ui {
  width: 24px;
  height: 24px;
  background: #eef3f8;
  color: #45617f;
  font-size: 13px;
}
.synonym-toolbar {
  flex-wrap: wrap;
}
.synonym-toolbar > input:first-child {
  flex: 1 1 190px;
}
.synonym-toolbar button {
  flex: none;
}
@media (max-width: 440px) {
  .guide-item code {
    white-space: normal;
  }
  .synonym-toolbar > input:first-child {
    flex-basis: 100%;
  }
  .synonym-toolbar button {
    flex: 1;
  }
}

html[data-theme="dark"] .guide-ui-button,
html[data-theme="dark"] .guide-calendar-ui,
html[data-theme="dark"] .guide-sort-ui {
  border-color: #354255;
  background: #1a2635;
  color: #cbd6e4;
}
html[data-theme="dark"] .guide-synonym-ui {
  background: #153b3a;
  color: #7be0d1;
}

/* patch-v022.css */
.guide-calendar-ui svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.result-filters > #sort-direction {
  display: grid;
  place-items: center;
}
.result-filters > #sort-direction svg {
  width: 23px;
  height: 23px;
  display: block;
  margin: auto;
  stroke-width: 2.8;
}
#detail > article > .close {
  top: 24px;
  right: 19px;
}
#detail .detail-identity {
  margin-right: 0;
  padding-right: 0;
}
#detail .detail-nav {
  border-top: 0;
}

/* patch-v023.css */
.material-card-button {
  height: 28px;
  flex: none;
  margin-left: auto;
  padding: 0 9px;
  border: 1px solid #b9d2f6;
  border-radius: 8px;
  background: #eaf2ff;
  color: #155fc9;
  font-size: 10px;
  font-weight: 800;
}
.card-meta .material-card-button + time,
.card-meta .material-card-button + .delete-case {
  margin-left: 0;
}
.card-meta .material-card-button + time:before {
  content: none;
}
#detail .detail-nav {
  grid-template-columns: 1fr 1fr 1fr;
}
#detail .detail-nav [data-material-detail] {
  border-color: #b9d2f6;
  background: #eaf2ff;
  color: #155fc9;
}
#detail .detail-nav [data-material-detail]:disabled {
  border-color: #dce3ec;
  background: #f1f3f6;
  color: #8994a3;
  opacity: 1;
}
#materials-dialog {
  height: 74dvh;
  max-height: none;
  margin: 13dvh auto 0;
}
#materials-dialog article {
  height: 74dvh;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 25px 9px 0;
}
#materials-dialog.materials-many {
  height: 60dvh;
  margin: 20dvh auto 0;
}
#materials-dialog.materials-many article {
  height: 60dvh;
}
#materials-dialog > article > .close {
  top: 24px;
  right: 9px;
}
.material-popup-head {
  position: relative;
  flex: none;
  padding-right: 40px;
}
.material-popup-head .case-number {
  margin-bottom: 7px;
}
.material-popup-head h2 {
  margin: 0 0 4px;
  font-size: 21px;
}
.material-popup-head > p:last-child {
  margin: 0 0 13px;
  color: #7d8898;
  font-size: 10px;
}
.material-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.material-row {
  padding: 6px 2px;
  border-bottom: 1px solid #e8ecf1;
}
.material-row:last-child {
  border-bottom: 0;
}
.material-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 0.68fr 1fr 1fr;
  gap: 1px;
  align-items: center;
}
.material-identity b {
  min-width: 0;
  overflow: hidden;
  padding: 0 9px 0 0;
  color: #155fc9;
  font:
    800 12px/1.45 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-identity b.hangul-code {
  font-size: 11px;
}
.material-identity span {
  min-width: 0;
  grid-column: 2/4;
  overflow: hidden;
  padding: 0 9px;
  color: #263247;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-values {
  display: grid;
  grid-template-columns: 0.68fr 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-top: 9px;
  border: 1px solid #e8ebef;
  border-radius: 10px;
  background: #e8ebef;
}
.material-values div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 9px;
  background: #f8fafc;
  white-space: nowrap;
}
.material-values div:nth-child(3) {
  background: #f0f5fb;
}
.material-values small {
  flex: none;
  color: #7c8798;
  font-size: 10px;
  font-weight: 700;
}
.material-values strong {
  min-width: 0;
  overflow: hidden;
  color: #263247;
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
}
.material-values div:nth-child(3) strong {
  color: #214f82;
}
.material-total {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin: 0 -9px;
  padding: 13px 29px calc(13px + env(safe-area-inset-bottom)) 9px;
  background: #fff;
}
.material-total span {
  color: #596679;
  font-size: 11px;
  font-weight: 800;
}
.material-total strong {
  color: var(--blue);
  font-size: 18px;
}
.material-loading {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: #758297;
  font-size: 11px;
  text-align: center;
}
.material-import {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e2e7ed;
}
.material-import .panel-head em {
  display: inline-block;
  margin-left: 5px;
  padding: 3px 5px;
  border-radius: 5px;
  background: #fff0d7;
  color: #9a6200;
  font-size: 8px;
  font-style: normal;
  vertical-align: 2px;
}
.material-import .upload-box {
  margin-top: 12px;
}
@media (max-width: 360px) {
  .material-values div {
    gap: 3px;
    padding: 4px 5px;
  }
  .material-values small {
    font-size: 9px;
  }
  .material-values strong {
    font-size: 10.5px;
  }
  #detail .detail-nav {
    gap: 5px;
    padding-left: 12px;
    padding-right: 12px;
  }
  #detail .detail-nav button {
    font-size: 10px;
  }
}

html[data-theme="dark"] .material-card-button,
html[data-theme="dark"] #detail .detail-nav [data-material-detail] {
  border-color: #315b8d;
  background: #18385e;
  color: #9ac8ff;
}
html[data-theme="dark"] #detail .detail-nav [data-material-detail]:disabled {
  border-color: #354255;
  background: #1a2635;
  color: #7f8da0;
}
html[data-theme="dark"] .material-row {
  border-color: #344154;
}
html[data-theme="dark"] .material-identity b {
  color: #8cc0ff;
}
html[data-theme="dark"] .material-identity span {
  color: #f2f6fb;
}
html[data-theme="dark"] .material-values {
  border-color: #3a4658;
  background: #3a4658;
}
html[data-theme="dark"] .material-values div {
  background: #1d2938;
}
html[data-theme="dark"] .material-values div:nth-child(3) {
  background: #223247;
}
html[data-theme="dark"] .material-values small {
  color: #b7c3d2;
}
html[data-theme="dark"] .material-values strong {
  color: #f4f7fb;
}
html[data-theme="dark"] .material-values div:nth-child(3) strong {
  color: #b8d7fa;
}
html[data-theme="dark"] .material-total {
  background: #182230;
}
html[data-theme="dark"] .material-total span {
  color: #c3cedc;
}
html[data-theme="dark"] .material-total strong {
  color: #8cc0ff;
}
html[data-theme="dark"] .material-loading {
  color: #a9b5c5;
}
html[data-theme="dark"] .material-import {
  border-color: #344154;
}
html[data-theme="dark"] .material-import .panel-head em {
  background: #3e321d;
  color: #ffd58d;
}

/* patch-v024.css */
.case-card {
  padding-left: 10px;
  padding-right: 10px;
}
.material-card-button {
  padding-left: 4px;
  padding-right: 4px;
}
#materials-dialog > article > .materials-close {
  z-index: 5;
  top: 24px;
  right: 19px;
  width: 36px;
  height: 36px;
  pointer-events: auto;
}
.material-popup-head {
  padding-right: 0;
}
.material-popup-head h2 {
  margin: 0 40px 8px 0;
  font-size: 21px;
  line-height: 1.35;
}
.material-popup-head .material-case-identity {
  margin: 2px 0 0;
  padding-right: 0;
}
.material-popup-head h3 {
  margin: 14px 0 7px;
  color: var(--blue);
  font-size: 14.4px;
}

/* patch-v025.css */
#detail,
#materials-dialog {
  border: 1px solid #d4dce7;
  box-shadow:
    0 22px 55px rgba(8, 20, 38, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.65) inset;
}
#detail > article {
  padding-left: 9px;
  padding-right: 9px;
}
#detail .detail-grid > div {
  padding-top: 6px;
  padding-bottom: 6px;
}
#detail .detail-nav {
  margin-left: -9px;
  margin-right: -9px;
  padding: 6px 9px calc(6px + env(safe-area-inset-bottom));
}
#detail .detail-company,
#materials-dialog .detail-company {
  color: #875c72;
}

html[data-theme="dark"] #detail,
html[data-theme="dark"] #materials-dialog {
  border-color: #405069;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
html[data-theme="dark"] #detail .detail-company,
html[data-theme="dark"] #materials-dialog .detail-company {
  color: #d4a9be;
}

/* patch-v026.css */
#detail .detail-nav {
  padding-top: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
#detail .detail-nav button {
  height: 32px;
}
.case-card .company {
  color: #875c72;
}

html[data-theme="dark"] .case-card .company {
  color: #d4a9be;
}

/* patch-v027.css */
#detail > article,
#materials-dialog > article {
  height: 100%;
  padding-top: 15px;
}
#detail > article > .close,
#materials-dialog > article > .close {
  top: 14px;
}

/* patch-v028.css */
.material-identity .material-part-link,
.material-identity .material-name-link {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.material-identity .material-part-link {
  flex: none;
  color: #1264a3;
  font-size: 11px;
  font-weight: 700;
}
.material-identity .material-name-link {
  width: 100%;
  grid-column: 2/-1;
  overflow: hidden;
  color: #334155;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.material-identity .material-part-link:active,
.material-identity .material-name-link:active {
  opacity: 0.62;
}
@media (hover: hover) {
  .material-identity .material-part-link:hover,
  .material-identity .material-name-link:hover {
    text-decoration: underline;
  }
}

html[data-theme="dark"] .material-identity .material-part-link {
  color: #8bc0f5;
}
html[data-theme="dark"] .material-identity .material-name-link {
  color: #d9e1ec;
}

/* patch-v030.css */
.admin-tabs {
  flex-wrap: wrap;
}
.admin-tabs button {
  min-width: 90px;
}
.sync-log-panel {
  padding: 15px;
}
.sync-log-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 14px 0;
}
.sync-log-summary > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.sync-log-summary span {
  display: block;
  color: #8490a0;
  font-size: 8px;
}
.sync-log-summary b {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #26364c;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sync-log-list {
  display: grid;
  gap: 8px;
}
.sync-log-card {
  padding: 11px;
  border: 1px solid #e1e7ee;
  border-radius: 12px;
  background: #fff;
}
.sync-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sync-log-head > div {
  min-width: 0;
}
.sync-log-head b {
  font-size: 11px;
}
.sync-log-head time {
  display: block;
  margin-top: 3px;
  color: #7c8999;
  font-size: 8px;
}
.sync-status {
  flex: none;
  padding: 5px 7px;
  border-radius: 7px;
  background: #e8f7f1;
  color: #18785f;
  font-size: 8px;
  font-weight: 900;
}
.sync-status.failed {
  background: #fff0ef;
  color: #b3423b;
}
.sync-status.running {
  background: #eef4ff;
  color: #3568ae;
}
.sync-log-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid #e8edf3;
  border-radius: 9px;
  background: #e8edf3;
}
.sync-log-metrics > div {
  min-width: 0;
  padding: 7px;
  background: #f8fafc;
}
.sync-log-metrics span {
  display: block;
  color: #8995a4;
  font-size: 7px;
}
.sync-log-metrics b {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sync-log-message {
  margin: 8px 0 0;
  color: #6f7c8d;
  font-size: 8px;
  line-height: 1.45;
}
.sync-log-empty {
  padding: 30px 10px;
  color: #7d8998;
  font-size: 10px;
  text-align: center;
}
@media (max-width: 420px) {
  .sync-log-summary {
    grid-template-columns: 1fr 1fr;
  }
  .sync-log-metrics {
    grid-template-columns: 1fr 1fr;
  }
}
html[data-theme="dark"] .sync-log-summary > div,
html[data-theme="dark"] .sync-log-card {
  border-color: #344154;
  background: #182230;
}
html[data-theme="dark"] .sync-log-summary b {
  color: #e7edf6;
}
html[data-theme="dark"] .sync-log-metrics {
  border-color: #344154;
  background: #344154;
}
html[data-theme="dark"] .sync-log-metrics > div {
  background: #202c3a;
}
html[data-theme="dark"] .sync-log-message {
  color: #aab6c6;
}
html[data-theme="dark"] .sync-status {
  background: #153a31;
  color: #86dbc3;
}
html[data-theme="dark"] .sync-status.failed {
  background: #402326;
  color: #f0aaa4;
}
html[data-theme="dark"] .sync-status.running {
  background: #18385e;
  color: #9ac8ff;
}

/* patch-v031.css */
body.report-modal-open {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}
.sync-actions {
  display: flex;
  gap: 7px;
}
.sync-actions button {
  white-space: nowrap;
}
.sync-actions button.secondary {
  border: 1px solid #dbe3ed;
  background: #fff;
  color: #52647a;
}
.sync-actions button:disabled {
  opacity: 0.45;
}
.sync-live {
  margin: 14px 0;
  border: 1px solid #273449;
  border-radius: 12px;
  background: #0b1220;
  overflow: hidden;
}
.sync-live-head {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border-bottom: 1px solid #263347;
  color: #c6d5e7;
  font-size: 9px;
}
.sync-live-head b {
  color: #75e0c5;
}
.sync-live-head button {
  height: 25px;
  padding: 0 8px;
  border: 1px solid #3a4b64;
  border-radius: 6px;
  background: #172337;
  color: #b9c8da;
  font-size: 8px;
}
.sync-live pre {
  height: 280px;
  margin: 0;
  padding: 11px;
  overflow: auto;
  color: #d5e2f1;
  background: #0b1220;
  font:
    9px/1.65 Consolas,
    "Noto Sans Mono",
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
}
.sync-log-metrics {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 520px) {
  .sync-log-panel .panel-head {
    align-items: stretch;
    flex-direction: column;
  }
  .sync-actions {
    justify-content: flex-end;
  }
  .sync-live pre {
    height: 240px;
  }
}
html[data-theme="dark"] .sync-actions button.secondary {
  border-color: #405069;
  background: #202c3a;
  color: #c8d4e2;
}
html[data-theme="dark"] .sync-live {
  border-color: #405069;
}

/* patch-v032.css */
.customer-credit-action {
  display: flex;
  justify-content: flex-end;
  margin: 0.65rem 0 0.15rem;
}
.customer-credit-button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #9bb7d0;
  border-radius: 10px;
  background: #edf6fc;
  color: #145f91;
  font: 700 0.88rem/1 inherit;
  cursor: pointer;
}
.customer-credit-button:active {
  transform: translateY(1px);
}
#materials-dialog {
  overflow: hidden;
}
#materials-dialog.materials-many {
  height: 74dvh;
  margin: 13dvh auto 0;
}
#materials-dialog.materials-many article {
  height: 74dvh;
}

html[data-theme="dark"] .customer-credit-button {
  border-color: #42657f;
  background: #173248;
  color: #9fd7fb;
}

/* patch-v033.css */
#receivables-dialog {
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
#receivables-dialog::backdrop {
  background: rgba(7, 16, 31, 0.62);
}
#receivables-dialog iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

/* patch-v034.css */
.customer-credit-action {
  width: 100%;
  margin: 0.72rem 0 0.15rem;
}
.customer-credit-button {
  width: 100%;
  min-height: 62px;
  padding: 10px 14px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 12px;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  text-align: left;
  transition:
    border-color 0.18s,
    background-color 0.18s,
    box-shadow 0.18s;
}
.customer-credit-button strong {
  grid-column: 1;
  font-size: 0.94rem;
}
.customer-credit-button span {
  grid-column: 1;
  font-size: 0.76rem;
  font-weight: 700;
}
.customer-credit-button b {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 0.88rem;
  white-space: nowrap;
}
.customer-credit-button i {
  grid-column: 3;
  grid-row: 1 / span 2;
  font-size: 1.25rem;
  font-style: normal;
}
.customer-credit-button.credit-loading {
  opacity: 0.72;
}
.customer-credit-button.credit-good {
  border-color: #72caae;
  background: #eaf8f3;
  color: #176b54;
}
.customer-credit-button.credit-fair {
  border-color: #7dbdff;
  background: #edf6ff;
  color: #155f9c;
}
.customer-credit-button.credit-caution {
  border-color: #e7b958;
  background: #fff7e4;
  color: #8b5a00;
}
.customer-credit-button.credit-critical {
  border-color: #d84a55;
  background: #fff0f1;
  color: #a21729;
  box-shadow: 0 0 0 1px rgba(216, 74, 85, 0.08);
}
.customer-credit-button.credit-error {
  border-color: #b4c1cd;
  background: #f3f6f8;
  color: #536477;
}
@media (max-width: 390px) {
  .customer-credit-button {
    grid-template-columns: minmax(0, 1fr) auto 10px;
    padding-inline: 11px;
  }
  .customer-credit-button b {
    font-size: 0.8rem;
  }
}

html[data-theme="dark"] .customer-credit-button.credit-good {
  border-color: #3c8f77;
  background: #153b33;
  color: #8be2c5;
}
html[data-theme="dark"] .customer-credit-button.credit-fair {
  border-color: #397fb6;
  background: #17364e;
  color: #9bd2ff;
}
html[data-theme="dark"] .customer-credit-button.credit-caution {
  border-color: #9a762d;
  background: #463719;
  color: #ffd37c;
}
html[data-theme="dark"] .customer-credit-button.credit-critical {
  border-color: #d84a55;
  background: #541c26;
  color: #ffb5bc;
}
html[data-theme="dark"] .customer-credit-button.credit-error {
  border-color: #526476;
  background: #263544;
  color: #c0cfdd;
}

/* patch-v035.css */
.customer-credit-button.credit-empty {
  border-color: #aebbc7;
  background: #f1f4f7;
  color: #637282;
  box-shadow: none;
}
.customer-credit-button.credit-empty i {
  opacity: 0.45;
}

html[data-theme="dark"] .customer-credit-button.credit-empty {
  border-color: #4a5b6c;
  background: #263442;
  color: #b6c3cf;
}

/* patch-v039.css */
.sync-panel-head {
  align-items: center;
}
.sync-actions {
  align-items: center;
}
.sync-latest {
  min-width: 126px;
  display: grid;
  gap: 3px;
  text-align: right;
  line-height: 1.2;
}
.sync-latest small {
  color: #8490a0;
  font-size: 8px;
}
.sync-latest b {
  color: #35465d;
  font-size: 10px;
  white-space: nowrap;
}
.sync-log-card {
  padding: 0;
  overflow: hidden;
}
.sync-log-head {
  width: 100%;
  min-height: 54px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.sync-log-head::after {
  content: "⌄";
  flex: none;
  color: #8290a1;
  font-size: 12px;
  transition: transform 0.15s ease;
}
.sync-log-head[aria-expanded="true"]::after {
  transform: rotate(180deg);
}
.sync-log-duration {
  margin-left: auto;
  color: #637286;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.sync-log-detail {
  padding: 0 10px 10px;
}
.sync-log-detail[hidden] {
  display: none;
}
.sync-log-line {
  border-radius: 7px;
}
.sync-log-line .sync-log-head {
  display: grid;
  grid-template-columns: 105px minmax(330px, auto) 1fr auto auto;
  min-height: 34px;
  padding: 5px 8px;
  gap: 8px;
  align-items: center;
}
.sync-log-line .sync-log-head time {
  margin: 0;
  white-space: nowrap;
}
.sync-log-line .sync-log-head b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sync-log-message-short {
  overflow: hidden;
  color: #7c8999;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sync-log-line.failed {
  border-color: #efaaa5;
}
.sync-log-line.success {
  border-color: #9dd7c5;
}
.sync-log-line .sync-log-detail {
  padding: 0 8px 8px;
}
.sync-log-line .sync-log-detail pre {
  max-height: 260px;
  margin: 0;
  padding: 8px;
  overflow: auto;
  border-radius: 6px;
  background: #f4f7fa;
  color: #455466;
  font:
    9px/1.5 Consolas,
    monospace;
  white-space: pre-wrap;
}
.sync-log-line .sync-status {
  padding: 3px 6px;
}
@media (max-width: 720px) {
  .sync-log-line .sync-log-head {
    grid-template-columns: 88px 1fr auto;
  }
  .sync-log-line .sync-log-message-short {
    display: none;
  }
  .sync-log-line .sync-log-head b {
    font-size: 8px;
  }
}
html[data-theme="dark"] .sync-log-line .sync-log-detail pre {
  background: #101923;
  color: #c8d2df;
}
.sync-log-textbox {
  width: 100%;
  height: 360px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #d9e1ea;
  border-radius: 10px;
  background: #f7f9fc;
  color: #344255;
  font:
    9px/1.65 Consolas,
    "Noto Sans Mono",
    monospace;
  white-space: pre;
  overscroll-behavior: contain;
}
.sync-log-textbox:focus {
  outline: 2px solid #79aef0;
  outline-offset: 1px;
}
html[data-theme="dark"] .sync-log-textbox {
  border-color: #3a485a;
  background: #101923;
  color: #cbd6e3;
}
@media (max-width: 520px) {
  .sync-log-textbox {
    height: 300px;
    font-size: 8px;
  }
}
.sync-log-metrics {
  margin-top: 0;
}
@media (max-width: 520px) {
  .sync-panel-head {
    display: flex !important;
    align-items: flex-start !important;
    flex-direction: row !important;
  }
  .sync-panel-head > div:first-child {
    min-width: 0;
    flex: 1;
  }
  .sync-actions {
    flex: none;
    display: grid;
    grid-template-columns: auto auto;
    gap: 6px;
  }
  .sync-latest {
    grid-column: 1/-1;
    min-width: 0;
    text-align: left;
  }
  .sync-actions button {
    min-width: 0;
    padding-inline: 9px;
  }
  .sync-log-duration {
    display: none;
  }
}

html[data-theme="dark"] .sync-latest b {
  color: #e7edf6;
}
html[data-theme="dark"] .sync-log-head {
  color: #e7edf6;
}

/* login.php inline styles */
.integrated-login {
  max-width: 410px;
  padding-top: 25px;
}
.integrated-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.integrated-brand > img {
  width: 68px;
  height: 68px;
  display: block;
  border-radius: 16px;
}
.integrated-brand > div {
  min-width: 0;
}
.integrated-brand p {
  margin: 0 0 4px;
  color: #168b80;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.integrated-brand strong {
  display: block;
  font-size: 17px;
}
.integrated-brand span {
  display: block;
  margin-top: 4px;
  color: #718096;
  font-size: 9px;
}
.integrated-login h1 {
  margin: 20px 0 12px;
  font-size: 25px;
  line-height: 1.25;
}
.integrated-login h1 em {
  color: #1264e3;
}
.integrated-caption {
  margin: 0 0 16px !important;
  color: #6f7d91 !important;
  font-size: 9px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  line-height: 1.5;
}
.login-services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 18px;
}
.login-services > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe6ef;
  border-radius: 11px;
  background: #f7f9fc;
}
.login-services small {
  display: block;
  color: #7f8b9c;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.login-services b {
  display: block;
  margin-top: 3px;
  color: #26364c;
  font-size: 10px;
}
.login-services div:last-child b {
  color: #087f75;
}
.integrated-login form {
  gap: 13px;
}
.integrated-login .primary {
  font-size: 11px;
}

html[data-theme="dark"] .integrated-brand span,
html[data-theme="dark"] .integrated-caption {
  color: #aab6c6 !important;
}
html[data-theme="dark"] .login-services > div {
  border-color: #344154;
  background: #202c3a;
}
html[data-theme="dark"] .login-services small {
  color: #9daabc;
}
html[data-theme="dark"] .login-services b {
  color: #dce5f0;
}
html[data-theme="dark"] .login-services div:last-child b {
  color: #7be0d1;
}

html[data-theme="light"] {
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
}
.shared-theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #ffffff24;
  border-radius: 11px;
  background: #152d4f;
  color: #c4d2e5;
}
.shared-theme-toggle span {
  display: block;
  width: 18px;
  height: 18px;
}
.shared-theme-toggle .moon {
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.8 2.3A8.9 8.9 0 1 0 21.7 15a7.2 7.2 0 0 1-5.9-12.7Z'/%3E%3C/svg%3E")
    center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.8 2.3A8.9 8.9 0 1 0 21.7 15a7.2 7.2 0 0 1-5.9-12.7Z'/%3E%3C/svg%3E")
    center/contain no-repeat;
}
.shared-theme-toggle .sun {
  font-size: 19px;
  line-height: 18px;
}
.login-theme-toggle {
  position: fixed;
  z-index: 20;
  right: 18px;
  top: 18px;
}
.dialog-head-actions {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dialog-head-actions .close {
  position: static;
}
.dialog-logout {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f0f2f5;
  color: #586476;
  text-decoration: none;
}
.password-dialog h2 {
  margin-right: 78px;
}
html[data-theme="dark"] .dialog-logout {
  background: #273444;
  color: #ced8e5;
}

/* v058 sector scheduler controls */
.sync-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}
.sync-control-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e1e7ee;
  border-radius: 12px;
  background: #f8fafc;
}
.sync-control-card h3 {
  margin: 0 0 2px;
  font-size: 12px;
}
.sync-control-card label {
  display: grid;
  gap: 4px;
  color: #65758a;
  font-size: 9px;
  font-weight: 800;
}
.sync-control-card input,
.sync-control-card select {
  width: 100%;
  height: 38px;
  padding: 0 9px;
  border: 1px solid #d7e1ec;
  border-radius: 9px;
  background: #fff;
  color: #26364c;
}
.sync-control-card small {
  color: #8490a0;
  font-size: 8px;
  line-height: 1.5;
}
.sync-control-card button {
  height: 39px;
  border: 0;
  border-radius: 9px;
  font-weight: 900;
}
html[data-theme="dark"] .sync-control-card {
  border-color: #344154;
  background: #182230;
}
html[data-theme="dark"] .sync-control-card input,
html[data-theme="dark"] .sync-control-card select {
  border-color: #405069;
  background: #202c3a;
  color: #e7edf6;
}
@media (max-width: 620px) {
  .sync-control-grid {
    grid-template-columns: 1fr;
  }
}
