*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #e5e7eb;
  background: #0f172a;
  display: flex;
  flex-direction: column;
}

a {
  color: #38bdf8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.95);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-inner-wide {
  max-width: 960px;
}

.logo {
  font-weight: 700;
  color: #f8fafc;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo-beta {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.nav a {
  color: #cbd5e1;
}

.inline-form {
  display: inline;
  margin: 0;
}

.link-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.link-btn:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.main {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.main-wide {
  max-width: 960px;
}

.footer {
  padding: 16px 20px;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 24px;
}

.card-narrow {
  max-width: 440px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 600;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #94a3b8;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  font-size: 14px;
}

.field input:disabled {
  opacity: 0.6;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  color: #0f172a;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.2);
  color: #e5e7eb;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.muted {
  color: #94a3b8;
  font-size: 13px;
}

.hint {
  color: #64748b;
  font-size: 12px;
  margin: -8px 0 12px;
}

.radio-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}

.radio-label input {
  margin-top: 3px;
}

.error,
.error-block {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.success {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
}

.divider {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin: 24px 0;
}

.progress-wrap {
  margin: 12px 0;
  display: none;
}

.progress-wrap.visible {
  display: block;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #14b8a6);
  border-radius: 999px;
  transition: width 0.2s ease;
  width: 0%;
}

.progress-text {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

.field-checkbox {
  margin: 8px 0 20px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #cbd5e1;
  cursor: pointer;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

.legal {
  max-width: 720px;
  margin: 0 auto;
}

.legal h1 {
  font-size: 22px;
}

.legal h2 {
  margin: 28px 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: #f1f5f9;
}

.legal p,
.legal li {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.55;
}

.legal ul {
  margin: 8px 0 12px;
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.stat {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.1;
}

.stat-label {
  margin-top: 4px;
  font-size: 12px;
  color: #94a3b8;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.search-row input[type="search"],
.search-row input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
}

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

.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  vertical-align: middle;
}

.data-table th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 12px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.badge-ok {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
}

.badge-admin {
  background: rgba(56, 189, 248, 0.18);
  color: #bae6fd;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 16px;
  margin: 8px 0 24px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.45);
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.meta-label {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 2px;
}

.meta-value {
  font-size: 13px;
  color: #e5e7eb;
  word-break: break-all;
}

code.meta-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.print-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.print-head h1 {
  margin-bottom: 6px;
}

.print-lead {
  margin: 0;
  max-width: 36em;
}

.mode-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 12px;
  line-height: 1.3;
}

.mode-status-label {
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  font-weight: 600;
}

.mode-status-value {
  color: #e2e8f0;
  font-weight: 600;
}

.mode-status-link {
  color: #38bdf8;
  font-size: 12px;
}

.field-supply {
  margin-bottom: 18px;
}

.print-actions {
  margin-top: 16px;
}

.print-result {
  margin-top: 14px;
}

.print-hint {
  margin: 12px 0 0;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 15px;
}

.label-card {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(30, 41, 59, 0.4);
}

.label-head {
  margin-bottom: 16px;
}

.label-head .section-title {
  margin-bottom: 4px;
}

.label-head .muted {
  margin: 0;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

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

.mode-option {
  position: relative;
  display: block;
  margin: 0;
  padding: 14px 14px 14px 38px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mode-option:hover:not(.is-disabled) {
  border-color: rgba(56, 189, 248, 0.45);
}

.mode-option.is-active {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.08);
}

.mode-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mode-option input {
  position: absolute;
  left: 14px;
  top: 16px;
  width: auto;
  margin: 0;
}

.mode-option-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mode-option-title {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
}

.mode-option-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}

.mode-option-desc code {
  font-size: 11px;
  color: #cbd5e1;
}

.excel-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.excel-panel-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  flex: 1;
}

.excel-panel-text strong {
  font-size: 13px;
  color: #e2e8f0;
}

.excel-template-link {
  font-size: 13px;
  margin-top: 4px;
  width: fit-content;
}

.excel-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.file-pick {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 13px;
}

.file-pick input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.file-pick-btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.8);
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 500;
}

.file-pick:hover .file-pick-btn {
  border-color: rgba(56, 189, 248, 0.5);
}

.file-pick-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #94a3b8;
  font-size: 12px;
}

.overwrite-check {
  width: 100%;
  margin: 4px 0 0;
}

.overwrite-banner {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
}

.overwrite-banner h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #fecaca;
}

.overwrite-banner p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #e2e8f0;
}

.label-table-block {
  margin: 8px 0 18px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.35);
}

.label-table-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.label-table-head strong {
  font-size: 13px;
  color: #e2e8f0;
}

.label-add-row {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1.2fr auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

@media (max-width: 800px) {
  .label-add-row {
    grid-template-columns: 1fr;
  }
}

.label-add-row .field {
  margin: 0;
}

.label-table-wrap {
  max-height: 360px;
  overflow: auto;
}

.label-data-table td input[type="text"] {
  width: 100%;
  min-width: 100px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  font-size: 13px;
}

.label-row-actions {
  white-space: nowrap;
  display: flex;
  gap: 10px;
  align-items: center;
}

.label-inline-form {
  display: contents;
}

.link-danger {
  color: #fca5a5;
}

.link-danger:hover {
  color: #fecaca;
}

.label-empty {
  margin: 0;
  font-size: 13px;
}

.excel-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  min-width: 240px;
}

.lt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 10px;
}

.lt-hint {
  font-size: 12px;
}

.lt-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 180px;
  max-width: 300px;
  flex: 1 1 180px;
}

.lt-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.92);
  color: #e5e7eb;
  font-size: 12px;
}

.lt-search input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.lt-search-clear {
  flex: 0 0 auto;
  padding: 4px 8px;
  font-size: 11px;
  display: none;
}

.lt-search-clear.is-visible {
  display: inline-flex;
}

.lt-wrap {
  overflow: auto;
  max-height: 420px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
}

.lt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.lt-table th,
.lt-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.7);
  vertical-align: middle;
}

.lt-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(15, 23, 42, 0.96);
  color: #9ca3af;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  text-align: left;
  white-space: nowrap;
}

.lt-table th:hover {
  color: #e5e7eb;
}

.lt-table th.lt-th-actions {
  cursor: default;
  width: 1%;
}

.lt-table th.is-sorted {
  color: #e2e8f0;
}

.lt-table th.is-filtered {
  color: #7dd3fc;
}

.lt-sort {
  color: #38bdf8;
  margin-left: 4px;
  font-size: 10px;
}

.lt-filter-dot {
  display: none;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: #38bdf8;
  vertical-align: middle;
}

.lt-table th.is-filtered .lt-filter-dot {
  display: inline-block;
}

.lt-table tr:hover td {
  background: rgba(30, 64, 175, 0.18);
}

.lt-table tr.is-editing td {
  background: rgba(34, 197, 94, 0.08);
}

.lt-nmid code {
  font-size: 12px;
  color: #e2e8f0;
}

.lt-cell-text {
  color: #cbd5e1;
  word-break: break-word;
}

.lt-input {
  width: 100%;
  min-width: 110px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 13px;
}

.lt-actions {
  white-space: nowrap;
  display: flex;
  gap: 10px;
  align-items: center;
}

.lt-header-menu {
  position: fixed;
  z-index: 50;
  width: 280px;
}

.lt-header-menu-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.48);
}

.lt-header-menu-title {
  font-size: 12px;
  font-weight: 700;
  color: #e5e7eb;
  margin-bottom: 10px;
}

.lt-header-menu-section + .lt-header-menu-section {
  margin-top: 12px;
}

.lt-header-menu-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.lt-header-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lt-header-act {
  padding: 4px 10px;
  font-size: 11px;
}

.lt-header-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.lt-header-menu-full {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}

.lt-header-menu-grid label,
.lt-header-menu-full {
  font-size: 11px;
  color: #9ca3af;
}

.lt-header-menu-grid input,
.lt-header-menu-full input {
  margin-top: 4px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  font-size: 12px;
}

.lt-loading {
  padding: 10px 12px;
  font-size: 12px;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}


.guide-link-wrap {
  margin: 8px 0 0;
}

.guide-link {
  font-size: 13px;
  font-weight: 600;
}

.guide-page h1 {
  margin-bottom: 10px;
}

.guide-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #38bdf8;
}

.guide-intro {
  margin: 0 0 24px;
  max-width: 42em;
}

.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.guide-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
}

.guide-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
  background: linear-gradient(135deg, #22c55e, #14b8a6);
}

.guide-step-content h2 {
  margin: 4px 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: #f8fafc;
}

.guide-step-content p {
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
}

.guide-shot {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
}

.guide-shot img,
.admin-guide-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.guide-shot-placeholder {
  padding: 28px 16px;
  text-align: center;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.35);
  font-size: 13px;
}

.guide-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.admin-guide-step {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.admin-guide-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 800px) {
  .admin-guide-grid {
    grid-template-columns: 1fr;
  }
}

.admin-guide-preview {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.4);
  min-height: 120px;
}



