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

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: #f0f4f0;
  color: #1a2e1a;
}

/* ── Layout ──────────────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Order panel (prawa kolumna) ──────────────────────────────────────────── */
#order-panel {
  width: 260px;
  min-width: 220px;
  background: #fff;
  border-left: 1px solid #d4e4d4;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#order-panel h2 {
  font-size: 16px;
  color: #2d5a27;
  margin-bottom: 4px;
}

.order-count-label {
  font-size: 13px;
  color: #555;
  margin: 4px 0;
}

.order-hint {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-top: 24px;
  line-height: 1.6;
}
.order-hint em { color: #4a9e4a; font-style: normal; font-weight: 600; }

#panel {
  width: 320px;
  min-width: 280px;
  background: #fff;
  border-right: 1px solid #d4e4d4;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#panel h1 {
  font-size: 18px;
  color: #2d5a27;
  margin-bottom: 8px;
}

#preview-wrap {
  flex: 1;
  position: relative;
  background: #e8f0e8;
}

#preview {
  width: 100%;
  height: 100%;
  display: block;
}

#preview-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  pointer-events: none;
}

/* ── Panel sections ──────────────────────────────────────────────── */
section {
  border-top: 1px solid #e8f0e4;
  padding: 10px 0;
}

section label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #4a7c3f;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

label.row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #1a2e1a;
  cursor: pointer;
}

input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], select, textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #c4d8c0;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fafffe;
  color: #1a2e1a;
}

input[type=text]:focus, input[type=number]:focus, input[type=password]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #4a9e4a;
  box-shadow: 0 0 0 2px rgba(74,158,74,0.15);
}

input[type=range] {
  width: 80px;
}

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

.row label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #1a2e1a;
}

.mt4 { margin-top: 6px; }
.unit { font-size: 12px; color: #666; }

/* ── Icon grid ───────────────────────────────────────────────────── */
#icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
  margin-top: 6px;
  padding: 4px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafff8;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  padding: 2px;
  transition: background 0.1s;
}

.icon-btn:hover { background: #d4f0d0; border-color: #8bc88b; }
.icon-btn.active { background: #4a9e4a; border-color: #2d7d2d; }
.icon-btn.active img { filter: brightness(10); }
.icon-btn img { width: 24px; height: 24px; }

#selected-icon {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #ccc;
}

#icon-name-label {
  font-size: 11px;
  color: #4a7c3f;
  font-weight: 600;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 10px;
  background: #4a9e4a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.btn-primary:hover { background: #3d8a3d; }

.btn-secondary {
  padding: 8px 16px;
  background: #e8e8e8;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.btn-small {
  padding: 3px 8px;
  background: #e8f4e8;
  border: 1px solid #b0d4b0;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.btn-small:hover { background: #d0ecd0; }

.divider {
  border-top: 1px solid #e0eedd;
  margin: 4px 0;
}

/* ── Order list ──────────────────────────────────────────────────── */
#order-list {
  margin-top: 8px;
}

#order-list h3 {
  font-size: 13px;
  font-weight: 600;
  color: #2d5a27;
  margin-bottom: 6px;
}

#order-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  max-height: 160px;
  overflow-y: auto;
}

#order-items li {
  background: #f0f8f0;
  border: 1px solid #c8e4c8;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

#order-items li button {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Modal ───────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.hidden { display: none; }

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 400px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-box h2 {
  font-size: 18px;
  color: #2d5a27;
}

.modal-box label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.modal-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.modal-btns .btn-primary { width: auto; padding: 8px 20px; }

/* ── Admin ───────────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 2px solid #c8e4c8;
  margin-bottom: 20px;
}
.tab-btn {
  padding: 8px 18px;
  background: #e8f4e8; border: 1px solid #c0d8c0;
  border-bottom: none; border-radius: 6px 6px 0 0;
  cursor: pointer; font-size: 13px; font-family: inherit;
}
.tab-btn.active {
  background: #fff; border-color: #c8e4c8;
  border-bottom: 2px solid #fff; margin-bottom: -2px; font-weight: 600;
}
.validation-note { font-size: 12px; color: #c00; margin-top: 6px; }

#toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #2d5a27; color: #fff;
  padding: 10px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  z-index: 999;
}
#toast.show { opacity: 1; }

.admin-body { background: #f4f4f4; }

.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-wrap h1 { color: #2d5a27; }

.admin-wrap h2 {
  font-size: 16px;
  color: #2d5a27;
  margin-bottom: 12px;
}

.admin-wrap h3 {
  font-size: 14px;
  color: #4a7c3f;
  margin: 12px 0 6px;
}

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

.orders-table th, .orders-table td,
.admin-wrap table th, .admin-wrap table td {
  border: 1px solid #ddd;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}

.orders-table th, .admin-wrap table th {
  background: #eaf4ea;
  font-weight: 600;
}

.order-item-row {
  padding: 4px 0;
  border-bottom: 1px dashed #eee;
}

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

.stl-status { margin-left: 8px; font-size: 12px; color: #4a7c3f; }
.sortable:hover { background: #ddf0dd; }
.sort-arrow { font-size: 10px; color: #4a7c3f; }

.btn-stl {
  margin-left: 8px;
  background: #d0eaff;
  border-color: #90c0f0;
}

.admin-wrap section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
}

.admin-wrap a { color: #4a9e4a; }

.hidden { display: none !important; }

.icon-cats {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px;
}
.icon-cat-btn {
  padding: 3px 9px; background: #e8f4e8; border: 1px solid #b0d4b0;
  border-radius: 20px; font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: background .1s;
}
.icon-cat-btn:hover  { background: #d0ecd0; }
.icon-cat-btn.active { background: #4a9e4a; color: #fff; border-color: #2d7d2d; }

.swatch-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.swatch {
  width: 40px; height: 24px; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .1s, border-color .1s;
  flex-shrink: 0;
}
.swatch:hover { transform: scale(1.15); }
.swatch.selected { border-color: #222; transform: scale(1.15); }
.swatch-empty { font-size: 12px; color: #888; font-style: italic; }

.pos-grid-wrap { margin-top: 6px; }
.pos-grid-label { font-size: 11px; font-weight: 600; color: #4a7c3f; text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 5px; }
.pos-grid {
  display: grid; grid-template-columns: repeat(3, 32px);
  gap: 3px; width: fit-content;
}
.pos-btn {
  width: 32px; height: 32px; background: #e8f4e8;
  border: 1px solid #b0d4b0; border-radius: 5px;
  cursor: pointer; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  color: #2d5a27; transition: background .1s;
}
.pos-btn:hover  { background: #d0ecd0; }
.pos-btn.active { background: #4a9e4a; color: #fff; border-color: #2d7d2d; }

.btn-align {
  padding: 4px 7px;
  background: #e8f4e8;
  border: 1px solid #b0d4b0;
  border-radius: 4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #2d5a27;
}
.btn-align.active { background: #4a9e4a; color: #fff; border-color: #2d7d2d; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: #f0f4f0;
  color: #1a2e1a;
}

/* ── Layout ──────────────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Order panel (prawa kolumna) ──────────────────────────────────────────── */
#order-panel {
  width: 260px;
  min-width: 220px;
  background: #fff;
  border-left: 1px solid #d4e4d4;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#order-panel h2 {
  font-size: 16px;
  color: #2d5a27;
  margin-bottom: 4px;
}

.order-count-label {
  font-size: 13px;
  color: #555;
  margin: 4px 0;
}

.order-hint {
  font-size: 12px;
  color: #888;
  text-align: center;
  margin-top: 24px;
  line-height: 1.6;
}
.order-hint em { color: #4a9e4a; font-style: normal; font-weight: 600; }

#panel {
  width: 320px;
  min-width: 280px;
  background: #fff;
  border-right: 1px solid #d4e4d4;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#panel h1 {
  font-size: 18px;
  color: #2d5a27;
  margin-bottom: 8px;
}

#preview-wrap {
  flex: 1;
  position: relative;
  background: #e8f0e8;
}

#preview {
  width: 100%;
  height: 100%;
  display: block;
}

#preview-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  pointer-events: none;
}

/* ── Panel sections ──────────────────────────────────────────────── */
section {
  border-top: 1px solid #e8f0e4;
  padding: 10px 0;
}

section label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #4a7c3f;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

label.row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #1a2e1a;
  cursor: pointer;
}

input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #c4d8c0;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fafffe;
  color: #1a2e1a;
}

input[type=text]:focus, input[type=number]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #4a9e4a;
  box-shadow: 0 0 0 2px rgba(74,158,74,0.15);
}

input[type=range] {
  width: 80px;
}

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

.row label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #1a2e1a;
}

.mt4 { margin-top: 6px; }
.unit { font-size: 12px; color: #666; }

/* ── Icon grid ───────────────────────────────────────────────────── */
#icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
  margin-top: 6px;
  padding: 4px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafff8;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  padding: 2px;
  transition: background 0.1s;
}

.icon-btn:hover { background: #d4f0d0; border-color: #8bc88b; }
.icon-btn.active { background: #4a9e4a; border-color: #2d7d2d; }
.icon-btn.active img { filter: brightness(10); }
.icon-btn img { width: 24px; height: 24px; }

#selected-icon {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #ccc;
}

#icon-name-label {
  font-size: 11px;
  color: #4a7c3f;
  font-weight: 600;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 10px;
  background: #4a9e4a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.btn-primary:hover { background: #3d8a3d; }

.btn-secondary {
  padding: 8px 16px;
  background: #e8e8e8;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.btn-small {
  padding: 3px 8px;
  background: #e8f4e8;
  border: 1px solid #b0d4b0;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.btn-small:hover { background: #d0ecd0; }

.divider {
  border-top: 1px solid #e0eedd;
  margin: 4px 0;
}

/* ── Order list ──────────────────────────────────────────────────── */
#order-list {
  margin-top: 8px;
}

#order-list h3 {
  font-size: 13px;
  font-weight: 600;
  color: #2d5a27;
  margin-bottom: 6px;
}

#order-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  max-height: 160px;
  overflow-y: auto;
}

#order-items li {
  background: #f0f8f0;
  border: 1px solid #c8e4c8;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

#order-items li button {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Modal ───────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.hidden { display: none; }

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 400px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-box h2 {
  font-size: 18px;
  color: #2d5a27;
}

.modal-box label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.modal-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.modal-btns .btn-primary { width: auto; padding: 8px 20px; }

/* ── Admin ───────────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 2px solid #c8e4c8;
  margin-bottom: 20px;
}
.tab-btn {
  padding: 8px 18px;
  background: #e8f4e8; border: 1px solid #c0d8c0;
  border-bottom: none; border-radius: 6px 6px 0 0;
  cursor: pointer; font-size: 13px; font-family: inherit;
}
.tab-btn.active {
  background: #fff; border-color: #c8e4c8;
  border-bottom: 2px solid #fff; margin-bottom: -2px; font-weight: 600;
}
.validation-note { font-size: 12px; color: #c00; margin-top: 6px; }

#toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #2d5a27; color: #fff;
  padding: 10px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  z-index: 999;
}
#toast.show { opacity: 1; }

.admin-body { background: #f4f4f4; }

.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-wrap h1 { color: #2d5a27; }

.admin-wrap h2 {
  font-size: 16px;
  color: #2d5a27;
  margin-bottom: 12px;
}

.admin-wrap h3 {
  font-size: 14px;
  color: #4a7c3f;
  margin: 12px 0 6px;
}

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

.orders-table th, .orders-table td,
.admin-wrap table th, .admin-wrap table td {
  border: 1px solid #ddd;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}

.orders-table th, .admin-wrap table th {
  background: #eaf4ea;
  font-weight: 600;
}

.order-item-row {
  padding: 4px 0;
  border-bottom: 1px dashed #eee;
}

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

.stl-status { margin-left: 8px; font-size: 12px; color: #4a7c3f; }
.sortable:hover { background: #ddf0dd; }
.sort-arrow { font-size: 10px; color: #4a7c3f; }

.btn-stl {
  margin-left: 8px;
  background: #d0eaff;
  border-color: #90c0f0;
}

.admin-wrap section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
}

.admin-wrap a { color: #4a9e4a; }

.hidden { display: none !important; }

.icon-cats {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px;
}
.icon-cat-btn {
  padding: 3px 9px; background: #e8f4e8; border: 1px solid #b0d4b0;
  border-radius: 20px; font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: background .1s;
}
.icon-cat-btn:hover  { background: #d0ecd0; }
.icon-cat-btn.active { background: #4a9e4a; color: #fff; border-color: #2d7d2d; }

.swatch-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.swatch {
  width: 40px; height: 24px; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .1s, border-color .1s;
  flex-shrink: 0;
}
.swatch:hover { transform: scale(1.15); }
.swatch.selected { border-color: #222; transform: scale(1.15); }
.swatch-empty { font-size: 12px; color: #888; font-style: italic; }

.pos-grid-wrap { margin-top: 6px; }
.pos-grid-label { font-size: 11px; font-weight: 600; color: #4a7c3f; text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 5px; }
.pos-grid {
  display: grid; grid-template-columns: repeat(3, 32px);
  gap: 3px; width: fit-content;
}
.pos-btn {
  width: 32px; height: 32px; background: #e8f4e8;
  border: 1px solid #b0d4b0; border-radius: 5px;
  cursor: pointer; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  color: #2d5a27; transition: background .1s;
}
.pos-btn:hover  { background: #d0ecd0; }
.pos-btn.active { background: #4a9e4a; color: #fff; border-color: #2d7d2d; }

.btn-align {
  padding: 4px 7px;
  background: #e8f4e8;
  border: 1px solid #b0d4b0;
  border-radius: 4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #2d5a27;
}
.btn-align.active { background: #4a9e4a; color: #fff; border-color: #2d7d2d; }

/* ── Formularz zamówienia ────────────────────────────────────────────────── */
.form-row {
  display: flex;
  gap: 10px;
}
.form-row label {
  flex: 1;
}
.sbtn {
  flex: 1;
  padding: 8px 10px;
  background: var(--surface2, #eee);
  border: 1px solid var(--border, #ccc);
  border-radius: 6px;
  color: var(--text, #222);
  cursor: pointer;
  font-size: 12px;
  transition: border-color .15s, background .15s;
}
.sbtn:hover { border-color: #4a9e4a; }
.sbtn.on    { border-color: #2d5a27; background: #e8f4e8; color: #2d5a27; font-weight: 600; }


/* ── Modal overlay (wzorzec z labelsgeneratora) ──────────────────────────── */
.moverlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:400;align-items:center;justify-content:center;}
.moverlay.open{display:flex;}
.mbox{background:var(--surface,#fff);border:1px solid var(--border,#ddd);border-radius:11px;padding:24px 28px;max-width:500px;width:90%;max-height:92vh;display:flex;flex-direction:column;position:relative;overflow:hidden;}
.mtitle{font-size:13px;font-weight:700;letter-spacing:.06em;margin-bottom:14px;color:var(--accent,#2d5a27);}
.mclose{position:absolute;top:12px;right:14px;background:none;border:none;color:var(--text-muted,#888);font-size:18px;cursor:pointer;}
.mclose:hover{color:var(--text,#222);}
@keyframes spin{to{transform:rotate(360deg);}}
