: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 */
}

::-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(7, minmax(0, 1fr));
  margin-bottom: 16px;
}

.modern-project-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 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-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: inline-flex;
  margin-top: 6px;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: rgba(6, 78, 59, 0.28);
  color: #a7f3d0;
  font-size: 0.66rem;
  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: 6px;
}

.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-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-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;
}

@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-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-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-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 {
    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;
  }
}

@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.16), transparent 24%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.09), transparent 18%),
    linear-gradient(180deg, #08111f 0%, #0d1527 42%, #111827 100%);
  padding: 18px 0 24px;
}

.admin-header {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto 16px;
  color: white;
  padding: 1.5rem 1.75rem;
  border-radius: 28px;
  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);
}

.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: #a8b8cf;
  margin: 0;
}

.admin-content {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  background: rgba(7, 14, 27, 0.72);
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  padding: 1.5rem;
}

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

.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(148, 163, 184, 0.12);
  flex-wrap: wrap;
}

.admin-tab-btn {
  position: relative;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: #b8c6da;
  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: #eff6ff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(96, 165, 250, 0.3);
  transform: translateY(-1px);
}

.admin-tab-btn.active {
  color: #eff6ff;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(17, 24, 39, 0.48));
  border-color: rgba(96, 165, 250, 0.54);
  box-shadow: 0 14px 30px rgba(2, 8, 23, 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: #eff6ff;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(96, 165, 250, 0.4);
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 1.2rem;
  row-gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.admin-content .form-group > label,
.tab-content .form-group > label {
  font-weight: 600;
  margin-bottom: 0.42rem;
  color: #ffffff !important;
  font-size: 0.9rem;
  line-height: 1.35;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.68rem 0.88rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  font-size: 0.96rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  background: rgba(15, 23, 42, 0.85);
  color: #f8fbff;
  -webkit-text-fill-color: #f8fbff;
  appearance: none;
}

.admin-content input,
.admin-content select,
.admin-content textarea,
.tab-content input,
.tab-content select,
.tab-content textarea {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #f8fbff !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  -webkit-text-fill-color: #f8fbff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

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

.admin-content select,
.tab-content select {
  background-image:
    linear-gradient(45deg, transparent 50%, #8ec5ff 50%),
    linear-gradient(135deg, #8ec5ff 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: #0f172a;
  color: #f8fbff;
}

.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: 16px;
  height: 16px;
}

.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: #f8fbff !important;
  -webkit-box-shadow: 0 0 0px 1000px rgba(15, 23, 42, 0.96) 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: #93a5bf;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.admin-content small,
.tab-content small {
  color: #9bb0ca !important;
}

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

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

.btn-danger {
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(248, 113, 113, 0.24);
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(127, 29, 29, 0.24);
  color: #fee2e2;
}

.btn-danger:hover {
  background: rgba(127, 29, 29, 0.38);
}

.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: #ffffff;
  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: 40px;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  background: rgba(127, 29, 29, 0.28);
  color: #fee2e2;
  border-color: rgba(248, 113, 113, 0.24);
}

.btn-small:hover {
  background: rgba(127, 29, 29, 0.38);
  transform: scale(1.05);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: white;
  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: rgba(15, 23, 42, 0.74);
  color: #ecf4ff;
  border-color: rgba(148, 163, 184, 0.18);
}

.btn-secondary:hover {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(30, 41, 59, 0.82);
}

.btn-edit,
.btn-delete {
  padding: 0.4rem 0.6rem;
  border-radius: 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.btn-edit {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.34);
}

.btn-edit:hover {
  background: rgba(14, 165, 233, 0.18);
  color: white;
  transform: scale(1.1);
}

.btn-delete {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.34);
}

.btn-delete:hover {
  background: rgba(220, 38, 38, 0.16);
  color: white;
  transform: scale(1.1);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: rgba(2, 8, 23, 0.34);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.admin-table thead {
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.4), rgba(14, 165, 233, 0.22));
}

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

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.95rem;
  color: #d8e3f4;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* 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(2, 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(3, 1fr);
  }
}

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

  .form-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* 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%;
}

/* 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: sticky;
  top: 14px;
  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.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-header .desktop-nav a {
  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.7rem 0.95rem;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.app-header .desktop-nav a: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-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);
}

/* Mobile Navigation Toggle */
@media (max-width: 768px) {
  .app-header {
    flex-wrap: wrap;
    gap: 0.75rem;
    width: min(100% - 18px, 1440px);
    margin-top: 10px;
    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) {
  .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;
}

/* 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;
  }
}