/* ---------- COMPONENTS STYLES ---------- */

/* ===== 1. PRICE BOARD ===== */
.board-frame {
  --amber: #F2A93B;
  --amber-deep: #C9821F;
  --white: #F7F9FA;
  --fog: #D0DCE5;
  --fog-light: #F1F5F8;
  --panel: #123A5A;
  --panel-line: rgba(255, 255, 255, 0.20);
  background: var(--board-bg);
  border-radius: 12px;
  padding: 20px 18px 18px;
  border: 1px solid #9FB8C7;
  box-shadow: 0 8px 20px rgba(22, 63, 95, 0.20);
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
}

.board-frame::after {
  display: none;
}

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

.board-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(10.5px + var(--text-size-delta));
  color: #A8CDBA;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  flex: 1;
}

.board-settings-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(10.5px + var(--text-size-delta));
  color: var(--amber);
  background: rgba(242, 169, 59, 0.12);
  border: 1px solid var(--amber-deep);
  border-radius: 14px;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.board-settings-btn:hover {
  background: var(--amber);
  color: #1a1005;
}

.board-species {
  font-family: 'Pretendard', sans-serif;
  font-size: calc(16px + var(--text-size-delta));
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.board-digits {
  font-family: 'Big Shoulders Display', 'Pretendard', sans-serif;
  font-weight: 800;
  font-size: calc(56px + var(--text-size-delta));
  line-height: 1;
  color: #ffb84d;
  text-shadow: 0 0 16px rgba(255, 184, 77, 0.6);
  letter-spacing: 1.5px;
}

.board-unit {
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(14px + var(--text-size-delta));
  color: #D4E2DA;
  margin-left: 8px;
  font-weight: 500;
}

.board-range {
  margin-top: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(12px + var(--text-size-delta));
  color: #BFE0CE;
  border-top: 1px dashed #1e4539;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.board-meta {
  margin-top: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(10.5px + var(--text-size-delta));
  color: #A9C5B6;
}

/* Input Fields */
.price-workflow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: -2px 0 18px;
  color: var(--fog);
  font-size: calc(10px + var(--text-size-delta));
  flex-wrap: wrap;
}

.region-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.region-selector button {
  min-width: 0;
  padding: 10px 5px;
  border: 1px solid var(--panel-line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--fog);
  font: inherit;
  font-size: calc(11.5px + var(--text-size-delta));
  font-weight: 600;
  cursor: pointer;
}

.region-selector button.on {
  border-color: var(--amber-surface);
  background: var(--amber-surface);
  color: #102F47;
}

.region-source-note {
  margin: 7px 0 0;
  color: var(--fog);
  font-size: calc(10.5px + var(--text-size-delta));
}

.verification-toggle {
  margin-bottom: 16px;
}

.verification-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.verification-panel {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  background: var(--ink-2);
}

.verification-panel[hidden] {
  display: none;
}

.verification-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.verification-heading b {
  color: var(--amber);
  font-size: calc(14px + var(--text-size-delta));
}

.verification-heading span {
  color: var(--fog);
  font-size: calc(10.5px + var(--text-size-delta));
}

.price-workflow span {
  padding: 5px 7px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  white-space: nowrap;
}

.price-workflow i {
  color: var(--amber-deep);
  font-style: normal;
}

.input-group {
  margin-bottom: 16px;
}

.price-evaluate-btn {
  margin: 2px 0 16px;
}

.price-evaluate-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.45;
}

.input-label {
  font-size: calc(12px + var(--text-size-delta));
  color: var(--fog);
  margin-bottom: 6px;
  font-weight: 600;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-row input[type=number],
.input-row input[type=text] {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  color: var(--white);
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(16px + var(--text-size-delta));
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
}

.input-row input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}

.input-suffix {
  font-size: calc(13px + var(--text-size-delta));
  color: var(--fog);
  font-family: 'IBM Plex Mono', monospace;
  white-space: nowrap;
}

/* Status Badges */
.buoy-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}

.buoy-dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Pretendard', sans-serif;
  font-weight: 800;
  font-size: calc(18px + var(--text-size-delta));
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.3), 0 3px 8px rgba(0, 0, 0, 0.3);
}

.buoy-text b {
  display: block;
  font-size: calc(15px + var(--text-size-delta));
  margin-bottom: 2px;
}

.buoy-text span {
  font-size: calc(12.5px + var(--text-size-delta));
  color: var(--fog-light);
  line-height: 1.5;
}

.state-normal {
  background: rgba(63, 167, 150, 0.16);
  border: 1px solid var(--teal);
}
.state-normal .buoy-dot { background: var(--teal); color: #04241f; }
.state-normal b { color: var(--teal-light); }

.state-caution {
  background: rgba(242, 169, 59, 0.16);
  border: 1px solid var(--amber);
}
.state-caution .buoy-dot { background: var(--amber); color: #281902; }
.state-caution b { color: var(--amber-light); }

.state-danger {
  background: rgba(221, 75, 48, 0.16);
  border: 1px solid var(--red);
}
.state-danger .buoy-dot { background: var(--red); color: #2b0b04; }
.state-danger b { color: var(--red-light); }

.field-checklist {
  display: grid;
  gap: 9px;
  margin: -6px 0 16px;
  padding: 14px;
  border: 1px dashed var(--amber-deep);
  border-radius: 10px;
  background: rgba(242, 169, 59, 0.07);
}

.field-checklist > b {
  color: var(--amber);
  font-size: calc(13px + var(--text-size-delta));
  margin-bottom: 2px;
}

.field-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--fog-light);
  font-size: calc(12px + var(--text-size-delta));
  line-height: 1.45;
}

.field-checklist input {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--amber);
  flex-shrink: 0;
}

/* History Log List */
.history-list {
  background: var(--ink-2);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  padding: 12px;
  margin-top: 14px;
}

.history-title {
  font-size: calc(12px + var(--text-size-delta));
  color: var(--fog);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: calc(12.5px + var(--text-size-delta));
}

.history-item:last-child {
  border-bottom: none;
}

/* ===== 2. CROSS CHECK STAMP ===== */
.cross-select {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.combo {
  position: relative;
}

.combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #0d263d;
  border: 1px solid var(--amber-deep);
  border-radius: 10px;
  max-height: 230px;
  overflow-y: auto;
  z-index: 25;
  display: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.combo-list.open {
  display: block;
}

.combo-item {
  padding: 11px 14px;
  font-size: calc(13.5px + var(--text-size-delta));
  color: var(--white);
  cursor: pointer;
  border-bottom: 1px solid var(--panel-line);
  transition: background 0.15s;
}

.combo-item:last-child {
  border-bottom: none;
}

.combo-item:hover, .combo-item:active {
  background: rgba(242, 169, 59, 0.2);
  color: var(--amber);
}

.combo-empty {
  padding: 14px;
  font-size: calc(13px + var(--text-size-delta));
  color: var(--fog);
  text-align: center;
}

.species-picker-group {
  margin-bottom: 16px;
}

.species-picker-group .search-bar {
  position: relative;
  padding-right: 38px;
}

.combo-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-size: calc(15px + var(--text-size-delta));
  pointer-events: none;
}

.species-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.species-option small {
  color: var(--fog);
  font-size: calc(10.5px + var(--text-size-delta));
}

.condition-prices {
  width: 100%;
  display: grid;
  gap: 7px;
  margin: 10px 0 12px;
}

.condition-prices > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  color: var(--fog);
  font-size: calc(12px + var(--text-size-delta));
}

.condition-prices > div.active {
  border-color: var(--amber-surface);
  background: var(--amber-surface);
  color: #102F47;
}

.condition-prices > div.unavailable {
  opacity: 0.46;
}

.condition-prices b {
  color: var(--white);
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(12px + var(--text-size-delta));
}

.condition-prices > div.active b {
  color: #102F47;
}

.condition-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.condition-toggle button {
  border: 1px solid var(--panel-line);
  border-radius: 9px;
  padding: 11px;
  background: var(--panel);
  color: var(--fog);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.condition-toggle button.on {
  border-color: var(--amber-surface);
  background: var(--amber-surface);
  color: #102F47;
}

.condition-toggle button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  border-style: dashed;
}

.species-condition-note {
  margin: -2px 0 8px;
  color: var(--amber);
  font-size: calc(11px + var(--text-size-delta));
  font-weight: 600;
}

.condition-guide {
  margin: 8px 0 0;
  color: var(--fog);
  font-size: calc(10.5px + var(--text-size-delta));
}

.sample-data-badge {
  flex-shrink: 0;
  padding: 4px 7px;
  border: 1px solid var(--amber-deep);
  border-radius: 999px;
  color: var(--amber);
  font-size: calc(9.5px + var(--text-size-delta));
  font-weight: 700;
}

.numeric-only-input {
  appearance: textfield;
  -moz-appearance: textfield;
}

.numeric-only-input::-webkit-inner-spin-button,
.numeric-only-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.stamp-frame {
  background: var(--paper);
  border-radius: 10px;
  padding: 28px 20px 24px;
  position: relative;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.stamp-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.025) 0px, rgba(0, 0, 0, 0.025) 2px, transparent 2px, transparent 10px);
}

.stamp-empty {
  color: #73654a;
  font-size: calc(13.5px + var(--text-size-delta));
  font-family: 'Pretendard', sans-serif;
  text-align: center;
  z-index: 1;
  line-height: 1.6;
}

.stamp-mark {
  font-family: 'Pretendard', sans-serif;
  font-weight: 800;
  font-size: calc(36px + var(--text-size-delta));
  letter-spacing: 3px;
  padding: 10px 28px;
  border: 5px double;
  border-radius: 8px;
  transform: rotate(-7deg);
  z-index: 1;
  opacity: 0;
}

.mark-ok { color: var(--teal-deep); border-color: var(--teal-deep); }
.mark-caution { color: var(--amber-deep); border-color: var(--amber-deep); }
.mark-no { color: var(--red-deep); border-color: var(--red-deep); }
.mark-unknown { color: #575042; border-color: #575042; }

.stamp-reason {
  margin-top: 14px;
  font-size: calc(13px + var(--text-size-delta));
  color: #4a4130;
  text-align: center;
  line-height: 1.6;
  z-index: 1;
  max-width: 320px;
  font-weight: 500;
}

.depth-data-note {
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(74, 65, 48, 0.08);
  color: #73654a;
  font-size: calc(10.5px + var(--text-size-delta));
  line-height: 1.45;
  text-align: center;
  z-index: 1;
}

/* Matrix Table Toggle */
.matrix-container {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  padding: 14px;
  overflow-x: auto;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: calc(11px + var(--text-size-delta));
  text-align: center;
}

.matrix-table th, .matrix-table td {
  padding: 6px 4px;
  border: 1px solid var(--panel-line);
}

.matrix-table th {
  background: var(--ink-2);
  color: var(--amber);
  font-weight: 600;
}

.badge-tag-ok { color: var(--teal-light); background: rgba(63, 167, 150, 0.2); padding: 2px 4px; border-radius: 4px; }
.badge-tag-caution { color: var(--amber-light); background: rgba(242, 169, 59, 0.2); padding: 2px 4px; border-radius: 4px; }
.badge-tag-no { color: var(--red-light); background: rgba(221, 75, 48, 0.2); padding: 2px 4px; border-radius: 4px; }

/* ===== 3. Q&A CASEBOOK ===== */
.search-bar {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 11px 14px;
  margin-bottom: 14px;
  gap: 10px;
}

.search-bar svg {
  color: var(--fog);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: 'Pretendard', sans-serif;
  font-size: calc(14px + var(--text-size-delta));
}

.qa-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.qa-card:hover {
  border-color: var(--panel-line-glow);
}

.qa-q {
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.qa-q b {
  font-size: calc(14px + var(--text-size-delta));
  font-weight: 600;
  line-height: 1.5;
  color: var(--white);
  flex: 1;
}

.qa-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bookmark-btn {
  background: none;
  border: none;
  color: var(--fog);
  cursor: pointer;
  padding: 2px;
  transition: color 0.2s;
}

.bookmark-btn.active {
  color: var(--amber);
}

.arrow-icon {
  color: var(--amber);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.qa-card.open .arrow-icon {
  transform: rotate(90deg);
}

.qa-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 1px solid transparent;
}

.qa-card.open .qa-a {
  max-height: 280px;
  border-top: 1px solid var(--panel-line);
}

.qa-a-inner {
  padding: 14px 16px 16px;
  font-size: calc(13px + var(--text-size-delta));
  color: var(--fog-light);
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 14px;
}

.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(10.5px + var(--text-size-delta));
  color: var(--teal-light);
  background: rgba(63, 167, 150, 0.15);
  border: 1px solid var(--teal-deep);
  padding: 3px 8px;
  border-radius: 12px;
}

/* ===== 4. SENIOR MENTOR & NOTES ===== */
.mentor-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.mentor-card h4 {
  margin: 0 0 12px;
  font-family: 'Pretendard', sans-serif;
  font-size: calc(17px + var(--text-size-delta));
  color: var(--amber);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.conv-select {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.conv-select select, .conv-select input {
  background: var(--ink-2);
  border: 1px solid var(--panel-line);
  color: var(--white);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'Pretendard', sans-serif;
  font-size: calc(13.5px + var(--text-size-delta));
  outline: none;
}

.conv-select select { flex: 1.4; }
.conv-select input { flex: 1; }

.conv-result {
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(22px + var(--text-size-delta));
  color: var(--amber);
  font-weight: 700;
  border-top: 1px dashed var(--panel-line);
  margin-top: 12px;
  padding-top: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.conv-result span {
  font-size: calc(12px + var(--text-size-delta));
  color: var(--fog);
  font-family: 'Pretendard', sans-serif;
  font-weight: 400;
}

.top10-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: top10;
}

.top10-list li {
  counter-increment: top10;
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel-line);
  font-size: calc(13px + var(--text-size-delta));
  color: var(--fog-light);
  line-height: 1.6;
}

.top10-list li:last-child {
  border-bottom: none;
}

.top10-list li::before {
  content: counter(top10);
  font-family: 'Pretendard', sans-serif;
  font-weight: 800;
  font-size: calc(18px + var(--text-size-delta));
  color: var(--amber);
  width: 22px;
  flex-shrink: 0;
}

.pull-quote-box {
  background: var(--ink-2);
  border-left: 4px solid var(--amber);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  font-size: calc(13.5px + var(--text-size-delta));
  color: var(--white);
  line-height: 1.7;
  position: relative;
}

.copy-btn {
  margin-top: 10px;
  background: rgba(242, 169, 59, 0.15);
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: calc(12px + var(--text-size-delta));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Field Memo Note */
.memo-textarea {
  width: 100%;
  height: 90px;
  background: var(--ink-2);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  color: var(--white);
  padding: 10px 12px;
  font-family: 'Pretendard', sans-serif;
  font-size: calc(13px + var(--text-size-delta));
  resize: vertical;
  outline: none;
}

.memo-textarea:focus {
  border-color: var(--amber);
}

.memo-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* ===== 5. PWA INSTALL & NAV ===== */
.install-card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}

.install-card h4 {
  margin: 0 0 14px;
  font-size: calc(15px + var(--text-size-delta));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.os-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(10px + var(--text-size-delta));
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--ink-2);
  color: var(--teal-light);
  border: 1px solid var(--teal-deep);
}

.step {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--amber);
  color: #2a1a02;
  font-family: 'Pretendard', sans-serif;
  font-weight: 800;
  font-size: calc(13px + var(--text-size-delta));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.step p {
  margin: 0;
  font-size: calc(13px + var(--text-size-delta));
  color: var(--fog-light);
  line-height: 1.6;
}

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  background: #FFFFFF;
  border: 1px solid var(--amber);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: calc(13px + var(--text-size-delta));
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 24px rgba(21, 52, 73, 0.20);
  max-width: 90%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Bottom Navigation */
nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--panel-line);
  display: flex;
  z-index: 40;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}

html[data-theme="dark"] nav {
  background: rgba(10, 26, 42, 0.96);
}

.navbtn {
  flex: 1;
  background: none;
  border: none;
  color: #B3C5D4;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  font-family: 'Pretendard', sans-serif;
  font-size: calc(10.5px + var(--text-size-delta));
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.navbtn svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}

.navbtn.active {
  color: var(--amber);
  font-weight: 700;
}

.navbtn.active svg {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 6px rgba(242, 169, 59, 0.6));
}

.navbtn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 20px;
  height: 3px;
  background: var(--amber);
  border-radius: 3px;
  box-shadow: 0 0 8px var(--amber);
}

/* ===== 6. STAFF LOGIN VIEW STYLES ===== */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 20px 0;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-line-glow);
  border-radius: 16px;
  padding: 26px 22px;
  box-shadow: var(--shadow-lg);
  animation: panelFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] .login-card {
  background: rgba(18, 58, 90, 0.90);
}

.login-header {
  text-align: center;
  margin-bottom: 22px;
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--amber-surface);
  color: #1a1003;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 6px 16px rgba(117, 64, 8, 0.18);
}

.login-header h2 {
  font-family: 'Pretendard', sans-serif;
  font-size: calc(24px + var(--text-size-delta));
  color: var(--white);
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}

.login-sub {
  font-size: calc(12px + var(--text-size-delta));
  color: var(--fog);
  margin: 0 0 10px;
}

.security-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: calc(10px + var(--text-size-delta));
  color: var(--teal-light);
  background: rgba(63, 167, 150, 0.18);
  border: 1px solid var(--teal-deep);
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  letter-spacing: 0.8px;
}

/* Unified Form Input Styling */
.form-input {
  width: 100%;
  background: var(--ink-2) !important;
  border: 1px solid var(--panel-line) !important;
  color: var(--white) !important;
  font-family: 'Pretendard', sans-serif !important;
  font-size: calc(15px + var(--text-size-delta)) !important;
  padding: 14px 16px !important;
  border-radius: 12px !important;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--amber) !important;
  box-shadow: 0 0 0 3px var(--amber-glow) !important;
}

.pw-input-row {
  position: relative;
  width: 100%;
}

.pw-input-row input {
  padding-right: 50px !important;
}

.pw-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--fog);
  cursor: pointer;
  font-size: calc(16px + var(--text-size-delta));
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s;
  z-index: 5;
}

.pw-toggle-btn:hover {
  color: var(--white);
}

/* User Profile Header Chip */
.user-profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: calc(11.5px + var(--text-size-delta));
  background: var(--ink-2);
  border: 1px solid var(--panel-line);
  padding: 4px 10px;
  border-radius: 16px;
  color: var(--amber-light);
}

.logout-btn {
  background: none;
  border: none;
  color: var(--fog);
  font-size: calc(10.5px + var(--text-size-delta));
  cursor: pointer;
  padding: 2px 4px;
  border-left: 1px solid var(--panel-line);
  margin-left: 4px;
  transition: color 0.2s;
}

.logout-btn:hover {
  color: var(--red-light);
}

/* Light field theme: dark text on bright surfaces, with the price board retained as a focal dark panel. */
.status-chip,
.security-badge,
.os-badge {
  color: var(--teal-deep);
  background: rgba(63, 167, 150, 0.12);
}

.state-normal b,
.tag,
.badge-tag-ok {
  color: var(--teal-deep);
}

.state-caution b,
.badge-tag-caution {
  color: var(--amber-deep);
}

.state-danger b,
.badge-tag-no {
  color: var(--red-deep);
}

.combo-list {
  background: #FFFFFF;
}

.navbtn {
  color: #587083;
}

.user-profile-chip {
  color: #6F4A0E;
}

.search-bar svg,
.bookmark-btn {
  color: #587083;
}

html[data-theme="dark"] .status-chip,
html[data-theme="dark"] .security-badge,
html[data-theme="dark"] .os-badge {
  color: var(--teal-light);
}

html[data-theme="dark"] .state-normal b,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .badge-tag-ok {
  color: var(--teal-light);
}

html[data-theme="dark"] .state-caution b,
html[data-theme="dark"] .badge-tag-caution {
  color: var(--amber-light);
}

html[data-theme="dark"] .state-danger b,
html[data-theme="dark"] .badge-tag-no {
  color: var(--red-light);
}

html[data-theme="dark"] .combo-list {
  background: #0D263D;
}

html[data-theme="dark"] .navbtn {
  color: #B3C5D4;
}

html[data-theme="dark"] .user-profile-chip {
  color: var(--amber-light);
}

html[data-theme="dark"] .search-bar svg,
html[data-theme="dark"] .bookmark-btn {
  color: var(--fog);
}

html[data-theme="dark"] .toast {
  background: #0A2033;
  color: #F7F9FA;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
}

/* Mobile readability: preserve control sizes while improving text contrast. */
@media (max-width: 520px) {
  input,
  select,
  textarea {
    font-size: max(16px, calc(16px + var(--text-size-delta))) !important;
  }

  .display-control-label,
  .sub-tag,
  .status-chip,
  .security-badge,
  .price-workflow,
  .sample-data-badge {
    font-size: max(12px, calc(11px + var(--text-size-delta)));
  }

  .sub-row {
    font-size: calc(12.5px + var(--text-size-delta));
  }

  .section-desc {
    font-size: calc(14px + var(--text-size-delta));
    line-height: 1.65;
  }

  .board-label,
  .board-meta,
  .region-source-note,
  .verification-heading span,
  .species-option small,
  .condition-guide,
  .depth-data-note {
    font-size: calc(12px + var(--text-size-delta));
    line-height: 1.55;
  }

  .input-label,
  .condition-prices > div,
  .field-checklist label,
  .conv-result span,
  .login-sub {
    font-size: calc(13px + var(--text-size-delta));
  }

  .qa-a-inner,
  .top10-list li,
  .step p,
  .stamp-reason {
    font-size: calc(14px + var(--text-size-delta));
  }

  .navbtn {
    font-size: calc(11.5px + var(--text-size-delta));
    font-weight: 600;
  }
}
