:root {
  --topbar: #2f3338;
  --nav: #3a3f45;
  --nav-active: #2f6db5;
  --sidebar: #ececec;
  --sidebar-group: #6b7280;
  --accent: #2f6db5;
  --accent-hover: #255a96;
  --border: #d0d4d9;
  --text: #222;
  --muted: #777;
  --content-bg: #fff;
  --row-hover: #f7f9fc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #f5f5f5;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 13px;
}

a {
  text-decoration: none;
}

/* Top bar */
.admin-topbar {
  background: var(--topbar);
  color: #fff;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #454a50;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

.admin-logo {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.admin-logo span {
  color: #9ec5f0;
  font-size: 12px;
  margin-left: 4px;
}

.admin-userbox {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #d7d7d7;
}

.lang-switcher {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: #454a50;
  color: #fff;
  border: 1px solid #5a6068;
  border-radius: 4px;
  padding: 2px 22px 2px 8px;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #ccc 50%),
    linear-gradient(135deg, #ccc 50%, transparent 50%);
  background-position: calc(100% - 10px) calc(50% - 2px), calc(100% - 5px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.lang-select:focus {
  outline: 1px solid #9ec5f0;
  outline-offset: 1px;
}

.login-lang {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

.admin-userbox .role {
  color: #fff;
  font-weight: 600;
}

.logout-btn {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

.logout-btn:hover {
  color: #ffb4b4;
}

/* Primary nav */
.admin-primary-nav {
  background: var(--nav);
  min-height: 38px;
  position: sticky;
  top: 42px;
  z-index: 35;
}

.admin-primary-nav-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.admin-primary-nav a {
  color: #ececec;
  padding: 10px 18px;
  font-size: 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-backdrop {
  display: none;
}

.admin-primary-nav a:hover {
  background: #4a5058;
  color: #fff;
}

.admin-primary-nav a.active {
  background: var(--nav-active);
  color: #fff;
  font-weight: 600;
}

/* Shell */
.admin-shell {
  display: flex;
  min-height: calc(100vh - 80px);
  background: #fff;
}

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
}

.sidebar-hero {
  padding: 22px 16px 18px;
  text-align: center;
  border-bottom: 1px solid #d8d8d8;
  background: #e4e4e4;
}

.sidebar-hero-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: linear-gradient(160deg, #5b8fd4, #2f6db5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.sidebar-hero-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.sidebar-group-title {
  background: var(--sidebar-group);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
}

.sidebar-separator {
  height: 1px;
  margin: 10px 12px 0;
  background: #c9cdd3;
}

.sidebar-group-cancel {
  margin-top: 10px;
  background: #8a4b00;
}

.sidebar-group-sold {
  margin-top: 10px;
  background: #2f6db5;
}

.sidebar-menu a {
  display: block;
  padding: 9px 14px 9px 18px;
  color: #444;
  border-bottom: 1px solid #e0e0e0;
  background: #f3f3f3;
}

.sidebar-menu a:hover {
  background: #fff;
}

.sidebar-menu a.active {
  background: #fff;
  color: #111;
  font-weight: 700;
}

.sidebar-menu a.active::before {
  content: "> ";
  color: var(--accent);
}

.sidebar-menu a.sidebar-cancel {
  color: #8a4b00;
  background: #fff7ef;
}

.sidebar-menu a.sidebar-cancel:hover {
  background: #ffefd9;
}

.sidebar-menu a.sidebar-cancel.active {
  background: #fff;
  color: #6b3a00;
}

.sidebar-menu a.sidebar-cancel.active::before {
  color: #c27400;
}

.sidebar-count {
  color: #888;
  font-weight: 600;
  font-size: 12px;
}

.sidebar-menu a.active .sidebar-count {
  color: #666;
}

.sidebar-menu a.sidebar-cancel .sidebar-count {
  color: #a66a20;
}

.sidebar-menu a.sidebar-sold {
  color: #255a96;
  background: #f3f7fc;
}

.sidebar-menu a.sidebar-sold:hover {
  background: #e8f0fa;
}

.sidebar-menu a.sidebar-sold.active {
  background: #fff;
  color: #1d4a7a;
}

.sidebar-menu a.sidebar-sold.active::before {
  color: var(--accent);
}

.sidebar-menu a.sidebar-sold .sidebar-count {
  color: #5b7ea8;
}

.admin-content {
  flex: 1;
  min-width: 0;
  padding: 18px 22px 80px;
  background: var(--content-bg);
}

.breadcrumb-bar {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.page-heading {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #1f1f1f;
}

.page-desc {
  color: var(--muted);
  margin-bottom: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
}

.section-title .mark {
  width: 12px;
  height: 12px;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

.panel-box {
  border: 1px solid var(--border);
  background: #fff;
  margin-bottom: 22px;
}

.panel-box-inner {
  padding: 16px;
}

.form-row-admin {
  display: flex;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  background: #fff;
}

.form-row-admin .form-label-cell {
  width: 120px;
  flex-shrink: 0;
  background: #f3f3f3;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: #444;
  padding: 10px 8px;
}

.form-row-admin .form-field-cell {
  flex: 1;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.form-control,
.form-select {
  border-radius: 2px !important;
  border-color: #bbb !important;
  font-size: 13px !important;
  min-height: 32px;
}

/* number input 우측 증감 화살표 제거 */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-admin {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  border-radius: 2px;
  padding: 8px 28px;
  font-weight: 600;
  font-size: 13px;
}

.btn-admin:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.btn-admin-secondary {
  background: #fff;
  border: 1px solid #999;
  color: #333;
  border-radius: 2px;
  padding: 7px 16px;
  font-size: 13px;
}

.btn-admin-secondary:hover {
  background: #f5f5f5;
  color: #111;
}

.btn-admin-success {
  background: #2e7d4f;
  border: 1px solid #2e7d4f;
  color: #fff;
  border-radius: 2px;
  padding: 8px 22px;
  font-weight: 600;
}

.btn-admin-success:hover {
  background: #246640;
  color: #fff;
}

.shortcut-btn {
  border: 1px solid #aaa;
  background: #fff;
  color: #333;
  border-radius: 2px;
  padding: 5px 10px;
  font-size: 12px;
}

.shortcut-btn:hover,
.shortcut-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table thead th {
  background: #f7f7f7;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  font-weight: 700;
  color: #444;
  text-align: center;
  white-space: nowrap;
}

.admin-table thead a.th-sort {
  color: inherit;
  text-decoration: none;
}

.admin-table thead a.th-sort:hover,
.admin-table thead a.th-sort.is-active {
  color: var(--accent);
}

.admin-table tbody td {
  border-bottom: 1px solid #e6e6e6;
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: var(--row-hover);
}

.admin-table tbody tr.row-link {
  cursor: pointer;
}

.admin-table tbody tr.row-link:hover {
  background: #eef4fb;
}

.admin-table tbody tr.row-link .no-row-link {
  cursor: default;
}

.admin-table .col-check {
  width: 42px;
}

.admin-table .col-check input {
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d7deea;
  background: #f7faff;
}

.bulk-check-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #444;
  cursor: pointer;
}

.bulk-selected {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  min-width: 72px;
}

.bulk-status-select {
  width: 130px;
}

.bulk-bar .btn-admin:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bulk-bar .btn-admin.is-saving {
  opacity: 0.7;
  cursor: wait;
}

.storage-inline-form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  vertical-align: middle;
}

.storage-inline-input {
  width: 110px;
  min-height: 28px !important;
  padding: 4px 8px;
  font-size: 12px !important;
  text-align: center;
}

.tracking-inline-input {
  appearance: none;
  width: 168px;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  font-size: 12.5px !important;
  font-weight: 600;
  line-height: 34px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.tracking-inline-input:hover {
  border-color: #9a9a9a;
  background-color: #fcfcfc;
}

.tracking-inline-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15);
}

.bulk-tracking-bar {
  background: #f8faf7;
  border-color: #d5e0d4;
}

.bulk-tracking-input {
  width: 220px;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px;
  font-size: 12.5px !important;
}

.bulk-kr-storage-bar {
  background: #f7f9fc;
  border-color: #d7deea;
}

.bulk-kr-storage-input {
  width: 220px;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px;
  font-size: 12.5px !important;
}

.storage-save-btn {
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.detail-page .storage-inline-form {
  display: flex;
  width: 100%;
  justify-content: flex-start;
}

.detail-page .storage-inline-form .form-control {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.admin-table .text-end {
  text-align: right !important;
}

.admin-table .text-start {
  text-align: left !important;
}

.admin-table .model-hard-export {
  color: #dc2626 !important;
  font-weight: 700;
}

.admin-table .text-center {
  text-align: center !important;
}

.admin-table .col-price {
  width: 120px;
}

.admin-table .col-price .storage-inline-form {
  width: 100%;
}

.admin-table .col-price .storage-inline-input {
  margin: 0 auto;
}

.admin-table .col-action {
  width: 168px;
  min-width: 168px;
  white-space: nowrap;
}

.admin-table .btn-table-save {
  padding: 4px 12px;
  font-size: 12px;
  min-height: 28px;
  line-height: 1.2;
}

.admin-table .btn-table-save:disabled,
.admin-table .btn-table-save.is-saving {
  opacity: 0.55;
  cursor: wait;
}

.admin-table .action-btn-row {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.admin-table .btn-redeemarket-sync {
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid #bbb;
  background: #fafafa;
  border-radius: 2px;
  font-size: 12px;
}

.row-status-moved {
  background: #fff8ef;
}

.row-status-moved:hover {
  background: #fff1de !important;
}

.status-inline-form {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  margin: 0;
}

.status-moved-hint {
  font-size: 11px;
  color: #a15c00;
  line-height: 1.3;
  white-space: nowrap;
}

.status-inline-select {
  appearance: none;
  -webkit-appearance: none;
  width: 118px;
  height: 28px;
  padding: 0 26px 0 8px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, #666 50%),
    linear-gradient(135deg, #666 50%, transparent 50%);
  background-position:
    calc(100% - 12px) calc(50% - 2px),
    calc(100% - 7px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: #333;
  font-size: 11px;
  font-weight: 600;
  line-height: 28px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.status-inline-select:hover {
  border-color: #9a9a9a;
  background-color: #fcfcfc;
}

.status-inline-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15);
}

.status-inline-select.is-moved {
  border-color: #e0a85a;
  background-color: #fffaf2;
  color: #8a4b00;
}

.status-inline-select.is-saving {
  opacity: 0.7;
  cursor: wait;
}

.status-toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.status-toast {
  min-width: 220px;
  max-width: 360px;
  padding: 10px 14px;
  border: 1px solid #b7cce6;
  background: #2f6db5;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.status-toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

.status-toast.is-error {
  background: #b42318;
  border-color: #912018;
}

.diff-up { color: #b42318; font-weight: 700; }
.diff-down { color: #027a48; font-weight: 700; }

.schedule-status-unpaid {
  color: #d64545;
  font-weight: 700;
}
.diff-same { color: #667085; }

.price-anomaly,
.current-price-cell.price-anomaly,
.current-price-text.price-anomaly {
  color: #d92d20 !important;
  font-weight: 700;
}

.money-input.price-anomaly {
  color: #d92d20 !important;
  border-color: #f04438 !important;
  background: #fff1f0 !important;
  font-weight: 700;
}

.ref-load-fields,
.ref-calc-fields {
  min-width: 0;
  width: 100%;
}

.ref-date-range {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ref-date-input {
  max-width: 160px;
}

.ref-shortcut-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.ref-calc-fields {
  align-items: flex-end;
}

.ref-calc-item {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ref-calc-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

.ref-calc-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ref-calc-input {
  max-width: 120px;
}

.ref-load-btn {
  align-self: flex-end;
}

.model-price-table {
  table-layout: fixed;
  width: 100%;
}

.model-price-table col.col-capacity { width: 12%; }
.model-price-table col.col-current { width: 22%; }
.model-price-table col.col-edit { width: 24%; }
.model-price-table col.col-sample { width: 12%; }
.model-price-table col.col-diff { width: 18%; }
.model-price-table col.col-save { width: 12%; }

.model-price-table thead th {
  text-align: center;
}

.model-price-table tbody tr.model-group-header td {
  background: #3a3f45;
  color: #fff;
  padding: 10px 14px;
  border-top: 10px solid #fff;
  border-bottom: 1px solid #2f3338;
  text-align: left;
}

.model-price-table tbody tr.model-group-header:first-child td {
  border-top: 0;
}

.model-group-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.model-price-table tbody tr.price-row td {
  background: #f7f9fc;
  border-bottom: 1px solid #e5eaf0;
  text-align: center;
  vertical-align: middle;
}

.model-price-table tbody tr.price-row:hover td {
  background: #eef3f9;
}

.model-price-table tbody tr.price-row td.capacity-cell {
  font-weight: 700;
  color: #333;
  text-align: left;
  padding-left: 18px;
  white-space: nowrap;
}

.model-price-table .price-value-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.model-price-table .price-value {
  display: inline-block;
  width: 144px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.model-price-table .price-unit {
  color: #6c757d;
  font-size: 12px;
  white-space: nowrap;
}

/* 7자리(+콤마) 고정 입력칸. Bootstrap form-control 미사용 */
.model-price-table input.ref-price-input {
  display: inline-block;
  width: 144px;
  max-width: 144px;
  min-width: 144px;
  height: 24px;
  margin: 0;
  padding: 0 4px;
  border: 1px solid #bbb;
  border-radius: 2px;
  background: #fff;
  color: #212529;
  font-size: 12px;
  line-height: 22px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

.model-price-table input.ref-price-input.is-loaded {
  background: #eef6ff;
}

.model-price-table input.ref-price-input:focus {
  outline: none;
  border-color: #6aa3d8;
  box-shadow: 0 0 0 2px rgba(106, 163, 216, 0.2);
}

.model-price-table .sample-cell,
.model-price-table .diff-cell,
.model-price-table .save-cell {
  white-space: nowrap;
  text-align: center;
}

.model-price-table .sample-cell {
  color: #6c757d;
}

.photo-side-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 8px 0 18px;
}

.photo-side-panel {
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  min-height: 140px;
  transition: outline-color 0.15s ease, background 0.15s ease;
}

.photo-side-panel.is-drop-target,
.photo-side-panel.is-swap-target {
  outline: 2px dashed #2f6fed;
  outline-offset: 2px;
  background: rgba(47, 111, 237, 0.06);
}

.photo-side-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.shot-dropzone-compact {
  min-height: 88px;
  padding: 10px 8px;
}

.shot-dropzone-compact .shot-dropzone-title {
  font-size: 0.95rem;
}

.shot-dropzone-compact .shot-dropzone-desc {
  font-size: 0.8rem;
}

.photo-sort-grid.is-drop-target,
.photo-sort-grid.is-swap-target {
  outline: 2px dashed #2f6fed;
  outline-offset: 2px;
  background: rgba(47, 111, 237, 0.04);
}

.photo-sort-grid {
  min-height: 120px;
}

.photo-sort-grid .thumb-card {
  user-select: none;
}

.thumb-card.is-photo-swappable {
  cursor: pointer;
}

.thumb-card.is-photo-selected {
  outline: 2px solid #2f6fed;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

.is-photo-swap-armed .thumb-card.is-photo-swappable:not(.is-photo-selected) {
  cursor: pointer;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 12px;
}

.detail-page .thumb-grid {
  margin-top: 6px;
  gap: 6px;
}

.detail-page .empty-shot {
  margin-top: 4px;
  padding: 14px 8px;
}

.thumb-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}

.main-thumb-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 6px;
}

.main-thumb-col {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.main-thumb-col .thumb-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f3f4f6;
}

.main-thumb-col .thumb-grid {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.main-thumb-col .empty-shot {
  margin-top: 0;
}

.main-thumb-label {
  font-size: 12px;
  color: #666;
}

.main-thumb-col.has-pending-main .thumb-card[data-main-saved-card] {
  display: none;
}

.main-thumb-col.has-pending-main .thumb-card[data-main-pending-card] img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.thumb-card a.btn-admin-secondary {
  display: block;
  text-align: center;
  text-decoration: none;
  background: #fff;
  border: 1px solid #999;
  overflow: visible;
}

.thumb-card a.btn-admin-secondary:hover {
  background: #f5f5f5;
}

.thumb-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.thumb-card a {
  border: 1px solid var(--border);
  background: #fafafa;
  overflow: hidden;
}

.thumb-card img {
  border: 0;
  transition: transform 0.2s ease;
}

.buyer-doc {
  display: block;
  max-width: 320px;
  border: 1px solid var(--border);
  background: #fafafa;
}

.buyer-doc img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.slip-detail-image {
  display: block;
  max-width: 720px;
  border: 1px solid var(--border);
  background: #fafafa;
}

.slip-detail-image img {
  display: block;
  width: 100%;
  height: auto;
}

.thumb-card a:hover img {
  transform: scale(1.03);
}

.thumb-caption {
  font-size: 11px;
  color: #526074;
  line-height: 1.3;
}

.thumb-card-inspection a {
  border-color: #b7cce6;
}

.api-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.api-key-value {
  display: inline-block;
  max-width: min(100%, 420px);
  overflow-x: auto;
  white-space: nowrap;
  font-size: 12px;
  padding: 4px 6px;
  background: #f4f6f8;
  border: 1px solid #d7dee8;
}

.api-key-create-form {
  max-width: 520px;
}

.api-key-create-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 8px;
}

.api-key-create-row .form-control {
  flex: 1;
}

.admin-content:has(.detail-page) {
  padding-bottom: 16px;
}

.admin-content:has(.detail-page) .page-heading {
  font-size: 20px;
  margin-bottom: 6px;
}

.admin-content:has(.detail-page) .breadcrumb-bar {
  margin-bottom: 4px;
}

.detail-page {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-page .status-inline-select {
  height: 30px;
  line-height: 30px;
  font-size: 12px;
}

.detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 0;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.detail-hero-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.detail-hero-no {
  flex-shrink: 0;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.detail-hero-no-new {
  background: #5b6775;
  font-size: 22px;
  line-height: 1;
}

.detail-hero-title {
  font-size: 15px;
  font-weight: 800;
  color: #1f1f1f;
  margin-bottom: 2px;
}

.detail-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 11px;
}

.detail-hero-meta span::before {
  content: "·";
  margin-right: 8px;
  color: #ccc;
}

.detail-hero-meta span:first-child::before {
  content: none;
  margin: 0;
}

.detail-hero-side {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.detail-hero-actions {
  display: flex;
  gap: 6px;
}

.status-pill-lg {
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  background: #eef4fb;
  border-color: #b7cce6;
  color: #255a96;
}

.detail-zone {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #d5dde8;
  background: #f7f9fc;
}

.detail-zone-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2f6db5;
}

.detail-zone-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.detail-zone-head p {
  margin: 0;
  color: #667;
  font-size: 12px;
}

.detail-zone-purchase {
  border-top: 4px solid #2f6db5;
}

.detail-zone-listing {
  margin-top: 28px;
  border-color: #c9ddd2;
  border-top: 4px solid #2f8a63;
  background: #f6fbf8;
}

.detail-zone-listing .detail-zone-head {
  border-bottom-color: #2f8a63;
}

.detail-zone-listing .listing-panel {
  margin-bottom: 0;
  background: #fff;
}

.detail-zone-listing .detail-save-bar-bottom,
.detail-zone-prompt .detail-save-bar-bottom {
  margin-top: 10px;
  padding: 10px 0 0;
  background: transparent;
}

.detail-zone-listing .detail-save-bar-bottom {
  border-top: 1px solid #d5e6dc;
}

.detail-zone-prompt .detail-save-bar-bottom {
  border-top: 1px solid #eadfce;
}

.detail-zone-prompt {
  margin-top: 28px;
  border-color: #e4d4bc;
  border-top: 4px solid #b5762a;
  background: #fbf8f3;
}

.detail-zone-prompt .detail-zone-head {
  border-bottom-color: #b5762a;
}

.detail-zone-prompt .listing-prompt-box {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.detail-zone-purchase .detail-save-bar-bottom {
  margin-top: 10px;
  padding: 10px 0 0;
  border-top: 1px solid #d7deea;
  background: transparent;
}

.detail-layout {
  margin-bottom: 0;
  gap: 8px;
}

.detail-page .panel-box-inner {
  padding: 10px;
}

.detail-page .section-title {
  margin: 0 0 8px;
  font-size: 13px;
}

.detail-region-kr {
  border-color: #c9d8ea;
}

.detail-region-kr .section-title .mark {
  background: #2f6fad;
}

.detail-region-th {
  border-color: #c9ddd2;
}

.detail-region-th .section-title .mark {
  background: #2f8a63;
}

.detail-region-inspection {
  border-color: #d5dde8;
}

.detail-region-inspection .section-title .mark {
  background: #5a6d86;
}

.purchase-form-grid > .purchase-form-span {
  height: auto;
}

.detail-subtitle {
  margin: 14px 0 8px;
  padding-top: 10px;
  border-top: 1px solid #e5e9ef;
  font-size: 12px;
  font-weight: 700;
  color: #445;
  display: flex;
  align-items: center;
  gap: 6px;
}

.installment-term-title {
  margin-top: 10px;
  padding-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #526074;
}

.installment-calc-action .btn-admin {
  width: fit-content;
}

.installment-calc-grid .field-hint {
  display: block;
  margin-top: 6px;
}

.detail-save-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5e9ef;
}

.detail-save-bar-bottom {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 12px 10px 4px;
  border-top: 1px solid #d7deea;
  background: #fff;
}

.detail-save-bar .btn-admin {
  min-width: 120px;
}

.listing-title-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  align-items: start;
}

.listing-title-row > .info-item {
  width: 100%;
  min-width: 0;
}

.listing-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
}

.listing-cell {
  min-width: 0;
}

.listing-cell-title {
  margin: 0;
}

.listing-cell-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.listing-cell-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 0;
  padding-top: 22px;
}

.listing-board-gap {
  min-width: 0;
}

.listing-cell-wide {
  grid-column: 1 / -1;
}

.listing-generate {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.listing-generate .field-hint {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 640px) {
  .listing-title-row {
    grid-template-columns: 1fr;
  }
}

@font-face {
  font-family: "ListingText";
  src: local("Apple Color Emoji"), local("Segoe UI Emoji"), local("Noto Color Emoji");
  unicode-range: U+2705, U+2728, U+1F4F1, U+1F4F8, U+1F49B, U+1F4CD, U+1F6F5, U+1F4AC;
  size-adjust: 85%;
  ascent-override: 88%;
  descent-override: 18%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "ListingText";
  src: local("Apple SD Gothic Neo"), local("Malgun Gothic"), local("Noto Sans KR");
  unicode-range: U+0000-2704, U+2706-2727, U+2729-1F4F0, U+1F4F2-1F4F7, U+1F4F9-1F49A, U+1F49C-1F4CC, U+1F4CE-1F6F4, U+1F6F6-10FFFF;
}

.listing-text,
.listing-editor,
.listing-view,
.listing-prompt,
.listing-prompt-view {
  font-family: "ListingText", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif !important;
  font-variant-emoji: normal;
  line-height: 1.45;
  letter-spacing: 0;
  word-spacing: 0;
}

#id_listing_ko {
  display: none;
}

.listing-text,
.listing-editor,
.listing-view,
.listing-body-field {
  width: 100%;
  height: 380px;
  min-height: 380px;
  max-height: 380px;
  white-space: pre-wrap;
  overflow-x: hidden;
  overflow-y: auto;
  resize: none;
  box-sizing: border-box;
}

.listing-editor {
  border: 1px solid #bbb;
  border-radius: 2px;
  background: #fff;
  padding: 8px 10px;
  font-size: 13px;
}

.listing-body-field {
  font-size: 13px;
  line-height: 1.45;
}

.listing-missing {
  color: #d92d20;
  font-weight: 700;
}

.listing-view {
  border: 1px solid #d7deea;
  background: #f7f9fc;
  padding: 8px 10px;
  font-size: 13px;
}

.listing-translate {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.listing-translate .btn-admin {
  min-width: 72px;
  padding: 8px 14px;
}

.listing-translate .field-hint {
  max-width: 80px;
  text-align: center;
  font-size: 11px;
  line-height: 1.35;
}

.listing-prompt-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e5e9ef;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.listing-prompt,
.listing-prompt-view {
  width: 100%;
  min-height: 160px;
  white-space: pre-wrap;
  font-size: 13px;
}

.detail-page .upload-inline {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 10px;
}

.detail-page .upload-inline .form-control {
  max-width: 100%;
}

.detail-page .info-item .form-control {
  width: 100%;
}

.detail-page .mt-3 {
  margin-top: 8px !important;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.info-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .info-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px;
  background: #fafbfc;
  border: 1px solid #eceff3;
}

.info-item-wide {
  grid-column: 1 / -1;
}

.info-item-total {
  background: #f3f7fc;
  border-color: #c7d8ee;
}

.info-item-total .info-value {
  color: var(--accent);
}

.info-label {
  font-size: 11px;
  font-weight: 700;
  color: #777;
  letter-spacing: 0.02em;
}

.info-value {
  font-size: 13px;
  color: #222;
  word-break: break-word;
  line-height: 1.3;
}

.info-value.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.money-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.money-card {
  padding: 8px 10px;
  border: 1px solid #e5e8ec;
  background: #fafbfc;
}

.money-card-total {
  background: #f3f7fc;
  border-color: #c7d8ee;
}

.money-label {
  font-size: 11px;
  font-weight: 700;
  color: #777;
  margin-bottom: 2px;
}

.money-value {
  font-size: 14px;
  font-weight: 800;
  color: #222;
  line-height: 1.25;
}

.money-card-total .money-value {
  color: var(--accent);
}

.status-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-current {
  font-size: 12px;
  color: #555;
}

.status-detail-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-detail-select {
  width: 100%;
}

.upload-inline {
  display: flex;
  gap: 6px;
  align-items: center;
}

.upload-inline .form-control {
  flex: 1;
}

.section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 10px;
  background: #eef2f7;
  color: #555;
  font-size: 11px;
  font-weight: 700;
}

.shot-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  margin-bottom: 8px;
  padding: 20px 16px;
  border: 1.5px dashed #b8c4d6;
  border-radius: 4px;
  background: #f7f9fc;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.detail-page .shot-dropzone {
  min-height: 140px;
}

.shot-dropzone:hover,
.shot-dropzone:focus-visible {
  border-color: var(--accent);
  background: #f0f5fb;
}

.shot-dropzone.is-dragover {
  border-color: var(--accent);
  background: #e8f0fa;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.shot-dropzone.has-files {
  min-height: 120px;
}

.shot-dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shot-dropzone-body {
  text-align: center;
  pointer-events: none;
}

.shot-dropzone-title {
  font-size: 14px;
  font-weight: 700;
  color: #2f3b4d;
  margin-bottom: 4px;
}

.shot-dropzone-desc {
  font-size: 12.5px;
  color: #556174;
  margin-bottom: 4px;
}

.shot-dropzone-hint {
  font-size: 11px;
  color: var(--muted);
}

.shot-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.shot-preview-card {
  position: relative;
  border: 1px solid var(--border);
  background: #fff;
  overflow: hidden;
}

.shot-preview-card.is-preview-selectable {
  cursor: pointer;
}

.shot-preview-card.is-preview-selected {
  outline: 2px solid #2f6fed;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

body.is-photo-place-armed .photo-side-panel.is-place-target {
  outline: 2px dashed #2f6fed;
  outline-offset: 2px;
  background: rgba(47, 111, 237, 0.06);
  cursor: pointer;
}

body.is-photo-place-armed .photo-side-panel.is-place-target .shot-dropzone {
  pointer-events: none;
}

/* 새 사진 배치 시: 업로드 박스·기존 저장 사진은 숨기고 새 미리보기만 표시 */
.photo-side-panel.has-pending-replace .shot-dropzone-compact {
  display: none;
}

.photo-side-panel.has-pending-replace .photo-sort-grid .thumb-card,
.photo-side-panel.has-pending-replace .photo-sort-grid .empty-shot {
  display: none;
}

.photo-side-panel.has-pending-replace .shot-preview-grid {
  margin-top: 0;
}

.photo-side-panel.has-pending-replace .shot-preview-card img {
  height: 140px;
}

.shot-preview-card img {
  display: block;
  width: 100%;
  height: 88px;
  object-fit: cover;
}

.shot-preview-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 88px;
  padding: 6px;
  font-size: 10.5px;
  color: #666;
  text-align: center;
  word-break: break-all;
  background: #f3f5f8;
}

.shot-preview-name {
  padding: 4px 6px;
  font-size: 10px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shot-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(33, 37, 41, 0.72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.shot-preview-remove:hover {
  background: rgba(192, 57, 43, 0.9);
}

.empty-shot {
  margin-top: 8px;
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  background: #fafbfc;
  border: 1px dashed #d7dbe1;
}

.device-edit-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.device-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
}

.device-fields .info-item {
  flex: 1 1 calc(50% - 3px);
  min-width: 0;
  max-width: calc(50% - 3px);
}

.device-fields .device-field-battery {
  flex: 1 1 calc(50% - 3px);
  min-width: 0;
  max-width: calc(50% - 3px);
}

.info-item-edit {
  background: #fff;
  border-color: #d7deea;
}

.info-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.info-label-row .info-label {
  margin-bottom: 0;
}

.btn-payment-add {
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}

.info-item-edit .form-control,
.info-item-edit .form-select {
  width: 100%;
  font-size: 12.5px !important;
  min-height: 28px !important;
  padding: 4px 8px;
}

.info-item-edit .form-control:not([type="date"]):not([type="number"]),
.device-fields .info-item-edit .form-control {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.detail-page .purchase-form-actions {
  margin-top: 4px;
  padding-top: 10px;
}

.detail-page .upload-inline {
  flex-wrap: wrap;
}

.detail-page textarea.form-control {
  min-height: 64px;
  resize: vertical;
}

.device-edit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.device-edit-actions .btn-admin {
  padding: 6px 14px;
}

@media (max-width: 600px) {
  .device-fields .info-item,
  .device-fields .device-field-battery {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.chart-head {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.chart-metrics {
  display: flex;
  gap: 6px;
}

.chart-metric.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chart-wrap {
  position: relative;
  height: 420px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 16px 8px 8px;
  margin-top: 10px;
}

.pagination .page-link {
  border-radius: 2px;
  color: #333;
}

.pagination .page-item.active .page-link,
.pagination .page-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #2f3338 0 42px, #ececec 42px);
}

.login-wrap {
  width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 28px 26px;
}

.login-wrap h1 {
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}

.login-wrap .sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  border: 1px solid var(--border);
}

.detail-grid dt,
.detail-grid dd {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #e8e8e8;
}

.detail-grid dt {
  background: #f3f3f3;
  font-weight: 600;
  border-right: 1px solid var(--border);
}

.alert {
  border-radius: 2px;
  font-size: 13px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.purchase-no-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.purchase-no-search input[type="search"] {
  width: 7.5rem;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
}

.purchase-no-search .btn-admin {
  padding: 7px 16px;
  white-space: nowrap;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.purchase-form-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: start;
}

.purchase-form-grid .panel-box {
  margin-bottom: 0;
  height: 100%;
}

.purchase-form-span {
  grid-column: 1 / -1;
}

/* 매입 등록(최초): 필드가 적어 전체 폭으로 늘어나지 않게 */
.purchase-form-grid-create {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.purchase-form-grid-create .info-grid-2 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.purchase-form-grid-create .info-item {
  padding: 4px 6px;
}

.purchase-form-grid-create .info-item-edit .form-control,
.purchase-form-grid-create .info-item-edit .form-select {
  width: 100%;
  max-width: 100%;
  font-size: 12px !important;
  min-height: 26px !important;
  height: 26px;
  padding: 2px 6px;
  line-height: 1.3;
}

.purchase-form-grid-create .info-item-edit textarea.form-control {
  height: auto;
  min-height: 52px;
  padding: 4px 6px;
}

.purchase-form-grid-create .info-item-wide {
  grid-column: 1 / -1;
}

.purchase-form-grid-create .info-item-spacer {
  visibility: hidden;
  pointer-events: none;
  background: transparent;
  border-color: transparent;
}

.purchase-form-grid-create .shot-dropzone {
  min-height: 150px;
}

.purchase-form-grid-create .btn-payment-add {
  padding: 1px 6px;
  font-size: 10.5px;
}

@media (max-width: 700px) {
  .purchase-form-grid-create .info-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .purchase-form-grid-create .info-grid-2 {
    grid-template-columns: 1fr;
  }
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px 14px;
}

.field-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field-item label {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  margin: 0;
}

.field-item .form-control,
.field-item .form-select {
  width: 100%;
}

.field-item-wide {
  grid-column: 1 / -1;
}

.field-item-highlight {
  background: #faf7f2;
  border: 1px solid #e6dccf;
  padding: 10px;
}

.field-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.field-error {
  color: #c0392b;
  font-size: 12px;
}

.field-error ul {
  margin: 0;
  padding-left: 16px;
}

.purchase-form-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

@media (max-width: 1100px) {
  .field-grid-4,
  .money-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .form-row-admin {
    flex-direction: column;
  }

  .form-row-admin .form-label-cell {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .purchase-form-grid {
    grid-template-columns: 1fr;
  }

  .listing-columns {
    grid-template-columns: 1fr;
  }

  .listing-board {
    grid-template-columns: 1fr;
  }

  .listing-board-gap {
    display: none;
  }

  .listing-cell-mid {
    padding-top: 0;
    justify-content: flex-start;
  }

  .listing-translate {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }

  .listing-translate .field-hint {
    max-width: none;
    text-align: left;
  }

  .detail-zone-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .field-grid-2,
  .field-grid-4,
  .info-grid-2,
  .info-grid-3,
  .money-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-hero-side {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .upload-inline {
    flex-direction: column;
    align-items: stretch;
  }
}

.device-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  user-select: none;
}

.device-check-label .form-check-input {
  margin: 0;
  width: 16px;
  height: 16px;
}

.info-item-wide {
  grid-column: 1 / -1;
}

.form-actions-admin {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.accounting-status-cell {
  align-items: flex-start !important;
  flex-direction: column;
}

.accounting-status-tools {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.accounting-status-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  width: 100%;
}

.accounting-status-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #666;
  margin-bottom: 6px;
}

.accounting-status-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333;
  margin-bottom: 4px;
  cursor: pointer;
  user-select: none;
}

.accounting-status-check.is-cancel {
  color: #8a4b00;
}

.accounting-status-check.is-sold {
  color: #255a96;
}

.accounting-status-check input {
  margin: 0;
}

.accounting-result-count {
  font-size: 13px;
  font-weight: 700;
  color: #444;
}

.accounting-result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-docs-toolbar {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.api-lead {
  font-size: 13px;
  color: #444;
  margin: 0 0 10px;
}

.api-list {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 13px;
  color: #444;
}

.api-list li {
  margin-bottom: 4px;
}

.api-meta {
  font-size: 13px;
  color: #555;
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.api-sub {
  font-size: 13px;
  font-weight: 700;
  margin: 16px 0 8px;
  color: #333;
}

.api-method {
  display: inline-block;
  min-width: 52px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  color: #fff;
}

.api-method-get {
  background: #2f6db5;
}

.api-method-post {
  background: #2d8a5b;
}

.api-code {
  background: #f4f6f8;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  margin: 0 0 8px;
  color: #222;
}

.panel-box:target {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.inspection-overall {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.inspection-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.inspection-status-card {
  border: 1px solid #d7dee8;
  background: #fff;
  padding: 10px 10px 8px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inspection-status-card.is-empty {
  background: #fafbfc;
}

.inspection-status-title {
  font-size: 13px;
  font-weight: 700;
  color: #243247;
  line-height: 1.3;
}

.inspection-status-sub {
  font-size: 11px;
  color: #7a8699;
  line-height: 1.3;
}

.inspection-status-value {
  margin-top: auto;
}

.inspection-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.inspection-status-blank {
  display: block;
  min-height: 22px;
  border-bottom: 1px dashed #d0d7e2;
}

.inspection-status-blank-panel {
  grid-column: 1 / -1;
  color: #8a94a6;
  font-size: 13px;
  padding: 8px 0;
}

.inspection-status-passed,
.inspection-overall.inspection-status-passed {
  background: #e8f7ee;
  border-color: #9fd5b5;
  color: #0f7a3f;
}

.inspection-status-failed,
.inspection-overall.inspection-status-failed {
  background: #fdecec;
  border-color: #f0b4b4;
  color: #b42318;
}

.inspection-status-needs-review,
.inspection-overall.inspection-status-needsReview,
.inspection-overall.inspection-status-needs-review {
  background: #fff6e8;
  border-color: #f0d2a0;
  color: #9a6700;
}

.inspection-status-unsupported,
.inspection-overall.inspection-status-unsupported {
  background: #eef1f5;
  border-color: #c9d1dc;
  color: #526074;
}

.inspection-status-skipped,
.inspection-overall.inspection-status-skipped {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #6b7280;
}

.inspection-status-pending,
.inspection-overall.inspection-status-pending {
  background: #eef4fb;
  border-color: #b7cce6;
  color: #255a96;
}

.inspection-status-testing,
.inspection-overall.inspection-status-testing {
  background: #e8f0fe;
  border-color: #a8c5f0;
  color: #1a56db;
}

.inspection-notes-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.inspection-reset-form {
  margin: 0;
  display: inline-flex;
}

@media (max-width: 768px) {
  .accounting-status-groups {
    flex-direction: column;
    gap: 12px;
  }

  .inspection-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== Mobile layout ===== */
@media (max-width: 900px) {
  /* 기준단가 페이지 */
  #ref-form .form-field-cell {
    flex-direction: column;
    align-items: stretch;
  }

  .ref-date-range {
    width: 100%;
  }

  .ref-date-input {
    flex: 1 1 0;
    max-width: none;
    width: 100%;
  }

  .ref-calc-fields {
    align-items: stretch;
  }

  .ref-calc-item,
  .ref-calc-inline {
    width: 100%;
  }

  .ref-calc-input {
    max-width: none;
    width: 100%;
  }

  .ref-load-btn {
    width: 100%;
    align-self: stretch;
  }

  #current-section .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #current-section .toolbar .d-flex {
    width: 100%;
  }

  #current-section .toolbar .btn-admin-success {
    width: 100%;
  }

  #current-section .table-responsive {
    overflow: visible;
    margin: 0;
    padding: 0;
  }

  .model-price-table.admin-table,
  .model-price-table {
    min-width: 0 !important;
    width: 100%;
    table-layout: auto;
  }

  .model-price-table colgroup {
    display: none;
  }

  .model-price-table thead {
    display: none;
  }

  .model-price-table,
  .model-price-table tbody,
  .model-price-table tr,
  .model-price-table td {
    display: block;
    width: 100%;
  }

  .model-price-table tbody tr.model-group-header {
    margin-top: 14px;
  }

  .model-price-table tbody tr.model-group-header td {
    border-top: 0;
    border-radius: 4px 4px 0 0;
  }

  .model-price-table tbody tr.price-row {
    margin: 0 0 10px;
    border: 1px solid #d7deea;
    border-radius: 4px;
    background: #f7f9fc;
    overflow: hidden;
  }

  .model-price-table tbody tr.price-row td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid #e5eaf0;
    background: transparent !important;
    white-space: normal;
  }

  .model-price-table tbody tr.price-row td:last-child {
    border-bottom: 0;
  }

  .model-price-table tbody tr.price-row td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    max-width: 42%;
    font-size: 12px;
    font-weight: 700;
    color: #555;
  }

  .model-price-table tbody tr.price-row td.capacity-cell {
    padding-left: 12px !important;
    background: #eef3f9 !important;
    font-size: 14px;
  }

  .model-price-table .price-value-wrap {
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
  }

  .model-price-table .price-value {
    width: auto;
  }

  .model-price-table input.ref-price-input {
    width: 100%;
    max-width: 160px;
    min-width: 0;
    height: 36px;
    line-height: 34px;
    font-size: 16px;
  }

  .model-price-table .save-cell .btn-table-save {
    width: 100%;
    min-width: 0;
  }

  .model-price-table .sample-cell,
  .model-price-table .diff-cell,
  .model-price-table .save-cell {
    text-align: left;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .admin-userbox {
    gap: 8px;
  }

  .admin-userbox .userbox-meta {
    display: none;
  }

  .admin-logo {
    font-size: 14px;
    letter-spacing: 0.2px;
  }

  .admin-primary-nav {
    overflow: hidden;
  }

  .admin-primary-nav-scroll {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .admin-primary-nav-scroll::-webkit-scrollbar {
    display: none;
  }

  .admin-primary-nav a {
    padding: 11px 14px;
    font-size: 12.5px;
  }

  .admin-shell {
    position: relative;
    min-height: calc(100vh - 80px);
  }

  .admin-sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 80px 0 0 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 45;
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .admin-content {
    padding: 14px 12px calc(120px + env(safe-area-inset-bottom, 0px));
  }

  .page-heading {
    font-size: 20px;
  }

  .page-desc {
    font-size: 12.5px;
    margin-bottom: 12px;
  }

  .panel-box-inner {
    padding: 12px;
  }

  .toolbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .bulk-bar {
    gap: 8px;
    padding: 10px;
  }

  .bulk-status-select,
  .bulk-tracking-input,
  .bulk-kr-storage-input,
  .storage-inline-input,
  .tracking-inline-input {
    width: 100%;
    max-width: 100%;
  }

  .bulk-bar .btn-admin,
  .bulk-bar .btn-admin-secondary {
    width: 100%;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
  }

  .admin-table {
    min-width: 720px;
  }

  .admin-table thead th,
  .admin-table tbody td {
    white-space: nowrap;
  }

  .admin-table .col-price .storage-inline-input,
  .admin-table .tracking-inline-input,
  .admin-table .storage-inline-input {
    width: 120px;
  }

  .admin-table .action-btn-row,
  .admin-table .action-btn-stack {
    flex-wrap: wrap;
  }

  .chart-wrap {
    height: 280px;
    padding: 10px 4px 4px;
  }

  .chart-head {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .form-row-admin .form-field-cell {
    padding: 10px;
  }

  .form-row-admin .form-field-cell .form-control,
  .form-row-admin .form-field-cell .form-select,
  .form-row-admin .form-field-cell .btn-admin,
  .form-row-admin .form-field-cell .shortcut-btn {
    max-width: 100% !important;
  }

  .listing-text,
  .listing-editor,
  .listing-view,
  .listing-body-field {
    height: 260px;
    min-height: 260px;
    max-height: 260px;
  }

  .thumb-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
  }

  .thumb-grid img {
    height: 110px;
  }

  .shot-preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }

  .shot-preview-card img {
    height: 72px;
  }

  .detail-hero-actions {
    flex-wrap: wrap;
  }

  .detail-hero-actions .btn-admin,
  .detail-hero-actions .btn-admin-secondary {
    flex: 1 1 auto;
    text-align: center;
  }

  .purchase-form-actions {
    flex-wrap: wrap;
  }

  .purchase-form-actions .btn-admin,
  .purchase-form-actions .btn-admin-secondary {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
  }

  .api-key-create-row {
    flex-direction: column;
    align-items: stretch;
  }

  .login-wrap {
    width: calc(100% - 28px);
    max-width: 420px;
    margin: 0 auto;
    padding: 22px 18px;
  }

  .login-lang {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }

  .btn-admin,
  .btn-admin-secondary,
  .shortcut-btn,
  .logout-btn,
  .nav-toggle {
    min-height: 36px;
  }

  .form-control,
  .form-select,
  .lang-select {
    min-height: 36px;
    font-size: 16px !important; /* iOS zoom 방지 */
  }

  .lang-select {
    min-height: 30px;
    font-size: 13px !important;
  }
}

@media (max-width: 600px) {
  .admin-content {
    padding: 12px 10px calc(140px + env(safe-area-inset-bottom, 0px));
  }

  .page-heading {
    font-size: 18px;
  }

  .breadcrumb-bar {
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  .sidebar-hero {
    padding: 16px 12px 14px;
  }

  .sidebar-hero-icon {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .admin-table {
    min-width: 640px;
    font-size: 12px;
  }

  .chart-wrap {
    height: 240px;
  }

  .inspection-status-grid {
    grid-template-columns: 1fr;
  }

  .status-toast-host {
    left: 10px;
    right: 10px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .purchase-form-actions .btn-admin,
  .purchase-form-actions .btn-admin-secondary {
    flex: 1 1 100%;
  }
}

.admin-content:has(.installment-detail-compact) .page-heading {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.admin-content:has(.installment-detail-compact) .page-desc {
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.installment-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-end;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid #e5e9ef;
  background: #f7f9fc;
}

.installment-filter-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 120px;
}

.installment-filter-q {
  flex: 1 1 220px;
  min-width: 200px;
}

.installment-filter-label {
  font-size: 11px;
  font-weight: 700;
  color: #777;
  margin: 0;
}

.installment-filter-bar .form-control,
.installment-filter-bar .form-select {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.86rem;
}

.installment-filter-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-bottom: 1px;
}

.installment-filter-actions .btn-admin,
.installment-filter-actions .btn-admin-secondary {
  padding: 5px 12px;
  font-size: 0.85rem;
}

.installment-detail-compact {
  max-width: 860px;
}

.installment-detail-toolbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.installment-phone-panel {
  margin: 0 0 8px;
  padding: 8px;
  border: 1px solid #d5dde8;
  background: #f7f9fc;
}

.installment-phone-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.installment-phone-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.installment-phone-grid {
  margin: 0;
}

.installment-phone-panel .btn-admin-secondary {
  padding: 3px 9px;
  font-size: 0.82rem;
}

.installment-detail-toolbar .btn-admin-secondary {
  padding: 3px 9px;
  font-size: 0.82rem;
}

.installment-detail-zone {
  margin-top: 0;
  padding: 6px;
  background: #f4f7fb;
}

.installment-detail-zone .panel-box {
  margin: 0;
  box-shadow: none;
  border: none;
  background: transparent;
}

.installment-detail-zone .panel-box-inner {
  padding: 0;
}

.installment-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px 6px;
}

.installment-detail-compact .info-item {
  padding: 3px 5px;
  min-height: 0;
  background: #fff;
  border-color: #e5e9ef;
}

.installment-detail-compact .info-label {
  font-size: 10px;
  margin: 0;
}

.installment-detail-compact .info-value {
  font-size: 0.86rem;
  line-height: 1.25;
}

.installment-detail-compact .info-item-edit .form-control,
.installment-detail-compact .info-item-edit .form-select {
  min-height: 28px;
  padding: 2px 5px;
  font-size: 0.84rem;
}

.installment-detail-compact textarea.form-control {
  min-height: 28px;
  height: 28px;
  line-height: 1.25;
  resize: vertical;
}

.installment-detail-compact .info-item-span-2 {
  grid-column: span 2;
}

.installment-detail-compact .info-item-wide {
  grid-column: 1 / -1;
}

.installment-detail-compact input[type="file"] {
  font-size: 0.78rem;
  padding: 1px 0;
}

.installment-detail-compact .buyer-doc {
  font-size: 0.78rem;
  margin-top: 1px;
}

.installment-schedule-title {
  margin: 10px 0 4px;
  font-size: 0.88rem;
}

.installment-detail-actions {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.installment-detail-actions .btn-admin {
  padding: 4px 10px;
  font-size: 0.82rem;
}

.installment-schedule-table th,
.installment-schedule-table td {
  padding: 3px 5px;
  vertical-align: middle;
  font-size: 0.82rem;
}

.installment-schedule-table tr.is-overdue-unpaid td {
  background: #fde8e8;
}

.installment-schedule-table tr.is-overdue-unpaid:hover td {
  background: #f9d4d4;
}

.installment-schedule-table .form-control,
.installment-schedule-table textarea.form-control {
  min-height: 26px;
  padding: 2px 4px;
  font-size: 0.82rem;
}

.installment-schedule-table textarea.form-control {
  min-height: 26px;
  height: 26px;
  resize: vertical;
}

.installment-schedule-table input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

@media (max-width: 1100px) {
  .installment-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .installment-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .installment-detail-compact .info-item-span-2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .installment-detail-grid {
    grid-template-columns: 1fr;
  }

  .installment-detail-compact .info-item-span-2 {
    grid-column: 1;
  }
}

.installment-cal-toolbar {
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.installment-cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.installment-cal-controls {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0 12px;
  border: 0;
  background: #f9fafb;
  color: #344054;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.cal-nav-btn:hover {
  background: #f2f4f7;
  color: #101828;
}

.installment-cal-jump {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0 8px;
  border-left: 1px solid #e4e7ec;
  border-right: 1px solid #e4e7ec;
  background: #fff;
}

.installment-cal-select {
  width: auto;
  min-width: 72px;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 700;
  font-size: 0.98rem;
  color: #101828;
  padding: 0 4px;
  cursor: pointer;
}

.installment-cal-select:focus {
  outline: none;
  box-shadow: none;
}

.cal-jump-sep {
  color: #98a2b3;
  font-weight: 600;
}

.cal-nav-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: #175cd3;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.cal-nav-today:hover {
  background: #eff8ff;
  border-color: #84caff;
  color: #175cd3;
}

.installment-cal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.cal-summary {
  font-size: 0.92rem;
  font-weight: 600;
}

.cal-summary.unpaid {
  color: #b42318;
}

.cal-summary.planned {
  color: #175cd3;
}

.cal-summary.paid {
  color: #027a48;
}

.installment-calendar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.installment-cal-head,
.installment-cal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.installment-cal-weekday {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #667085;
  padding: 4px 0;
}

.installment-cal-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 96px;
  padding: 8px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.installment-cal-day:hover {
  border-color: #98a2b3;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.08);
}

.installment-cal-day.is-out {
  opacity: 0.42;
  background: #f9fafb;
}

.installment-cal-day.is-today {
  border-color: #175cd3;
  box-shadow: inset 0 0 0 1px #175cd3;
}

.installment-cal-day.has-unpaid {
  background: #fff7f5;
}

.installment-cal-day.has-planned:not(.has-unpaid) {
  background: #f5f9ff;
}

.installment-cal-day.has-paid:not(.has-unpaid):not(.has-planned) {
  background: #f3faf6;
}

.cal-day-num {
  font-weight: 700;
  font-size: 0.95rem;
}

.cal-day-num.is-today-label {
  color: #175cd3;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.cal-day-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cal-chip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: baseline;
  font-size: 0.72rem;
  line-height: 1.2;
}

.cal-chip.unpaid {
  color: #b42318;
}

.cal-chip.planned {
  color: #175cd3;
}

.cal-chip.paid {
  color: #027a48;
}

.cal-status-planned {
  color: #175cd3;
  font-weight: 600;
}

.cal-chip-label {
  font-weight: 700;
}

.cal-chip-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.cal-chip-count {
  opacity: 0.8;
}

@media (max-width: 900px) {
  .installment-cal-day {
    min-height: 78px;
    padding: 6px;
  }

  .cal-chip-amount,
  .cal-chip-count {
    display: none;
  }
}

@media (max-width: 420px) {
  .admin-logo {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .admin-primary-nav a {
    padding: 10px 12px;
  }
}
