:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== MOBILE OPTIMIZATION ========== */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
  /* Prevent layout shift on mobile when scrollbar appears */
  overflow-y: scroll;
  /* Ensure proper rendering on iOS */
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
  /* Better touch target */
  touch-action: manipulation;
}

a:hover {
  color: #535bf2;
}

/* Ensure buttons have proper touch targets (minimum 44x44 on mobile) */
button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  min-height: 44px;
  min-width: 44px;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
  touch-action: manipulation;
  /* Prevent zoom on double-tap on iOS */
  -webkit-user-select: none;
  user-select: none;
}

button:hover {
  border-color: #646cff;
}

button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

button:active {
  transform: scale(0.98);
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

/* Input field optimization for mobile */
input,
select,
textarea {
  font-size: 16px; /* Prevent zoom on iOS when focusing input */
  touch-action: manipulation;
  -webkit-appearance: none; /* Remove default iOS styling */
  appearance: none;
  border-radius: 6px;
  border: 1px solid #ddd;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Custom select dropdown arrow for mobile */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23333' d='M8 12l-8-8h16z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 28px;
}

/* Prevent iOS keyboard from covering inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  font-size: 16px; /* Prevents iOS auto-zoom on focus */
}

/* The global input reset removes native checkbox rendering, so define a
   consistent, large control with an explicit checked and focus state. */
input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: checkbox;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  accent-color: #059669;
  cursor: pointer;
  vertical-align: middle;
}

input[type="checkbox"]:focus-visible {
  outline: 3px solid rgb(16 185 129 / 0.35);
  outline-offset: 2px;
}

::-webkit-input-placeholder {
  color: #999;
}

::placeholder {
  color: #999;
  opacity: 1;
}

/* Mobile-friendly table */
table {
  width: 100%;
  border-collapse: collapse;
  touch-action: pan-x;
}

/* Reduce system font size adjustment on landscape orientation */
@media (orientation: landscape) {
  body {
    max-height: 100vh;
    overflow-y: auto;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High DPI devices (retina displays) */
@media (min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Subtle adjustments for high-DPI screens */
  body {
    -webkit-font-smoothing: subpixel-antialiased;
  }
}
/* Desktop Application Style for TestPage */

/* Application Container - Desktop Look */
.desktop-app-container {
  width: 100%;
  min-height: 100vh;
  background: #f0f0f0; /* Flat gray background like desktop apps */
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
}

/* Menu Bar - Like Windows/macOS apps */
.desktop-menu-bar {
  background: linear-gradient(to bottom, #fafafa 0%, #e8e8e8 100%);
  border-bottom: 1px solid #b0b0b0;
  padding: 0;
  height: 28px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.desktop-menu-item {
  padding: 4px 12px;
  font-size: 12px;
  color: #333;
  cursor: pointer;
  border: none;
  background: none;
  height: 100%;
  display: flex;
  align-items: center;
  transition: background 0.15s ease;
}

.desktop-menu-item:hover {
  background: rgba(0, 0, 0, 0.08);
}

.desktop-menu-item:active {
  background: rgba(0, 0, 0, 0.15);
}

/* Toolbar - Icon buttons */
.desktop-toolbar {
  background: linear-gradient(to bottom, #f5f5f5 0%, #e5e5e5 100%);
  border-bottom: 1px solid #c0c0c0;
  padding: 4px 8px;
  display: flex;
  gap: 2px;
  align-items: center;
}

.toolbar-button {
  padding: 4px 8px;
  border: 1px solid #ababab;
  background: linear-gradient(to bottom, #fefefe 0%, #e8e8e8 100%);
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.1s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.toolbar-button:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #efefef 100%);
  border-color: #0078d4;
}

.toolbar-button:active {
  background: linear-gradient(to bottom, #e0e0e0 0%, #d0d0d0 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.toolbar-button.primary {
  background: linear-gradient(to bottom, #0078d4 0%, #0063b1 100%);
  color: white;
  border-color: #005a9e;
}

.toolbar-button.primary:hover {
  background: linear-gradient(to bottom, #1084d8 0%, #0070c9 100%);
}

.toolbar-separator {
  width: 1px;
  height: 18px;
  background: #c0c0c0;
  margin: 0 2px;
}

/* Main Content Area */
.desktop-main-content {
  width: 100%;
  max-width: none;
  flex: 1;
  margin: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}

/* Tab Navigation - Desktop style */
.desktop-tab-container {
  width: 100%;
  background: #ffffff;
  border: 1px solid #c0c0c0;
  border-radius: 0;
  margin-bottom: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.desktop-tab-header {
  background: linear-gradient(to bottom, #f5f5f5 0%, #e5e5e5 100%);
  border-bottom: 1px solid #c0c0c0;
  display: flex;
  padding: 0;
  overflow-x: auto;
}

.desktop-tab-button {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 400;
  border: none;
  border-right: 1px solid #d0d0d0;
  background: none;
  color: #333;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  position: relative;
}

.desktop-tab-button:hover {
  background: rgba(0, 120, 212, 0.05);
}

.desktop-tab-button.active {
  background: #ffffff;
  font-weight: 600;
  color: #0078d4;
  border-bottom: 2px solid #0078d4;
  margin-bottom: -1px;
}

.desktop-tab-button.active::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #0078d4;
}

/* Tab Content */
.desktop-tab-content {
  padding: 12px;
  background: #ffffff;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Form Controls - Desktop style */
.desktop-form-group {
  margin-bottom: 8px;
}

.desktop-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin-bottom: 3px;
}

.desktop-input {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #ababab;
  border-radius: 2px;
  font-size: 12px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s ease;
}

.desktop-input:focus {
  outline: none;
  border-color: #0078d4;
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.1);
}

.desktop-select {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #ababab;
  border-radius: 2px;
  font-size: 12px;
  background: #ffffff;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.desktop-select:focus {
  outline: none;
  border-color: #0078d4;
}

/* Buttons */
.desktop-button {
  padding: 6px 12px;
  border: 1px solid #ababab;
  background: linear-gradient(to bottom, #fefefe 0%, #e8e8e8 100%);
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  transition: all 0.1s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.desktop-button:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #efefef 100%);
  border-color: #0078d4;
}

.desktop-button:active {
  background: linear-gradient(to bottom, #e0e0e0 0%, #d0d0d0 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.desktop-button.primary {
  background: linear-gradient(to bottom, #0078d4 0%, #0063b1 100%);
  color: white;
  border-color: #005a9e;
}

.desktop-button.primary:hover {
  background: linear-gradient(to bottom, #1084d8 0%, #0070c9 100%);
}

.desktop-button.primary:active {
  background: linear-gradient(to bottom, #005a9e 0%, #004578 100%);
}

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

/* Panel - GroupBox style */
.desktop-panel {
  border: 1px solid #c0c0c0;
  background: #ffffff;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.desktop-panel-header {
  background: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
  border-bottom: 1px solid #c0c0c0;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.desktop-panel-header:hover {
  background: linear-gradient(to bottom, #f8f8f8 0%, #ebebeb 100%);
}

.desktop-panel-content {
  padding: 10px;
}

/* Table - Grid style */
.desktop-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #c0c0c0;
  font-size: 11px;
}

.desktop-table th {
  background: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
  border: 1px solid #c0c0c0;
  padding: 6px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
}

.desktop-table td {
  border: 1px solid #d8d8d8;
  padding: 4px 8px;
  background: #ffffff;
}

.desktop-table tr:nth-child(even) td {
  background: #f9f9f9;
}

.desktop-table tr:hover td {
  background: #e8f4ff;
}

/* Status Bar */
.desktop-status-bar {
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
  border-top: 1px solid #b0b0b0;
  padding: 2px 8px;
  font-size: 11px;
  color: #555;
  display: flex;
  gap: 12px;
  align-items: center;
  height: 20px;
  width: 100%;
  position: sticky;
  bottom: 0;
  flex-shrink: 0;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.status-separator {
  width: 1px;
  height: 12px;
  background: #c0c0c0;
}

/* Navigation buttons */
.desktop-nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
  gap: 8px;
}

/* Title bar */
.desktop-title-bar {
  background: linear-gradient(to bottom, #ffffff 0%, #f0f0f0 100%);
  padding: 8px 12px;
  border-bottom: 1px solid #c0c0c0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.desktop-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.desktop-subtitle {
  font-size: 11px;
  color: #666;
  margin: 0;
}

/* Alert/Info boxes */
.desktop-info-box {
  padding: 8px 12px;
  background: #e8f4ff;
  border: 1px solid #0078d4;
  border-left: 4px solid #0078d4;
  margin-bottom: 8px;
  font-size: 12px;
  color: #333;
}

.desktop-warning-box {
  padding: 8px 12px;
  background: #fff4e5;
  border: 1px solid #ff9800;
  border-left: 4px solid #ff9800;
  margin-bottom: 8px;
  font-size: 12px;
  color: #333;
}

/* Responsive */
@media (max-width: 768px) {
  .desktop-main-content {
    padding: 4px;
  }
  
  .desktop-tab-content {
    padding: 8px;
  }
}
.modern-configurator {
  min-height: 100vh;
  color: #f3f6fb;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.24), transparent 28%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.14), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #0d1527 42%, #111827 100%);
}

.modern-shell {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.modern-card,
.modern-panel,
.modern-sidecard {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(7, 14, 27, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.modern-card {
  border-radius: 28px;
  padding: 28px;
}

.modern-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #8ec5ff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modern-title {
  margin: 16px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.modern-title span {
  color: #79b8ff;
}

.modern-subtitle {
  max-width: 58ch;
  margin: 0;
  color: #b5c0d4;
  font-size: 1rem;
  line-height: 1.7;
}

.modern-badges,
.modern-stats,
.modern-step-tabs,
.modern-action-row,
.modern-option-grid,
.modern-summary-grid,
.modern-mini-stats,
.modern-feature-list,
.modern-kpi-grid {
  display: grid;
  gap: 12px;
}

.modern-badges {
  margin-top: 22px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.modern-badge {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.modern-badge strong,
.modern-kpi strong,
.modern-summary-item strong,
.modern-sidecard strong,
.modern-profile-card strong,
.modern-accessory-card strong {
  display: block;
  font-size: 0.92rem;
}

.modern-badge span,
.modern-summary-item span,
.modern-kpi span,
.modern-accessory-card span,
.modern-muted {
  color: #97a6bd;
  font-size: 0.88rem;
}

.modern-sidecard {
  border-radius: 28px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modern-sidecard-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.modern-price {
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.modern-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modern-kpi {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.modern-kpi-value {
  margin-top: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #eef5ff;
}

.modern-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
  margin-top: 0;
  align-items: stretch;
}

.modern-panel {
  border-radius: 32px;
  padding: 18px;
  height: 100%;
}

.modern-progress-strip {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 17, 31, 0.78));
  animation: modernFadeSlideIn 0.45s ease;
}

.modern-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.modern-progress-meta strong,
.modern-progress-value {
  color: #eef5ff;
}

.modern-progress-meta span {
  display: block;
  margin-top: 3px;
  color: #9eb0c8;
  font-size: 0.84rem;
}

.modern-progress-value {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modern-progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.modern-progress-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.28) 48%, transparent 100%);
  transform: translateX(-100%);
  animation: modernProgressSheen 2.4s ease-in-out infinite;
  pointer-events: none;
}

.modern-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 45%, #34d399 100%);
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.32);
  transform-origin: left center;
  transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.modern-step-tabs {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-bottom: 16px;
}

.modern-project-actions-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.modern-step-tab {
  position: relative;
  overflow: hidden;
  text-align: left;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #c9d4e6;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.modern-step-tab::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #34d399 100%);
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: center;
  transition: opacity 0.22s ease, transform 0.28s ease;
}

.modern-step-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.45);
}

.modern-step-tab.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(17, 24, 39, 0.6));
  border-color: rgba(96, 165, 250, 0.7);
  color: #eff6ff;
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.32);
  animation: modernStepActivate 0.3s ease;
}

.modern-step-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.modern-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  margin-bottom: 8px;
  transition: background 0.22s ease, transform 0.22s ease, color 0.22s ease;
}

.modern-step-tab.active .modern-step-index {
  background: rgba(191, 219, 254, 0.18);
  color: #ffffff;
  transform: scale(1.06);
}

.modern-step-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 0.22s ease, color 0.22s ease;
}

.modern-project-actions-row .modern-step-tab {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}

.modern-project-actions-row .modern-step-index {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.modern-project-actions-row .modern-step-title {
  display: inline-block;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.modern-step-tab.active .modern-step-title {
  transform: translateX(1px);
}

.modern-step-note {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #8ea1be;
  transition: color 0.22s ease;
}

.modern-step-tab.active .modern-step-note {
  color: #cfe5ff;
}

.modern-step-tab.configured {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.12);
}

.modern-step-tab.configured .modern-step-index {
  background: rgba(16, 185, 129, 0.22);
  color: #d1fae5;
}

.modern-step-status {
  display: flex;
  margin-top: 4px;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: rgba(6, 78, 59, 0.28);
  color: #a7f3d0;
  font-size: 0.62rem;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.modern-open-project-tab {
  border-style: dashed;
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(8, 47, 73, 0.5);
}

.modern-open-project-tab,
.modern-new-project-tab,
.modern-save-project-tab {
  padding: 8px 10px;
  border-radius: 14px;
}

.modern-open-project-tab .modern-step-index,
.modern-new-project-tab .modern-step-index,
.modern-save-project-tab .modern-step-index {
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  margin-bottom: 0;
}

.modern-open-project-tab .modern-step-title {
  font-size: 0.8rem;
  color: #67e8f9;
}

.modern-open-project-tab .modern-step-note {
  font-size: 0.68rem;
  margin-top: 2px;
  color: #bae6fd;
}

.modern-new-project-tab {
  border-style: solid;
  border-color: rgba(14, 165, 233, 0.7);
  background: rgba(7, 26, 49, 0.72);
}

.modern-new-project-tab .modern-step-title {
  font-size: 0.8rem;
  color: #7dd3fc;
}

.modern-new-project-tab .modern-step-note {
  font-size: 0.68rem;
  margin-top: 2px;
  color: #bfdbfe;
}

.modern-save-project-tab {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.65);
  background: rgba(6, 29, 33, 0.72);
}

.modern-save-project-tab .modern-step-title {
  font-size: 0.8rem;
  color: #6ee7b7;
}

.modern-save-project-tab .modern-step-note {
  font-size: 0.68rem;
  margin-top: 2px;
  color: #bbf7d0;
}

.modern-print-project-tab {
  border-style: solid;
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(12, 34, 58, 0.72);
}

.modern-print-project-tab .modern-step-index {
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
}

.modern-print-project-tab .modern-step-title {
  font-size: 0.8rem;
  color: #93c5fd;
}

.modern-order-project-tab {
  border-style: solid;
  border-color: rgba(245, 158, 11, 0.62);
  background: rgba(66, 32, 6, 0.62);
}

.modern-order-project-tab .modern-step-index {
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
}

.modern-order-project-tab .modern-step-title {
  font-size: 0.8rem;
  color: #fdba74;
}

.modern-visualization-project-tab {
  border-style: solid;
  border-color: rgba(52, 211, 153, 0.58);
  background: rgba(6, 46, 31, 0.62);
}

.modern-visualization-project-tab .modern-step-index {
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
}

.modern-visualization-project-tab .modern-step-title {
  font-size: 0.8rem;
  color: #86efac;
}

.modern-open-project-tab {
  grid-column: auto;
}

.modern-new-project-tab {
  grid-column: auto;
}

.modern-save-project-tab {
  grid-column: auto;
}

.modern-update-project-tab {
  grid-column: auto;
}

.modern-assembly-tab {
  border-style: solid;
  border-color: rgba(249, 115, 22, 0.58);
  background: rgba(67, 20, 7, 0.55);
}

.modern-assembly-tab .modern-step-title {
  color: #fdba74;
}

.modern-assembly-tab .modern-step-note {
  color: #fed7aa;
}

.modern-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2200;
}

.modern-load-modal {
  width: min(760px, 100%);
  max-height: 85vh;
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(7, 14, 27, 0.98);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.modern-load-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.modern-load-modal-header h3 {
  margin: 0;
}

.modern-load-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.modern-load-quote-list {
  display: grid;
  gap: 10px;
}

.modern-load-quote-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.7);
  color: #e5edf9;
  padding: 12px 14px;
  cursor: pointer;
}

.modern-load-quote-item:hover {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(8, 47, 73, 0.42);
}

.modern-load-quote-item:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modern-print-template-modal {
  width: min(860px, 100%);
}

.modern-print-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  background: rgba(9, 18, 34, 0.6);
}

.modern-print-options-title {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #cbd5e1;
  margin-bottom: 2px;
}

.modern-print-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  color: #e5edf9;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.modern-print-option:hover {
  background: rgba(148, 163, 184, 0.16);
}

.modern-print-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
  cursor: pointer;
}

@media (max-width: 760px) {
  .modern-print-options {
    grid-template-columns: 1fr;
  }
}

.modern-print-variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modern-print-variant-card {
  text-align: left;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(59, 130, 246, 0.24);
  background: linear-gradient(180deg, rgba(9, 18, 34, 0.98), rgba(10, 27, 47, 0.98));
  color: #e5edf9;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.modern-print-variant-card:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.62);
  box-shadow: 0 18px 40px rgba(2, 8, 23, 0.35);
}

.modern-print-variant-card.is-client {
  border-color: rgba(249, 115, 22, 0.28);
  background: linear-gradient(180deg, rgba(33, 17, 10, 0.98), rgba(53, 27, 15, 0.98));
}

.modern-print-variant-card.is-client:hover {
  border-color: rgba(251, 146, 60, 0.72);
}

.modern-print-variant-label {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modern-print-variant-card strong {
  font-size: 1.05rem;
}

.modern-print-variant-note {
  color: #9fb2ca;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .modern-print-variant-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes modernFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modernStepActivate {
  0% {
    transform: translateY(0) scale(0.985);
  }

  60% {
    transform: translateY(-1px) scale(1.01);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes modernProgressSheen {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modern-progress-strip,
  .modern-progress-track::after,
  .modern-progress-fill,
  .modern-step-tab,
  .modern-step-tab::after,
  .modern-step-tab.active,
  .modern-step-index,
  .modern-step-title,
  .modern-step-note {
    animation: none !important;
    transition: none !important;
  }
}

.modern-section {
  border-radius: 24px;
  padding: 22px;
  background: rgba(2, 8, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.modern-section + .modern-section {
  margin-top: 16px;
}

.modern-section-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.modern-section-header h2,
.modern-section-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.modern-section-header.compact {
  margin-bottom: 14px;
}

.modern-section-header.compact h3 {
  font-size: 1.08rem;
}

.modern-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.modern-form-grid.two-col,
.modern-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modern-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modern-field label {
  font-size: 0.84rem;
  color: #b8c6da;
}

.modern-roof-shape {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.modern-roof-shape-label {
  font-size: 0.84rem;
  color: #b8c6da;
  font-weight: 600;
}

.modern-roof-shape-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modern-roof-shape-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fbff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-width: 180px;
}

.modern-roof-shape-option.small {
  flex-direction: row;
  align-items: center;
  min-width: 0;
  padding: 10px 16px;
}

.modern-roof-shape-option:hover {
  border-color: rgba(14, 165, 233, 0.5);
}

.modern-roof-shape-option.active {
  border-color: rgba(14, 165, 233, 0.7);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(37, 99, 235, 0.14));
}

.modern-roof-shape-icon {
  font-size: 1.4rem;
}

.modern-roof-shape-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.modern-roof-shape-desc {
  font-size: 0.78rem;
  color: #94a3b8;
}

.modern-roof-shape-direction {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modern-input,
.modern-select,
.modern-button,
.modern-chip {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.modern-input,
.modern-select {
  background: rgba(15, 23, 42, 0.85);
  color: #f8fbff;
  padding: 14px 16px;
  font-size: 0.96rem;
  outline: none;
}

.modern-input:focus,
.modern-select:focus {
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.modern-chip-row,
.modern-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modern-chip {
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbe6f5;
  cursor: pointer;
}

.modern-chip.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
  color: #e0f2fe;
}

.modern-button {
  padding: 14px 18px;
  cursor: pointer;
  color: #ecf4ff;
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.modern-button:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.45);
}

.modern-button.primary {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.modern-button.ghost {
  background: rgba(15, 23, 42, 0.74);
}

.modern-button.success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border-color: transparent;
}

.modern-option-stack {
  display: grid;
  gap: 14px;
}

.modern-subsection {
  padding: 18px;
  background: rgba(6, 13, 25, 0.68);
}

.modern-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.modern-choice-card {
  text-align: left;
  min-height: 132px;
}

.modern-choice-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.24);
  color: #bdeaff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.modern-choice-tag.muted {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.16);
  color: #b7c6dc;
}

.modern-gutter-layout,
.modern-gutter-summary,
.modern-accessory-grid {
  display: grid;
  gap: 12px;
}

.modern-gutter-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: start;
}

.modern-gutter-panel {
  padding: 16px;
  border-radius: 20px;
  background: rgba(2, 8, 23, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.modern-summary-item.compact {
  min-height: 100%;
}

.modern-accessory-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modern-offer-projections {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.modern-offer-projections svg {
  width: 100%;
  height: auto;
}

.modern-offer-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 8, 23, 0.34);
}

.modern-offer-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.modern-offer-table.compact {
  min-width: 520px;
}

.modern-offer-table thead {
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.38), rgba(14, 165, 233, 0.2));
}

.modern-offer-table th,
.modern-offer-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  text-align: left;
}

.modern-offer-table th {
  color: #eff6ff;
  font-size: 0.77rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.modern-offer-table td {
  color: #d7e3f5;
  font-size: 0.92rem;
}

.modern-offer-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.modern-offer-table tbody tr.is-total {
  background: rgba(56, 189, 248, 0.12);
}

.modern-offer-table tbody tr.is-total td {
  color: #f8fbff;
  font-weight: 700;
}

.modern-offer-table .numeric {
  text-align: right;
  white-space: nowrap;
}

.modern-action-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.modern-mini-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.modern-mini-card,
.modern-summary-item,
.modern-profile-card,
.modern-accessory-card {
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.modern-profile-card,
.modern-accessory-card {
  color: #e8f1ff;
}

.modern-profile-card {
  text-align: center;
  cursor: pointer;
}

.modern-profile-card span,
.modern-accessory-card span {
  display: block;
  color: #c1cde0;
}

.modern-accessory-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.5));
}

.modern-mini-card strong,
.modern-summary-item strong {
  margin-bottom: 8px;
}

.modern-cost-chart-card {
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: grid;
  gap: 12px;
}

.modern-cost-chart-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.modern-cost-chart {
  width: min(100%, 260px);
  height: auto;
}

.modern-cost-chart-track {
  fill: none;
  stroke: rgba(148, 163, 184, 0.18);
  stroke-width: 20;
}

.modern-cost-chart-segment {
  fill: none;
  stroke-width: 20;
  stroke-linecap: butt;
}

.modern-cost-chart-total-label {
  fill: #9fb1ca;
  font-size: 0.72rem;
  font-weight: 600;
}

.modern-cost-chart-total-value {
  fill: #f8fbff;
  font-size: 0.86rem;
  font-weight: 800;
}

.modern-cost-chart-legend {
  display: grid;
  gap: 8px;
}

.modern-cost-chart-legend-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.5);
}

.modern-cost-chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.modern-cost-chart-name {
  color: #dbe6f5;
  font-size: 0.86rem;
}

.modern-cost-chart-percent {
  color: #f8fbff;
  font-size: 0.84rem;
  font-weight: 700;
}

.modern-cost-chart-value {
  grid-column: 2 / 4;
  color: #9fb1ca;
  font-size: 0.8rem;
}

.modern-cost-chart-includes {
  grid-column: 2 / 4;
  color: #b9c8dd;
  font-size: 0.79rem;
  line-height: 1.35;
}

.modern-mini-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.modern-profile-list,
.modern-accessory-list {
  display: grid;
  gap: 12px;
}

.modern-profile-card.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(37, 99, 235, 0.14));
  border-color: rgba(96, 165, 250, 0.6);
  color: #f8fbff;
}

.modern-profile-card.active span {
  color: #d9ecff;
}

.modern-visual-wrap {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 8, 23, 0.65);
  min-height: 560px;
  flex: 1;
}

.modern-aside {
  display: grid;
  gap: 16px;
  height: 100%;
  align-self: stretch;
}

.modern-aside .modern-sidecard {
  height: 100%;
}

.modern-hall-summary-card {
  overflow: auto;
}

.modern-hall-summary-card .modern-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modern-hall-summary-card .modern-summary-grid {
  margin-top: 2px;
}

.modern-tech-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.modern-tech-section {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 10px;
}

.modern-tech-section h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #eaf3ff;
  letter-spacing: 0.01em;
}

.modern-tech-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.18);
}

.modern-tech-row span {
  color: #9fb1ca;
  font-size: 0.86rem;
}

.modern-tech-row strong {
  color: #f5f9ff;
  font-size: 0.87rem;
  font-weight: 700;
  text-align: right;
}

.modern-tech-note {
  margin-top: 6px;
  color: #96a9c2;
  font-size: 0.82rem;
  line-height: 1.45;
}

.modern-tech-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.modern-tech-list-item {
  padding: 7px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.18);
}

.modern-tech-list-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.modern-tech-list-top span {
  color: #d2dded;
  font-size: 0.84rem;
}

.modern-tech-list-top strong {
  color: #f5f9ff;
  font-size: 0.85rem;
  text-align: right;
}

.modern-summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modern-summary-item .value {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.modern-result-box {
  border-radius: 24px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(3, 105, 161, 0.18), rgba(5, 150, 105, 0.14));
  border: 1px solid rgba(96, 165, 250, 0.28);
}

.modern-result-price {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  margin: 10px 0;
}

.modern-feature-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modern-feature {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: #d8e3f4;
}

.modern-message {
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.22);
}

@media (max-width: 1180px) {
  .modern-shell-grid {
    grid-template-columns: 1fr;
  }

  .modern-aside {
    position: static;
  }

  .modern-step-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modern-open-project-tab,
  .modern-new-project-tab,
  .modern-save-project-tab,
  .modern-update-project-tab,
  .modern-print-project-tab,
  .modern-order-project-tab {
    grid-column: auto;
  }

  .modern-project-actions-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modern-choice-grid,
  .modern-accessory-grid,
  .modern-gutter-layout,
  .modern-offer-projections {
    grid-template-columns: 1fr;
  }

  .modern-cost-chart-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .modern-shell {
    width: min(100% - 18px, 1440px);
    padding-top: 16px;
  }

  .modern-card,
  .modern-panel,
  .modern-sidecard,
  .modern-section {
    border-radius: 22px;
    padding: 16px;
  }

  .modern-step-tabs,
  .modern-project-actions-row,
  .modern-form-grid,
  .modern-form-grid.two-col,
  .modern-summary-grid,
  .modern-action-row,
  .modern-mini-stats,
  .modern-feature-list,
  .modern-kpi-grid {
    grid-template-columns: 1fr;
  }
}.admin-container {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 18%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 42%, #e2e8f0 100%);
  padding: 18px 0 24px;
}

.admin-header {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto 16px;
  color: #1e293b;
  padding: 1.5rem 1.75rem;
  border-radius: 28px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.admin-header h1 {
  font-size: 1.9rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem 0;
}

.admin-header p {
  font-size: 0.95rem;
  color: #475569;
  margin: 0;
}

.admin-content {
  width: 100%;
  margin: 0;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
  padding: 1.5rem;
}

.admin-content,
.tab-content {
  color: #1e293b;
}

.admin-content h2,
.admin-content h3,
.admin-content h4,
.admin-content p,
.admin-content strong,
.admin-content label,
.admin-content small,
.admin-content span,
.tab-content h2,
.tab-content h3,
.tab-content h4,
.tab-content p,
.tab-content strong,
.tab-content label,
.tab-content small,
.tab-content span {
  color: inherit;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 2rem;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.2);
  flex-wrap: wrap;
}

.admin-tab-btn {
  position: relative;
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: #475569;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.admin-tab-btn:hover {
  color: #1e293b;
  background: #e2e8f0;
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.admin-tab-btn.active {
  color: #1e293b;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.34), rgba(56, 189, 248, 0.34));
  border-color: rgba(37, 99, 235, 0.54);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.3);
}

.admin-tab-btn.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #34d399 100%);
}

.tab-content {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.82);
}

.info-box {
  background: #e0f2fe;
  border-left: 4px solid rgba(14, 165, 233, 0.7);
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1e40af;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  column-gap: 1rem;
  row-gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-content .form-group > label,
.tab-content .form-group > label {
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: #1e293b !important;
  font-size: 0.8rem;
  line-height: 1.3;
}

.form-group .required {
  color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(100, 116, 139, 0.3);
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  background: #ffffff;
  color: #1e293b;
  -webkit-text-fill-color: #1e293b;
  appearance: none;
}

.admin-content input,
.admin-content select,
.admin-content textarea,
.tab-content input,
.tab-content select,
.tab-content textarea {
  background: #ffffff !important;
  color: #1e293b !important;
  border-color: rgba(100, 116, 139, 0.3) !important;
  -webkit-text-fill-color: #1e293b !important;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

.admin-content input::placeholder,
.admin-content textarea::placeholder,
.tab-content input::placeholder,
.tab-content textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

.admin-content select,
.tab-content select {
  background-image:
    linear-gradient(45deg, transparent 50%, #475569 50%),
    linear-gradient(135deg, #475569 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

.admin-content option,
.tab-content option {
  background: #ffffff;
  color: #1e293b;
}

.admin-content input[type='number'],
.tab-content input[type='number'] {
  appearance: auto;
}

.admin-content input[type='radio'],
.admin-content input[type='checkbox'],
.tab-content input[type='radio'],
.tab-content input[type='checkbox'] {
  accent-color: #38bdf8;
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-right: 0.3rem;
  vertical-align: middle;
}

/* Checkbox/radio labels - highlight when checked */
.admin-content label:has(input[type='checkbox']:checked),
.admin-content label:has(input[type='radio']:checked),
.tab-content label:has(input[type='checkbox']:checked),
.tab-content label:has(input[type='radio']:checked) {
  color: #7dd3fc !important;
  font-weight: 600;
}

.admin-content input:-webkit-autofill,
.admin-content input:-webkit-autofill:hover,
.admin-content input:-webkit-autofill:focus,
.admin-content textarea:-webkit-autofill,
.admin-content select:-webkit-autofill,
.tab-content input:-webkit-autofill,
.tab-content input:-webkit-autofill:hover,
.tab-content input:-webkit-autofill:focus,
.tab-content textarea:-webkit-autofill,
.tab-content select:-webkit-autofill {
  -webkit-text-fill-color: #1e293b !important;
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  transition: background-color 9999s ease-in-out 0s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.form-group small {
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.admin-content small,
.tab-content small {
  color: #64748b !important;
}

.button-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-small {
  padding: 0.45rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-danger {
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  background: #fee2e2;
  color: #991b1b;
}

.btn-danger:hover {
  background: #fecaca;
}

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

.bulk-price-box {
  display: grid;
  grid-template-columns: minmax(280px, 340px) max-content;
  gap: 0.9rem;
  align-items: end;
  margin-bottom: 1.5rem;
  justify-content: start;
}

.bulk-price-box .form-group {
  min-width: 0;
}

.admin-content .bulk-price-box .form-group > label,
.tab-content .bulk-price-box .form-group > label {
  color: #1e293b;
  margin-bottom: 0.65rem;
}

.bulk-price-box .btn-danger {
  align-self: end;
  min-height: 44px;
  min-width: 240px;
  padding-inline: 1.1rem;
  white-space: nowrap;
}

.form-group input,
.form-group select,
.form-group textarea {
  min-height: 34px;
}

.btn-small {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  background: #fee2e2;
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.3);
}

.btn-small:hover {
  background: #fecaca;
  transform: scale(1.05);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.34) 0%, #0ea5e9 100%);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

.btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
  border-color: rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
  border-color: rgba(30, 41, 59, 0.82);
  background: #cbd5e1;
}

.btn-edit,
.btn-delete {
  padding: 0.4rem 0.6rem;
  border-radius: 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.btn-edit {
  color: #1e40af;
  border-color: rgba(14, 165, 233, 0.4);
}

.btn-edit:hover {
  background: #e0f2fe;
  color: #1e40af;
  transform: scale(1.1);
}

.btn-delete {
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.4);
}

.btn-delete:hover {
  background: #fee2e2;
  color: #7f1d1d;
  transform: scale(1.1);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.admin-table thead {
  background: linear-gradient(90deg, #dbeafe, #e0f2fe);
}

.admin-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #1e40af;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.15);
  font-size: 0.95rem;
  color: #1e293b;
}

.admin-table tbody tr:hover {
  background: #f1f5f9;
}

.admin-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-header h1 {
    font-size: 1.5rem;
  }

  .admin-header p {
    font-size: 0.85rem;
  }

  .admin-content {
    width: min(100% - 18px, 1600px);
    padding: 1rem;
    border-radius: 22px;
  }

  .admin-tabs {
    flex-direction: column;
    border-bottom: none;
    padding-bottom: 0;
  }

  .admin-tab-btn {
    text-align: left;
    padding: 0.75rem 1rem;
  }

  .admin-tab-btn.active {
    border-color: rgba(96, 165, 250, 0.54);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(17, 24, 39, 0.48));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .button-group {
    flex-direction: column;
  }

  .bulk-price-box {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .bulk-price-box .btn-danger {
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem;
  }
}

/* ========== RESPONSIVE DESIGN FOR ADMIN PANEL ========== */

/* Extra Small Devices (< 480px) */
@media (max-width: 480px) {
  .admin-container {
    padding: 0;
  }

  .admin-header {
    width: min(100% - 18px, 1600px);
    padding: 0.9rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 20px;
  }

  .admin-header h1 {
    font-size: 1.2rem;
    margin: 0 0 0.3rem 0;
  }

  .admin-header p {
    font-size: 0.8rem;
  }

  .admin-content {
    margin: 0 auto;
    padding: 0.8rem;
    border-radius: 18px;
  }

  .admin-tabs {
    gap: 5px;
    margin-bottom: 1rem;
  }

  .admin-tab-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
  }

  .section-title {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .info-box {
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .admin-table {
    font-size: 0.7rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.4rem;
  }

  .button-group {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    width: 100%;
  }
}

/* Small Devices (480px - 600px) */
@media (min-width: 480px) and (max-width: 600px) {
  .admin-header {
    padding: 1rem 1.2rem;
  }

  .admin-header h1 {
    font-size: 1.3rem;
  }

  .admin-content {
    padding: 1rem;
    margin: 0.5rem;
  }

  .admin-tabs {
    gap: 8px;
  }

  .admin-tab-btn {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-table {
    font-size: 0.78rem;
  }

  .button-group {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* Medium Tablets (600px - 768px) */
@media (min-width: 600px) and (max-width: 768px) {
  .admin-header {
    padding: 1.2rem 1.5rem;
  }

  .admin-header h1 {
    font-size: 1.5rem;
  }

  .admin-content {
    padding: 1.2rem;
    margin: 0.8rem;
  }

  .admin-tabs {
    gap: 10px;
  }

  .admin-tab-btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.6rem;
  }
}

/* Large Tablets/Landscape (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .admin-header {
    padding: 1.5rem;
  }

  .admin-header h1 {
    font-size: 1.6rem;
  }

  .admin-content {
    padding: 1.5rem;
    max-width: 100%;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-table {
    font-size: 0.9rem;
  }
}

/* Small Desktop (1024px - 1200px) */
@media (min-width: 1024px) and (max-width: 1200px) {
  .admin-header {
    padding: 1.7rem 2rem;
  }

  .admin-content {
    padding: 1.8rem;
    max-width: 1400px;
  }

  .form-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Desktop (> 1200px) */
@media (min-width: 1200px) {
  .admin-header {
    padding: 2rem;
  }

  .admin-header h1 {
    font-size: 1.8rem;
  }

  .admin-content {
    max-width: 1600px;
    padding: 2rem;
  }

  .form-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Extra Large Desktop (> 1600px) */
@media (min-width: 1600px) {
  .admin-content {
    max-width: 1800px;
    margin: 0 auto;
  }

  .form-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* ============================================================
   NEW LAYOUT: Sidebar Navigation
   ============================================================ */

.admin-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-header-badge {
  padding: 0.5rem 1rem;
  border-radius: 12px;
  background: #dbeafe;
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: #1e40af;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.admin-layout {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* Sidebar */
.admin-sidebar {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
  padding: 1rem;
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 0 0.5rem;
  margin-bottom: 0.25rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.15s;
}

.admin-nav-item:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.admin-nav-item.active {
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  border: 1px solid rgba(37, 99, 235, 0.35);
  color: #1e40af;
  font-weight: 600;
}

.admin-nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.admin-nav-text {
  flex: 1;
}

/* Responsive: stack sidebar on top for mobile */
@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .admin-nav-group {
    flex: 1 1 100%;
  }

  .admin-nav-group-label {
    display: none;
  }

  .admin-nav-item {
    flex: 1 1 auto;
    justify-content: center;
  }
}
.production-order-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #08111f 0%, #0d1527 50%, #111827 100%);
  color: #eaf3ff;
  padding: 20px;
}

.production-order-wrap {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 16px;
  background: rgba(8, 17, 31, 0.78);
}

.order-header h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.order-header p {
  margin: 0;
  color: #9fb1ca;
}

.order-header-actions {
  display: flex;
  gap: 8px;
}

.order-header-actions button {
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(12, 34, 58, 0.9);
  color: #dbeafe;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.order-section {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 14px;
  background: rgba(8, 17, 31, 0.78);
}

.order-section h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.order-section table {
  width: 100%;
  border-collapse: collapse;
}

.order-section th,
.order-section td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding: 8px;
  text-align: left;
  font-size: 0.9rem;
}

.order-section th {
  color: #9fb1ca;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-select {
  width: 100%;
  min-width: 88px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(12, 34, 58, 0.85);
  color: #eaf3ff;
  border-radius: 8px;
  padding: 5px 8px;
}

.order-number-input {
  width: 100%;
  min-width: 92px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(12, 34, 58, 0.85);
  color: #eaf3ff;
  border-radius: 8px;
  padding: 5px 8px;
}

.order-recommendation {
  margin-top: 4px;
  font-size: 0.78rem;
  color: #86efac;
}

.order-note {
  margin-top: 10px;
  color: #c8d6ea;
}

.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.order-summary-grid div {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.order-summary-grid .order-summary-highlight {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(120, 53, 15, 0.28);
}

.order-summary-grid .order-summary-highlight strong {
  color: #fdba74;
}

.order-summary-grid span {
  color: #9fb1ca;
}

@media (max-width: 900px) {
  .order-header {
    flex-direction: column;
  }

  .order-summary-grid {
    grid-template-columns: 1fr;
  }
}
.visualization-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #08111f 0%, #0d1527 50%, #111827 100%);
  color: #eaf3ff;
  padding: 20px;
}

.visualization-wrap {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.visualization-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 16px;
  background: rgba(8, 17, 31, 0.78);
}

.visualization-header h1 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.visualization-header p {
  margin: 0;
  color: #9fb1ca;
}

.visualization-header button,
.visualization-wrap > button {
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(12, 34, 58, 0.9);
  color: #dbeafe;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.visualization-canvas {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 14px;
  background: rgba(8, 17, 31, 0.78);
  overflow: hidden;
}

.visualization-canvas > div {
  border-radius: 10px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .visualization-header {
    flex-direction: column;
  }
}
.panel-calc-page {
  width: min(1440px, calc(100% - 40px));
  margin: 18px auto;
  color: #e6eefb;
  max-width: 100%;
  overflow-x: clip;
}

.panel-calc-hero {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(135deg, rgba(7, 14, 27, 0.75), rgba(17, 24, 39, 0.78));
  border-radius: 22px;
  padding: 22px;
}

.panel-calc-hero h1 {
  margin: 0;
  font-size: 1.9rem;
  letter-spacing: 0.01em;
}

.panel-calc-hero p {
  margin: 12px 0 0;
  color: #c2d2ea;
  max-width: 900px;
}

.panel-calc-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 14px;
  min-width: 0;
}

.panel-calc-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(7, 14, 27, 0.72);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 35px rgba(2, 8, 23, 0.28);
  min-width: 0;
  max-width: 100%;
}

.panel-calc-card h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: #f2f7ff;
}

.controls label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #d6e3f5;
}

.controls input,
.controls select {
  width: 100%;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: #eef5ff;
  padding: 10px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.orientation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.openings-section {
  margin-top: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.52);
}

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

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

.openings-actions button {
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(14, 116, 144, 0.35);
  color: #e7f7ff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  cursor: pointer;
}

.openings-empty {
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 10px;
  padding: 10px;
  color: #c6d7ef;
  font-size: 0.85rem;
}

.openings-list {
  display: grid;
  gap: 8px;
}

.opening-row {
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.35);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.opening-row label {
  margin-bottom: 0;
}

.opening-summary {
  grid-column: 1 / -2;
  color: #9ed2ff;
  font-size: 0.8rem;
}

.opening-row .danger {
  border: 1px solid rgba(248, 113, 113, 0.55);
  background: rgba(153, 27, 27, 0.28);
  color: #fee2e2;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.info-box {
  margin-top: 10px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  background: rgba(14, 116, 144, 0.2);
  padding: 12px;
}

.info-box strong {
  display: block;
  margin-bottom: 6px;
}

.info-box p {
  margin: 0;
  color: #d2eaff;
  font-size: 0.88rem;
  line-height: 1.5;
}

.panel-calc-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

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

.kpis div {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.66);
}

.kpis span {
  display: block;
  color: #9fb4d2;
  font-size: 0.82rem;
}

.kpis strong {
  display: block;
  margin-top: 4px;
  color: #eff6ff;
  font-size: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid rgba(148, 163, 184, 0.26);
  padding: 8px 10px;
  text-align: left;
  font-size: 0.88rem;
}

th {
  background: rgba(30, 64, 175, 0.28);
  color: #dbeafe;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.74rem;
}

td {
  color: #e3edf9;
}

.visualization-placeholder .viz-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.visualization-placeholder svg {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
}

.visualization-placeholder {
  overflow-x: hidden;
}

.controls,
.panel-calc-main,
.viz-note,
.viz-3d-note {
  min-width: 0;
}

.visualization-placeholder .shape {
  fill: rgba(59, 130, 246, 0.18);
  stroke: rgba(186, 230, 253, 0.95);
  stroke-width: 1.5;
}

.visualization-placeholder .guide {
  stroke: rgba(52, 211, 153, 0.95);
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
}

.visualization-placeholder .roof-guide {
  stroke: rgba(250, 204, 21, 0.95);
}

.visualization-placeholder .panel-block {
  fill: rgba(34, 211, 238, 0.62);
  stroke: rgba(224, 242, 254, 0.98);
  stroke-width: 1.1;
}

.visualization-placeholder .panel-block-roof {
  fill: rgba(251, 191, 36, 0.64);
  stroke: rgba(255, 251, 235, 0.98);
  stroke-width: 1.1;
}

.visualization-placeholder .panel-length-label {
  fill: #ffffff;
  font-size: 8px;
  font-weight: 700;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(2, 6, 23, 0.98);
  stroke-width: 2.1;
}

.visualization-placeholder .panel-no-label {
  fill: #fff7c2;
  font-size: 9px;
  font-weight: 700;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(2, 6, 23, 1);
  stroke-width: 2.3;
}

.visualization-placeholder .panel-no-label-right {
  text-anchor: end;
}

.visualization-placeholder .elev-title {
  fill: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.visualization-placeholder .elev-label {
  fill: #bfdbfe;
  font-size: 10px;
  font-weight: 600;
}

.visualization-placeholder .roof-label {
  fill: #fde68a;
}

.visualization-placeholder .roof-shape {
  fill: rgba(250, 204, 21, 0.14);
  stroke: rgba(250, 204, 21, 0.9);
  stroke-width: 1.2;
}

.visualization-placeholder .opening-cut {
  fill: rgba(239, 68, 68, 0.38);
  stroke: rgba(252, 165, 165, 0.95);
  stroke-width: 1;
}

.visualization-placeholder .opening-label {
  fill: #fee2e2;
  font-size: 7px;
  font-weight: 700;
}

.visualization-placeholder .legend-bg {
  fill: rgba(15, 23, 42, 0.7);
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 1;
}

.visualization-placeholder .legend-line {
  fill: #cbd5e1;
  font-size: 10px;
}

.viz-3d-note {
  margin: 0 0 12px;
  color: #c2d2ea;
  font-size: 0.9rem;
}

.viz-note p {
  margin: 0;
  color: #d0e1f8;
  line-height: 1.5;
}

.viz-note ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #d0e1f8;
}

.viz-note li {
  margin-bottom: 6px;
}

.viz-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.viz-actions button {
  background: #0b2b4a;
  color: #ffffff;
  border: 1px solid rgba(125, 211, 252, 0.7);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.viz-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.legend-table-wrap {
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
}

.legend-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 360px;
}

.legend-table th,
.legend-table td {
  border: 1px solid rgba(148, 163, 184, 0.24);
  padding: 6px 8px;
  font-size: 0.8rem;
}

.order-lists-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

.order-list {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
  padding: 12px;
  overflow-x: auto;
}

.order-list h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: #f0f5ff;
}

.order-list table {
  font-size: 0.82rem;
}

.order-list .empty-list {
  color: #cbd5e1;
  font-size: 0.88rem;
  padding: 10px 0;
  margin: 0;
}

@media (max-width: 1200px) {
  .panel-calc-grid {
    grid-template-columns: 1fr;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opening-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .opening-summary {
    grid-column: 1 / -1;
  }

  .visualization-placeholder .viz-grid {
    grid-template-columns: 1fr;
  }

  .order-lists-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .panel-calc-page {
    width: min(100% - 16px, 1440px);
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .orientation-grid {
    grid-template-columns: 1fr;
  }

  .opening-row {
    grid-template-columns: 1fr;
  }

  .opening-summary {
    grid-column: 1;
  }

  .kpis {
    grid-template-columns: 1fr;
  }
}
/* ===== Konfigurator V2 - FMG-inspired step wizard ===== */

/* ---- Step Panel (left sidebar form) ---- */
.fmg-step {
  padding: 0.25rem 0;
}
.fmg-step h3 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}
.fmg-step > p {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}
.fmg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.fmg-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fmg-field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}
.fmg-field input[type="number"],
.fmg-field input[type="text"],
.fmg-field select,
.fmg-field textarea {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.fmg-field input:focus,
.fmg-field select:focus,
.fmg-field textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.fmg-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  padding-right: 1.5rem;
  cursor: pointer;
}
.fmg-field textarea {
  resize: vertical;
  min-height: 50px;
}
.fmg-value-badge {
  padding: 0.45rem 0.55rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2563eb;
  text-align: center;
  background: #f8fafc;
}
.fmg-notice {
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.8rem;
  text-align: center;
}
.fmg-radio-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.fmg-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.15s;
  background: #fff;
}
.fmg-chip:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.fmg-chip.active {
  border-color: #2563eb;
  background: #eff6ff;
}
.fmg-chip input[type="radio"] {
  margin: 0;
  flex-shrink: 0;
}
.fmg-chip small {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 0.05rem;
}
.fmg-profile-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 200px;
  overflow-y: auto;
}
.fmg-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.15s;
  background: #fff;
}
.fmg-radio-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.fmg-radio-card.active {
  border-color: #2563eb;
  background: #eff6ff;
}
.fmg-radio-card input[type="radio"] {
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.fmg-radio-card strong {
  display: block;
  margin-bottom: 0.05rem;
}
.fmg-radio-card small {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
}
.fmg-summary-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
}
.fmg-summary-box strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  color: #0f172a;
}
.fmg-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.78rem;
  border-bottom: 1px solid #f1f5f9;
}
.fmg-info-row:last-child {
  border-bottom: none;
}
.fmg-info-row span {
  color: #64748b;
}
.fmg-info-row strong {
  color: #0f172a;
  font-weight: 600;
  margin: 0;
}
.fmg-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid #e2e8f0;
}
.fmg-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.fmg-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.fmg-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.fmg-btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}
.fmg-btn-success {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}
.fmg-btn-success:hover {
  background: #15803d;
  border-color: #15803d;
}
.fmg-btn-outline {
  background: transparent;
  border-color: #d1d5db;
  color: #475569;
}
.fmg-btn-outline:hover {
  background: #f3f4f6;
}
.fmg-btn-sm {
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
}
.fmg-btn-danger {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.fmg-btn-danger:hover {
  background: #dc2626;
}
.fmg-color-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}
.fmg-color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.fmg-color-swatch:hover {
  transform: scale(1.15);
  z-index: 1;
}
.fmg-color-swatch.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}
.fmg-color-label {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.2rem;
  text-align: center;
}
.fmg-check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  cursor: pointer;
  font-size: 0.82rem;
  border-bottom: 1px solid #f1f5f9;
}
.fmg-check-row:last-child {
  border-bottom: none;
}
.fmg-check-row input[type="checkbox"] {
  flex-shrink: 0;
}

/* ---- Wall Click Overlay ---- */
.fmg-wall-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.fmg-wall-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.7);
  color: #e2e8f0;
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 0.72rem;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 6;
}
.fmg-wall-info {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.7);
  color: #e2e8f0;
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 0.72rem;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 6;
}
.fmg-wall-zone {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  border: 2px dashed rgba(37, 99, 235, 0.3);
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.06);
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  opacity: 0;
  padding: 0;
}
.fmg-wall-overlay:hover .fmg-wall-zone {
  opacity: 1;
}
.fmg-wall-zone:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.6);
  transform: scale(1.02);
}
.fmg-wall-zone span {
  background: rgba(255,255,255,0.9);
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.fmg-wall-front {
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 18%;
}
.fmg-wall-front:hover {
  transform: translateX(-50%) scale(1.02);
}
.fmg-wall-back {
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 18%;
}
.fmg-wall-back:hover {
  transform: translateX(-50%) scale(1.02);
}
.fmg-wall-left {
  top: 50%;
  left: 3%;
  transform: translateY(-50%);
  width: 12%;
  height: 35%;
}
.fmg-wall-left:hover {
  transform: translateY(-50%) scale(1.02);
}
.fmg-wall-right {
  top: 50%;
  right: 3%;
  transform: translateY(-50%);
  width: 12%;
  height: 35%;
}
.fmg-wall-right:hover {
  transform: translateY(-50%) scale(1.02);
}
.fmg-wall-roof {
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  width: 20%;
  height: 10%;
}
.fmg-wall-roof:hover {
  transform: translateX(-50%) scale(1.02);
}

/* ---- Joinery Modal (FMG-style) ---- */

/* ---- Joinery Modal (FMG-style) ---- */
.fmg-joinery-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.fmg-joinery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}
.fmg-joinery-header h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #0f172a;
}
.fmg-joinery-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fmg-joinery-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.fmg-joinery-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.fmg-joinery-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.fmg-joinery-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}
.fmg-joinery-select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #0f172a;
  background: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  cursor: pointer;
}
.fmg-joinery-wall-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.fmg-joinery-wall-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.5rem 0.25rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 500;
  color: #475569;
  transition: all 0.15s;
}
.fmg-joinery-wall-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.fmg-joinery-wall-btn.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
}
.fmg-joinery-wall-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.fmg-joinery-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.fmg-joinery-type-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.fmg-joinery-type-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}
.fmg-joinery-type-btn.active {
  background: #eff6ff;
  border-color: #2563eb;
}
.fmg-joinery-type-icon {
  font-size: 1.2rem;
}
.fmg-joinery-type-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
}
.fmg-joinery-size-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.3rem;
}
.fmg-joinery-size-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fmg-joinery-size-field label {
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
}
.fmg-joinery-size-field input {
  padding: 0.4rem 0.55rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
}
.fmg-joinery-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #94a3b8;
}
.fmg-joinery-error {
  padding: 0.5rem 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  font-size: 0.8rem;
}
.fmg-joinery-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e2e8f0;
}

/* ---- Modal overlay ---- */
.fmg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.fmg-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.fmg-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.fmg-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.konfigurator-v2 {
  min-height: 100vh;
  background: #f0f2f5;
  color: #0f172a;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Hero ---- */
.konf-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  padding: 1.75rem 2rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.konf-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(37, 99, 235, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(16,185,129,0.10) 0%, transparent 60%);
  pointer-events: none;
}
.konf-hero h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  position: relative;
}
.konf-hero p {
  margin: 0.3rem 0 0;
  color: #94a3b8;
  font-size: 0.9rem;
  position: relative;
}

/* ===== Step Progress Bar ===== */
.fmg-steps-bar {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 0;
  gap: 2px;
}
.fmg-step-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.5rem;
  border: none;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  border-radius: 0;
}
.fmg-step-btn:first-child {
  border-radius: 10px 0 0 10px;
}
.fmg-step-btn:last-child {
  border-radius: 0 10px 10px 0;
}
.fmg-step-btn:hover {
  background: #d1d5db;
  color: #374151;
}
.fmg-step-btn.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  z-index: 1;
}
.fmg-step-btn.done {
  background: #dbeafe;
  color: #2563eb;
}
.fmg-step-icon {
  font-size: 1rem;
}
.fmg-step-label {
  white-space: nowrap;
}

/* ===== Main Layout ===== */
.fmg-layout {
  display: grid;
  grid-template-columns: 340px 1fr 280px;
  gap: 1rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 1.5rem;
  align-items: start;
}

/* ---- Panels ---- */
.fmg-panel {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.fmg-panel:last-child {
  margin-bottom: 0;
}
.fmg-panel-header {
  padding: 0.7rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.fmg-panel-body {
  padding: 0.75rem 1rem;
}

/* ---- Step Content ---- */
.fmg-step-content {
  padding: 1rem 1.1rem;
}
.fmg-step-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  color: #0f172a;
}
.fmg-step-desc {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
}

/* ---- Params Grid ---- */
.fmg-params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.fmg-param {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.fmg-param.fmg-full {
  grid-column: 1 / -1;
}
.fmg-param label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}
.fmg-param input[type="number"],
.fmg-param input[type="text"],
.fmg-param select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fmg-param input:focus,
.fmg-param select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.fmg-param select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 1.5rem;
  cursor: pointer;
}
.fmg-value {
  padding: 0.45rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #2563eb;
  text-align: center;
  background: #f8fafc;
}

/* ---- Radio Cards ---- */
.fmg-radio-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.fmg-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.15s;
}
.fmg-radio-card:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.fmg-radio-card.active {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.fmg-radio-card input[type="radio"] {
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.fmg-radio-card strong {
  display: block;
}
.fmg-radio-card small {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.05rem;
}

/* ---- Color Swatches ---- */
.fmg-color-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.fmg-color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.fmg-color-swatch:hover {
  transform: scale(1.12);
  z-index: 1;
}
.fmg-color-swatch.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}
.fmg-color-label {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.25rem;
  text-align: center;
}

/* ---- Check rows ---- */
.fmg-check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  cursor: pointer;
  font-size: 0.82rem;
  border-bottom: 1px solid #f1f5f9;
}
.fmg-check-row:last-child {
  border-bottom: none;
}

/* ---- Navigation Buttons ---- */
.fmg-nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem 1rem;
  border-top: 1px solid #e2e8f0;
}

/* ---- Buttons ---- */
.fmg-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.fmg-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.fmg-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.fmg-btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}
.fmg-btn-success {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}
.fmg-btn-success:hover {
  background: #15803d;
  border-color: #15803d;
}
.fmg-btn-outline {
  background: transparent;
  border-color: #d1d5db;
  color: #475569;
}
.fmg-btn-outline:hover {
  background: #f3f4f6;
}
.fmg-btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

/* ---- 3D View ---- */
.fmg-center {
  position: sticky;
  top: 0.75rem;
}
.fmg-3d-wrap {
  position: relative;
  background: #e8ecf0;
  border-radius: 12px;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.fmg-3d-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.fmg-3d-info {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.7);
  color: #e2e8f0;
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 0.75rem;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  z-index: 10;
  pointer-events: none;
}
.fmg-3d-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.7);
  color: #e2e8f0;
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 0.72rem;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* ---- Right Summary ---- */
.fmg-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fmg-price-box {
  text-align: center;
  padding: 1.1rem 1rem;
}
.fmg-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
}
.fmg-price-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.1rem;
}
.fmg-price-vat {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}
.fmg-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.8rem;
  border-bottom: 1px solid #f1f5f9;
}
.fmg-info-row:last-child {
  border-bottom: none;
}
.fmg-info-row span {
  color: #64748b;
}
.fmg-info-row strong {
  color: #0f172a;
  font-weight: 600;
}
.fmg-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
}

/* ---- Error ---- */
.fmg-error {
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.82rem;
}

/* ---- Inquiry Form ---- */
.fmg-inquiry {
  max-width: 1440px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}
.fmg-inquiry-inner {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 1.5rem 2rem;
}
.fmg-inquiry h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  color: #0f172a;
}
.fmg-inquiry > p {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: #64748b;
}
.fmg-inquiry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1rem;
}
.fmg-inquiry-grid .full-width {
  grid-column: 1 / -1;
}
.fmg-inquiry-grid label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.2rem;
}
.fmg-inquiry-grid label .required {
  color: #ef4444;
}
.fmg-inquiry-grid input,
.fmg-inquiry-grid select,
.fmg-inquiry-grid textarea {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
  font-family: inherit;
}
.fmg-inquiry-grid input:focus,
.fmg-inquiry-grid select:focus,
.fmg-inquiry-grid textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.fmg-inquiry-grid textarea {
  resize: vertical;
  min-height: 56px;
}
.fmg-consent {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400 !important;
  font-size: 0.8rem !important;
  cursor: pointer;
}
.fmg-consent input[type="checkbox"] {
  width: auto !important;
  flex-shrink: 0;
}
.fmg-inquiry-submit {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}
.fmg-inquiry-submit button {
  padding: 0.6rem 2rem;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.fmg-inquiry-submit button:hover {
  background: #2563eb;
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .fmg-layout {
    grid-template-columns: 300px 1fr 240px;
    gap: 0.75rem;
    padding: 0.75rem 1rem 1.5rem;
  }
}
@media (max-width: 992px) {
  .fmg-layout {
    grid-template-columns: 1fr;
  }
  .fmg-sidebar { order: 2; }
  .fmg-center { order: 1; }
  .fmg-summary { order: 3; }
  .fmg-3d-wrap { min-height: 360px; }
  .fmg-steps-bar { padding: 0.5rem 1rem 0; overflow-x: auto; }
  .fmg-step-btn { min-width: 80px; }
  .fmg-inquiry { padding: 0 1rem; }
  .fmg-inquiry-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .konf-hero { padding: 1.25rem 1rem; }
  .fmg-params { grid-template-columns: 1fr; }
  .fmg-3d-wrap { min-height: 280px; }
  .fmg-step-label { display: none; }
  .fmg-step-btn { min-width: auto; padding: 0.5rem; }
  .fmg-nav-buttons { flex-direction: column; }
}
.footprint-page {
  padding: 1.5rem 2rem;
  color: #e2e8f0;
  background: #0b1220;
  min-height: 100vh;
  box-sizing: border-box;
}

.footprint-header h1 {
  margin: 0 0 0.3rem;
  font-size: 1.6rem;
  color: #f8fafc;
}

.footprint-header p {
  margin: 0 0 1.5rem;
  color: #94a3b8;
  font-size: 0.95rem;
}

.footprint-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footprint-panel {
  background: #0f1c30;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.footprint-panel-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #dbeafe;
  margin-bottom: 0.75rem;
}

/* Toolbar */
.footprint-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.footprint-tool {
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.15s, border-color 0.15s;
}

.footprint-tool:hover {
  border-color: rgba(14, 165, 233, 0.5);
}

.footprint-tool.active {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(14, 165, 233, 0.7);
}

.footprint-tool.primary {
  background: rgba(37, 99, 235, 0.3);
  border-color: rgba(37, 99, 235, 0.7);
}

.footprint-tool:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Editor body (palette + canvas) */
.footprint-editor-body {
  display: flex;
  gap: 0.75rem;
}

.footprint-palette {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 150px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.footprint-palette-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footprint-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.footprint-block:hover {
  background: rgba(15, 23, 42, 1);
}

.footprint-block.active {
  background: rgba(14, 165, 233, 0.18);
}

.footprint-block-icon {
  font-size: 1.1rem;
}

.footprint-block-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.footprint-block-dims {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Canvas */
.footprint-canvas-wrap {
  flex: 1;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: #091220;
}

.footprint-canvas {
  display: block;
  cursor: crosshair;
}

/* Stats */
.footprint-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.footprint-stat {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  min-width: 110px;
}

.footprint-stat strong {
  font-size: 1.05rem;
  color: #f8fafc;
}

.footprint-stat span {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Params */
.footprint-params {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footprint-params label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: #b8c6da;
}

.footprint-params input,
.footprint-params select {
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 0.9rem;
}

/* Modules */
.footprint-modules {
  margin-top: 1rem;
}

.footprint-module-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.85rem;
}

.footprint-module-row select {
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 0.8rem;
}

/* 3D */
.footprint-3d {
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  background: #091220;
}

.footprint-3d canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Results */
.footprint-error {
  padding: 0.8rem 1rem;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 10px;
  color: #fca5a5;
  margin-bottom: 0.75rem;
}

.footprint-loading {
  color: #93c5fd;
  padding: 1rem 0;
}

.footprint-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footprint-result-card {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 0.8rem 1rem;
}

.footprint-result-card strong {
  font-size: 1.1rem;
  color: #f8fafc;
}

.footprint-result-card span {
  font-size: 0.78rem;
  color: #94a3b8;
}

.footprint-module-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.footprint-module-result {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
}

.footprint-module-result strong {
  color: #dbeafe;
}

.footprint-module-result span {
  color: #94a3b8;
}

@media (max-width: 900px) {
  .footprint-layout {
    grid-template-columns: 1fr;
  }
}
.truss-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0f172a;
}

.truss-header {
  margin-bottom: 1.5rem;
}

.truss-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem;
}

.truss-header p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.truss-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.truss-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.truss-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
}

.truss-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.truss-field {
  margin-bottom: 0.6rem;
}

.truss-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0.25rem;
}

.truss-field input[type="number"],
.truss-field select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.truss-field input[type="number"]:focus,
.truss-field select:focus {
  border-color: #2563eb;
  background: #ffffff;
}

.truss-chip-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.truss-chip {
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.truss-chip:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.truss-chip.active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #2563eb;
}

.truss-pattern-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.truss-pattern-btn {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.truss-pattern-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.truss-pattern-btn.active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #2563eb;
}

.truss-pattern-btn strong {
  font-size: 0.8rem;
}

.truss-pattern-btn small {
  font-size: 0.65rem;
  color: inherit;
  opacity: 0.7;
}

.truss-actions {
  display: flex;
  gap: 0.5rem;
}

.truss-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.truss-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.truss-btn-primary:hover {
  background: #2563eb;
}

.truss-btn-primary:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

.truss-btn-success {
  background: #16a34a;
  color: #ffffff;
}

.truss-btn-success:hover {
  background: #15803d;
}

.truss-btn-success:disabled {
  background: #86efac;
  cursor: not-allowed;
}

.truss-btn-warning {
  background: #f59e0b;
  color: #ffffff;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.truss-btn-warning:hover {
  background: #d97706;
}
.truss-btn-warning:disabled {
  background: #fcd34d;
  cursor: not-allowed;
}

.truss-btn-outline {
  background: #ffffff;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.truss-btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.truss-error {
  padding: 0.6rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  font-size: 0.78rem;
}

.truss-main {
  min-height: 500px;
  min-width: 0;
  overflow: hidden;
}

.truss-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: #ffffff;
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  text-align: center;
  padding: 2rem;
}

.truss-placeholder-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.truss-placeholder h3 {
  font-size: 1.1rem;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.truss-placeholder p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  max-width: 400px;
}

.truss-loading {
  margin-top: 1rem !important;
  color: #2563eb !important;
  font-weight: 500;
}

.truss-visualization {
  margin-bottom: 1rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.truss-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.truss-result-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  text-align: center;
}

.truss-result-label {
  font-size: 0.7rem;
  color: #64748b;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.truss-result-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

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

.truss-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.truss-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.truss-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}

.truss-table tr:hover td {
  background: #f8fafc;
}

.truss-util-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 80px;
}

.truss-util-fill {
  height: 6px;
  border-radius: 3px;
  min-width: 4px;
  transition: width 0.3s;
}

.truss-util-bar span {
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
}

/* Compact table for FEM results */
.truss-table-compact {
  font-size: 0.75rem;
}
.truss-table-compact th,
.truss-table-compact td {
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}
.truss-table-compact th {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.truss-table-compact tbody tr:hover {
  background: #f8fafc;
}
.truss-table-compact sub {
  font-size: 0.6rem;
}

@media (max-width: 900px) {
  .truss-layout {
    grid-template-columns: 1fr;
  }
  .truss-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.wizard-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0f172a;
}

.wizard-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.wizard-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem;
}

.wizard-header p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

/* Stepper */
.wizard-stepper {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  cursor: default;
  border-radius: 8px;
  min-width: 90px;
}

.wizard-step.done {
  cursor: pointer;
}

.wizard-step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: #f1f5f9;
  border: 2px solid #e2e8f0;
  color: #94a3b8;
  transition: all 0.2s;
}

.wizard-step.active .wizard-step-circle {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.wizard-step.done .wizard-step-circle {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.wizard-step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
}

.wizard-step.active .wizard-step-label {
  color: #2563eb;
}

.wizard-step.done .wizard-step-label {
  color: #059669;
}

/* Body */
.wizard-body {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 320px;
}

.wizard-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1rem;
}

.wizard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.wizard-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wizard-field.full {
  grid-column: 1 / -1;
}

.wizard-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.wizard-field input,
.wizard-field select,
.wizard-field textarea {
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wizard-field input:focus,
.wizard-field select:focus,
.wizard-field textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.wizard-field textarea {
  resize: vertical;
}

/* Loading / error */
.wizard-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #64748b;
  font-size: 0.9rem;
}

.wizard-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* Summary line */
.wizard-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #475569;
}

.wizard-summary-line b {
  color: #0f172a;
}

/* Pricing */
.wizard-price-summary {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.wizard-price-summary.compact {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.wizard-price-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: #475569;
}

.wizard-price-row.total {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  border-top: 1px solid #bbf7d0;
  margin-top: 0.35rem;
  padding-top: 0.6rem;
}

.wizard-price-summary.compact .wizard-price-row.total {
  border-top-color: #e2e8f0;
}

.wizard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.wizard-table th,
.wizard-table td {
  padding: 0.55rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.wizard-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wizard-table td:last-child,
.wizard-table th:last-child {
  text-align: right;
}

/* Consent */
.wizard-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #475569;
  margin: 1rem 0;
  cursor: pointer;
}

.wizard-consent input {
  margin-top: 0.15rem;
}

/* Success */
.wizard-success {
  text-align: center;
  padding: 2rem 1rem;
}

.wizard-success-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.wizard-success h2 {
  color: #059669;
}

.wizard-success p {
  color: #475569;
  font-size: 0.95rem;
  margin: 0.4rem 0;
}

/* Navigation */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.wizard-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.wizard-btn-primary:hover:not(:disabled) {
  background: #2563eb;
}

.wizard-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.wizard-btn-secondary {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.wizard-btn-secondary:hover {
  background: #f8fafc;
}

@media (max-width: 640px) {
  .wizard-step {
    min-width: 60px;
  }
  .wizard-step-label {
    font-size: 0.6rem;
  }
  .wizard-grid {
    grid-template-columns: 1fr;
  }
}
.home-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0f172a;
}

.home-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.home-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.4rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-header p {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #0f172a;
  min-height: 240px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  overflow: hidden;
}

.home-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--card-gradient);
}

.home-card:hover:not(.disabled) {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  border-color: transparent;
}

.home-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.home-card-icon {
  font-size: 3.2rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.home-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-card:hover:not(.disabled) .home-card-img {
  transform: scale(1.03);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.home-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
}

.home-card p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.home-card-arrow {
  position: absolute;
  bottom: 1rem;
  right: 1.25rem;
  font-size: 1.4rem;
  color: #94a3b8;
  transition: transform 0.2s, color 0.2s;
}

.home-card:hover:not(.disabled) .home-card-arrow {
  transform: translateX(4px);
  color: var(--card-gradient);
}

@media (max-width: 640px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .home-card {
    min-height: 200px;
  }
}
.home-next-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); max-width: 1600px; min-height: calc(100vh - 2rem); margin: 1rem auto; padding: 0 1rem; }
.home-next-sidebar { position: sticky; top: 1rem; align-self: start; min-height: calc(100vh - 2rem); display: flex; flex-direction: column; padding: 1.25rem 1rem; border-right: 1px solid rgba(174, 194, 194, 0.28); color: #d7e4e2; background: rgba(7, 14, 27, 0.32); }
.home-next-sidebar-brand { padding: 0.4rem 0.5rem 1.5rem; color: #f4f8f6; font: 700 1.1rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }.home-next-sidebar-brand span { color: #dc4e33; }.home-next-sidebar-nav { display: grid; gap: 1.5rem; }.home-next-sidebar-group { display: grid; gap: 0.2rem; }.home-next-sidebar-group > span { padding: 0 0.5rem 0.35rem; color: #91a8ac; font: 700 0.65rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.09em; text-transform: uppercase; }.home-next-sidebar-group a { padding: 0.56rem 0.6rem; border-radius: 6px; color: #c5d3d4; text-decoration: none; font: 0.84rem/1.25 system-ui, sans-serif; }.home-next-sidebar-group a:hover, .home-next-sidebar-group a.active { color: #f4fbfa; background: rgba(93, 157, 181, 0.22); }.home-next-sidebar-footer { margin-top: auto; padding: 1rem 0.5rem 0; color: #83999d; font: 0.62rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }

.home-next {
  --home-ink: #17242d;
  --home-paper: #f3f1e9;
  --home-red: #db4e33;
  --home-blue: #4d95b2;
  --home-yellow: #f0c94c;
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.25rem;
  color: var(--home-ink);
  font-family: Georgia, 'Times New Roman', serif;
}

.home-next-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 64px; padding: 0 0 1.15rem; border-bottom: 1px solid rgb(224 232 226 / 0.32); }
.home-next-logo { width: min(158px, 35vw); max-height: 42px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.home-next-nav-note { color: #c4d0d4; font: 0.69rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.home-next-nav-button { justify-self: end; border: 1px solid #afc3c7; border-radius: 0; padding: 0.58rem 0.8rem; color: #edf5f4; background: transparent; font: 600 0.76rem system-ui, sans-serif; cursor: pointer; }
.home-next-nav-button:hover { color: var(--home-ink); background: #e8f0ee; }

.home-next-hero { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); min-height: min(700px, calc(100vh - 130px)); background: var(--home-paper); }
.home-next-hero-copy { align-self: center; padding: clamp(2.25rem, 7vw, 7rem); padding-right: clamp(2.25rem, 5vw, 5rem); }
.home-next-eyebrow { margin: 0 0 1.1rem; color: var(--home-red); font: 700 0.7rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.1em; text-transform: uppercase; }
.home-next h1 { margin: 0; font-size: clamp(3rem, 6vw, 6.3rem); line-height: 0.88; font-weight: 500; letter-spacing: 0; }.home-next h1 i { color: var(--home-red); font-weight: 400; }
.home-next-lead { max-width: 455px; margin: 1.8rem 0 0; color: #405158; font: 1.05rem/1.6 system-ui, sans-serif; }
.home-next-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 2rem; }.home-next-action-primary { border: 0; border-radius: 0; padding: 0.95rem 1.25rem; color: #fff; background: var(--home-red); font: 700 0.82rem system-ui, sans-serif; cursor: pointer; }.home-next-action-primary:hover { background: #b83925; }.home-next-action-link { border: 0; padding: 0; color: var(--home-ink); background: none; font: 600 0.84rem system-ui, sans-serif; cursor: pointer; }.home-next-action-link span { color: var(--home-red); font-size: 1.1rem; }

.home-next-drawing { position: relative; min-height: 440px; overflow: hidden; background: #c9dde1; background-image: linear-gradient(rgb(23 36 45 / 0.09) 1px, transparent 1px), linear-gradient(90deg, rgb(23 36 45 / 0.09) 1px, transparent 1px); background-size: 30px 30px; }.home-next-drawing::after { content: ''; position: absolute; inset: 8% 7%; border: 1px solid rgb(23 36 45 / 0.25); pointer-events: none; }.home-next-drawing-label { position: absolute; z-index: 2; color: #38515a; font: 700 0.66rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }.home-next-drawing-label-top { top: 2rem; left: 2rem; }.home-next-drawing-label-bottom { right: 2rem; bottom: 2rem; }.home-next-structure { position: absolute; left: 15%; right: 15%; top: 20%; bottom: 22%; }.home-next-structure span { position: absolute; display: block; height: 5px; border-radius: 1px; background: var(--home-ink); transform-origin: left center; }.home-next-roof { top: 12%; width: 50%; }.home-next-roof-left { left: 4%; transform: rotate(25deg); }.home-next-roof-right { left: 48.8%; transform: rotate(-25deg); }.home-next-column { top: 31%; height: 63% !important; }.home-next-column-left { left: 4%; }.home-next-column-right { right: 2%; }.home-next-beam { top: 31%; left: 4%; width: 94%; }.home-next-brace { top: 60%; width: 47%; height: 3px !important; }.home-next-brace-left { left: 4%; transform: rotate(36deg); }.home-next-brace-right { right: 2%; transform: rotate(-36deg); transform-origin: right center !important; }.home-next-base { bottom: 6%; width: 17%; height: 7px !important; }.home-next-base-left { left: -4%; }.home-next-base-right { right: -6%; }.home-next-dimension { position: absolute; right: 3%; top: 27%; bottom: 19%; border-right: 1px solid #48646d; }.home-next-dimension::before, .home-next-dimension::after { content: ''; position: absolute; right: -4px; width: 7px; height: 1px; background: #48646d; }.home-next-dimension::before { top: 0; }.home-next-dimension::after { bottom: 0; }.home-next-dimension span { position: absolute; right: 0.55rem; top: 50%; color: #38515a; font: 700 0.65rem ui-monospace, SFMono-Regular, Menlo, monospace; writing-mode: vertical-rl; }

.home-next-intro { display: grid; grid-template-columns: 1fr minmax(0, 2fr); gap: 2rem; padding: clamp(3.5rem, 8vw, 8rem) clamp(1.25rem, 8vw, 9rem); color: #eef4f1; }.home-next-intro .home-next-eyebrow { margin: 0; }.home-next-intro > p:last-child { max-width: 800px; margin: 0; font-size: clamp(1.75rem, 3.2vw, 3.4rem); line-height: 1.04; }
.home-next-services { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #839399; }.home-next-service { min-height: 280px; display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-content: space-between; padding: 1.4rem; border-right: 1px solid #839399; color: #eaf2ef; }.home-next-service:last-child { border-right: 0; }.home-next-service-number { color: #9cb1b1; font: 0.7rem ui-monospace, SFMono-Regular, Menlo, monospace; }.home-next-service-body { grid-column: 1 / -1; }.home-next-service h2 { margin: 0 0 0.6rem; font-size: clamp(1.5rem, 2vw, 2.25rem); font-weight: 400; }.home-next-service p { max-width: 290px; margin: 0; color: #bdc9c6; font: 0.85rem/1.55 system-ui, sans-serif; }.home-next-service-open { justify-self: end; width: 2.3rem; height: 2.3rem; border: 1px solid currentColor; border-radius: 50%; color: inherit; background: transparent; font-size: 1.1rem; cursor: pointer; }.home-next-service-blue:hover { color: var(--home-blue); background: #1b2b32; }.home-next-service-red:hover { color: #f07b60; background: #2a2224; }.home-next-service-yellow:hover { color: var(--home-yellow); background: #2d2c23; }
.home-next-manifesto { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 6rem; padding: clamp(2rem, 6vw, 5rem); background: var(--home-red); color: #fff7ed; }.home-next-manifesto .home-next-eyebrow { color: #ffd4c8; }.home-next-manifesto h2 { margin: 0; font-size: clamp(2rem, 4vw, 4.2rem); line-height: 0.96; font-weight: 400; }.home-next-manifesto-copy { align-self: end; max-width: 445px; }.home-next-manifesto-copy p { margin: 0; font: 1rem/1.6 system-ui, sans-serif; }.home-next-manifesto-copy span { display: block; margin-top: 2.4rem; font: 0.68rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }

@media (max-width: 760px) { .home-next-shell { display: block; margin: 0; padding: 0; }.home-next-sidebar { position: static; min-height: 0; padding: 1rem; border-right: 0; border-bottom: 1px solid rgba(174, 194, 194, 0.28); }.home-next-sidebar-brand { padding: 0.25rem 0.5rem 0.8rem; }.home-next-sidebar-nav { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }.home-next-sidebar-group > span { padding-left: 0; }.home-next-sidebar-group a { padding: 0.45rem 0; font-size: 0.73rem; }.home-next-sidebar-footer { display: none; }.home-next { padding: 0.7rem; }.home-next-nav { grid-template-columns: 1fr auto; }.home-next-nav-note { display: none; }.home-next-hero { grid-template-columns: 1fr; }.home-next-hero-copy { padding: 3rem 1.4rem; }.home-next-drawing { min-height: 360px; }.home-next-intro, .home-next-manifesto { grid-template-columns: 1fr; gap: 1.25rem; }.home-next-intro { padding: 4rem 1.4rem; }.home-next-services { grid-template-columns: 1fr; }.home-next-service { min-height: 205px; border-right: 0; border-bottom: 1px solid #839399; }.home-next-manifesto { margin-top: 3rem; padding: 3rem 1.4rem; } }.laser-orders-link {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.55rem 1.2rem;
  background: #10b981;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.laser-orders-link:hover {
  background: #059669;
}

.laser-price-preview {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.8rem;
}

.laser-price-preview-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.85rem;
  color: #475569;
}

.laser-price-preview-row.total {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  border-top: 1px solid #bbf7d0;
  margin-top: 0.25rem;
  padding-top: 0.4rem;
}

.laser-cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.laser-cart-item {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem;
}

.laser-cart-thumb {
  flex-shrink: 0;
  width: 120px;
}

.dxf-preview-trigger {
  cursor: zoom-in;
}

.laser-cart-thumb canvas {
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.laser-cart-formatka {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.laser-cart-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.laser-cart-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.laser-cart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.laser-cart-badge {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  color: #475569;
  font-weight: 600;
}

.laser-cart-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.laser-cart-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.laser-cart-field label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
}

.laser-cart-field input {
  width: 70px;
  padding: 0.3rem 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.8rem;
}

.laser-cart-material-field select {
  max-width: 170px;
  padding: 0.3rem 1.7rem 0.3rem 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #0f172a;
  background-color: #fff;
  font: inherit;
  font-size: 0.8rem;
}

.laser-cart-price {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.25rem;
  min-width: 140px;
  text-align: right;
}

.laser-cart-price-label {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}

.laser-cart-price-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #059669;
}

.laser-cart-price-total {
  font-size: 0.78rem;
  color: #475569;
}

.laser-cart-remove {
  margin-top: 0.4rem;
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .laser-cart-item {
    flex-direction: column;
  }
  .laser-cart-thumb {
    width: 100%;
  }
  .laser-cart-price {
    align-items: flex-start;
    text-align: left;
  }
}

.laser-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0f172a;
}

.laser-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.laser-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.3rem;
}

.laser-header p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

.laser-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.laser-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.laser-left,
.laser-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.laser-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

.laser-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.9rem;
}

.laser-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.laser-dropzone.dragover {
  border-color: #10b981;
  background: #f0fdf4;
}

.laser-dropzone-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.laser-dropzone p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
  color: #475569;
  font-weight: 600;
}

.laser-dropzone-sub {
  font-size: 0.8rem !important;
  color: #94a3b8 !important;
  font-weight: 400 !important;
}

.laser-file-name {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: #059669;
  font-weight: 600;
}

.laser-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.laser-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.laser-field.full {
  grid-column: 1 / -1;
}

.laser-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.laser-field input,
.laser-field select,
.laser-field textarea {
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
}

.laser-field input:focus,
.laser-field select:focus,
.laser-field textarea:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.laser-field textarea {
  resize: vertical;
}

.laser-btn-primary {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.laser-btn-primary:hover:not(:disabled) {
  background: #059669;
}

.laser-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.laser-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  color: #94a3b8;
  text-align: center;
}

.laser-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.laser-metric {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem;
  text-align: center;
}

.laser-metric-label {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.laser-metric b {
  font-size: 0.9rem;
  color: #0f172a;
}

.laser-quote {
  margin-top: 1.25rem;
}

.laser-price-summary {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.laser-price-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  color: #475569;
}

.laser-price-row.total {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  border-top: 1px solid #bbf7d0;
  margin-top: 0.3rem;
  padding-top: 0.5rem;
}

.laser-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.laser-table th,
.laser-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.laser-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.laser-table td:last-child,
.laser-table th:last-child {
  text-align: right;
}

.laser-order {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.laser-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #475569;
  margin: 0.8rem 0;
  cursor: pointer;
}

.laser-consent input {
  margin-top: 0.15rem;
}

.laser-success {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 1.25rem;
}

.laser-success-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.laser-success h3 {
  color: #059669;
}

.laser-success p {
  color: #475569;
  font-size: 0.95rem;
  margin: 0.4rem 0;
}

/* Nesting preview */
.laser-nesting {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
  margin-bottom: 1rem;
}

.laser-nesting h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.laser-material-cost-basis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -0.2rem 0 0.8rem;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
}

.laser-material-cost-basis-controls {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

.laser-material-cost-basis-controls button {
  min-width: 0;
  min-height: 0;
  padding: 0.4rem 0.6rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.laser-material-cost-basis-controls button + button {
  border-left: 1px solid #cbd5e1;
}

.laser-material-cost-basis-controls button.active {
  background: #0f766e;
  color: #fff;
}

.laser-nesting-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.laser-nesting-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  text-align: center;
}

.laser-nesting-stat-label {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.laser-nesting-stat b {
  font-size: 0.9rem;
  color: #0f172a;
}

.laser-nesting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.laser-nesting-sheet {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.laser-nesting-sheet-parts {
  padding: 0.6rem 0.75rem 0.7rem;
  border-top: 1px solid #e2e8f0;
}

.laser-nesting-sheet-parts-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.laser-nesting-sheet-part {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.2rem 0;
  font-size: 0.75rem;
  color: #334155;
}

.laser-nesting-sheet-part span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.laser-nesting-sheet-part b {
  flex-shrink: 0;
  color: #0f172a;
}

.laser-nesting-group + .laser-nesting-group {
  margin-top: 1rem;
}

.laser-nesting-group h4 {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  color: #334155;
}

.laser-nesting-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.laser-nesting-sheet-select {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #475569;
}

.laser-nesting-sheet-select select {
  max-width: 220px;
  padding: 0.35rem 0.45rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  background: #fff;
  font: inherit;
}

.laser-nesting-warning {
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.78rem;
}

.np-wrap {
  cursor: zoom-in;
}

.np-preview-popover {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgb(15 23 42 / 0.3);
  pointer-events: none;
}

.np-preview-popover-content {
  width: min(960px, 90vw);
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgb(15 23 42 / 0.28);
  background: #f8fafc;
}

.np-popup-canvas {
  max-height: calc(100vh - 4rem);
}

@media (max-width: 768px) {
  .laser-layout {
    grid-template-columns: 1fr;
  }
  .laser-fields {
    grid-template-columns: 1fr;
  }
  .laser-metrics {
    grid-template-columns: 1fr;
  }
  .laser-material-cost-basis {
    align-items: flex-start;
    flex-direction: column;
  }
}
.tube-header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.tube-orders-link {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  background: #6366f1;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.tube-header-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.tube-header-btn:hover {
  background: #4f46e5;
}

.tube-orders-link:hover {
  background: #4f46e5;
}

.tube-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: #0f172a;
}

.tube-header {
  margin-bottom: 1.5rem;
}

.tube-header h1 {
  font-size: 1.6rem;
  margin: 0 0 0.4rem;
  color: #0f172a;
}

.tube-header p {
  color: #475569;
  font-size: 0.95rem;
  margin: 0;
}

.tube-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.tube-warnings {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.tube-warnings div {
  margin: 0.15rem 0;
}

.tube-edge-selection {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.8rem;
}

.tube-edge-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.tube-edge-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.tube-edge-option {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
}

.tube-edge-option input {
  accent-color: #6366f1;
}

.tube-ai-recognition {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: #4c1d95;
}

.tube-ai-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.tube-ai-badge {
  background: #7c3aed;
  color: #fff;
  border-radius: 10px;
  padding: 0.05rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.tube-ai-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.tube-ai-desc {
  color: #6d28d9;
  margin-bottom: 0.5rem;
}

.tube-ai-apply {
  padding: 0.4rem 0.8rem;
  background: #7c3aed;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.tube-ai-apply:hover {
  background: #6d28d9;
}

.tube-ai-spinner {
  font-size: 1rem;
  margin-right: 0.3rem;
}

.tube-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.tube-left,
.tube-right {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 900px) {
  .tube-layout {
    grid-template-columns: 1fr;
  }
}

.tube-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.tube-card h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: #0f172a;
}

.tube-dropzone {
  border: 2px dashed #c7d2fe;
  border-radius: 10px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
}

.tube-dropzone.dragover {
  border-color: #6366f1;
  background: #eef2ff;
}

.tube-dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.tube-dropzone p {
  margin: 0.25rem 0;
  color: #334155;
  font-weight: 600;
}

.tube-dropzone-sub {
  color: #64748b !important;
  font-weight: 400 !important;
  font-size: 0.85rem;
}

.tube-file-name {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  font-size: 0.85rem;
  font-weight: 600;
}

.tube-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tube-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tube-field.full {
  grid-column: 1 / -1;
}

.tube-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.tube-field input,
.tube-field select,
.tube-field textarea {
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: #0f172a;
}

.tube-field input:focus,
.tube-field select:focus,
.tube-field textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.tube-btn-primary {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.tube-btn-primary:hover {
  background: #4f46e5;
}

.tube-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tube-price-preview {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.8rem;
}

.tube-price-preview-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  font-size: 0.85rem;
  color: #475569;
}

.tube-price-preview-row.total {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  border-top: 1px solid #c7d2fe;
  margin-top: 0.25rem;
  padding-top: 0.4rem;
}

.tube-preview-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.tube-preview-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.tube-preview-toggle input {
  accent-color: #6366f1;
}

.tube-preview-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tube-preview-section select {
  padding: 0.35rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.8rem;
  background: #fff;
}

.tube-preview-section input[type="range"] {
  width: 120px;
  accent-color: #6366f1;
}

.tube-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
}

.tube-metric {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tube-metric-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tube-metric b {
  font-size: 0.95rem;
  color: #0f172a;
}

.tube-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #64748b;
  text-align: center;
}

.tube-cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tube-cart-item {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem;
}

.tube-cart-thumb {
  flex-shrink: 0;
  width: 160px;
}

.tube-cart-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tube-cart-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tube-cart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tube-cart-badge {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  color: #475569;
  font-weight: 600;
}

.tube-cart-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tube-cart-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tube-cart-field label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
}

.tube-cart-field input {
  padding: 0.4rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.85rem;
  width: 90px;
}

.tube-cart-price {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  min-width: 140px;
}

.tube-cart-price-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

.tube-cart-price-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.tube-cart-price-total {
  font-size: 0.8rem;
  color: #475569;
}

.tube-cart-remove {
  margin-top: 0.3rem;
  padding: 0.35rem 0.7rem;
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.tube-cart-remove:hover {
  background: #fecaca;
}

.tube-price-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.tube-price-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  color: #475569;
}

.tube-price-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  border-top: 1px solid #e2e8f0;
  margin-top: 0.3rem;
  padding-top: 0.5rem;
}

.tube-order h3 {
  margin-bottom: 0.75rem;
}

.tube-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #475569;
  margin: 0.75rem 0;
}

.tube-consent input {
  margin-top: 0.15rem;
}

.tube-success {
  text-align: center;
  padding: 2rem;
}

.tube-success-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.tube-success h3 {
  margin-bottom: 0.5rem;
}

.tube-success p {
  color: #475569;
  margin: 0.3rem 0;
}
.tube-orders-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: #0f172a;
}

.tube-orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.tube-orders-header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.tube-orders-back {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  background: #6366f1;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.tube-orders-back:hover {
  background: #4f46e5;
}

.tube-orders-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.tube-orders-loading,
.tube-orders-empty {
  text-align: center;
  color: #64748b;
  padding: 3rem 1rem;
}

.tube-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tube-order-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tube-order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.tube-order-number {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
}

.tube-order-name {
  font-size: 0.85rem;
  color: #64748b;
}

.tube-order-status {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.tube-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.75rem;
}

.tube-order-total {
  font-weight: 700;
  color: #0f172a;
}

.tube-order-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.tube-order-btn {
  padding: 0.45rem 0.9rem;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.tube-order-btn:hover {
  background: #4f46e5;
}

.tube-order-status-select {
  padding: 0.45rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.8rem;
  background: #fff;
}

/* Modal */
.tube-order-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.tube-order-modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.25rem;
}

.tube-order-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.tube-order-modal-head h3 {
  margin: 0;
  font-size: 1.1rem;
}

.tube-order-close {
  background: #f1f5f9;
  border: none;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 0.9rem;
}

.tube-order-client {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
}

.tube-order-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tube-order-item {
  display: flex;
  gap: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem;
}

.tube-order-item-preview {
  flex-shrink: 0;
  width: 200px;
}

.tube-order-item-nopreview {
  width: 200px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8rem;
  background: #f1f5f9;
  border-radius: 8px;
}

.tube-order-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tube-order-item-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  word-break: break-all;
}

.tube-order-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tube-order-badge {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  color: #475569;
  font-weight: 600;
}

.tube-order-item-quote {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.82rem;
  color: #475569;
}

.tube-order-modal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}
.proj-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
}

.proj-header h1 {
  font-size: 26px;
  margin: 0 0 6px;
  color: #0f172a;
}

.proj-header p {
  margin: 0 0 20px;
  color: #64748b;
  font-size: 14px;
}

.proj-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.proj-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .proj-layout {
    grid-template-columns: 1fr;
  }
}

.proj-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.proj-card h3 {
  margin: 0 0 14px;
  font-size: 16px;
  color: #0f172a;
}

.proj-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.proj-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proj-field label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.proj-field input,
.proj-field textarea {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

.proj-field input:focus,
.proj-field textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.proj-btn-primary {
  width: 100%;
  padding: 10px 14px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.proj-btn-primary:hover {
  background: #1d4ed8;
}

.proj-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.proj-muted {
  color: #94a3b8;
  font-size: 13px;
  padding: 8px 0;
}

.proj-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proj-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.proj-item:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.proj-item.active {
  border-color: #2563eb;
  background: #eff6ff;
}

.proj-item-main {
  min-width: 0;
}

.proj-item-name {
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-item-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-item-meta {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.proj-badge {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.proj-item-del {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
}

.proj-item-del:hover {
  background: #fee2e2;
}

.proj-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #94a3b8;
  text-align: center;
}

.proj-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.proj-detail-header h3 {
  margin: 0;
}

.proj-btn-back {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

.proj-btn-back:hover {
  background: #e2e8f0;
}

.proj-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.proj-dropzone:hover {
  border-color: #2563eb;
  background: #f8fafc;
}

.proj-dropzone-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.proj-dropzone p {
  margin: 0;
  font-weight: 600;
  color: #334155;
  font-size: 14px;
}

.proj-dropzone-sub {
  font-weight: 400 !important;
  color: #94a3b8 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
}

.proj-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proj-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.proj-file.active {
  border-color: #2563eb;
  background: #eff6ff;
}

.proj-file-info {
  min-width: 0;
  cursor: pointer;
  flex: 1;
}

.proj-file-name {
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-file-meta {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.proj-file-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.proj-btn-sm {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.proj-btn-sm:hover {
  background: #e2e8f0;
}

.proj-btn-sm.danger:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

/* Modal */
.proj-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.proj-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.proj-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.proj-modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #0f172a;
  word-break: break-all;
}

.proj-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.proj-metric {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.proj-metric-label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.proj-metric b {
  font-size: 14px;
  color: #0f172a;
}

.proj-modal-hint {
  margin-top: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.lo-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0f172a;
}

.lo-header {
  margin-bottom: 1.25rem;
}

.lo-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem;
}

.lo-header p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

.lo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.lo-btn-primary {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 0.6rem 1.3rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.lo-btn-secondary {
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 0.6rem 1.3rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.lo-btn-prod {
  background: #7c3aed;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}

.lo-btn-prod:hover {
  background: #6d28d9;
}

.lo-create-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.9rem;
}

.lo-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem;
}

.lo-create-grid input {
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.lo-upload-label {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.lo-drafts {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.lo-draft {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}

.lo-draft-name {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.lo-draft-status {
  font-size: 0.75rem;
  font-weight: 500;
  color: #2563eb;
}

.lo-draft-error {
  color: #b91c1c;
}

.lo-draft-fields {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.lo-draft-fields label {
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  color: #64748b;
  gap: 0.2rem;
}

.lo-draft-fields input,
.lo-draft-fields select {
  padding: 0.4rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.85rem;
  min-width: 90px;
}

.lo-draft-remove {
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 0.9rem;
}

.lo-create-form input {
  flex: 1;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
}

.lo-create-form button {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.lo-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.lo-loading,
.lo-empty {
  text-align: center;
  color: #94a3b8;
  padding: 2rem;
}

.lo-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.lo-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.lo-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.lo-card-left {
  flex: 1;
  min-width: 0;
}

.lo-card-number {
  font-weight: 700;
  color: #2563eb;
  font-size: 0.85rem;
}

.lo-card-name {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lo-card-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.lo-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.lo-status {
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}

.lo-card-price {
  font-weight: 700;
  color: #059669;
  font-size: 0.9rem;
}

.lo-status-select {
  padding: 0.25rem 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.75rem;
  background: #fff;
}

/* Modal */
.lo-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.lo-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.lo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.lo-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #2563eb;
}

.lo-modal-header p {
  margin: 0.2rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.lo-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
}

.lo-modal-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.lo-modal-info span {
  color: #64748b;
}

.lo-files {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lo-file {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lo-file-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.lo-file-meta {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .lo-modal-info {
    grid-template-columns: 1fr;
  }
}
.lp-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0f172a;
}

.lp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.lp-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.lp-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.lp-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0.2rem 0 0;
}

.lp-btn-secondary {
  background: #fff;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 0.6rem 1.3rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}

.lp-status {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.lp-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.lp-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lp-info-item span {
  font-size: 0.72rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lp-info-item b {
  font-size: 0.9rem;
  color: #0f172a;
  word-break: break-word;
}

.lp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.lp-stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.lp-stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: #7c3aed;
}

.lp-stat-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.lp-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.lp-chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.1rem;
}

.lp-chart-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.9rem;
}

.lp-barchart {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.lp-bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 70px;
  align-items: center;
  gap: 0.6rem;
}

.lp-bar-label {
  font-size: 0.78rem;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-bar-track {
  background: #f1f5f9;
  border-radius: 6px;
  height: 18px;
  overflow: hidden;
}

.lp-bar-fill {
  height: 100%;
  border-radius: 6px;
  min-width: 4px;
  transition: width 0.4s ease;
}

.lp-bar-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  text-align: right;
}

.lp-donut-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 0.8rem;
}

.lp-donut {
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
}

.lp-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lp-donut-center b {
  font-size: 1.6rem;
  color: #0f172a;
}

.lp-donut-center span {
  font-size: 0.75rem;
  color: #64748b;
}

.lp-legend {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lp-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #475569;
}

.lp-legend-item b {
  margin-left: auto;
  color: #0f172a;
}

.lp-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.lp-baskets-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.9rem;
}

.lp-baskets {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.lp-basket {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.lp-basket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: #f8fafc;
  border-left: 5px solid #7c3aed;
  flex-wrap: wrap;
}

.lp-basket-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lp-basket-badge {
  color: #fff;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.lp-basket-thick {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.lp-basket-meta {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lp-sheet-count {
  font-weight: 700;
  color: #7c3aed;
  background: #f3e8ff;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.lp-basket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.9rem;
  padding: 1rem;
}

.lp-file-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.lp-file-preview {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.lp-file-preview canvas {
  width: 100%;
  display: block;
}

.lp-file-body {
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lp-file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-file-stats {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: #64748b;
}

.lp-file-stats b {
  color: #0f172a;
}

.lp-btn-download {
  align-self: flex-start;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.lp-btn-download:hover {
  background: #dbeafe;
}

.lp-loading,
.lp-empty {
  text-align: center;
  color: #94a3b8;
  padding: 2rem;
}

.lp-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

@media (max-width: 820px) {
  .lp-charts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .lp-bar-row {
    grid-template-columns: 90px 1fr 60px;
  }
}

.lp-nesting {
  padding: 0 1rem 1rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 0.5rem;
}

.lp-nesting-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  padding: 0.75rem 0 0.5rem;
}

.lp-nesting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.lp-nesting-sheet {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
/* Mobile Navigation Styles */

.mobile-menu-button {
  display: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.2);
  cursor: pointer;
  padding: 0.55rem;
  margin: 0;
  position: relative;
  z-index: 101;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  height: 20px;
}

.line {
  display: block;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, #dbeafe 0%, #7dd3fc 100%);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-button.open .line-1 {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-button.open .line-2 {
  opacity: 0;
}

.mobile-menu-button.open .line-3 {
  transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(2, 8, 23, 0.64);
  z-index: 99;
  backdrop-filter: blur(8px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(8, 17, 31, 0.98) 0%, rgba(13, 21, 39, 0.98) 100%);
  color: white;
  flex-direction: column;
  z-index: 100;
  box-shadow: 18px 0 48px rgba(0, 0, 0, 0.34);
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  transition: left 0.3s ease;
  overflow-y: auto;
}

.mobile-nav.open {
  left: 0;
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
}

.mobile-nav-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #eff6ff;
}

.mobile-menu-close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.mobile-menu-close:active {
  transform: scale(0.9);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem;
  flex: 1;
}

.mobile-nav-links a {
  display: block;
  padding: 0.95rem 1rem;
  color: #d6e3f5;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s;
  touch-action: manipulation;
  font-size: 0.98rem;
  font-weight: 600;
}

.mobile-nav-links a:active {
  background-color: rgba(255, 255, 255, 0.08);
}

.mobile-nav-links a.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(17, 24, 39, 0.46));
  color: #eff6ff;
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.28);
}

.mobile-nav-links hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  margin: 0.5rem 0 0.25rem;
}

.mobile-logout-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.9rem 1rem;
  background: rgba(127, 29, 29, 0.24);
  color: #fee2e2;
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 16px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s ease, border-color 0.2s ease;
  touch-action: manipulation;
}

.mobile-logout-btn:active {
  background: rgba(127, 29, 29, 0.34);
}

.mobile-logout-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 113, 113, 0.42);
}

/* Show mobile menu on small screens */
@media (max-width: 768px) {
  .app-header nav {
    display: none;
  }

  .mobile-menu-button {
    display: flex;
  }

  .mobile-menu-overlay {
    display: block;
  }

  .mobile-nav {
    display: flex;
  }
}

/* Desktop - hide mobile menu button */
@media (min-width: 769px) {
  .mobile-menu-button,
  .mobile-menu-overlay,
  .mobile-nav {
    display: none !important;
  }
}
/* ========== MOBILE FIRST - SAFE AREAS & NOTCHED DEVICES ========== */
@supports (padding: max(0px)) {
  .app-header {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
    padding-top: max(1.5rem, env(safe-area-inset-top));
  }

  footer {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }

  main {
    padding-left: max(0, env(safe-area-inset-left));
    padding-right: max(0, env(safe-area-inset-right));
  }
}

/* Base layout overrides (ensure full-width body) */
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.2), transparent 24%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.1), transparent 18%),
    linear-gradient(180deg, #08111f 0%, #0d1527 42%, #111827 100%);
  display: block;
}

#root {
  width: 100%;
}

body.home-next-preview .app-header,
body.home-next-preview footer {
  display: none;
}

/* App Layout */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: transparent;
}

.app-header {
  width: min(1440px, calc(100% - 40px));
  margin: 14px auto 0;
  color: white;
  padding: 1rem 1.35rem;
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(7, 14, 27, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  position: relative;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-logo {
  height: 48px;
  max-width: 190px;
  flex: 0 0 auto;
  object-fit: contain;
  cursor: pointer;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.22));
}

.app-header h1 {
  margin: 0 0 1rem 0;
  font-size: 1.8rem;
  flex: 1;
}

.app-header .desktop-nav {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
}

.app-header .desktop-nav a,
.desktop-nav-group summary {
  position: relative;
  color: #d6e3f5;
  text-decoration: none;
  transition: color 0.24s ease, border-color 0.24s ease, background 0.24s ease, transform 0.2s ease, box-shadow 0.24s ease;
  padding: 0.62rem 0.78rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.app-header .desktop-nav > a:hover,
.desktop-nav-group summary:hover {
  color: #f4f9ff;
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 24px rgba(2, 8, 23, 0.2);
}

.app-header .desktop-nav > a.active {
  color: #eff6ff;
  border-color: rgba(96, 165, 250, 0.58);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(17, 24, 39, 0.46));
  box-shadow: 0 14px 30px rgba(2, 8, 23, 0.3);
}

.app-header .desktop-nav > a.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #34d399 100%);
}

.desktop-nav-group {
  position: relative;
}

.desktop-nav-group summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  list-style: none;
}

.desktop-nav-group summary::-webkit-details-marker {
  display: none;
}

.desktop-nav-group summary::after {
  content: '⌄';
  color: #7dd3fc;
  font-size: 0.85rem;
  line-height: 1;
}

.desktop-nav-group[open] summary {
  color: #eff6ff;
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(37, 99, 235, 0.2);
}

.desktop-nav-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  z-index: 140;
  display: flex;
  flex-direction: column;
  min-width: 205px;
  padding: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 12px;
  background: rgba(7, 14, 27, 0.98);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

.desktop-nav-group-label {
  padding: 0.15rem 0.45rem 0.4rem;
  color: #7dd3fc;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-header .desktop-nav .desktop-nav-menu a {
  padding: 0.58rem 0.62rem;
  border-radius: 7px;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.8rem;
}

.app-header .desktop-nav .desktop-nav-menu a:hover,
.app-header .desktop-nav .desktop-nav-menu a.active {
  color: #f8fafc;
  border-color: transparent;
  background: rgba(56, 189, 248, 0.16);
  box-shadow: none;
  transform: none;
}

.desktop-logout-btn {
  margin-left: 0.4rem;
  padding: 0.72rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(248, 113, 113, 0.24);
  background: rgba(127, 29, 29, 0.22);
  color: #fee2e2;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.desktop-logout-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(127, 29, 29, 0.34);
}

.desktop-auth-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  margin-left: 0.4rem;
}

.desktop-auth-user {
  font-size: 0.78rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ecfeff;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(103, 232, 249, 0.45);
  background: rgba(14, 116, 144, 0.35);
  padding: 0.3rem 0.5rem;
  border-radius: 10px;
}

/* Mobile Navigation Toggle */
@media (max-width: 768px) {
  .app-header {
    flex-wrap: wrap;
    gap: 0.75rem;
    width: min(100% - 18px, 1440px);
    margin-top: 10px;
    padding: 0.85rem 0.95rem;
    border-radius: 22px;
  }

  .app-logo {
    height: 40px;
    max-width: 150px;
    flex: 1;
  }

  .app-header h1 {
    font-size: 1.3rem;
    margin: 0;
    flex: 1;
  }

  .app-header .desktop-nav {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  .app-header .desktop-nav {
    display: none;
  }
}

@media (min-width: 769px) {
  .app-header {
    flex-direction: row;
  }

  .app-header h1 {
    margin-bottom: 0;
  }
}

main {
  flex: 1;
  width: 100%;
  padding: 0;
}

footer {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto 16px;
  background: rgba(7, 14, 27, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  color: #b8c6da;
  text-align: center;
  padding: 1rem 1.2rem;
  margin-top: 2rem;
  backdrop-filter: blur(18px);
}

/* Calculator Page - Improved UX */
.calculator-page {
  display: flex;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: calc(100vh - 120px);
}

.calculator-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
  width: 100%;
  max-width: 2000px;
  align-items: start;
}

@media (max-width: 1600px) {
  .calculator-container {
    grid-template-columns: 340px 1fr;
    gap: 1.2rem;
  }
}

@media (max-width: 1400px) {
  .calculator-container {
    grid-template-columns: 320px 1fr;
    gap: 1rem;
  }
}

@media (max-width: 1200px) {
  .calculator-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.2rem;
  }
}

/* ===== SPLIT-VIEW CONFIGURATOR (PREVIEW) ===== */
.calculator-page-preview {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #f5f5f5;
}

.configurator-header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.configurator-header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

/* ===== CARD GRID LAYOUT ===== */
.cards-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card-header {
  background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
  color: white;
  padding: 1rem 1.5rem;
  flex-shrink: 0;
  border-bottom: 2px solid #3498db;
}

.card-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.card-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.card-parameters {
  grid-column: span 1;
  font-size: 0.85rem;
}

.card-parameters .form-group label {
  font-size: 0.75rem;
}

.card-parameters input,
.card-parameters select {
  font-size: 0.75rem;
  padding: 0.4rem 0.5rem;
}

.card-visualization {
  grid-column: span 2;
  min-height: 600px;
}

.card-results {
  grid-column: span 1;
  font-size: 0.8rem;
}

.card-results h3 {
  font-size: 0.9rem;
  margin: 0.6rem 0 0.4rem;
  color: #2c3e50;
}

/* Section Positioning in Calculator Container */
.parameter-section {
  grid-column: 1;
  grid-row: 1;
}

.visualization-section {
  grid-column: 2;
  grid-row: 1;
}

.calculator-section {
  grid-column: 1 / -1;
  grid-row: 2;
}

@media (max-width: 1200px) {
  .parameter-section {
    grid-column: 1;
    grid-row: 1;
  }

  .visualization-section {
    grid-column: 1;
    grid-row: 2;
  }

  .calculator-section {
    grid-column: 1;
    grid-row: 3;
  }
}

.visualization-content {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  padding: 0;
  gap: 0;
}

.results-content {
  display: flex;
  flex-direction: column;
}

.results-inner {
  flex: 1;
  overflow-y: auto;
}

/* Form elements in cards */
.card-content > form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

.card-content fieldset {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.8rem;
  margin: 0;
  background: #fafafa;
}

.card-content legend {
  font-weight: 600;
  color: #2c3e50;
  padding: 0 0.5rem;
  font-size: 0.85rem;
}

.card-content .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}

.card-content label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #333;
}

.card-content input,
.card-content select {
  padding: 0.5rem 0.6rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.8rem;
}

.card-content input:focus,
.card-content select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ===== RESPONSIVE CARD GRID ===== */
@media (max-width: 1400px) {
  .cards-grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .card-visualization {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .cards-grid-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card-visualization {
    grid-column: span 1;
  }

  .card-parameters {
    max-height: 400px;
  }
}

.parameters-panel {
  /* Removed - handled by card-parameters */
}

.panel-content {
  /* Removed - handled by card-content */
}

.panel-content > h2 {
  /* Removed - handled by card-header h2 */
}

.panel-content > form,
.panel-content > div > form {
  /* Removed - handled by card-content */
}

.configurator-main {
  /* Removed - handled by card-visualization */
}

.visualization-wrapper {
  /* Removed - handled by visualization-content */
}

.results-panel {
  /* Removed - handled by card-results */
}

.results-panel > .panel-content {
  /* Removed */
}

.results-panel > .panel-content > h2 {
  /* Removed */
}

@media (max-width: 1200px) {
  .cards-grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .card-visualization {
    grid-column: span 2;
  }

  .configurator-header {
    padding: 1rem 1.5rem;
  }

  .configurator-header h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 900px) {
  .calculator-page-preview {
    height: auto;
  }

  .cards-grid-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .card-visualization {
    grid-column: span 1;
  }

  .card-parameters {
    max-height: 350px;
  }
}

@media (max-width: 600px) {
  .calculator-page-preview {
    height: auto;
  }

  .configurator-header {
    padding: 1rem;
  }

  .configurator-header h1 {
    font-size: 1.3rem;
  }

  .cards-grid-container {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .card {
    border-radius: 8px;
  }

  .card-header {
    padding: 0.8rem 1rem;
  }

  .card-header h2 {
    font-size: 1rem;
  }

  .card-content {
    padding: 1rem;
  }

  .card-parameters {
    max-height: 300px;
  }
}

/* ===== ORIGINAL STYLES ===== */
.parameter-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: visible;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.3s ease;
}

.parameter-section:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.parameter-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  padding: 1.2rem 1.5rem;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: white;
  border-radius: 12px 12px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.parameter-section h2::before {
  content: '⚙️';
  font-size: 1.2rem;
}

.visualization-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  min-height: calc(100vh - 180px);
  transition: box-shadow 0.3s ease;
}

.visualization-section:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.calculator-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: visible;
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.3s ease;
}

.calculator-section:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

@media (max-width: 1200px) {
  .parameter-section,
  .visualization-section,
  .calculator-section {
    max-height: none;
    min-height: auto;
  }
}

.visualization-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  padding: 1.2rem 1.5rem;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: white;
  border-radius: 12px 12px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.visualization-section h2::before {
  content: '🎨';
  font-size: 1.2rem;
}

.calculator-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  padding: 1.2rem 1.5rem;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  border-radius: 12px 12px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calculator-section h2::before {
  content: '📊';
  font-size: 1.2rem;
}

/* Form Styles - Improved */
.parameter-section > form {
  flex: 1;
  overflow-y: visible;
  overflow-x: hidden;
  padding: 1.2rem 1.5rem;
  scroll-behavior: smooth;
}

.parameter-section > form::-webkit-scrollbar {
  width: 8px;
}

.parameter-section > form::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.parameter-section > form::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
  transition: background 0.3s;
}

.parameter-section > form::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

fieldset {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  transition: all 0.3s ease;
}

fieldset:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

fieldset legend {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.9rem;
  padding: 0.3rem 0.8rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  transition: all 0.3s ease;
}

fieldset legend:hover {
  background: #f8fafc;
  border-color: #3b82f6;
  color: #1e40af;
  transform: translateX(2px);
}

.form-group {
  margin-bottom: 0.8rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #334155;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  background: white;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: #f8fafc;
}

.form-group input:hover:not(:focus),
.form-group select:hover:not(:focus) {
  border-color: #cbd5e1;
}

/* Visualization Content */
.visualization-section > div:not(h2) {
  flex: 1;
  padding: 1rem;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Calculator Results Content */
.calculator-section > div:not(h2) {
  flex: 1;
  overflow-y: visible;
  overflow-x: hidden;
  padding: 1.2rem 1.5rem;
  scroll-behavior: smooth;
}

.calculator-section > div::-webkit-scrollbar {
  width: 8px;
}

.calculator-section > div::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.calculator-section > div::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
  transition: background 0.3s;
}

.calculator-section > div::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Canvas Placeholder */
.canvas-placeholder {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.canvas-placeholder:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #dbeafe 100%);
  border-color: #3b82f6;
}
  color: #666;
}

.canvas-placeholder p {
  margin: 0.5rem 0;
}

/* Price Display */
.price-display {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e0e0e0;
}

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

.price-row.total {
  font-size: 1.2rem;
  font-weight: bold;
  color: #27ae60;
  background-color: #ecf0f1;
  padding: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
}

.price-row strong {
  color: #2c3e50;
}

/* Detailed Cost Breakdown */
.cost-breakdown {
  background: linear-gradient(135deg, #f9f9f9 0%, #f5f5f5 100%);
  border: 2px solid #34495e;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.cost-breakdown h3 {
  color: #2c3e50;
  font-size: 1.3rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #34495e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cost-category {
  margin-bottom: 1.5rem;
  background-color: white;
  border-radius: 4px;
  padding: 1rem;
  border-left: 4px solid #3498db;
}

.cost-category h4 {
  color: #34495e;
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #ecf0f1;
  gap: 1rem;
}

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

.cost-item span:first-child {
  flex: 1;
  color: #2c3e50;
  font-weight: 500;
}

.cost-detail {
  color: #7f8c8d;
  font-size: 0.9rem;
  white-space: nowrap;
}

.cost-price {
  color: #27ae60;
  font-size: 1rem;
  text-align: right;
  min-width: 120px;
}

.cost-summary {
  background-color: #ecf0f1;
  border-radius: 4px;
  padding: 1.25rem;
  margin-top: 1rem;
  border: 2px solid #bdc3c7;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #27ae60;
  padding: 1rem 0;
  border-bottom: 2px solid #bdc3c7;
}

.unit-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: #34495e;
  padding: 0.75rem 0;
  margin-top: 0.75rem;
}

.loading {
  color: #3498db;
  font-style: italic;
}

.error-message {
  color: #e74c3c;
  background-color: #fadbd8;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 1rem;
  border-left: 4px solid #e74c3c;
}

/* Buttons - Improved */
.btn-primary,
.btn-secondary,
.btn-link {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-primary::before,
.btn-secondary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(100, 116, 139, 0.4);
}

.btn-link {
  background-color: transparent;
  color: #3498db;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid #3498db;
}

.btn-link:hover {
  background-color: #3498db;
  color: white;
}

/* Quotes List Page */
.quotes-list-page {
  max-width: 1200px;
}

.quotes-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quotes-table table {
  width: 100%;
  border-collapse: collapse;
}

.quotes-table th {
  background-color: #2c3e50;
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.quotes-table td {
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.quotes-table tr:hover {
  background-color: #f9f9f9;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-draft {
  background-color: #ecf0f1;
  color: #7f8c8d;
}

.status-submitted {
  background-color: #ffeaa7;
  color: #d63031;
}

.status-approved {
  background-color: #55efc4;
  color: #27ae60;
}

.status-ordered {
  background-color: #81ecec;
  color: #0984e3;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  background: white;
  border-radius: 8px;
  color: #7f8c8d;
}

/* Quote Detail Page */
.quote-detail-page {
  max-width: 1000px;
}

.quote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quote-header h1 {
  margin: 0;
  color: #2c3e50;
}

.quote-header p {
  margin: 0.5rem 0 0 0;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.quote-status {
  text-align: right;
}

.quote-details,
.quote-summary,
.quote-versions {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quote-details table {
  width: 100%;
  border-collapse: collapse;
}

.quote-details th {
  background-color: #ecf0f1;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #bdc3c7;
}

.quote-details td {
  padding: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background-color: #ecf0f1;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
}

.quote-dates {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.quote-dates p {
  margin: 0.5rem 0;
}

.version-item {
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.version-item h4 {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
}

.version-price {
  font-size: 1.1rem;
  font-weight: bold;
  color: #27ae60;
}

.version-date {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.quote-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  main {
    padding: 1rem;
  }

  .calculator-container {
    grid-template-columns: 1fr;
  }

  .quote-header {
    flex-direction: column;
    text-align: left;
  }

  .quote-status {
    text-align: left;
    margin-top: 1rem;
  }

  .quote-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-link {
    width: 100%;
    text-align: center;
  }
}
/* Joinery Manager Styles */
.joinery-list {
  margin-bottom: 1rem;
}

.joinery-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.joinery-item:hover {
  background-color: #f9f9f9;
}

.joinery-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.joinery-item-info strong {
  color: #2c3e50;
  font-size: 0.95rem;
}

.joinery-item-info span {
  color: #666;
  font-size: 0.85rem;
}

.btn-remove {
  background-color: #e74c3c;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.btn-remove:hover {
  background-color: #c0392b;
}

.joinery-form {
  background-color: #f9f9f9;
}

.joinery-form h4 {
  margin-top: 0;
  color: #2c3e50;
}

.joinery-offset-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.35), rgba(14, 165, 233, 0.22));
  border: 1px solid rgba(96, 165, 250, 0.34);
  outline: none;
}

.joinery-offset-range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.32), rgba(14, 165, 233, 0.2));
}

.joinery-offset-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border-radius: 50%;
  border: 2px solid rgba(186, 230, 253, 0.95);
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.45);
}

.joinery-offset-range::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.32), rgba(14, 165, 233, 0.2));
  border: 1px solid rgba(96, 165, 250, 0.34);
}

.joinery-offset-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(186, 230, 253, 0.95);
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.45);
}

.joinery-offset-value {
  min-width: 92px;
}

/* Results sections */
.results-section,
.result-section {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.results-section h4,
.result-section h4 {
  margin: 0 0 0.75rem 0;
  color: #2c3e50;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
}

.result-section h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
}

.results-group,
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  background-color: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #3498db;
}

.result-item strong {
  color: #555;
  font-size: 0.85rem;
  font-weight: 500;
}

.result-item span {
  color: #2c3e50;
  font-weight: 600;
  font-size: 0.9rem;
}

.subsection {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.subsection:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.subsection h4 {
  margin: 0 0 0.75rem 0;
  color: #2c3e50;
  font-size: 1rem;
  font-weight: 600;
  color: #34495e;
}

.results-pricing-table {
  width: 100%;
  border-collapse: collapse;
}

.results-pricing-table th,
.results-pricing-table td {
  padding: 0.6rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.results-pricing-table th {
  background-color: #f8f9fa;
  color: #555;
  font-weight: 500;
  font-size: 0.85rem;
}

.results-pricing-table td {
  color: #2c3e50;
  font-size: 0.9rem;
}

.results-pricing-table td:last-child {
  text-align: right;
  font-weight: 600;
}

.pricing-summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #3498db;
}

.pricing-summary .result-item {
  background-color: #e8f4f8;
  border-left-color: #2980b9;
  padding: 0.75rem;
}

.pricing-summary .result-item strong {
  font-size: 1rem;
  color: #2c3e50;
}

.pricing-summary .result-item span {
  font-size: 1.25rem;
  color: #2980b9;
}

/* ========== RESPONSIVE DESIGN - COMPREHENSIVE BREAKPOINTS ========== */

/* Extra Small Devices (< 480px) - Small Mobile Phones */
@media (max-width: 480px) {
  .app-header {
    padding: 1rem;
  }

  .app-header h1 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
  }

  .app-header nav {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .app-header nav a {
    font-size: 0.85rem;
  }

  .calculator-page {
    padding: 0.5rem;
  }

  .parameter-section {
    padding: 0.5rem;
    margin-bottom: 1rem;
  }

  .parameter-section h2 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }

  .form-group label {
    font-size: 0.75rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
  }

  fieldset {
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.4rem;
  }

  fieldset legend {
    font-size: 0.75rem;
    padding: 0 0.2rem;
  }

  .price-display {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .price-row {
    padding: 0.5rem 0;
    font-size: 0.85rem;
  }

  .cost-breakdown {
    padding: 0.75rem;
  }

  .cost-category {
    padding: 0.7rem;
    margin-bottom: 0.8rem;
  }

  .cost-category h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .cost-item {
    padding: 0.5rem 0;
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  .cost-price {
    font-size: 0.9rem;
    min-width: 80px;
  }

  .visualization-section {
    display: none;
  }

  .calculator-section {
    grid-column: 1 / -1;
  }

  h1 {
    font-size: 2em;
  }

  h2 {
    font-size: 1.3em;
  }

  h3 {
    font-size: 1.1em;
  }
}

/* Small Devices (480px - 600px) - Mobile Phones */
@media (min-width: 480px) and (max-width: 600px) {
  .app-header {
    padding: 1rem 1.2rem;
  }

  .app-header h1 {
    font-size: 1.4rem;
    margin: 0 0 0.7rem 0;
  }

  .app-header nav {
    gap: 1rem;
  }

  .calculator-page {
    padding: 0.7rem;
  }

  .parameter-section {
    padding: 0.7rem;
    max-height: calc(100vh - 160px);
  }

  .parameter-section h2 {
    font-size: 0.95rem;
  }

  .form-group label {
    font-size: 0.8rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.3rem 0.45rem;
    font-size: 0.8rem;
  }

  .visualization-section {
    display: none;
  }

  h1 {
    font-size: 2.2em;
  }

  h2 {
    font-size: 1.5em;
  }
}

/* Medium Devices (600px - 768px) - Tablets */
@media (min-width: 600px) and (max-width: 768px) {
  .app-header {
    padding: 1.2rem 1.5rem;
  }

  .app-header h1 {
    font-size: 1.6rem;
  }

  .app-header nav {
    gap: 1.5rem;
  }

  .calculator-page {
    padding: 0.8rem;
  }

  .calculator-container {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .parameter-section {
    padding: 0.9rem;
    max-height: 50vh;
    grid-column: 1;
    margin-bottom: 0.5rem;
  }

  .visualization-section {
    grid-column: 1;
    min-height: 300px;
    display: block;
  }

  .calculator-section {
    grid-column: 1;
  }

  .form-group label {
    font-size: 0.85rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
  }

  .cost-breakdown {
    padding: 1.2rem;
  }

  h1 {
    font-size: 2.5em;
  }

  h2 {
    font-size: 1.6em;
  }
}

/* Adjusted for 768px Tablet (existing breakpoint) */
@media (max-width: 768px) {
  main {
    padding: 1rem;
  }

  .calculator-container {
    grid-template-columns: 1fr;
  }

  .quote-header {
    flex-direction: column;
    text-align: left;
  }

  .quote-status {
    text-align: left;
    margin-top: 1rem;
  }

  .quote-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-link {
    width: 100%;
    text-align: center;
  }
}

/* Large Tablets (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .app-header {
    padding: 1.3rem 1.8rem;
  }

  .app-header h1 {
    font-size: 1.75rem;
  }

  .calculator-page {
    padding: 1rem;
  }

  .calculator-container {
    grid-template-columns: minmax(260px, 1fr) 1.3fr;
    gap: 1.2rem;
  }

  .visualization-section {
    grid-column: 1;
    grid-row: 2;
  }

  .calculator-section {
    grid-column: 1 / -1;
    grid-row: 2;
    max-height: unset;
  }
}

/* Small Desktop (1024px - 1400px) - handled by the main layout breakpoints above */
@media (min-width: 1024px) and (max-width: 1400px) {
  .calculator-container {
    /* 2-col: params + visualization, results below */
    grid-template-columns: minmax(280px, 1fr) 1.6fr;
    gap: 1rem;
  }
}

/* Desktop and Larger (> 1200px) */
@media (min-width: 1200px) {
  .app-header {
    padding: 1.5rem 2.5rem;
  }

  .calculator-page {
    padding: 1.5rem;
  }

  .parameter-section {
    max-height: calc(100vh - 160px);
  }
}

/* Extra Large Desktop (> 1600px) */
@media (min-width: 1600px) {
  .calculator-container {
    grid-template-columns: minmax(320px, 1fr) 2fr;
    max-width: 1800px;
    margin: 0 auto;
  }

  .app-header {
    padding: 2rem 3rem;
  }

  .app-header h1 {
    font-size: 2rem;
  }
}

/* Universal Mobile Fixes */
@media (max-width: 600px) {
  * {
    max-width: 100%;
  }

  .btn-primary,
  .btn-secondary,
  .btn-link {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }

  table {
    font-size: 0.8rem;
  }

  .results-pricing-table th,
  .results-pricing-table td {
    padding: 0.4rem;
  }

  .price-detail {
    display: none;
  }

  footer {
    padding: 1rem;
    font-size: 0.9rem;
  }
}

/* ========== IMPROVED UX/UI ADDITIONS ========== */

/* Loading States with Animation */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  color: #64748b;
  min-height: 300px;
}

.loading-state::before {
  content: '⏳';
  font-size: 3rem;
  animation: spin 2s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-state p {
  margin: 0.5rem 0;
  font-size: 1rem;
  font-weight: 500;
}

/* Error Messages - Enhanced */
.error-message {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 2px solid #f87171;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  color: #991b1b;
  font-weight: 500;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.error-message::before {
  content: '⚠️';
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Enhanced Responsive Behavior */
@media (max-width: 1200px) {
  .calculator-page {
    padding: 1rem;
  }
  
  .parameter-section h2::before,
  .visualization-section h2::before,
  .calculator-section h2::before {
    font-size: 1rem;
  }
  
  .parameter-section h2,
  .visualization-section h2,
  .calculator-section h2 {
    padding: 1rem 1.2rem;
    font-size: 1rem;
  }
  
  fieldset {
    padding: 0.8rem 1rem;
  }
  
  fieldset legend {
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
  }
}

@media (max-width: 768px) {
  .calculator-page {
    padding: 0.5rem;
    background: #f8fafc;
  }
  
  .calculator-container {
    gap: 0.75rem;
  }
  
  .parameter-section,
  .visualization-section,
  .calculator-section {
    border-radius: 8px;
  }
  
  .parameter-section h2,
  .visualization-section h2,
  .calculator-section h2 {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    border-radius: 8px 8px 0 0;
  }
  
  .parameter-section > form,
  .calculator-section > div {
    padding: 1rem;
  }
  
  fieldset {
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.8rem;
  }
  
  .form-group {
    margin-bottom: 0.6rem;
  }
}

@media (max-width: 480px) {
  .parameter-section h2::before,
  .visualization-section h2::before,
  .calculator-section h2::before {
    display: none;
  }
  
  fieldset legend {
    font-size: 0.8rem;
  }
  
  .form-group label {
    font-size: 0.8rem;
  }
  
  .form-group input,
  .form-group select {
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
  }
}