@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap");

@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato-400.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato-700.ttf") format("truetype");
  font-weight: 600;
}

:root {
  --green: #76b900;
  --green-dark: #4f7f00;
  --ink: #102033;
  --muted: #64748b;
  --line: #d8e1e8;
  --soft: #f5faed;
  --surface: #ffffff;
  --surface-muted: #f8fbfd;
  --shadow: 0 18px 45px rgba(15, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Inter, "Lato", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.admin-shell {
  margin: 0 auto;
  max-width: 1480px;
  padding: 22px;
}

.admin-header {
  align-items: stretch;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.4fr);
  margin-bottom: 18px;
  padding: 22px;
}

.admin-header img {
  height: 42px;
  object-fit: contain;
}

.admin-header p {
  color: var(--green-dark);
  font-weight: 600;
  margin: 12px 0 4px;
}

.admin-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.98;
  margin: 0;
}

.active-shop-badge {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: inline-grid;
  gap: 2px;
  margin-top: 16px;
  min-width: min(280px, 100%);
  padding: 10px 12px;
}

.active-shop-badge span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.active-shop-badge strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.admin-actions {
  align-content: start;
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-language-select {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-height: 44px;
  padding: 6px 10px;
}

.admin-language-select span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.admin-language-select select {
  min-height: 32px;
  min-width: 112px;
  border: 0;
  color: var(--ink);
  font-weight: 700;
  outline: none;
}

.admin-header a,
.admin-header button,
.toolbar button {
  background: var(--green);
  border-radius: 8px;
  color: #102000;
  font-weight: 600;
  min-height: 44px;
  padding: 11px 16px;
  text-decoration: none;
}

.admin-header button {
  box-shadow: 0 10px 24px rgba(118, 185, 0, 0.18);
}

.admin-header a {
  background: #ecf6d2;
  color: #425b00;
}

.admin-header .logout-button {
  background: #fff3f3;
  border: 1px solid #ffd0d0;
  box-shadow: none;
  color: #9f1d1d;
}

.settings-panel small {
  color: var(--muted);
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 6px;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  padding: 8px 0;
}

.admin-tabs button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: #ffffff;
  font-weight: 600;
}

.admin-tabs button.active {
  border-color: var(--green);
  color: #102000;
  background: var(--soft);
  box-shadow: inset 0 0 0 2px rgba(118, 185, 0, 0.22);
}

.status-panel {
  align-items: center;
  background: var(--soft);
  border-radius: 8px;
  color: var(--green-dark);
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
}

.status-panel.error {
  background: #fbeaea;
  color: #b42318;
}

.settings-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
  padding: 16px;
}

.settings-intro {
  grid-column: 1 / -1;
}

.settings-card {
  align-content: start;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.settings-card-title {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.settings-card-title h3 {
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.settings-card-title p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
}

.settings-card-grid {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-card-grid-wide {
  grid-template-columns: minmax(320px, 2fr) minmax(220px, 0.8fr);
}

.settings-wide-field {
  grid-column: 1 / -1;
}

.settings-debug-card {
  background: #fffaf0;
}

.kiosk-settings-panel {
  align-items: stretch;
  grid-template-columns: 1fr;
}

.kiosk-settings-intro {
  max-width: 760px;
}

.kiosk-settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: end;
}

.terminal-settings-grid {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding-top: 14px;
}

.branch-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 16px;
}

.checkin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 16px;
}

.chat-ai-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 16px;
}

.connector-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
}

.connector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.connector-actions button {
  background: var(--green);
  border-radius: 8px;
  color: #102000;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 14px;
}

.connector-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.connector-status-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.connector-card,
.connector-session-card {
  background: #f8fbf2;
  border: 1px solid #dcebbc;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.connector-card span,
.connector-session-card span,
.connector-card small {
  color: var(--muted);
  font-weight: 600;
}

.connector-card strong {
  color: var(--ink);
  font-size: 1.4rem;
}

.connector-list {
  display: grid;
  gap: 12px;
}

.connector-session-card > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.connector-session-card dl {
  display: grid;
  gap: 8px 14px;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0;
}

.connector-session-card dt {
  color: var(--muted);
  font-weight: 700;
}

.connector-session-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.connector-empty {
  color: var(--muted);
  margin: 0;
}

.connector-test-output {
  background: #102033;
  border-radius: 8px;
  color: #e7eef6;
  font: 0.88rem/1.5 Consolas, "Liberation Mono", monospace;
  margin: 0;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.chat-settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  margin-bottom: 14px;
}

.chat-settings-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.chat-insights-actions {
  margin-bottom: 14px;
}

.chat-insights-actions button {
  background: #ecf6d2;
  border-radius: 8px;
  color: #425b00;
  font-weight: 600;
  min-height: 42px;
  padding: 10px 14px;
}

.chat-insights {
  display: grid;
  gap: 14px;
}

.publication-note {
  background: #f8fbf2;
  border: 1px solid #dcebbc;
  border-radius: 8px;
  color: #425b00;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.publication-note strong {
  color: #102000;
}

.publication-note.warning {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.model-image-editor {
  display: grid;
  gap: 12px;
}

.model-image-list {
  display: grid;
  gap: 10px;
}

.model-image-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 96px minmax(0, 1fr) minmax(190px, 0.8fr);
  padding: 10px;
}

.model-image-preview {
  align-items: center;
  background: #f7f9fb;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 0.78rem;
  justify-content: center;
  min-height: 72px;
  overflow: hidden;
  text-align: center;
}

.model-image-preview img {
  height: 72px;
  object-fit: contain;
  width: 100%;
}

.model-image-info {
  display: grid;
  gap: 4px;
}

.model-image-info span {
  color: var(--muted);
  font-size: 0.85rem;
}

.chat-insight-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chat-insight-cards article,
.chat-insight-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.chat-insight-cards strong {
  display: block;
  color: var(--green-dark);
  font-size: 1.8rem;
  line-height: 1;
}

.chat-insight-cards span {
  color: var(--muted);
  font-weight: 600;
}

.chat-insight-list h3 {
  margin: 0 0 10px;
}

.chat-insight-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}

.chat-insight-list div:first-of-type {
  border-top: 0;
}

.section-title h2 {
  font-size: 1.25rem;
  margin: 0 0 6px;
}

.section-title p {
  color: var(--muted);
  margin: 0 0 14px;
}

.branch-list {
  display: grid;
  gap: 12px;
}

.checkin-step-list {
  display: grid;
  gap: 10px;
}

.checkin-step-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 130px minmax(0, 1fr) 150px;
  padding: 12px;
}

.checkin-step-row.is-fixed {
  background: #f7faf0;
}

.step-visible-toggle {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 8px;
}

.step-visible-toggle input {
  min-height: 22px;
  width: 22px;
}

.step-info {
  display: grid;
  gap: 3px;
}

.step-info small {
  color: var(--muted);
}

.step-order-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 1fr);
}

.step-order-actions button {
  background: #ecf6d2;
  border-radius: 8px;
  color: #425b00;
  font-weight: 600;
  min-height: 38px;
}

.step-order-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.branch-row {
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 130px 130px 120px minmax(0, 1fr);
  padding: 12px;
}

.branch-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.branch-fields > strong,
.branch-fields > small,
.branch-fields label:last-child {
  grid-column: 1 / -1;
}

.branch-fields small {
  color: var(--muted);
}

.branch-fields textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 92px;
  padding: 10px;
  resize: vertical;
}

.branch-row .image-field {
  grid-column: 4;
}

.settings-panel h2 {
  font-size: 1.25rem;
  margin: 0 0 6px;
}

.settings-panel p {
  color: var(--muted);
  margin: 0;
}

.settings-toggle {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 10px;
  min-height: 46px;
  min-width: 0;
}

.settings-toggle input {
  flex: 0 0 auto;
  min-height: 22px;
  width: 22px;
}

.settings-toggle span {
  line-height: 1.25;
  min-width: 0;
}

.color-field input {
  min-height: 46px;
  padding: 4px;
}

.color-control {
  align-items: center;
  display: flex;
  gap: 8px;
}

.color-control input {
  min-width: 64px;
}

.color-control button {
  background: #ecf6d2;
  border-radius: 8px;
  color: #425b00;
  font-weight: 700;
  min-height: 46px;
  padding: 10px 12px;
  white-space: nowrap;
}

.shop-logo-field {
  display: grid;
  gap: 8px;
}

.shop-logo-field > span {
  color: var(--muted);
  font-weight: 700;
}

.shop-logo-control {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 14px;
  grid-template-columns: 180px minmax(0, 1fr);
  padding: 12px;
}

.shop-logo-preview {
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #f5f8fb);
  border: 1px dashed #c8d6df;
  border-radius: 10px;
  display: flex;
  height: 96px;
  justify-content: center;
  padding: 12px;
}

.shop-logo-preview img {
  max-height: 72px;
  max-width: 150px;
  object-fit: contain;
}

.shop-logo-actions {
  display: grid;
  gap: 8px;
}

.shop-logo-actions input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 8px;
}

.shop-logo-actions button {
  background: #fff3f3;
  border: 1px solid #ffd0d0;
  border-radius: 8px;
  color: #9f1d1d;
  font-weight: 700;
  min-height: 42px;
  padding: 8px 12px;
  width: fit-content;
}

.settings-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #425b00;
  background: #f4fadf;
  font-weight: 600;
  min-width: 0;
  padding: 10px 12px;
}

.settings-note.warning {
  color: #9a3a00;
  background: #fff3df;
}

.shop-choice-panel {
  max-width: 780px;
}

.shop-choice-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.shop-choice-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  display: grid;
  gap: 4px;
  padding: 16px;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.shop-choice-card:hover {
  border-color: var(--green);
  box-shadow: 0 12px 28px rgba(118, 185, 0, 0.16);
  transform: translateY(-1px);
}

.shop-choice-card strong {
  font-size: 1.15rem;
}

.shop-choice-card span,
.shop-choice-card small {
  color: var(--muted);
}

.button-link {
  background: var(--green);
  border-radius: 8px;
  color: #102000;
  display: inline-flex;
  font-weight: 700;
  margin-top: 12px;
  min-height: 44px;
  padding: 11px 16px;
  text-decoration: none;
}

.kiosk-test-row {
  display: grid;
  grid-template-columns: minmax(220px, max-content) minmax(260px, 1fr);
  gap: 12px;
  align-items: center;
}

.kiosk-test-row button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  color: #102000;
  background: var(--green);
  font-weight: 700;
  cursor: pointer;
}

.kiosk-test-row button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.fiscal-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.price-import-panel {
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px) minmax(170px, 220px) auto;
  margin-bottom: 18px;
  padding: 16px;
}

.price-rules-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
}

.price-rule-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.price-rule-list {
  display: grid;
  gap: 10px;
}

.price-rule-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 100px 1fr 80px 1.5fr 96px;
  padding: 12px;
}

.price-rule-row small {
  color: var(--muted);
}

.category-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
}

.category-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-row {
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 48px 42px 130px 130px minmax(220px, 1fr) auto;
  gap: 12px;
  padding: 12px;
}

.category-row.dragging {
  opacity: 0.45;
}

.category-row.drag-over {
  border-color: var(--green);
  box-shadow: inset 0 3px 0 var(--green);
}

.category-row.drag-over.drop-after {
  box-shadow: inset 0 -3px 0 var(--green);
}

.category-drag-handle {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #425b00;
  background: #ecf6d2;
  cursor: grab;
  font-size: 1.2rem;
  font-weight: 800;
}

.category-drag-handle:active {
  cursor: grabbing;
}

.category-position {
  align-self: center;
  justify-self: center;
  border-radius: 999px;
  min-width: 32px;
  padding: 6px 8px;
  color: #425b00;
  background: #f4fadf;
  font-weight: 800;
  text-align: center;
}

.category-visible-toggle,
.category-discount-toggle {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 8px;
  min-height: 44px;
}

.category-visible-toggle input,
.category-discount-toggle input {
  min-height: 20px;
  width: 20px;
}

.category-remove-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #8a2d25;
  background: #fff;
  min-height: 44px;
  padding: 0 12px;
  font-weight: 700;
}

.price-import-panel button {
  background: var(--green);
  border-radius: 8px;
  color: #102000;
  font-weight: 600;
  min-height: 46px;
  padding: 12px 16px;
}

.price-matrix-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 12px;
}

.price-matrix-wrap {
  overflow-x: auto;
  width: 100%;
}

.price-matrix {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 780px;
  width: 100%;
}

.price-matrix th,
.price-matrix td {
  border-bottom: 1px solid var(--line);
  padding: 4px;
  text-align: left;
  vertical-align: middle;
}

.price-matrix thead th {
  background: #f4fadf;
  color: #425b00;
  font-size: 0.88rem;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

.price-matrix tbody th {
  min-width: 210px;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #ffffff;
}

.price-matrix tbody th strong,
.price-matrix tbody th span {
  display: block;
}

.price-matrix tbody th span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 3px;
}

.price-matrix input {
  min-height: 28px;
  min-width: 42px;
  width: 54px;
  padding: 3px 5px;
  text-align: right;
  font-size: 0.82rem;
}

.price-row-action {
  border: 1px solid var(--green);
  border-radius: 6px;
  color: #425b00;
  background: #f4fadf;
  min-height: 28px;
  padding: 3px 8px;
  font-size: 0.8rem;
  font-weight: 800;
}

.orders-panel {
  display: grid;
  gap: 14px;
}

.orders-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.orders-toolbar button {
  background: var(--green);
  border-radius: 8px;
  color: #102000;
  font-weight: 700;
  min-height: 42px;
  padding: 10px 14px;
}

.orders-list {
  display: grid;
  gap: 12px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.order-header,
.order-footer {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.order-header > div,
.order-total {
  display: grid;
  gap: 4px;
}

.order-header strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.order-total {
  text-align: right;
}

.order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-pill {
  background: #f1f5f7;
  border-radius: 999px;
  color: #415461;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 10px;
}

.order-pill.ok {
  background: #edf6d7;
  color: #425b00;
}

.order-pill.warn {
  background: #fff5d8;
  color: #725200;
}

.order-details summary {
  color: #425b00;
  cursor: pointer;
  font-weight: 800;
}

.order-people {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.order-person {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.order-person ul {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.order-person li {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.order-extra-lines {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
}

.order-extra-lines ul {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-extra-lines li {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.order-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  padding-top: 10px;
}

.login-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  max-width: 420px;
  padding: 28px;
  width: 100%;
}

.login-panel img {
  height: 44px;
  object-fit: contain;
  width: fit-content;
}

.login-panel h1 {
  margin: 0;
}

.login-panel button {
  background: var(--green);
  border-radius: 8px;
  color: #102000;
  font-weight: 600;
  min-height: 48px;
  padding: 12px;
}

.status-dot {
  background: var(--green);
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.toolbar {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto;
  margin-bottom: 18px;
  padding: 14px;
}

label {
  color: var(--muted);
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
}

input:focus,
select:focus {
  border-color: var(--green);
  outline: 3px solid #dff0b8;
}

.product-list {
  display: grid;
  gap: 12px;
}

.product-row {
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 32, 51, 0.06);
  display: grid;
  gap: 16px;
  grid-template-columns: 62px 148px minmax(220px, 0.72fr) minmax(240px, 0.8fr) minmax(320px, 1fr) minmax(210px, 0.72fr);
  grid-template-rows: repeat(5, auto);
  overflow: hidden;
  padding: 16px;
}

.product-row > .publish-toggle,
.product-row > .featured-toggle,
.product-row > .rfid-toggle,
.product-row > .no-price-toggle,
.product-row > .discount-toggle {
  grid-column: 2;
}

.product-row > .publish-toggle {
  grid-row: 1;
}

.product-row > .featured-toggle {
  grid-row: 2;
}

.product-row > .rfid-toggle {
  grid-row: 3;
}

.product-row > .no-price-toggle {
  grid-row: 4;
}

.product-row > .discount-toggle {
  grid-row: 5;
}

.product-row > .preview {
  grid-column: 3;
  grid-row: 1 / span 4;
}

.product-row > .product-info {
  grid-column: 4;
  grid-row: 1 / span 4;
}

.product-row > .commercial-fields {
  grid-column: 5;
  grid-row: 1 / span 5;
}

.deposit-fields {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 0.6fr);
  margin: 0;
  padding: 10px;
}

.deposit-fields legend {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0 6px;
}

.product-row > .price-map-fields {
  grid-column: 6;
  grid-row: 1 / span 2;
}

.product-row > .image-field {
  grid-column: 6;
  grid-row: 3;
}

.product-row > .product-details {
  grid-column: 1 / -1;
}

.product-row.dragging {
  opacity: 0.45;
}

.product-row.drag-over {
  border-color: var(--green);
  box-shadow: inset 0 3px 0 var(--green);
}

.product-row.drag-over.drop-after {
  box-shadow: inset 0 -3px 0 var(--green);
}

.product-drag-handle {
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #425b00;
  background: #ecf6d2;
  cursor: grab;
  font-size: 0.86rem;
  font-weight: 800;
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 86px;
  padding: 8px;
  writing-mode: vertical-rl;
}

.product-drag-handle:active {
  cursor: grabbing;
}

.product-position {
  align-self: center;
  justify-self: center;
  border-radius: 999px;
  min-width: 32px;
  padding: 6px 8px;
  color: #425b00;
  background: #f4fadf;
  font-weight: 800;
  grid-column: 1;
  grid-row: 3;
  text-align: center;
}

.product-row.is-published {
  border-color: var(--green);
  box-shadow: inset 0 0 0 2px rgba(118, 185, 0, 0.25);
}

.product-row.is-featured {
  background: linear-gradient(90deg, #fbfff2 0%, #ffffff 34%);
}

.product-row.is-missing-price {
  border-color: #f59e0b;
}

.publish-toggle,
.featured-toggle,
.rfid-toggle,
.no-price-toggle,
.discount-toggle,
.branch-publish-toggle,
.default-branch {
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid #e5edf2;
  border-radius: 10px;
  color: var(--ink);
  display: flex;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px;
}

.publish-toggle span,
.featured-toggle span,
.rfid-toggle span,
.no-price-toggle span,
.discount-toggle span {
  line-height: 1.1;
}

.publish-toggle input,
.featured-toggle input,
.rfid-toggle input,
.no-price-toggle input,
.discount-toggle input,
.branch-publish-toggle input,
.default-branch input {
  min-height: 22px;
  width: 22px;
}

.preview {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f7fafb 0%, #eef3f6 100%);
  border: 1px solid #e5edf2;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  max-height: clamp(90px, 16vw, 180px);
}

.preview img {
  height: 100%;
  object-fit: contain;
  padding: clamp(4px, 1vw, 10px);
  width: 100%;
}

.preview.placeholder {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.85rem;
  justify-content: center;
  padding: 10px;
  text-align: center;
}

.product-info h2 {
  font-size: 1.25rem;
  margin: 0 0 6px;
}

.product-info p,
.product-info small {
  color: var(--muted);
  display: block;
  margin: 0;
}

.grouping-badge {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: #425b00;
  background: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
  margin: 8px 0;
  padding: 4px 8px;
}

.variant-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.variant-list strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.variant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.variant-chips span {
  border: 1px solid #cbd8dd;
  border-radius: 999px;
  color: #3e4c56;
  background: #f7fafb;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 8px;
}

.commercial-fields {
  background: #ffffff;
  border: 1px solid #e5edf2;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.commercial-fields label,
.price-map-fields label,
.image-field {
  font-size: 0.9rem;
}

.price-map-fields {
  background: var(--surface-muted);
  border: 1px solid #e5edf2;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.image-field {
  background: var(--surface-muted);
  border: 1px dashed #cbd8dd;
  border-radius: 12px;
  padding: 12px;
}

.description-field {
  grid-column: 1 / -1;
}

.image-field input {
  border: 0;
  min-height: auto;
  padding: 0;
}

.product-details {
  grid-column: 1 / -1;
}

.product-details summary {
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
}

.price-editor,
.addon-editor {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.price-editor h3,
.addon-title h3 {
  font-size: 1rem;
  margin: 0;
}

.price-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.extra-price-field {
  max-width: 260px;
}

.addon-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.hint {
  color: var(--muted);
  margin: 0;
}

.addon-list {
  display: grid;
  gap: 10px;
}

.addon-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  padding: 10px;
}

.kiosk-stations-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding: 16px;
}

.kiosk-stations-panel h3 {
  margin: 0 0 4px;
}

.kiosk-station-create,
.kiosk-station-card {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

.kiosk-station-list {
  display: grid;
  gap: 10px;
}

.kiosk-station-card {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-template-columns: minmax(160px, 1fr) auto minmax(260px, 2fr) auto auto auto;
  padding: 12px;
}

.kiosk-station-card strong,
.kiosk-station-card small {
  display: block;
}

.kiosk-station-card small {
  color: var(--muted);
  margin-top: 4px;
}

.settings-toggle.compact {
  padding: 0;
}

.danger-button {
  background: #fde8e8;
  color: #b42318;
}

@media (max-width: 900px) {
  .toolbar,
  .settings-panel,
  .settings-card-grid,
  .settings-card-grid-wide,
  .shop-logo-control,
  .kiosk-settings-grid,
  .connector-status-grid,
  .connector-session-card dl,
  .fiscal-settings-grid,
  .kiosk-test-row,
  .category-actions,
  .category-row,
  .price-import-panel,
  .price-rule-form,
  .price-rule-row,
  .checkin-step-row,
  .branch-row,
  .product-row {
    grid-template-columns: 1fr;
  }

  .kiosk-station-create,
  .kiosk-station-card {
    grid-template-columns: 1fr;
  }

  .settings-wide-field {
    grid-column: 1;
  }

  .admin-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-actions {
    justify-content: start;
  }

  .admin-tabs {
    grid-template-columns: 1fr;
  }

  .preview {
    max-width: min(260px, 100%);
    max-height: none;
  }

  .product-row > *,
  .product-row > .publish-toggle,
  .product-row > .featured-toggle,
  .product-row > .rfid-toggle,
  .product-row > .no-price-toggle,
  .product-row > .discount-toggle,
  .product-row > .preview,
  .product-row > .product-info,
  .product-row > .commercial-fields,
  .product-row > .price-map-fields,
  .product-row > .image-field,
  .product-row > .product-details {
    grid-column: 1;
    grid-row: auto;
  }

  .product-drag-handle {
    min-height: 44px;
    writing-mode: horizontal-tb;
  }

  .addon-row {
    grid-template-columns: 1fr;
  }
}
