/* Shapekin Variant C — Slate & Teal/Amber studio theme with 3D tactile buttons and original logo styling. */

:root {
  --shop-bg: #0e131b;
  --shop-panel: #141c28;
  --shop-raised: #1c2839;
  --shop-border: #26364c;
  --shop-border-strong: #395170;
  --shop-text: #eef5fc;
  --shop-muted: #8ea3bc;
  --shop-accent: #2dd4bf;
  --shop-accent-strong: #14b8a6;
  --shop-warm: #f59e0b;
  --shop-warm-soft: #fcd34d;
  --shop-on-accent: #04211e;
  --forma-tint: #192638;
  accent-color: #2dd4bf;
}

body.app-neon {
  background: radial-gradient(circle at 50% -10%, #172436 0%, #0e131b 55%);
  background-color: var(--shop-bg);
  color: var(--shop-text);
}

/* Brand & epic Shapekin 3D logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--shop-text);
  font-weight: 600;
  letter-spacing: -.015em;
}

.brand strong {
  color: #5eead4;
  font-weight: 800;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 10px #14b8a638);
}

.boot-logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  margin-bottom: 12px;
  filter: drop-shadow(0 10px 26px #14b8a645);
  animation: formaFloat 3s ease-in-out infinite;
}

@keyframes formaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ================= 3D TACTILE BUTTONS & EFFECTS ================= */
body.app-neon button,
body.app-neon :is(.viewtools, .project-card-menu) > summary {
  position: relative;
  background: linear-gradient(180deg, #253347 0%, #192434 56%, #131c29 100%);
  border: 1px solid #334761;
  color: var(--shop-text);
  box-shadow:
    inset 0 1px 0 #ffffff28,
    inset 0 -2px 0 #060b1299,
    0 3px 0 #091019,
    0 6px 14px #02050a70;
  transition:
    transform .12s cubic-bezier(.22, 1, .36, 1),
    box-shadow .16s ease,
    border-color .16s ease,
    background .16s ease,
    color .16s ease;
}

/* Primary 3D teal keycap */
body.app-neon button.primary,
body.app-neon #projects-screen .primary,
body.app-neon.selection-workspace #header-export,
body.app-neon.selection-workspace #add-first-part,
body.app-neon.selection-workspace #context-actions #context-transform-size {
  background: linear-gradient(180deg, #3ce0cc 0%, #16ad9c 58%, #0f8478 100%);
  border-color: #79f5e6;
  color: #03201d;
  font-weight: 700;
  text-shadow: 0 1px 0 #ffffff40;
  box-shadow:
    inset 0 1px 0 #dcfff9b0,
    inset 0 -2px 0 #084f4888,
    0 3px 0 #084a44,
    0 7px 18px #14b8a645;
}

/* Active / toggled / pressed-in 3D luminous state */
body.app-neon button:is(.active, [aria-pressed=true], [aria-expanded=true]):not(.primary):not(#context-transform-size) {
  background: linear-gradient(180deg, #163742 0%, #102731 100%);
  border-color: #2dd4bf;
  color: #99f6e4;
  box-shadow:
    inset 0 2px 5px #04101699,
    inset 0 -1px 0 #2dd4bf44,
    0 1px 0 #08121a,
    0 0 14px #14b8a633;
}

body.app-neon button.danger,
body.app-neon button.danger-text {
  border-color: #6b313d;
  color: #ffb8c3;
}

body.app-neon button.danger {
  background: linear-gradient(180deg, #872b3e 0%, #5c1c2a 100%);
  border-color: #c2556b;
  color: #fff5f7;
  box-shadow:
    inset 0 1px 0 #ffffff28,
    inset 0 -2px 0 #2c0a12aa,
    0 3px 0 #340e17,
    0 6px 14px #02050a70;
}

@media (hover: hover) {
  body.app-neon button:hover:not(:disabled),
  body.app-neon :is(.viewtools, .project-card-menu) > summary:hover {
    transform: translateY(-1px);
    border-color: #46c8ba;
    box-shadow:
      inset 0 1px 0 #ccfbf13a,
      inset 0 -2px 0 #060b1299,
      0 4px 0 #091019,
      0 9px 22px #14b8a636;
  }
  body.app-neon button.primary:hover:not(:disabled),
  body.app-neon #projects-screen .primary:hover:not(:disabled),
  body.app-neon.selection-workspace #header-export:hover:not(:disabled),
  body.app-neon.selection-workspace #context-actions #context-transform-size:hover:not(:disabled) {
    background: linear-gradient(180deg, #52ebd8 0%, #1bc0ad 58%, #119487 100%);
    border-color: #a6fff4;
    box-shadow:
      inset 0 1px 0 #ffffffc4,
      inset 0 -2px 0 #084f4888,
      0 4px 0 #084a44,
      0 10px 24px #14b8a659;
  }
}

body.app-neon button:focus-visible,
body.app-neon :is(.viewtools, .project-card-menu) > summary:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
  border-color: #5eead4;
}

/* Tactile physical press-down */
body.app-neon button:active:not(:disabled),
body.app-neon :is(.viewtools, .project-card-menu) > summary:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 5px #040910aa,
    0 1px 0 #091019,
    0 2px 6px #02050a66;
}

body.app-neon button:disabled {
  background: #17202c;
  border-color: #253345;
  color: #6c7f96;
  text-shadow: none;
  box-shadow: none;
  opacity: .68;
  transform: none;
  transition: none;
}

/* ================= PROJECT & LIBRARY CARDS ================= */
.project-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subproject-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-left: 14px;
  padding: 9px 10px;
  border-left: 2px solid #2dd4bf66;
  border-radius: 0 12px 12px 0;
  background: #0e1622;
}

.subproject-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.subproject-head span {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--shop-muted);
}

body.app-neon .subproject-add {
  min-height: 30px;
  padding: 4px 10px;
  font-size: .76rem;
  color: #5eead4;
}

.subproject-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #141f2e;
  border: 1px solid var(--shop-border);
}

body.app-neon .subproject-open {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  text-align: left;
}

body.app-neon .subproject-open strong {
  font-size: .88rem;
  color: var(--shop-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

body.app-neon .subproject-open small {
  font-size: .73rem;
  color: var(--shop-muted);
}

body.app-neon .subproject-row .project-card-menu > summary {
  min-height: 34px;
  width: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-color: #31445e;
}

body.app-neon :is(#projects-screen, #library-screen) .project-card {
  background: linear-gradient(160deg, #172130, #121925);
  border: 1px solid var(--shop-border);
  border-radius: 14px;
  box-shadow: 0 4px 14px #04080e55;
}

body.app-neon :is(#projects-screen, #library-screen) .card-open {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

body.app-neon :is(#projects-screen, #library-screen) .card-open:hover {
  background: #1c293c88;
  border-color: #36506e;
  transform: none;
  box-shadow: none;
}

body.app-neon :is(#projects-screen, #library-screen) .card-chevron {
  color: var(--shop-accent);
}

body.app-neon :is(#projects-screen, #library-screen) .project-card-menu > summary {
  border-color: #31445e;
}

body.app-neon :is(#projects-screen, #library-screen) .project-card:has(.project-card-menu[open]) {
  transform: none !important;
  z-index: 120;
}

body.app-neon :is(#projects-screen, #library-screen) .project-card-menu .card-actions {
  z-index: 120;
  min-width: 11.5rem;
  background: #141d2af2;
  backdrop-filter: blur(14px);
  border-color: var(--shop-border-strong);
  box-shadow: 0 16px 38px #03070dd8;
}

/* Library filter & tag chips */
#library-filter {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--shop-panel);
  border: 1px solid var(--shop-border);
  border-radius: 15px;
}

#library-filter .control-label {
  margin: 0;
}

#library-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

#library-tags:empty {
  display: none;
}

body.app-neon #library-tags button {
  min-height: 36px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .82rem;
}

#library-parts {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  background: #0f1620;
}

#library-parts legend {
  padding: 0 6px;
  color: var(--shop-muted);
  font-size: .8rem;
  font-weight: 600;
}

/* ================= SURFACES & FLOATING GLASS DOCK ================= */
body.app-neon .app-header {
  background: #101722e8;
  backdrop-filter: blur(12px);
  border-color: var(--shop-border);
}

body.app-neon :is(.page-heading, .empty-state, .settings-card, .module-card, dialog, #mobile-sheet) {
  border-color: var(--shop-border);
}

body.app-neon.selection-workspace #context-actions,
body.app-neon.selection-workspace #mobile-toolbar {
  background: #111925eb;
  backdrop-filter: blur(14px);
  border-color: #2a3d56;
}

body.app-neon.selection-workspace #context-actions {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  box-shadow: 0 -10px 28px #03070d88;
}

body.app-neon.selection-workspace #mobile-sheet {
  background: #121a26f2;
  backdrop-filter: blur(14px);
}

/* ================= COMPACT 2-COLUMN DESIGNER GRID ================= */
body.app-neon .designer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 340px) {
  body.app-neon .designer-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 720px) {
  body.app-neon .designer-grid {
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
    gap: 14px;
  }
}

.designer-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 13px;
  background: linear-gradient(160deg, #172231 0%, #111824 100%);
  border: 1px solid var(--shop-border);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 #ffffff10, 0 6px 18px #04080e55;
}

/* Multi-action tile (Krabičky a organizéry) spans full width on phone so buttons breathe */
@media (max-width: 719px) {
  .designer-tile:has(button:nth-of-type(2)) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 8px 10px;
  }
  .designer-tile:has(button:nth-of-type(2)) p {
    grid-column: 1 / -1;
  }
  .designer-tile:has(button:nth-of-type(2)) button {
    grid-column: 1 / -1;
  }
}

.designer-tile h2 {
  margin: 0;
  font-size: .98rem;
  line-height: 1.25;
}

.designer-tile p {
  margin: 0;
  color: var(--shop-muted);
  font-size: .8rem;
  line-height: 1.4;
  flex: 1;
}

.designer-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(155deg, #1f3548, #142230);
  border: 1px solid #2f516c;
  border-radius: 10px;
  color: #5eead4;
  font-size: 1.12rem;
  box-shadow: inset 0 1px 0 #99f6e426;
}

.designer-tile button {
  width: 100%;
  margin-top: 2px;
  padding: 9px 10px;
  font-size: .84rem;
}

/* ================= UNIFIED DIALOGS ================= */
dialog {
  background: linear-gradient(170deg, #16202e, #111824);
  box-shadow: 0 22px 54px #02050bd4;
}

dialog::backdrop {
  background: #05080ec2;
  backdrop-filter: blur(4px);
}

:is(#designer-qr-dialog, #designer-shelf-dialog, #library-edit, #underlay-dialog, #spool-add-dialog, #spool-detail-dialog, #print-log-dialog, #shopping-list-dialog, #invoice-import-dialog, #privacy-dialog, #terms-dialog) {
  width: min(460px, calc(100% - 24px));
}

:is(#box-template, #cut-dialog) {
  width: min(520px, calc(100% - 24px));
}

/* ================= STANDALONE 3D PRINT MANAGEMENT DASHBOARD ================= */
.print-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  background: #0b1018;
  border: 1px solid var(--shop-border);
  border-radius: 14px;
}

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

.print-tabs.print-tabs-5 {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.print-tabs.print-tabs-5 button {
  flex: 1 1 30%;
  min-width: 0;
  padding: 8px 6px;
  font-size: .8rem;
}

.notif-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: rgba(148, 163, 184, .14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, .28);
  margin: 0 0 10px;
}

.notif-status-pill.is-active {
  background: rgba(34, 197, 94, .14);
  color: #86efac;
  border-color: rgba(34, 197, 94, .35);
}

.notif-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 6px 0 12px;
}

.notif-toggle-list {
  display: grid;
  gap: 6px;
  margin: 6px 0 12px;
}

.captured-prints-card {
  border-color: rgba(45, 212, 191, .42);
  background: linear-gradient(160deg, rgba(19, 44, 52, .85) 0%, rgba(14, 21, 32, .94) 100%);
  margin-bottom: 12px;
}

.captured-print-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(10, 16, 26, .65);
  border: 1px solid rgba(45, 212, 191, .22);
}

.captured-print-row .spool-meta {
  min-width: 0;
  flex: 1;
}

.captured-print-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.captured-print-actions button {
  min-height: 36px;
  padding: 6px 10px;
  font-size: .78rem;
}

.game-export-box {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, .28);
  background: rgba(14, 28, 44, .55);
  display: grid;
  gap: 8px;
}

body.app-neon .color-select-trigger {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-weight: 500;
  border-radius: 12px;
  background: #0d1420;
  border: 1px solid var(--shop-border);
  color: #edf3fa;
}

.color-select-trigger #spool-color-btn-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-select-caret {
  color: #94a3b8;
  font-size: .85rem;
  flex-shrink: 0;
}

.color-opt-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, .36);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
}

.color-opt-dot.all-colors {
  background: conic-gradient(#e04b53, #f97316, #facc15, #22c55e, #3b82f6, #8b5cf6, #e04b53);
}

.color-filter-list {
  display: grid;
  gap: 6px;
}

body.app-neon .color-filter-row {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border-radius: 12px;
  background: #121a28;
  border: 1px solid rgba(148, 163, 184, .18);
  color: #edf3fa;
}

body.app-neon .color-filter-row.is-selected {
  border-color: rgba(45, 212, 191, .65);
  background: rgba(20, 48, 56, .6);
}

.color-filter-row .color-opt-dot {
  width: 22px;
  height: 22px;
}

.color-filter-name {
  flex: 1;
  font-size: .95rem;
  font-weight: 600;
}

.color-filter-qty {
  font-size: .8rem;
  color: #94a3b8;
}

.color-opt-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #64748b;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.color-filter-row.is-selected .color-opt-radio {
  border-color: #2dd4bf;
}

.color-filter-row.is-selected .color-opt-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2dd4bf;
}

body.app-neon .save-error {
  background: linear-gradient(180deg, #fbbf24 0%, #ea8c0a 62%, #c26706 100%) !important;
  border-bottom: 1px solid #fde68a !important;
  color: #261302 !important;
  box-shadow: 0 8px 24px rgba(234, 140, 10, .32);
}

body.app-neon .save-error p {
  color: #261302 !important;
  font-weight: 700;
}

body.app-neon #toast {
  background: linear-gradient(180deg, #fbbf24 0%, #ea8c0a 62%, #c26706 100%) !important;
  border: 1px solid #fde68a !important;
  color: #261302 !important;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 #fffbebaa,
    0 8px 24px rgba(234, 140, 10, .35) !important;
}

body.app-neon .maint-alert-banner {
  background: linear-gradient(180deg, #fbbf24 0%, #ea8c0a 62%, #c26706 100%) !important;
  border: 1px solid #fde68a !important;
  color: #261302 !important;
  font-weight: 700;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fbbf24 0%, #ea8c0a 100%);
  color: #261302;
  font-size: .68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border: 1px solid #fde68a;
  box-shadow: 0 2px 6px rgba(234, 140, 10, .45);
}

@media (max-width: 360px) {
  body.app-neon .app-nav button span {
    font-size: .67rem;
  }
  body.app-neon .app-nav button {
    padding: 6px 2px 8px;
  }
}

.inbox-drop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.inbox-drop-actions button {
  min-height: 52px;
  font-weight: 650;
}

.inbox-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.inbox-hints span {
  font-size: .74rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: #0d1522;
  border: 1px solid rgba(148, 163, 184, .18);
  color: #cbd5e1;
}

.inbox-kind-pill {
  font-size: .74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(45, 212, 191, .16);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, .38);
}

.inbox-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.inbox-mode-switch button {
  min-height: 36px;
  padding: 6px 4px;
  font-size: .75rem;
}

.inbox-mode-switch button[aria-pressed="true"] {
  border-color: #2dd4bf;
  background: rgba(20, 56, 62, .75);
  color: #5eead4;
}

.print-tabs button {
  min-height: 42px;
  padding: 8px 4px;
  border-radius: 10px;
  font-size: .82rem;
  white-space: nowrap;
}

@media (max-width: 350px) {
  .print-tabs.print-tabs-4 button {
    font-size: .74rem;
    padding: 8px 2px;
  }
}

body.app-neon .workshop-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 15px;
  background: linear-gradient(155deg, #162a37 0%, #101926 100%);
  border: 1px solid #2a5364;
}

.workshop-banner > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.workshop-banner strong {
  font-size: .92rem;
  color: #e6fffa;
}

.workshop-banner small {
  font-size: .76rem;
  color: #94aec4;
  font-weight: 500;
}

.workshop-banner > span {
  font-size: 1.1rem;
  color: #5eead4;
  flex-shrink: 0;
}

.three-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.three-fields > * {
  min-width: 0;
}

.stock-column-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.inline-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

body.app-neon .compact-btn {
  min-height: 36px;
  padding: 6px 12px;
  font-size: .8rem;
}

.login-brand,
.about-brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.login-brand span {
  font-size: 1.35rem;
  font-weight: 700;
}

.login-brand strong {
  color: var(--shop-accent);
}

.about-brand-head h2 {
  margin: 0 0 2px;
}

.oss-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: .84rem;
}

.oss-list a {
  color: #5eead4;
}

#invoice-import-dialog textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--shop-border);
  background: #0b111b;
  color: var(--shop-text);
  font: inherit;
  font-size: .86rem;
}

.invoice-row {
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.invoice-row input[type=checkbox] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--shop-accent);
}

body.reduced-motion *,
body.reduced-motion *::before,
body.reduced-motion *::after {
  animation: none !important;
  transition: none !important;
}

.inline-save-status {
  margin: 0 0 10px;
  padding: 8px 11px;
  border-radius: 10px;
  background: #102a1d;
  border: 1px solid #22c55e66;
  color: #86efac;
  font-size: .84rem;
  font-weight: 650;
}

.inline-save-status:empty {
  display: none;
}

#settings-print-status {
  margin: 0 0 12px;
  color: #fcd34d;
  font-size: .9rem;
  font-weight: 600;
}

#settings-print-status:empty {
  display: none;
}

.maint-alert-banner {
  margin-bottom: 12px;
  padding: 10px 13px;
  border-radius: 12px;
  background: #34171d;
  border: 1px solid #f8717188;
  color: #fecaca;
  font-size: .84rem;
  font-weight: 600;
}

.quality-filter-row,
.quality-buttons {
  display: grid;
  gap: 6px;
}

.quality-filter-row {
  grid-template-columns: .75fr 1fr 1.25fr 1fr;
  margin: 8px 0 10px;
}

.quality-buttons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
}

.quality-picker {
  margin: 10px 0;
}

body.app-neon :is(.quality-filter-row, .quality-buttons) button {
  min-height: 38px;
  padding: 6px 4px;
  font-size: .74rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.q-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.q-dot.q-good { background: #22c55e; box-shadow: 0 0 6px #22c55eaa; }
.q-dot.q-medium { background: #f59e0b; box-shadow: 0 0 6px #f59e0baa; }
.q-dot.q-bad { background: #ef4444; box-shadow: 0 0 6px #ef4444aa; }

.spool-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.spool-title-row strong {
  min-width: 0;
}

.quality-badge {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.3;
}

.quality-badge.q-good {
  background: #143624;
  color: #86efac;
  border: 1px solid #22c55e66;
}

.quality-badge.q-medium {
  background: #3d2408;
  color: #fde68a;
  border: 1px solid #f59e0b77;
}

.quality-badge.q-bad {
  background: #3d181e;
  color: #fecaca;
  border: 1px solid #ef444477;
}

.pct-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 6px;
  margin-top: 8px;
}

body.app-neon .pct-presets button {
  min-height: 32px;
  padding: 4px 6px;
  font-size: .74rem;
}

.spool-item-actions.spool-item-actions-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

@media (max-width: 380px) {
  .spool-item-actions.spool-item-actions-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.spool-item-actions.spool-item-actions-5 button {
  min-height: 34px;
  padding: 5px 4px;
  font-size: .74rem;
}

.detail-advanced {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0d1420;
  border: 1px solid var(--shop-border);
}

.detail-advanced summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .86rem;
}

#detail-remove-spool {
  margin-top: 8px;
}

.workshop-backup-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--shop-border);
}

.printer-maint-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.printer-maint-box small {
  font-size: .74rem;
  line-height: 1.35;
}

.maint-due {
  color: #fca5a5;
  font-weight: 700;
}

.maint-soon {
  color: #fcd34d;
  font-weight: 600;
}

.spool-bar.bar-warn span {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.spool-bar.bar-danger span {
  background: linear-gradient(90deg, #b91c1c, #f87171);
}

.quote-item-actions.quote-item-actions-3 {
  grid-template-columns: 1.2fr auto auto;
  align-items: center;
}

.quote-item-actions.quote-item-actions-4 {
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

body.app-neon .quote-status-select {
  min-height: 36px;
  padding: 5px 24px 5px 9px;
  font-size: .76rem;
  font-weight: 700;
  border-radius: 9px;
}

body.app-neon .quote-status-select.status-paid {
  border-color: #22c55e88;
  color: #86efac;
  background-color: #102a1d;
}

body.app-neon .quote-status-select.status-approved {
  border-color: #2dd4bf88;
  color: #99f6e4;
  background-color: #102730;
}

body.app-neon .quote-status-select.status-sent {
  border-color: #f59e0b88;
  color: #fde68a;
  background-color: #2b1d0b;
}

.bed-fit-pill {
  margin: 0 0 12px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.35;
}

.bed-fit-pill.fit-ok {
  background: #0f2922;
  border: 1px solid #22c55e77;
  color: #86efac;
}

.bed-fit-pill.fit-warn {
  background: #32161c;
  border: 1px solid #f8717188;
  color: #fecaca;
}

.bed-fit-pill.fit-none {
  background: #0f1724;
  border: 1px solid var(--shop-border);
  color: var(--shop-muted);
}

#config-to-quote {
  margin-top: 8px;
}

.printer-catalog-box {
  margin: 8px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--shop-border);
}

.printer-catalog-list {
  display: grid;
  gap: 6px;
  max-height: 196px;
  overflow-y: auto;
  margin-top: 8px;
  padding-right: 2px;
}

body.app-neon .printer-catalog-item {
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  border-radius: 10px;
  background: #121c2a;
  border: 1px solid var(--shop-border);
  box-shadow: none;
}

.printer-catalog-item strong {
  font-size: .86rem;
  color: var(--shop-text);
}

.printer-catalog-item small {
  font-size: .73rem;
  color: #7dd3fc;
  font-weight: 500;
}

.printer-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.printer-card-actions button {
  flex: 1 1 80px;
  min-height: 36px;
  padding: 6px 8px;
  font-size: .78rem;
}

.print-stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.print-stats-row > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 4px;
  border-radius: 11px;
  background: #0d1420;
  border: 1px solid var(--shop-border);
}

.print-stats-row strong {
  font-size: 1.05rem;
  color: #f4f9ff;
  font-variant-numeric: tabular-nums;
}

.print-stats-row small {
  font-size: .7rem;
  color: var(--shop-muted);
}

.reasons-chart {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.reason-row {
  display: grid;
  grid-template-columns: minmax(0, 110px) 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
}

.reason-row span {
  color: var(--shop-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reason-track {
  height: 8px;
  border-radius: 999px;
  background: #1a2636;
  overflow: hidden;
}

.reason-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.reason-row strong {
  color: #fcd34d;
  font-variant-numeric: tabular-nums;
}

.status-badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}

.status-badge.status-ok {
  background: #133936;
  color: #5eead4;
  border: 1px solid #2dd4bf66;
}

.status-badge.status-fail {
  background: #3d1c23;
  color: #fca5a5;
  border: 1px solid #f8717166;
}

.status-badge.status-cancel {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #64748b66;
}

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

.spool-detail-head h2 {
  margin: 0;
  font-size: 1.12rem;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.detail-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 11px;
  background: #0d1420;
  border: 1px solid var(--shop-border);
}

.detail-metrics strong {
  font-size: .92rem;
  color: #99f6e4;
}

.detail-section {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 13px;
  background: #0e1622;
  border: 1px solid var(--shop-border);
}

.detail-section > strong {
  display: block;
  margin-bottom: 8px;
  font-size: .9rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dry-chip {
  padding: 3px 8px;
  border-radius: 999px;
  background: #162c37;
  border: 1px solid #2dd4bf55;
  color: #99f6e4;
  font-size: .74rem;
}

#spool-detail-dialog textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--shop-border);
  background: #0b111b;
  color: var(--shop-text);
  font: inherit;
}

.print-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

@media (min-width: 780px) {
  .print-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 14px;
  border-radius: 15px;
  background: linear-gradient(160deg, #172334 0%, #101824 100%);
  border: 1px solid var(--shop-border);
  box-shadow: inset 0 1px 0 #ffffff12, 0 4px 14px #04080e55;
}

.kpi-card span {
  font-size: .74rem;
  color: var(--shop-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}

.kpi-card strong {
  font-size: 1.32rem;
  line-height: 1.15;
  color: #f4f9ff;
  font-variant-numeric: tabular-nums;
}

.kpi-card small {
  font-size: .76rem;
  color: #5eead4;
}

.print-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

@media (max-width: 420px) {
  .print-quick-actions {
    grid-template-columns: 1fr 1fr;
  }
  .print-quick-actions #dash-add-spool {
    grid-column: 1 / -1;
  }
}

.print-quick-actions button {
  padding: 10px 8px;
  font-size: .84rem;
}

.stock-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.stock-section-head h2 {
  margin: 0;
}

body.app-neon .link-btn {
  min-height: 36px;
  padding: 5px 10px;
  font-size: .8rem;
  color: #5eead4;
}

/* ================= STOCK COLOR DOTS (SEMAFOR) ================= */
@keyframes stock-blink-red {
  0%, 100% {
    box-shadow: 0 0 0 2px #ef4444, 0 0 14px #ef444488;
    border-color: #ef4444;
  }
  50% {
    box-shadow: 0 0 0 3px #f87171, 0 0 22px #ef4444ee;
    border-color: #fca5a5;
  }
}

.color-dots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.color-dots-grid[hidden] {
  display: none;
}

body.app-neon .color-dot-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 82px;
  padding: 9px 5px 7px;
  border-radius: 14px;
  background: #0d1521;
  border: 1px solid var(--shop-border);
  box-shadow: inset 0 1px 0 #ffffff0d;
}

.color-dot-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 4px;
  background: #0a1019;
  border: 2.5px solid #22c55e;
  box-shadow: 0 0 10px #22c55e44;
}

.color-dot-fill {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid #ffffff38;
  box-shadow: inset 0 2px 4px #ffffff30, inset 0 -2px 5px #00000066;
}

.color-dot-qty {
  position: absolute;
  bottom: -6px;
  right: -8px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  border: 1px solid #0b111b;
}

.color-dot-tile.level-ok .color-dot-ring {
  border-color: #22c55e;
  box-shadow: 0 0 10px #22c55e55;
}

.color-dot-tile.level-ok .color-dot-qty {
  background: #14532d;
  color: #86efac;
  border-color: #22c55e88;
}

.color-dot-tile.level-min .color-dot-ring {
  border-color: #f59e0b;
  box-shadow: 0 0 12px #f59e0b66;
}

.color-dot-tile.level-min .color-dot-qty {
  background: #451a03;
  color: #fde68a;
  border-color: #f59e0b99;
}

.color-dot-tile.level-empty .color-dot-ring {
  border-color: #ef4444;
  animation: stock-blink-red 1.15s ease-in-out infinite;
}

.color-dot-tile.level-empty .color-dot-qty {
  background: #7f1d1d;
  color: #fecaca;
  border-color: #ef4444;
}

.color-dot-tile.active-dot {
  border-color: #2dd4bf;
  background: #122231;
}

.color-dot-tile small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .71rem;
  color: var(--shop-text);
  font-weight: 600;
}

.spool-swatch.level-empty {
  border-color: #ef4444;
  animation: stock-blink-red 1.15s ease-in-out infinite;
}

.spool-swatch.level-min {
  border-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b88;
}

.spool-swatch.level-ok {
  border-color: #22c55e;
}

.spool-item-actions.spool-item-actions-qty {
  grid-template-columns: auto auto 1fr 1fr;
}

.spool-item-actions .qty-step-btn {
  padding: 6px 9px;
  font-variant-numeric: tabular-nums;
}

/* ================= 3D CONFIGURATOR (BOXES & ORGANIZERS) ================= */
.config-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

@media (min-width: 440px) {
  .config-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.config-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 10px;
  background: #0d1420;
  border: 1px solid var(--shop-border);
  min-width: 0;
}

.config-metrics span {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--shop-muted);
  font-weight: 650;
}

.config-metrics strong {
  font-size: .8rem;
  color: #99f6e4;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lid-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}

.lid-grid[hidden] {
  display: none;
}

@media (min-width: 420px) {
  .lid-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

body.app-neon .lid-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 66px;
  padding: 8px 6px;
  border-radius: 12px;
  font-size: .78rem;
}

.lid-grid svg {
  width: 34px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.slider-card {
  padding: 10px 12px;
  margin: 10px 0;
  border-radius: 12px;
  background: #0e1622;
  border: 1px solid var(--shop-border);
}

.slider-card input[type=range] {
  width: 100%;
  margin-top: 6px;
  accent-color: var(--shop-accent);
}

.slider-card strong {
  color: #5eead4;
  font-variant-numeric: tabular-nums;
}

.configurator-lock-note {
  margin: 6px 0 8px;
  font-size: .75rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .color-dot-tile.level-empty .color-dot-ring,
  .spool-swatch.level-empty {
    animation: none;
  }
}

.spool-cards,
.quote-cards {
  display: grid;
  gap: 10px;
}

.spool-item,
.quote-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 13px;
  background: #0f1622;
  border: 1px solid var(--shop-border);
}

.spool-item.selected {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 1px #2dd4bf44;
}

.spool-item-head,
.quote-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spool-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #ffffff38;
  box-shadow: 0 2px 6px #00000066;
}

.spool-meta,
.quote-item-head > div {
  flex: 1;
  min-width: 0;
}

.spool-meta strong,
.quote-item-head strong {
  display: block;
  font-size: .92rem;
  color: var(--shop-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spool-meta small,
.quote-item-head small {
  display: block;
  font-size: .76rem;
  color: var(--shop-muted);
}

.spool-qty {
  text-align: right;
  flex-shrink: 0;
}

.spool-qty strong,
.quote-price {
  display: block;
  font-size: .92rem;
  color: #99f6e4;
  font-variant-numeric: tabular-nums;
}

.spool-qty small {
  display: block;
  font-size: .72rem;
  color: var(--shop-muted);
}

.spool-bar {
  height: 6px;
  border-radius: 999px;
  background: #1b2738;
  overflow: hidden;
}

.spool-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6, #5eead4);
}

.spool-item.low .spool-bar span {
  background: linear-gradient(90deg, #dc2626, #f59e0b);
}

.spool-item-actions,
.quote-item-actions,
.quote-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.spool-item-actions button,
.quote-item-actions button {
  min-height: 36px;
  padding: 6px 8px;
  font-size: .78rem;
}

.print-panel,
.stock-layout > *,
.stock-card,
.kpi-card,
.spool-item,
.quote-item,
#stock-screen .two-fields > * {
  min-width: 0;
}

#stock-screen :is(input, select) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.app-neon input[type=file]::file-selector-button {
  margin-right: 10px;
  padding: 7px 12px;
  border: 1px solid #354a64;
  border-radius: 9px;
  background: linear-gradient(180deg, #253447 0%, #192434 100%);
  color: #edf3fa;
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 360px) {
  #stock-screen .two-fields {
    grid-template-columns: 1fr;
  }
  .kpi-card {
    padding: 11px;
  }
  .kpi-card strong {
    font-size: 1.12rem;
  }
}

.stock-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 820px) {
  .stock-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.stock-card {
  background: linear-gradient(160deg, #172231 0%, #111824 100%);
  border: 1px solid var(--shop-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: inset 0 1px 0 #ffffff10, 0 6px 18px #04080e55;
}

.stock-card h2 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.stock-balance-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 12px;
}

#print-balance {
  margin: 0;
  color: #99f6e4;
  font-size: .92rem;
  font-weight: 600;
}

#spool-remove {
  min-height: 38px;
  padding: 6px 12px;
  font-size: .82rem;
}

#stock-screen details {
  margin: 12px 0;
  padding: 10px 12px;
  background: #0f1620;
  border: 1px solid var(--shop-border);
  border-radius: 12px;
}

#stock-screen summary {
  cursor: pointer;
  min-height: 36px;
  display: flex;
  align-items: center;
  font-weight: 650;
  color: var(--shop-text);
}

#stock-screen form button {
  width: 100%;
  margin-top: 10px;
}

#print-totals {
  margin: 12px 0 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0f1c26;
  border: 1px solid #264857;
  color: #ccfbf1;
  font-size: .9rem;
  line-height: 1.45;
}

#print-status {
  margin: 0 0 12px;
  color: #fcd34d;
  font-size: .9rem;
  font-weight: 600;
}

#print-status:empty {
  display: none;
}

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

dialog .dialog-top h2 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.25;
}

dialog .dialog-top button {
  flex: 0 0 42px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}

#designer-qr-dialog .control-label:has([aria-describedby]) {
  margin-bottom: 4px;
}

#designer-qr-dialog .control-label + .muted {
  margin: 0 0 16px;
}

#box-template [data-tray-pack],
#cut-dialog button[type=submit] {
  width: 100%;
  margin-top: 10px;
}

#box-template .quote-actions button {
  margin-top: 0;
}

#box-config-tabs button {
  font-size: .78rem;
  padding: 8px 4px;
}

#box-template canvas,
#cut-dialog canvas {
  display: block;
  margin-bottom: 12px;
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  background: #0d131d;
}

#drawer-settings {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--shop-border);
}

#drawer-settings h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

#drawer-settings > p {
  margin: 0 0 10px;
  color: var(--shop-muted);
  font-size: .85rem;
}

#drawer-settings .tray-grid {
  margin-bottom: 10px;
}

#drawer-settings .tray-grid button {
  min-height: 44px;
  padding: 6px 4px;
  font-size: .82rem;
}

#drawer-settings .actions {
  margin-bottom: 8px;
}

#drawer-settings .actions button {
  margin-top: 0;
}

#cut-dialog input[type=range] {
  width: 100%;
  margin-top: 8px;
  accent-color: var(--shop-accent);
}

/* ================= 3D MODEL DIMENSION LABELS ================= */
.model-dimensions {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.model-dimensions svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #5eead4;
  stroke-width: 1.25;
}

body.app-neon .model-dimension-tag {
  position: absolute;
  transform: translate(-50%, -50%);
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #2dd4bf99;
  border-radius: 8px;
  background: #0f202deb;
  color: #ccfbf1;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  box-shadow: 0 4px 12px #02080eb3;
}

body.app-neon button.model-dimension-tag:not(:disabled) {
  pointer-events: auto;
}

body.app-neon button.model-dimension-tag:not(:disabled)::before {
  content: "";
  position: absolute;
  inset: -7px -3px;
}

body.app-neon button.model-dimension-tag:disabled {
  background: #0f202deb;
  border-color: #2dd4bf77;
  color: #ccfbf1;
  opacity: 1;
}

#model-measurement-tag {
  transform: translate(-50%, calc(-100% - 7px));
}

#model-measurement-tag::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% - 4px);
  border: 4px solid transparent;
  border-top-color: #2dd4bf99;
}

/* ================= ACCOUNT LOGIN ================= */
#login-screen {
  width: min(100%, 490px);
}

#login-screen h1 {
  margin-top: 0;
}

#login-form .control-label {
  margin-bottom: 6px;
}

#login-form .wide {
  margin-top: 0;
}

.login-field {
  padding: 1px;
  border-radius: 12px;
  border: 1px solid var(--shop-border);
  background: #0f1621;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.login-field:hover {
  border-color: #3f6382;
}

.login-field:focus-within {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px #14b8a633;
}

body.app-neon #login-form .login-field input {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

body.app-neon #login-form .login-field input:focus {
  outline: none;
}

.login-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.login-options button {
  flex: 1 1 130px;
}

/* ================= FLOATING GLASS PILL NAVIGATION ================= */
body.app-neon:not(.selection-workspace) .app-nav {
  display: flex;
  justify-content: center;
  width: min(420px, calc(100% - 20px));
  height: auto;
  margin: 10px auto 0;
  padding: 4px 5px;
  gap: 4px;
  border: 1px solid #2b3f57;
  border-radius: 999px;
  background: #111a26eb;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px #03070db8, inset 0 1px 0 #ffffff14;
}

/* Na mobilu je Nastavení jen výrazně vpravo nahoře (spodní lišta má čistě 5 záložek). */
html:not(.pc) #nav-settings {
  display: none !important;
}

body.app-neon:not(.selection-workspace) #home-settings,
body.app-neon:not(.selection-workspace) #home-wiki {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  line-height: 1;
}

html:not(.pc) body.app-neon:not(.selection-workspace) #home-settings {
  border: 1.5px solid #2dd4bfb8;
  color: #5eead4;
  background: linear-gradient(160deg, #1b3a46 0%, #122531 100%);
  box-shadow: 0 0 0 1px #2dd4bf30, 0 6px 18px #07262d88;
}

.wiki-nav-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.app-neon #home-wiki.active,
body.app-neon #home-settings.active {
  border-color: #5eead4;
  color: #ccfbf1;
  background: linear-gradient(180deg, #1f5c60 0%, #133c45 100%);
  box-shadow: 0 0 14px #2dd4bf55, inset 0 1px 0 #ffffff28;
}

body.app-neon .app-nav button {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 52px;
  gap: 3px;
  padding: 6px 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--shop-muted);
}

body.app-neon .app-nav button span {
  color: inherit;
  font-size: .75rem;
  line-height: 1.15;
}

.app-nav-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}

body.app-neon .app-nav button::after {
  content: none;
}

body.app-neon .app-nav button[aria-current=page] {
  background: linear-gradient(180deg, #1d3c47 0%, #142a34 100%);
  border-color: #2dd4bf88;
  color: #5eead4;
  box-shadow:
    inset 0 1px 0 #99f6e438,
    0 2px 10px #14b8a62e;
}

body.app-neon .app-nav button[aria-current=page] .app-nav-icon {
  transform: translateY(-1px) scale(1.08);
}

body.app-neon .app-nav button:focus-visible {
  outline: 2px solid var(--shop-accent);
  outline-offset: -3px;
}

@media (hover: hover) {
  body.app-neon .app-nav button:hover:not(:disabled) {
    transform: none;
    color: #ccfbf1;
    background: #1a2738;
    border-color: transparent;
    box-shadow: none;
  }
  body.app-neon .app-nav button[aria-current=page]:hover:not(:disabled) {
    background: linear-gradient(180deg, #214552 0%, #16303b 100%);
    border-color: #5eead4aa;
  }
}

body.app-neon[data-active-screen=photo] .app-nav {
  display: none;
}

@media (max-width: 650px) {
  body.app-neon:not(.selection-workspace):not([data-active-screen=photo]) {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }
  body.app-neon:not(.selection-workspace) .app-nav {
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    margin-top: 0;
  }
}

/* ================= WORKSHOP 3D / 2D / SPLIT SWITCH ================= */
body.app-neon.selection-workspace #workshop-view-mode {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: #0a0f17;
  border: 1px solid #27384e;
  border-radius: 999px;
  box-shadow: inset 0 2px 5px #03060b88;
}

.view-mode-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  min-width: 46px;
  min-height: 40px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 650;
  color: var(--shop-muted);
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease;
}

.view-mode-option input[type=radio] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  opacity: 0;
}

.view-mode-icon {
  width: 13px;
  height: 13px;
  fill: #7f95ae;
  transition: transform .18s ease, fill .18s ease;
}

.view-mode-option:has(input:checked) {
  background: linear-gradient(180deg, #3c2a12 0%, #261a0a 100%);
  color: var(--shop-warm-soft);
  box-shadow: inset 0 1px 0 #fde68a44, inset 0 0 0 1px #f59e0b99;
}

.view-mode-option:has(input:checked) .view-mode-icon {
  fill: var(--shop-warm);
  transform: scale(1.08);
}

.view-mode-option:has(input:focus-visible) {
  outline: 2px solid #fcd34d;
  outline-offset: -1px;
}

@media (hover: hover) {
  .view-mode-option:hover:not(:has(input:checked)) {
    color: var(--shop-text);
  }
  .view-mode-option:hover:not(:has(input:checked)) .view-mode-icon {
    fill: #fbbf24;
  }
}

@media (max-width: 375px) {
  .view-mode-option {
    min-width: 41px;
    gap: 2px;
    padding: 4px 5px;
  }
  .view-mode-icon {
    width: 11px;
  }
}

/* ================= 3D QUICK TOOLS (+ ÚPRAVY & + ŠTĚTCE) ================= */
body.app-neon #quick-tools {
  --quick-top: 12px;
}

body.app-neon.selection-workspace #quick-tools #quick-tools-toggle {
  background: linear-gradient(180deg, #24364d 0%, #162334 62%, #111b29 100%);
  border: 1px solid #3c5d7e;
  color: #5eead4;
  box-shadow:
    inset 0 1px 0 #99f6e440,
    inset 0 -2px 0 #050a12aa,
    0 3px 0 #0a121d,
    0 8px 18px #02060c88;
  right: calc(var(--quick-right) + var(--quick-size) + 8px);
  overflow: visible;
}

body.app-neon.selection-workspace #quick-tools #quick-sculpt-toggle {
  top: var(--quick-top);
  background: linear-gradient(180deg, #fbbf24 0%, #ea8c0a 62%, #c26706 100%);
  border: 1px solid #fde68a;
  color: #261302;
  box-shadow:
    inset 0 1px 0 #fffbebaa,
    inset 0 -2px 0 #78350f88,
    0 3px 0 #6e300d,
    0 8px 18px #f59e0b44;
  overflow: visible;
}

body.app-neon #quick-tools .quick-tools-caption {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  color: #eaf3fc;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 4px #04080e;
}

body.app-neon #quick-tools :is(#quick-tools-fan, #quick-tools-drawer, #quick-sculpt-menu) {
  right: var(--quick-right);
  top: calc(var(--quick-top) + var(--quick-size) + 28px);
  max-height: calc(100% - var(--quick-top) - var(--quick-size) - 28px - var(--quick-bottom));
  background: #131c29ee;
  backdrop-filter: blur(14px);
  border: 1px solid #2d425c;
  box-shadow: 0 14px 36px #03070dc4;
}

body.app-neon #quick-tools-fan .quick-tools-action {
  padding-inline: 8px;
}

body.app-neon #quick-tools-fan :is(#quick-hole, #quick-cut) {
  background: linear-gradient(180deg, #213247 0%, #162232 100%);
  border: 1px solid #35506e;
  border-radius: 10px;
  color: #5eead4;
  box-shadow:
    inset 0 1px 0 #99f6e42e,
    0 2px 0 #091019;
}

body.app-neon #quick-tools-fan .quick-tools-icon {
  border-color: #365672;
  background: linear-gradient(180deg, #202f44, #141f2e);
  box-shadow: inset 0 1px 0 #ffffff22, 0 2px 5px #04080e88;
}

/* Structured Přidat díl shapes & create grids + transform fixtures */
.shapes.shapes-compact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 10px;
}
.shapes.shapes-compact button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 6px 3px;
  font-size: .74rem;
  line-height: 1.15;
  text-align: center;
}
.shapes.shapes-compact button b {
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 500;
}
.create-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 12px;
}
.create-actions-grid button {
  min-height: 46px;
  padding: 8px 10px;
  font-size: .82rem;
  justify-content: center;
}
.transform-tools .transform-fixtures {
  margin-top: 8px;
  gap: 6px;
}
.transform-tools .transform-fixtures > button {
  font-size: .76rem;
  padding: 7px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.app-neon.selection-workspace .viewtools .view-options {
  background: linear-gradient(180deg, #162336f5, #0e1828f8);
  border: 1px solid #35506d;
}
body.app-neon.selection-workspace .viewtools .view-options button[aria-pressed="true"] {
  background: linear-gradient(180deg, #fbbf24 0%, #ea8c0a 56%, #c26706 100%);
  border-color: #fde68a;
  color: #261302;
}
.view-shading-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
body.selection-workspace .viewtools .view-shading-row button {
  min-height: 36px;
  padding: 4px 6px;
  font-size: .76rem;
  justify-content: center;
  text-align: center;
}
.create-actions-grid .create-span-2 { grid-column: 1 / -1; }

/* 3D Gizmo floating toolbar & HUD */
#gizmo-bar {
  position: absolute;
  left: 8px;
  bottom: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #0d1726e6;
  border: 1px solid #2d435e;
  backdrop-filter: blur(8px);
  max-width: calc(100% - 86px);
  overflow-x: auto;
  scrollbar-width: none;
}
#gizmo-bar[hidden] { display: none; }
#gizmo-bar::-webkit-scrollbar { display: none; }
body.selection-workspace #gizmo-bar button {
  min-height: 36px;
  min-width: 36px;
  padding: 4px 8px;
  font-size: .76rem;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
body.selection-workspace #gizmo-bar button[aria-pressed="true"] {
  background: linear-gradient(180deg, #fbbf24 0%, #ea8c0a 56%, #c26706 100%);
  border-color: #fde68a;
  color: #261302;
  font-weight: 700;
}
#gizmo-hud {
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fbbf24 0%, #ea8c0a 56%, #c26706 100%);
  border: 1px solid #fde68a;
  color: #261302;
  font-size: .82rem;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px #020617a6;
}
#gizmo-hud[hidden] { display: none; }

/* Interactive 3D ViewCube */
#view-cube-wrap {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 10;
  width: 54px;
  height: 54px;
  perspective: 220px;
  user-select: none;
}
#view-cube-wrap[hidden],
body.edge-task-open #view-cube-wrap { display: none; }
.view-cube {
  width: 54px;
  height: 54px;
  position: relative;
  transform-style: preserve-3d;
  transform: translateZ(-27px);
}
body.selection-workspace .view-cube .vc-face {
  position: absolute;
  inset: 0;
  width: 54px;
  height: 54px;
  min-height: 0;
  min-width: 0;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  display: grid;
  place-items: center;
  background: #142235e8;
  color: #dbeafe;
  border: 1.5px solid #3c5978;
  box-shadow: inset 0 0 8px #07101c99;
  backface-visibility: hidden;
}
.view-cube .vc-front  { transform: rotateY(0deg) translateZ(27px); border-color: #3b82f6aa; }
.view-cube .vc-back   { transform: rotateY(180deg) translateZ(27px); border-color: #3b82f688; }
.view-cube .vc-right  { transform: rotateY(90deg) translateZ(27px); border-color: #ef4444aa; }
.view-cube .vc-left   { transform: rotateY(-90deg) translateZ(27px); border-color: #ef444488; }
.view-cube .vc-top    { transform: rotateX(90deg) translateZ(27px); border-color: #22c55eaa; }
.view-cube .vc-bottom { transform: rotateX(-90deg) translateZ(27px); border-color: #22c55e88; }

/* Scene Outliner (Multi-select, Solo, Eye, Lock) */
.outliner-bar, .outliner-multi-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 10px;
  flex-wrap: wrap;
}
.outliner-bar button, .outliner-multi-bar button {
  flex: 1 1 0;
  min-height: 38px;
  padding: 6px 8px;
  font-size: .78rem;
}
.outliner-bar button[aria-pressed="true"] {
  background: linear-gradient(180deg, #fbbf24 0%, #ea8c0a 56%, #c26706 100%);
  border-color: #fde68a;
  color: #261302;
  font-weight: 700;
}
.outliner-multi-bar span {
  font-size: .78rem;
  font-weight: 700;
  color: #fbbf24;
  padding: 0 4px;
}
.object-row {
  display: flex;
  align-items: stretch;
  gap: 5px;
  margin-bottom: 6px;
}
.object-row .object {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.object-row .object small { margin-left: auto; opacity: .78; flex-shrink: 0; }
.object-row.is-hidden .object { opacity: .48; }
.object-row .obj-chk { font-size: 1rem; line-height: 1; color: #fbbf24; }
body.selection-workspace .object-row .obj-icon-btn {
  flex: 0 0 40px;
  min-width: 40px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: .95rem;
  border-radius: 10px;
}
body.selection-workspace .object-row .obj-icon-btn[aria-pressed="true"] {
  border-color: #fbbf24;
  background: #2b2112;
}

/* Modifiers & Materials */
.mod-shell-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin: 8px 0;
}
#modifiers-card input[type="range"],
#material-card input[type="range"] {
  width: 100%;
  accent-color: #fbbf24;
  min-height: 30px;
}

/* Nomad Sculpt upgraded controls & Trim overlay */
#sculpt-dialog .sculpt-brushes {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
#sculpt-dialog .sculpt-brushes::-webkit-scrollbar { display: none; }
#sculpt-dialog .sculpt-brushes button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 6px 10px;
  font-size: .78rem;
  white-space: nowrap;
}
.sculpt-pro-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.sculpt-pro-row label {
  display: grid;
  gap: 4px;
  font-size: .76rem;
  color: var(--shop-muted);
}
.sculpt-pro-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.sculpt-pro-actions #sculpt-subdivide {
  min-height: 38px;
  padding: 5px 10px;
  font-size: .78rem;
}
.sculpt-trim-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}
.sculpt-trim-overlay line {
  stroke: #fbbf24;
  stroke-width: 2.5;
  stroke-dasharray: 6 4;
}

/* Ensure all 4 context actions (Rozměry, Posun, Otočit, Barva) fit cleanly side-by-side on mobile */
body.app-neon.selection-workspace #context-actions .context-group {
  gap: 6px;
}
body.app-neon.selection-workspace #context-actions .context-group button {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 6px;
  font-size: 12px;
}

/* Update banner, Overhang legend, Offline Slicer & Profile logo */
.update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 12px 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbbf24 0%, #ea8c0a 56%, #c26706 100%);
  border: 1px solid #fde68a;
  color: #261302;
  font-size: .82rem;
  font-weight: 700;
}
.update-banner[hidden] { display: none; }
.update-banner-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.update-banner-actions button { min-height: 36px; padding: 5px 10px; font-size: .78rem; }

#overhang-legend {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100% - 24px);
  padding: 6px 11px;
  border-radius: 999px;
  background: #0d1726eb;
  border: 1px solid #35506d;
  color: #e2e8f0;
  font-size: .74rem;
  pointer-events: none;
}
#overhang-legend[hidden] { display: none; }
.ov-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: -1px; margin-right: 3px; }
.ov-crit { background: #ef4444; }
.ov-warn { background: #f59e0b; }
.ov-thin { background: #a855f7; }

.slicer-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}
.slicer-kpis > div {
  padding: 8px;
  border-radius: 10px;
  background: #101c2d;
  border: 1px solid #2b415a;
  text-align: center;
}
.slicer-kpis span { display: block; font-size: .7rem; color: var(--shop-muted); }
.slicer-kpis strong { font-size: .88rem; color: #f8fafc; }
#slicer-canvas {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  display: block;
  margin: 8px auto;
  border-radius: 12px;
  border: 1px solid #2f4662;
}
.slicer-legend { text-align: center; font-size: .76rem; margin: 4px 0 8px; }
.profile-logo-box { margin: 10px 0; }
.profile-logo-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
#profile-logo-preview,
#qd-logo-preview { max-height: 44px; max-width: 120px; border-radius: 8px; background: #fff; padding: 3px; border: 1px solid #334e6e; }
#qd-accent { height: 42px; padding: 4px; cursor: pointer; }

/* Completed order card & customer ZIP dialog */
#order-card-dialog { width: min(500px, calc(100% - 20px)); }
.order-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #101c2d;
  border: 1px solid #2b415a;
}
#order-card-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #334e6e;
  flex-shrink: 0;
  background: #0b1320;
}
.order-card-summary { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.order-card-price { font-size: 1rem; color: #5eead4; }
.order-card-summary small { color: var(--shop-muted); font-size: .8rem; line-height: 1.35; }
.order-owner-box {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(20, 184, 166, .1);
  border: 1px solid rgba(45, 212, 191, .36);
  align-items: flex-start;
}
.order-owner-box span { display: flex; flex-direction: column; gap: 2px; }
.order-owner-box strong { color: #f8fafc; font-size: .88rem; }
.order-owner-box small { color: #cbd5e1; font-size: .76rem; line-height: 1.35; }
.order-zip-checks label:has(input:disabled) { opacity: .48; }
.order-file-preview {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0c1522;
  border: 1px solid #24374f;
}
.order-file-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: .78rem;
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}
.order-file-list li { margin: 2px 0; }

/* Shapekin Wiki & Visual Guide */
.wiki-search-bar { margin-bottom: 10px; }
.wiki-search-bar input { width: 100%; }
.wiki-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.wiki-cat-btn {
  padding: 7px 11px;
  min-height: 36px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
body.app-neon .wiki-cat-btn.active {
  background: linear-gradient(180deg, #1d3c47 0%, #142a34 100%);
  border-color: #2dd4bfaa;
  color: #5eead4;
}
.wiki-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.wiki-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wiki-card-head h2 {
  margin: 6px 0 4px;
  font-size: 1.08rem;
  line-height: 1.3;
}
.wiki-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  background: rgba(45, 212, 191, .14);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, .35);
}
.wiki-summary { margin: 0; font-size: .86rem; line-height: 1.45; }
.wiki-diagram-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #263b52;
  background: #0b1320;
}
.wiki-diagram {
  width: 100%;
  height: auto;
  display: block;
}
.wiki-details {
  border-radius: 10px;
  background: #0d1624;
  border: 1px solid #223449;
  padding: 8px 12px;
}
.wiki-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .86rem;
  color: #e2e8f0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wiki-details summary::after {
  content: '▾';
  color: #5eead4;
  font-size: .95rem;
  transition: transform .15s ease;
}
.wiki-details[open] summary::after { transform: rotate(180deg); }
.wiki-steps {
  margin: 10px 0 2px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: .84rem;
  line-height: 1.48;
  color: #cbd5e1;
}
.wiki-steps strong { color: #f8fafc; }
.wiki-steps code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #172638;
  color: #7dd3fc;
  font-size: .8rem;
}
.wiki-tip {
  margin: 0;
  padding: 8px 11px;
  border-radius: 9px;
  background: rgba(245, 158, 11, .1);
  border: 1px solid rgba(251, 191, 36, .3);
  color: #fde68a;
  font-size: .8rem;
  line-height: 1.42;
}
.wiki-jump-btn {
  align-self: flex-start;
  font-size: .82rem;
  min-height: 38px;
  padding: 6px 14px;
}

/* Tube along curve dialog */
#tube-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid #30455f;
  margin: 8px 0 10px;
  touch-action: none;
  cursor: crosshair;
}
@media (max-width: 350px) {
  .shapes.shapes-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .transform-tools .transform-fixtures {
    flex-wrap: wrap;
  }
  .transform-tools .transform-fixtures > button {
    flex: 1 1 45%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-logo {
    animation: none;
  }
  body.app-neon button,
  body.app-neon :is(.viewtools, .project-card-menu) > summary,
  .login-field,
  .app-nav-icon,
  .view-mode-option,
  .view-mode-icon {
    transition: none;
  }
}

/* Propojení telefonu a PC */
.sync-key code{font:600 15px/1.4 ui-monospace,monospace;letter-spacing:1px;word-break:break-all}
.sync-key code.masked{filter:blur(6px);user-select:none}
.sync-join{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.sync-join .control-label{flex:1 1 260px;margin:0}
.sync-join button{flex:0 0 auto}

/* Tvary a sestavy v dialogu Další tvary: stejně široké sloupce. */
#shape-dialog .shapes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#shape-dialog .shapes button { min-width: 0; overflow-wrap: anywhere; }

/* Díl z fotky: spodní lišta v tmavém motivu (dřív světlá tlačítka). */
body.app-neon.workspace-photo .photo-flow-footer { background: #0e131b; border-top: 1px solid #233042; }
body.app-neon.workspace-photo .photo-flow-footer #photo-prev { background: #162132; border-color: #2a3d56; color: #e6edf6; }
body.app-neon.workspace-photo .photo-flow-footer #photo-next:disabled { background: #1b2738; border-color: #2a3d56; color: #6b7a90; opacity: 1; }
body.app-neon.workspace-photo .photo-flow-footer #photo-footer-status { color: #8d9bb0; }

/* Export: souhrn rozměrů v tmavém motivu (dřív světlý rámeček). */
body.app-neon .export-size { background: #162132; border: 1px solid #2a3d56; color: #c7d2e0; }
body.app-neon .export-size strong { color: #e6edf6; }

/* Menu ⋯ v editoru je uvnitř hlavičky: rozmazané pozadí hlavičky (backdrop-filter) ho ořízne,
   takže se na telefonu vůbec neukázalo. Hlavička editoru má proto plné pozadí. */
body.app-neon.selection-workspace .app-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #0e131b; overflow: visible; }
body.app-neon.selection-workspace.mobile-nav-open #workspace-project-actions { z-index: 60; }
.view-extra-row { margin-top: 6px; flex-wrap: wrap; }
.view-extra-row select { flex: 1 1 120px; min-height: 34px; font-size: 13px; border-radius: 8px; }
/* Živé modifikátory */
.mod-live { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #22303f; }
.mod-live select { width: 100%; min-height: 36px; }
.mod-array { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-items: end; }
.mod-array-title { grid-column: 1 / -1; font-size: 12.5px; color: #cbd5e1; font-weight: 600; }
.mod-array label { display: grid; gap: 3px; font-size: 11px; color: #8d9bb0; }
.mod-array input { min-height: 34px; padding: 4px 6px; width: 100%; }
.mod-live-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* Hlášení problému a záchranný klíč */
#feedback-dialog, #recovery-dialog { width: min(520px, calc(100vw - 24px)); }
.feedback-form { display: flex; flex-direction: column; gap: 10px; }
.feedback-form h2 { margin: 0; }
.feedback-form textarea, .feedback-form input:not([type=checkbox]) { width: 100%; box-sizing: border-box; font: inherit; padding: 10px; border-radius: 10px; }
.feedback-form .actions { display: flex; justify-content: flex-end; gap: 8px; }
.recovery-key { font: 700 1.05rem ui-monospace, monospace; letter-spacing: .04em; padding: 12px; border-radius: 10px; background: #0b1220; color: #5eead4; text-align: center; word-break: break-all; user-select: all; }
.sample-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.sample-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.sample-buttons button { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 999px; }
/* Kreslení tvaru s kótami */
#poly-sketch-dialog { width: min(720px, calc(100vw - 16px)); }
.poly-wrap { display: flex; flex-direction: column; gap: 10px; }
.poly-wrap h2 { margin: 0; }
.poly-stage { position: relative; }
.poly-canvas { width: 100%; height: auto; border-radius: 12px; cursor: crosshair; touch-action: none; display: block; }
.poly-length { position: absolute; transform: translate(-50%, -50%); width: 90px; min-height: 30px; font: 600 13px ui-monospace, monospace; text-align: center; border: 2px solid #2dd4bf; border-radius: 8px; }
.poly-tools, .poly-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.poly-actions { justify-content: flex-end; }
.poly-spacer { flex: 1; }
.poly-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.poly-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.poly-info { margin: 0; min-height: 1.3em; }
#fastener-dialog { width: min(440px, calc(100vw - 24px)); }
#fastener-dialog label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.hole-preset { width: 100%; margin: 4px 0 8px; }
#collision-dialog, #motion-dialog { width: min(480px, calc(100vw - 24px)); }
#motion-dialog label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.collision-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: #fca5a5; }
#motion-dialog .actions { flex-wrap: wrap; }
#print-dialog { width: min(520px, calc(100vw - 24px)); }
.print-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.print-checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.check-icon { flex: 0 0 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.check-ok .check-icon { background: #134e4a; color: #5eead4; }
.check-warn .check-icon { background: #4a3410; color: #fbbf24; }
.check-bad .check-icon { background: #4c1d1d; color: #fca5a5; }
.print-material { display: flex; align-items: center; gap: 8px; font-size: 13px; }
#header-print, #header-quote { min-height: 36px; padding: 0 14px; font-weight: 700; }
#share-dialog, #share-open-dialog { width: min(560px, calc(100vw - 24px)); }
.share-link { width: 100%; box-sizing: border-box; font: 12.5px ui-monospace, monospace; padding: 10px; border-radius: 10px; }

/* ---------- Telefon: přehlednější editor (2.38) ---------- */
@media (max-width: 800px) {
  html:not(.pc) :is(#header-print, #header-quote) { display: none !important; }            /* Tisk je v Exportu */
  /* Přepínač 3D / 2D / Oba jen s ikonami, ať se vejde název projektu */
  html:not(.pc) .view-mode-option span { display: none; }
  html:not(.pc) .view-mode-option { padding-inline: 10px !important; min-width: 0 !important; }
  html:not(.pc) .project-status { min-width: 0; flex: 1 1 auto; overflow: hidden; }
  html:not(.pc) .project-status * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Menu štětců: dva sloupce, menší tlačítka, nepřekrývá celou obrazovku */
  html:not(.pc) #quick-sculpt-menu { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 52vh; overflow-y: auto; width: min(320px, calc(100vw - 24px)); }
  html:not(.pc) #quick-sculpt-menu[hidden] { display: none !important; }
  html:not(.pc) #quick-sculpt-menu button { min-height: 44px !important; height: auto !important; padding: 6px 8px !important; font-size: 14px !important; }
}
/* Historie úprav i na telefonu (styl jako na PC) */
.cad-history-box { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.cad-history-box[hidden] { display: none !important; }
.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.history-step { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; min-height: 44px; padding: 6px 10px; border-radius: 10px; }
.history-step.open { outline: 2px solid #2dd4bf; }
.history-num { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #1f3a3a; color: #5eead4; font-size: 12px; font-weight: 800; }
.history-edit { display: flex; flex-direction: column; gap: 8px; padding: 8px 4px 4px 32px; }
.history-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history-field input { width: 110px; }
.history-actions { display: flex; flex-wrap: wrap; gap: 6px; }
/* Telefon: stejné tmavé pozadí náhledů a prázdných projektů */
body.app-neon :is(#projects-screen, #library-screen) .card-open img, body.app-neon :is(#projects-screen, #library-screen) .card-placeholder { background: #162132 !important; color: #4b6378 !important; }
/* Telefon: název projektu v hlavičce jen tam, kde se s projektem pracuje (editor, fotka). */
@media (max-width: 800px) {
  html:not(.pc) body:is([data-active-screen=designer],[data-active-screen=library],[data-active-screen=stock],[data-active-screen=inbox],[data-active-screen=settings],[data-active-screen=wiki]) .project-status { visibility: hidden; }
}
.poly-edit { position: absolute; z-index: 5; display: flex; flex-direction: column; gap: 6px; width: 230px; padding: 10px; background: #0f151f; border: 1px solid #2dd4bf; border-radius: 10px; box-shadow: 0 12px 30px #000a; }
.poly-edit[hidden] { display: none; }
.poly-edit label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.poly-edit { width: 260px; max-height: 92%; overflow: auto; }
.poly-flags { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.poly-edit label.poly-check { flex-direction: row; align-items: center; gap: 4px; }
.poly-rel { display: grid; grid-template-columns: 1fr 70px; gap: 6px; border-top: 1px solid #1f2b3a; padding-top: 6px; }
.poly-pairs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.poly-pair { font-size: 12px; background: #13202d; border-radius: 6px; padding: 2px 4px 2px 8px; }
.poly-pair button { padding: 0 6px; min-height: 0; }
.poly-edit input, .poly-edit select { min-height: 30px; }
.poly-edit-actions { display: flex; justify-content: flex-end; gap: 6px; }
.poly-mode { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.poly-fields label[hidden] { display: none; }
#loft-dialog, #shell-dialog { width: min(520px, calc(100vw - 24px)); }
.loft-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.loft-row { display: flex; flex-direction: column; gap: 6px; border: 1px solid #233042; border-radius: 10px; padding: 8px 10px; margin: 0; }
.loft-row label, #loft-dialog > div > label, #shell-dialog label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.loft-row label[hidden] { display: none; }
@media (max-width: 500px) { .loft-rows { grid-template-columns: 1fr; } }
.history-field input.bound { border-color: #a78bfa !important; color: #ddd6fe; }
#params-dialog { width: min(480px, calc(100vw - 24px)); }
.params-list { display: flex; flex-direction: column; gap: 6px; }
.param-row { display: grid; grid-template-columns: 1fr auto 110px auto; gap: 6px; align-items: center; }
.param-row input { min-height: 34px; }
#drawing-dialog { width: min(920px, calc(100vw - 24px)); }
.drawing-preview { background: #fff; border-radius: 8px; overflow: hidden; }
.drawing-preview svg { width: 100%; height: auto; display: block; }
/* Lekce */
#lessons-dialog { width: min(520px, calc(100vw - 24px)); }
.lesson-list { display: grid; gap: 8px; }
.lesson-card { display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 0 14px; text-align: left; }
#lesson-panel { position: fixed; z-index: 90; left: 16px; bottom: 80px; width: min(360px, calc(100vw - 32px)); padding: 12px 14px; background: #0f151f; border: 1px solid #2dd4bf; border-radius: 14px; box-shadow: 0 16px 40px #000b; color: #e2e8f0; }
#lesson-panel[hidden] { display: none; }
#lesson-panel p { margin: 8px 0; font-size: 14px; line-height: 1.45; }
.lesson-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.lesson-progress { height: 4px; background: #1e2a3a; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.lesson-progress i { display: block; height: 100%; background: #2dd4bf; transition: width .3s; }
.lesson-actions { display: flex; justify-content: flex-end; gap: 6px; }
.lesson-actions button { min-height: 32px; padding: 0 12px; }
html.pc #lesson-panel { left: 80px; bottom: 44px; }
@media (max-width: 800px) { #lesson-panel { bottom: 170px; } }
/* Komentáře k modelu */
#comment-pins { position: absolute; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.comment-pin { position: absolute; left: -13px; top: -30px; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform-origin: 13px 30px; background: #f59e0b; color: #1f1300; display: grid; place-items: center; font: 800 12px system-ui; box-shadow: 0 3px 10px #0008; rotate: -45deg; }
.comment-pin { rotate: 0deg; border-radius: 50%; }
.comment-pin.done { background: #475569; color: #e2e8f0; }
.comment-pin[hidden] { display: none; }
#comment-panel { position: fixed; z-index: 85; right: 16px; top: 70px; width: min(330px, calc(100vw - 32px)); max-height: 60vh; overflow-y: auto; padding: 12px; background: #0f151f; border: 1px solid #2a3a50; border-radius: 14px; box-shadow: 0 16px 40px #000b; color: #e2e8f0; }
#comment-panel[hidden] { display: none; }
.comment-head { display: flex; align-items: center; gap: 6px; }
.comment-head strong { margin-right: auto; }
.comment-head button { min-height: 30px; padding: 0 10px; }
#comment-add.active { background: #f59e0b; color: #1f1300; }
.comment-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.comment-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: start; }
.comment-item.done .comment-body p { text-decoration: line-through; opacity: .6; }
.comment-num { width: 24px; height: 24px; border-radius: 50%; background: #f59e0b; color: #1f1300; display: grid; place-items: center; font: 800 12px system-ui; }
.comment-item.done .comment-num { background: #475569; color: #e2e8f0; }
.comment-body p { margin: 0 0 2px; font-size: 13.5px; white-space: pre-wrap; }
.comment-actions { display: flex; gap: 4px; }
.comment-actions button { min-height: 28px; width: 30px; padding: 0; }
body.comment-placing #viewport canvas { cursor: crosshair !important; }
#comment-dialog { width: min(440px, calc(100vw - 24px)); }
#comment-dialog textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px; border-radius: 10px; }
html.pc #comment-panel { right: 350px; }
.printer-link { border: 1px solid #233042; border-radius: 10px; padding: 8px 10px; }
.printer-link summary { cursor: pointer; font-size: 13.5px; }
.printer-link[open] { display: flex; flex-direction: column; gap: 6px; }
.printer-link label:not(.check-label) { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }

/* Galerie modelů (2.40) */
#gallery-dialog { width: min(980px, 96vw); max-height: 92vh; }
.gallery-wrap { display: flex; flex-direction: column; gap: 10px; }
.gallery-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gallery-bar input[type=search] { flex: 1 1 220px; }
.gallery-tabs { display: flex; gap: 4px; }
.gallery-tabs button.active { background: #14b8a6; color: #04211d; border-color: #14b8a6; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; overflow: auto; max-height: 62vh; }
.gallery-grid[hidden] { display: none; }
.gallery-card { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px; text-align: left; border-radius: 10px; }
.gallery-card img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 7px; background: #162132; }
.gallery-card strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-card span { font-size: 12px; }
.gallery-detail[hidden] { display: none; }
.gallery-detail-body { display: grid; grid-template-columns: minmax(200px, 360px) 1fr; gap: 16px; margin-top: 8px; }
.gallery-detail-body img { width: 100%; border-radius: 10px; background: #162132; }
.gallery-desc { white-space: pre-wrap; }
.gallery-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gallery-tags span { background: #13202d; border-radius: 6px; padding: 2px 8px; font-size: 12.5px; }
.gallery-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gallery-publish { display: grid; grid-template-columns: 200px 1fr; gap: 12px; }
.gallery-publish label { display: flex; flex-direction: column; gap: 3px; margin-bottom: 6px; }
.gallery-preview { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 10px; background: #162132; }
.gallery-own { display: flex; gap: 8px; align-items: flex-start; }
@media (max-width: 640px) { .gallery-detail-body, .gallery-publish { grid-template-columns: 1fr; } .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* Cenová nabídka z modelu (2.40) */
#quote-wizard { width: min(720px, 96vw); max-height: 94vh; }
.qw-wrap { display: flex; flex-direction: column; gap: 12px; }
.qw-step { border: 1px solid #1f2b3d; border-radius: 12px; padding: 12px; background: #0e1626; }
.qw-step h3 { margin: 0 0 8px; font-size: 1rem; color: #5eead4; }
.qw-parts { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.qw-part { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 4px 10px; align-items: center; padding: 8px; border-radius: 10px; background: #0b1220; }
.qw-part.off { opacity: .5; }
.qw-part small { grid-column: 1 / -1; }
.qw-part-name { display: flex; gap: 6px; align-items: center; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qw-material { border-left: 8px solid var(--qw-swatch, #334155); min-width: 0; }
.three-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qw-breakdown { display: flex; flex-direction: column; gap: 4px; }
.qw-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed #1f2b3d; }
.qw-total { font-size: 1.15rem; border-bottom: 0; padding-top: 6px; color: #f8fafc; }
.qw-total strong { color: #2dd4bf; }
.qw-warn { color: #fbbf24; margin: 6px 0 0; }
.qw-rates { margin-top: 10px; }
.qw-actions { position: sticky; bottom: 0; background: #0f151f; padding-top: 8px; flex-wrap: wrap; }
.print-quote-btn { margin: 4px 0 8px; }
.quote-doc-select { min-width: 0; }
.quote-finish-dialog { width: min(480px, 94vw); }
.quote-check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; }
@media (max-width: 560px) { .qw-part { grid-template-columns: 1fr; } .three-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } .qw-actions button { flex: 1 1 100%; } }
.qw-mode { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.qw-mode button.active { background: #14b8a6; color: #04211d; border-color: #14b8a6; font-weight: 700; }
.qw-slicer { display: flex; flex-direction: column; gap: 8px; }
.qw-slicer-head { margin: 0; }
.qw-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid #fff5; vertical-align: -1px; }
.qw-extra-fil { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.qw-share { width: 64px; } .qw-share-wrap { white-space: nowrap; }
.qw-x { padding: 4px 9px; min-height: 0; }
.qw-link { background: none; border: 0; color: #5eead4; padding: 2px 0; min-height: 0; text-decoration: underline; cursor: pointer; }
.qw-sub { margin: 12px 0 4px; font-size: .9rem; color: #cbd5e1; }
.qw-extras { display: flex; flex-direction: column; gap: 6px; }
.qw-extra { display: grid; grid-template-columns: minmax(0, 1.6fr) auto auto auto; gap: 6px; align-items: center; }
.qw-extra small { grid-column: 1 / -1; }
.qw-inline { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: .85rem; }
.qw-inline input { width: 74px; }
.extras-stock-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.extras-stock-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 9px; background: #0b1220; }
.extras-stock-row.empty strong { color: #f87171; }
.extras-stock-row input { width: 80px; }
.extras-stock-new { display: grid; grid-template-columns: minmax(0, 1fr) 90px 100px auto; gap: 6px; }
@media (max-width: 560px) { .qw-extra { grid-template-columns: 1fr auto auto; } .qw-extra > input:first-child { grid-column: 1 / -1; } .extras-stock-row, .extras-stock-new { grid-template-columns: 1fr 1fr; } .extras-stock-row strong, .extras-stock-new input:first-child { grid-column: 1 / -1; } }
