/* ========================================
   Flexi Panely — Konfigurátor stěn
   Brand: Skymax Living s.r.o.
   ======================================== */

:root {
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
  --font-display: 'DM Sans', 'Work Sans', sans-serif;

  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Skymax Living brand */
  --color-primary: #0B3D91;
  --color-primary-hover: #092E6E;
  --color-primary-light: #E8EEF8;
  --color-accent: #E87722;
  --color-accent-hover: #D06A1E;
  --color-accent-light: #FDF0E5;

  --color-bg: #F5F6F8;
  --color-surface: #FFFFFF;
  --color-surface-2: #F8F9FB;
  --color-border: #D8DCE3;
  --color-border-light: #E8EBF0;
  --color-text: #1A2038;
  --color-text-muted: #6B7280;
  --color-text-faint: #9CA3AF;

  --color-door: #5B9BD5;
  --color-spacer: #E87722;
  --color-panel: #6B7B8D;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --shadow-sm: 0 1px 3px rgba(11,61,145,0.06);
  --shadow-md: 0 4px 16px rgba(11,61,145,0.08);
  --shadow-lg: 0 12px 40px rgba(11,61,145,0.12);

  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- HEADER ---- */
.site-header {
  background: var(--color-primary);
  color: white;
  padding: var(--space-3) var(--space-6);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.logo-area {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.logo-icon {
  height: 36px;
  width: auto;
  display: block;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  color: #fff;
}
.logo-tagline {
  font-size: 0.7rem;
  font-style: italic;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.02em;
}
.product-badge {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.12);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.15);
}

/* ---- HERO ---- */
/* hero — uses .tool-hero from pages.css */

/* ---- DECORATIVE WATERMARK ---- */
main {
  position: relative;
  overflow: hidden;
}
main::after {
  content: '';
  position: absolute;
  bottom: -8%;
  right: -5%;
  width: 700px;
  height: 840px;
  background: url('./icon-outline.png') no-repeat center / contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}
@media (max-width: 900px) {
  main::after {
    width: 400px;
    height: 480px;
    bottom: -5%;
    right: -10%;
  }
}

/* ---- CALCULATOR LAYOUT ---- */
.calculator-section {
  position: relative;
  z-index: 1;
  padding: var(--space-10) var(--space-6);
}
.calc-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 900px) {
  .calc-container {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .header-inner {
    flex-wrap: nowrap;
  }
  .logo-icon {
    height: 26px;
  }
  .logo-name {
    font-size: var(--text-sm);
  }
  .logo-tagline {
    font-size: 0.6rem;
  }
  .product-badge {
    font-size: 0.65rem;
    padding: var(--space-1) var(--space-2);
  }
}

/* ---- INPUT PANEL ---- */
.input-panel {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
}
.input-panel h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-6);
}
.input-panel h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.optional {
  font-weight: 400;
  color: var(--color-text-muted);
}
.divider {
  height: 1px;
  background: var(--color-border-light);
  margin: var(--space-6) 0;
}

/* ---- FORM ELEMENTS ---- */
.input-group {
  margin-bottom: var(--space-4);
}
.input-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.input-with-unit {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  transition: border-color var(--transition);
}
.input-with-unit:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11,61,145,0.1);
}
.input-with-unit input,
.input-with-unit select {
  border: none;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-variant-numeric: tabular-nums;
  flex: 1;
  min-width: 0;
  background: transparent;
  outline: none;
}
.input-with-unit select {
  cursor: pointer;
  appearance: auto;
}
.unit {
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  border-left: 1px solid var(--color-border-light);
  white-space: nowrap;
}
.input-hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
  display: block;
}

/* ---- TOGGLE ---- */
.checkbox-group {
  margin-bottom: var(--space-4);
}
.toggle-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
}
.toggle-label input { display: none; }
.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--color-border);
  border-radius: 12px;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-label input:checked + .toggle-switch {
  background: var(--color-primary);
}
.toggle-label input:checked + .toggle-switch::after {
  transform: translateX(20px);
}

/* ---- BUTTON ---- */
.calc-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background: var(--color-accent);
  color: white;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  margin-top: var(--space-6);
}
.calc-button:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.calc-button:active {
  transform: translateY(0);
}
.calc-button svg {
  display: inline-block;
  flex-shrink: 0;
}

/* ---- RESULT PANEL ---- */
.result-panel {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  min-height: 500px;
  display: flex;
  flex-direction: column;
}
.result-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  color: var(--color-text-faint);
  text-align: center;
}
.result-placeholder p {
  font-size: var(--text-sm);
}

.result-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-6);
}
.result-content h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

/* ---- WALL VISUALIZATION ---- */
.wall-viz-container {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}
.wall-viz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}
.viz-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.viz-dims {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.wall-viz {
  width: 100%;
  overflow-x: auto;
}
.wall-viz svg {
  display: block;
  margin: 0 auto;
}
.viz-legend {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

/* ---- PANEL LIST ---- */
.panel-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.panel-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  font-size: var(--text-sm);
}
.panel-item-color {
  width: 8px;
  height: 32px;
  border-radius: 4px;
  flex-shrink: 0;
}
.panel-item-info {
  flex: 1;
}
.panel-item-name {
  font-weight: 600;
  color: var(--color-text);
}
.panel-item-detail {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.panel-item-count {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  min-width: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---- SUMMARY ---- */
.result-summary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0A2F6E 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-4);
}
.summary-item {
  text-align: center;
}
.summary-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  display: block;
  font-variant-numeric: tabular-nums;
}
.summary-label {
  font-size: var(--text-xs);
  opacity: 0.7;
  display: block;
  margin-top: var(--space-1);
}

/* ---- HEIGHT INFO ---- */
.height-info {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--color-accent-light);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-sm);
}
.height-info strong {
  color: var(--color-accent);
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--color-primary);
  color: white;
  padding: var(--space-4) var(--space-6);
  text-align: center;
}
.footer-inner {
  font-size: var(--text-xs);
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.footer-inner a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.3);
}
.footer-sep { opacity: 0.4; }

/* ---- UTILITIES ---- */
.hidden { display: none !important; }

/* ---- ERROR ---- */
.input-error .input-with-unit {
  border-color: #DC2626;
}
.error-msg {
  color: #DC2626;
  font-size: var(--text-xs);
  margin-top: var(--space-1);
}

/* ========================================
   NEW STYLES — Multi-door & Export
   ======================================== */

/* ---- DOOR LIST ---- */
.door-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.door-entry {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  position: relative;
}
.door-entry-error {
  border-color: #DC2626;
}
.door-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.door-entry-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-door);
}
.door-remove-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 1.25rem;
  line-height: 1;
  transition: all var(--transition);
  cursor: pointer;
  background: none;
  border: none;
}
.door-remove-btn:hover {
  background: #FEE2E2;
  color: #DC2626;
}
.door-entry .input-group {
  margin-bottom: var(--space-3);
}
.door-entry .input-group:last-of-type {
  margin-bottom: 0;
}

/* ---- ADD DOOR BUTTON ---- */
.add-door-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  margin-bottom: var(--space-2);
}
.add-door-btn:hover {
  border-color: var(--color-door);
  color: var(--color-door);
  background: rgba(91, 155, 213, 0.06);
}
.add-door-btn svg {
  flex-shrink: 0;
}

/* ---- EXPORT SECTION ---- */
.export-section {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}
.export-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  white-space: nowrap;
}
.export-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.export-btn svg {
  flex-shrink: 0;
}
.export-btn--pdf {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.export-btn--pdf:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #fff;
}
.export-btn--pdf.is-generating {
  opacity: 0.7;
  pointer-events: none;
}
.export-btn--pdf.is-generating::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pdfSpin 0.6s linear infinite;
  margin-left: 6px;
}
@keyframes pdfSpin {
  to { transform: rotate(360deg); }
}

/* ---- DOOR ADJUSTMENT NOTE ---- */
.door-adjust-note {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-sm);
  color: var(--color-primary);
}

/* ========================================
   MODE SWITCHER
   ======================================== */
.mode-switcher-bar {
  display: flex;
  justify-content: center;
  padding: var(--space-6) var(--space-6) 0;
  background: var(--color-bg);
  position: relative;
  z-index: 1;
}
.mode-switcher {
  display: inline-flex;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 4px;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.mode-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}
.mode-btn.active {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}
.mode-btn svg {
  flex-shrink: 0;
}

/* ========================================
   ADVANCED MODE — LAYOUT
   ======================================== */
.adv-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--space-6);
  align-items: start;
}
/* ---- SIDEBAR ---- */
.sidebar {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
  position: sticky;
  top: var(--space-4);
}

@media (max-width: 1060px) {
  .adv-container {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    max-height: none;
  }
  .adv-main {
    min-height: 0;
  }
  .adv-placeholder,
  .adv-waiting {
    min-height: 200px;
  }
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
}
.sidebar-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}
.sidebar-add-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.sidebar-add-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

/* Sidebar scroll wrapper */
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Room tree */
.room-tree {
  padding: var(--space-3);
}
.room-node {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-light);
}
.room-node:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.room-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.room-header:hover {
  background: var(--color-surface-2);
}
.room-collapse-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.room-collapse-btn.collapsed {
  transform: rotate(-90deg);
}
.room-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
}
.room-wall-count {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  flex-shrink: 0;
}
.room-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition);
}
.room-header:hover .room-actions {
  opacity: 1;
}
@media (max-width: 1060px) {
  .room-actions {
    opacity: 1;
  }
}
.room-action-btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.room-action-btn:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.room-delete-btn:hover {
  background: #FEE2E2;
  color: #DC2626;
}

/* Wall list inside room */
.wall-list {
  padding-left: var(--space-8);
}
.wall-node {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid transparent;
  margin-bottom: 2px;
}
.wall-node:hover {
  background: var(--color-surface-2);
}
.wall-node.active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}
.wall-node-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wall-node-dims {
  font-size: 0.7rem;
  color: var(--color-text-faint);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.wall-status {
  font-size: 0.7rem;
  flex-shrink: 0;
}
.wall-status--ok {
  color: #16A34A;
}
.wall-status--pending {
  color: var(--color-text-faint);
}
.wall-delete-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--color-text-faint);
  cursor: pointer;
  opacity: 0;
  transition: all var(--transition);
}
.wall-node:hover .wall-delete-btn {
  opacity: 1;
}
@media (max-width: 1060px) {
  .wall-delete-btn {
    opacity: 1;
  }
}
.wall-delete-btn:hover {
  background: #FEE2E2;
  color: #DC2626;
}

/* Inline rename */
.inline-rename {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 1px var(--space-2);
  outline: none;
  background: var(--color-surface);
  color: var(--color-text);
  width: 100%;
  min-width: 0;
}
/* Rename edit button (touch-friendly) */
.rename-btn {
  width: 22px;
  height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--color-text-faint);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  padding: 0;
}
.rename-btn:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}
@media (max-width: 1060px) {
  .rename-btn {
    display: flex;
  }
}

/* Sidebar wall form */
.sidebar-wall-form {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border-light);
  background: var(--color-surface-2);
}
.sidebar-wall-form .input-group {
  margin-bottom: var(--space-3);
}
.sidebar-wall-form-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-light);
}
.sidebar-wall-form .adv-wall-room-name {
  color: var(--color-text-muted);
  font-weight: 500;
}
.sidebar-wall-form .adv-wall-sep {
  color: var(--color-text-faint);
  font-weight: 400;
}
.sidebar-wall-form .adv-wall-wall-name {
  color: var(--color-primary);
}
.sidebar-wall-form .calc-button {
  margin-top: var(--space-4);
}
.sidebar-wall-form .adv-doors-section {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
}

/* Sidebar total */
.sidebar-total {
  border-top: 1px solid var(--color-border-light);
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface-2);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.sidebar-total-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.sidebar-total-values {
  display: flex;
  gap: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
}

/* ---- ADVANCED MAIN ---- */
.adv-main {
  min-height: 500px;
}
.adv-placeholder {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  color: var(--color-text-faint);
  text-align: center;
  padding: var(--space-8);
}
.adv-placeholder p {
  font-size: var(--text-sm);
}

/* (Old .adv-wall-detail removed — form is now in sidebar) */

.adv-doors-section {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-light);
}
.adv-doors-section h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.adv-result {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  padding: var(--space-6) var(--space-8);
}

/* Waiting state (wall selected but not yet calculated) */
.adv-waiting {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  color: var(--color-text-faint);
  text-align: center;
  padding: var(--space-8);
}
.adv-waiting p {
  font-size: var(--text-sm);
}

/* ---- KUSOVNIK TABS ---- */
.kusovnik-section {
  margin-top: var(--space-6);
}
.kusovnik-tabs {
  display: flex;
  gap: 4px;
  background: var(--color-surface-2);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-4);
}
.kusovnik-tab {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  background: transparent;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.kusovnik-tab:hover {
  color: var(--color-text);
}
.kusovnik-tab.active {
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.kusovnik-content {
  /* no extra styles needed */
}
.kusovnik-empty {
  text-align: center;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
  padding: var(--space-6) 0;
}

/* ========================================
   CATALOG SECTION (Panel types overview)
   ======================================== */
.catalog-section {
  position: relative;
  z-index: 1;
  padding: var(--space-16) var(--space-6) var(--space-10);
  background: var(--color-bg);
}
.catalog-container {
  max-width: 1100px;
  margin: 0 auto;
}
.catalog-heading {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: var(--space-2);
  display: inline-block;
  margin-bottom: var(--space-4);
}
.catalog-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 700px;
  margin-bottom: var(--space-8);
}

/* Panel cards grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-10);
  align-items: stretch;
}
.cat-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.cat-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-1);
  text-align: center;
  color: var(--color-text);
}
.cat-dims {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  text-align: center;
}
.cat-svg-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}
.cat-card svg {
  display: block;
  margin: 0 auto;
}
.cat-notes {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  text-align: center;
  margin-top: var(--space-4);
}
.cat-card--door {
  grid-column: span 2;
}
@media (max-width: 900px) {
  .cat-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .cat-grid {
    grid-template-columns: 1fr;
  }
  .cat-card--door {
    grid-column: span 1;
  }
}

/* Wall demo card */
.cat-demo-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  margin-bottom: var(--space-8);
}
.cat-demo-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.cat-demo-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.cat-legend {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.cat-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.cat-legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.06);
}

/* Specs table */
.cat-specs {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.cat-specs th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--color-primary);
  font-size: var(--text-xs);
}
.cat-specs td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-light);
  font-size: var(--text-sm);
}
.cat-specs tr:last-child td {
  border-bottom: none;
}
.cat-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-display);
}
.cat-chip--gray {
  background: #F2F4F6;
  color: #5C6B7A;
}
.cat-chip--orange {
  background: var(--color-accent-light);
  color: #A06020;
}
.cat-chip--blue {
  background: var(--color-primary-light);
  color: #2A68A2;
}

.cat-footer-note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
  margin-top: var(--space-6);
}

/* ---- PRINT STYLES ---- */
@media print {
  .site-header,
  .tool-hero,
  .hero,
  .input-panel,
  .site-footer,
  .export-section,
  .mode-switcher-bar,
  .sidebar,
  .catalog-section {
    display: none !important;
  }
  .calculator-section {
    padding: 0 !important;
  }
  .calc-container {
    grid-template-columns: 1fr !important;
  }
  .adv-container {
    grid-template-columns: 1fr !important;
  }
  .result-panel,
  .adv-wall-detail {
    box-shadow: none !important;
    border: none !important;
  }
  body {
    background: white !important;
  }
}
