:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --bg-primary: var(--surface);
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #dbeafe;
  --error: #ef4444;
  --error-light: #fef2f2;
  --success: #22c55e;
  --success-light: #f0fdf4;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --recommended: #22c55e;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdf4 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.realtime-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 4000;
}

.realtime-toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.25s ease;
  min-width: 220px;
}

.realtime-toast.show {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

@keyframes ripple {
  to { transform: scale(2.5); opacity: 0; }
}

@keyframes checkmark {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

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

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  padding: 48px 40px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  animation: fadeIn 0.5s ease-out;
}

.login-box h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-box p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 15px;
}

.form-group {
  margin-bottom: 24px;
  animation: slideIn 0.4s ease-out backwards;
}

.form-group:nth-child(2) { animation-delay: 0.1s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:hover {
  border-color: var(--text-muted);
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
  background: var(--surface);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input.error {
  border-color: var(--error);
  background: var(--error-light);
  animation: shake 0.4s ease;
}

.error-message {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--error);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  min-height: 24px;
  padding: 10px 14px;
  background: var(--error-light);
  border-radius: var(--radius);
  border: 1px solid var(--error);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.error-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.error-message:empty {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s, opacity 0.3s;
}

.btn:active::after {
  transform: scale(2.5);
  opacity: 1;
  transition: 0s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

.btn-icon-danger {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  transform: scale(1.05);
}

.btn-icon-primary {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-primary:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  transform: scale(1.05);
}

.btn-icon-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #3b82f6;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-sm:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  transform: scale(1.05);
}

.btn-icon-sm:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.app-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 100vh;
}

.menu-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
}

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

.menu-loading .menu-cards {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.menu-ready .menu-cards {
  opacity: 1;
  transform: translateY(0);
}

.menu-ready .menu-card {
  animation: menuCardIn 0.45s ease-out forwards;
  opacity: 0;
}

.menu-ready .menu-card:nth-child(1) { animation-delay: 0.05s; }
.menu-ready .menu-card:nth-child(2) { animation-delay: 0.12s; }
.menu-ready .menu-card:nth-child(3) { animation-delay: 0.19s; }

.menu-topbar {
  position: fixed;
  top: 18px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  z-index: 1000;
}

.menu-user {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.menu-logout {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.menu-logout:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-hover);
}

.catalog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.catalog-header h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.catalog-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.catalog-section {
  margin-top: 24px;
}

.catalog-supplier-add {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.catalog-supplier-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.supplier-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.supplier-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.supplier-info {
  flex: 1;
  min-width: 0;
}

.supplier-name {
  font-weight: 700;
  font-size: 14px;
}

.supplier-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

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

.supplier-delete-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
}

.supplier-delete-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.supplier-delete-id {
  font-size: 12px;
  color: var(--text-secondary);
}

.supplier-delete-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.catalog-section h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

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

.catalog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.catalog-card:hover,
.catalog-card:focus {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
}

.catalog-card-title {
  font-weight: 700;
  font-size: 14px;
}

.catalog-card-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.catalog-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-catalog-action {
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}

.btn-catalog-action:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.btn-catalog-delete:hover {
  border-color: var(--error);
  background: var(--error-light);
}

.catalog-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.catalog-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
  background: var(--surface);
}

.catalog-color-input {
  width: 100%;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 4px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.emoji-picker-popover {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
}

emoji-picker {
  --background: var(--surface);
  --border-color: var(--border);
  --input-border-color: var(--border);
  --input-font-color: var(--text);
  --category-label-font-color: var(--text-secondary);
  --button-active-background: var(--accent-light);
  --button-hover-background: var(--accent-light);
  --outline-color: var(--accent);
  display: block;
  width: 100%;
  max-width: 420px;
  height: 320px;
}

.catalog-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.catalog-modal.open {
  display: flex;
}

.catalog-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
}

.catalog-modal-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  max-width: 520px;
  width: calc(100% - 32px);
  max-height: 80vh;
  overflow: auto;
  padding: 18px 20px;
  z-index: 1;
}

.catalog-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.catalog-modal-close {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.catalog-info {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.catalog-table th,
.catalog-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
}

.catalog-empty {
  font-size: 13px;
  color: var(--text-secondary);
}

.menu-header {
  text-align: center;
  margin-bottom: 8px;
  animation: fadeIn 0.4s ease;
}

.menu-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.menu-header-sub {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

.menu-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.menu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  min-width: 260px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.menu-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

.menu-card:hover,
.menu-card:focus {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
  outline: none;
}

.menu-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.menu-sub {
  color: var(--text-secondary);
  font-size: 14px;
}

.app-top-action {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 1000;
}

.app-top-action.btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.bug-report-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.bug-report-fab:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-xl);
}

.bug-report-fab .bug-icon {
  font-size: 15px;
  line-height: 1;
}

.turbo-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.turbo-card {
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.turbo-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.turbo-sub {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 14px;
}

.turbo-results {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.turbo-total {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.turbo-total-animated {
  opacity: 0;
  transform: translateY(6px);
  animation: turboFadeIn 0.35s ease forwards;
}

.turbo-total-try {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 6px;
}

.turbo-breakdown {
  display: grid;
  gap: 2px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.35;
}

.turbo-breakdown-item {
  opacity: 0;
  transform: translateY(6px);
  animation: turboFadeIn 0.35s ease forwards;
}

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

.turbo-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--warning-light);
  color: #92400e;
  font-size: 13px;
}

.app-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(6px);
  z-index: 9999;
}

.app-loading-card {
  background: var(--surface);
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.app-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--accent-light);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.app-loading-title {
  font-weight: 600;
  color: var(--text);
}

.app-loading-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.main-panel {
  padding: 40px;
  display: flex;
  flex-direction: column;
}

.progress-container {
  margin-bottom: 40px;
}

.progress-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.progress-step-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.progress-step-wrapper[data-goto-step] {
  cursor: pointer;
}

.progress-step-wrapper[data-goto-step]:hover .progress-step {
  transform: scaleY(1.3);
  filter: brightness(1.2);
}

.progress-step-wrapper[data-goto-step]:hover .progress-step-label {
  color: var(--accent);
}

.progress-step-label {
  font-size: 9px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
  transition: color 0.2s ease;
}

.progress-step {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  transition: all 0.4s ease;
  overflow: hidden;
  position: relative;
}

.progress-step.active {
  background: linear-gradient(90deg, var(--accent) 0%, #8b5cf6 100%);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.progress-step.completed {
  background: var(--success);
}

.progress-step.visited {
  background: var(--accent);
  opacity: 0.6;
}

.progress-step::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
}

.progress-step.active::after {
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.progress-info span:first-child {
  font-weight: 600;
  color: var(--accent);
}

.step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.4s ease-out;
}

.step-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  color: var(--text);
}

.step-description {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.cards-collapsed-wrap {
  position: relative;
}

.cards-collapsed-wrap.collapsed .options-grid.single-col {
  max-height: 320px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 62%,
    rgba(0, 0, 0, 0.72) 78%,
    rgba(0, 0, 0, 0.38) 90%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 62%,
    rgba(0, 0, 0, 0.72) 78%,
    rgba(0, 0, 0, 0.38) 90%,
    rgba(0, 0, 0, 0) 100%
  );
}

.cards-fade-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px 0;
  pointer-events: none;
}

.cards-fade-btn {
  pointer-events: auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.cards-fade-btn:hover {
  background: var(--accent-light);
}

.option-card.preview-locked {
  pointer-events: none;
}

.option-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.option-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #8b5cf6 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.option-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.option-card:hover::before {
  transform: scaleX(1);
}

.option-card.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.option-card.selected::before {
  transform: scaleX(1);
}

.option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  animation: bounce 0.4s ease;
}

.option-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.option-card.recommended {
  border-color: var(--success);
  background: var(--success-light);
}

.option-card.recommended .option-badge {
  background: var(--success);
}

.recommend-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--success);
  color: white;
  border-radius: 4px;
}

.option-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.option-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.option-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.option-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent);
  color: white;
  border-radius: 20px;
  margin-top: 8px;
}

.input-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.input-field {
  position: relative;
}

.input-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.input-field input,
.input-field select,
.input-field textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path d='M1 1 L5 5 L9 1' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;

  padding-right: 40px;
}

.input-field select::-ms-expand {
  display: none;
} 

.select-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.select-input-row select {
  flex: 0 0 40%;
}
.select-input-row input {
  flex: 1;
}

@media (max-width: 640px) {
  .select-input-row { flex-direction: column; }
  .select-input-row select { flex: none; width: 100%; }
  .select-input-row input { width: 100%; }
}

.manual-controls { display:flex; gap:8px; align-items:center; }
.manual-select { min-width: 220px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); -webkit-appearance: menulist-button; appearance: menulist-button; background-image: none; }
.manual-number { width: 80px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); }
.btn-add-manual { background: var(--accent); color: white; padding: 9px 18px; border-radius: 10px; border: none; cursor: pointer; }
.btn-add-manual:hover { filter: brightness(0.95); }

.manual-controls select, .manual-controls input, .manual-controls .btn { height: 44px; }
.manual-controls select { line-height: 1.2; }

.manual-item { display:flex; align-items:center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--surface); border: 2px solid var(--border); margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.manual-item-card { display:flex; align-items:center; gap: 12px; }
.manual-item-title { font-size: 15px; color: var(--text); font-weight: 700; }
.manual-item-meta { font-size: 14px; color: var(--text-secondary); }
.btn-remove-icon { width: 38px; height: 38px; border-radius: 8px; background: var(--error); color: #fff; border: none; cursor: pointer; display:flex; align-items:center; justify-content:center; font-size:16px; }
.btn-remove-icon:hover { filter: brightness(0.95); transform: translateY(-1px); }
.btn-remove-icon:focus { outline: 3px solid rgba(220,38,38,0.15); }

.input-field input:hover,
.input-field select:hover,
.input-field textarea:hover {
  border-color: var(--text-muted);
}

.input-field input:focus,
.input-field select:focus,
.input-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.input-field input.valid {
  border-color: var(--success);
  background: var(--success-light);
}

.input-field input.invalid {
  border-color: var(--error);
  background: var(--error-light);
}

.input-field .input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.input-field .input-error {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--error);
  margin-top: 6px;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.2s ease;
}

.input-field .input-error.visible {
  opacity: 1;
  transform: translateY(0);
}

.input-warning {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(255, 149, 0, 0.1);
  border-left: 3px solid #ff9500;
  border-radius: 8px;
  font-size: 14px;
  color: #ff9500;
  line-height: 1.5;
}

.input-warning strong {
  color: #ff9500;
}

.input-warning small {
  font-size: 12px;
  opacity: 0.8;
}

.input-success-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(48, 209, 88, 0.1);
  border-left: 3px solid #30d158;
  border-radius: 8px;
  font-size: 14px;
  color: #30d158;
  line-height: 1.5;
  font-weight: 600;
}

.input-field .input-success {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--success);
  margin-top: 6px;
}

.input-field .input-success::before {
  content: "✓";
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkbox-field:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.checkbox-field input {
  display: none;
}

.checkbox-field .checkbox-box {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-field input:checked + .checkbox-box {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-field input:checked + .checkbox-box::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.checkbox-label {
  font-weight: 500;
}

.fixed-price-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.fixed-price-checkbox .checkbox-label {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.psu-panel { background: var(--surface); padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); }
.psu-header { display:flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.psu-grid { display: flex; gap: 12px; }
.psu-card { flex: 1; background: transparent; padding: 10px; border-radius: 8px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.psu-label { font-weight: 600; color: var(--text); }
.psu-controls { display:flex; gap: 8px; align-items: center; }
.psu-input { width: 80px; text-align: center; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; }
.psu-note { font-size: 13px; color: var(--text-secondary); }
.psu-btn { width: 36px; height: 36px; border-radius: 8px; border: none; cursor: pointer; font-size: 18px; line-height: 1; display:flex; align-items:center; justify-content:center; }
.psu-btn:focus { outline: 2px solid rgba(0,0,0,0.05); }
.psu-btn-dec { background: var(--error); color: white; }
.psu-btn-inc { background: var(--success); color: white; }

@media (max-width: 720px) {
  .psu-grid { flex-direction: column; }
  .psu-card { width: 100%; }
}

.case-option {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.case-option:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.case-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.case-option.recommended {
  border-color: var(--success);
  background: var(--success-light);
}

.case-option.recommended::before {
  content: '⭐ Önerilen';
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 4px;
}

.case-option.hidden {
  display: none;
}

.case-option .case-size {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.case-option .case-price {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.pitch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.pitch-option {
  padding: 12px 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pitch-option:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.pitch-option.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.small-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.case-category {
  margin-bottom: 24px;
}

.case-category:last-of-type {
  margin-bottom: 0;
}

.category-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.small-option {
  padding: 12px 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
}

.small-option:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-2px);
}

.small-option.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.small-option.recommended {
  border-color: var(--success);
  background: var(--success-light);
  color: var(--success);
}

.small-option.recommended:hover {
  background: var(--success);
  color: white;
}

.controller-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
}

.controller-select {
  flex: 1;
}

.controller-select label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.controller-select select {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><path d='M1 1 L5 5 L9 1' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  padding-right: 40px;
}

.controller-select select:hover {
  border-color: var(--text-muted);
}

.controller-select select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
  outline: none;
}

.controller-count {
  display: flex;
  align-items: center;
  gap: 12px;
}

.controller-count button {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.controller-count button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.controller-count span {
  font-size: 18px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.extra-costs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.extra-cost-item {
  display: grid;
  grid-template-columns: 1fr 150px auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  animation: slideIn 0.3s ease-out;
}

.extra-cost-item input {
  padding: 10px 14px;
  font-size: 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  transition: all 0.2s ease;
}

.extra-cost-item input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  outline: none;
}

.extra-cost-item .remove-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--error-light);
  color: var(--error);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.extra-cost-item .remove-btn:hover {
  background: var(--error);
  color: white;
  transform: scale(1.1);
}

.custom-case-item {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  animation: slideIn 0.3s ease-out;
}

.custom-case-item.has-warning {
  border-color: #ef4444;
  border-width: 2px;
  background: rgba(239, 68, 68, 0.05);
}

.custom-case-inputs {
  display: grid;
  grid-template-columns: 100px 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
}

.custom-case-warning {
  margin-bottom: 8px;
  padding: 8px 12px;
  background: rgba(255, 149, 0, 0.15);
  border-left: 3px solid #ff9500;
  border-radius: 6px;
  font-size: 13px;
  color: #ff9500;
  line-height: 1.4;
}

.custom-case-price {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  padding-left: 4px;
}

.custom-case-total {
  font-size: 16px;
  color: rgba(255,255,255,0.9);
}

.add-cost-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-cost-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.step-nav {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 32px;
}

.side-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.side-panel h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.preview-container {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-radius: var(--radius-lg);
  padding: 12px 16px 6px 16px; 
  margin-bottom: 6px; 
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.preview-container:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.preview-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 8px;
}

.preview-canvas {
  width: 100%;
  height: 220px;
  border-radius: var(--radius);
}

.preview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.3);
}

.preview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.95);
  z-index: 10000;
  padding: 40px;
  animation: fadeIn 0.3s ease;
}

.preview-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
}

.preview-modal-close {
  position: absolute;
  top: -30px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 10001;
}

.preview-modal-close:hover {
  opacity: 1;
}

.preview-fullscreen-canvas {
  flex: 1;
  width: 100%;
  border-radius: var(--radius-lg);
  background: #0a0a0a;
}

.preview-modal-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 20px;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
}

.preview-modal-legend .legend-item {
  font-size: 13px;
}

.preview-modal-legend .legend-color {
  width: 16px;
  height: 16px;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 14px;
}

.summary-item .label {
  color: var(--text-secondary);
}

.summary-item .value {
  font-weight: 600;
  color: var(--text);
}

.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%);
  border-radius: var(--radius);
  color: white;
  margin-top: 8px;
}

.summary-total .label {
  font-weight: 600;
}

.summary-total .value {
  font-size: 20px;
  font-weight: 700;
}

.price-summary {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.price-row span {
  color: var(--text-secondary);
  font-size: 14px;
}

.price-row strong {
  font-size: 16px;
  color: var(--text);
}

.price-row.subtotal {
  background: linear-gradient(90deg, rgba(59,130,246,0.05) 0%, transparent 100%);
  margin: 0 -24px;
  padding: 12px 24px;
  border-bottom: 1px dashed var(--border);
}

.price-row.total {
  background: linear-gradient(90deg, rgba(59,130,246,0.1) 0%, rgba(16,185,129,0.1) 100%);
  margin: 12px -24px 0 -24px;
  padding: 16px 24px;
  border-radius: 0;
  border-bottom: none;
}

.price-row.total span {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
}

.price-row.total strong {
  font-size: 22px;
  color: var(--accent);
}

.price-row.profit {
  background: linear-gradient(90deg, rgba(16,185,129,0.1) 0%, transparent 100%);
  margin: 0 -24px -24px -24px;
  padding: 12px 24px;
  border-radius: 0 0 var(--radius) var(--radius);
}

.price-row.profit strong {
  color: var(--success);
}

.report-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.btn-report {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 140px;
}

.btn-report:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, white 0%, var(--accent-light) 100%);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.btn-report:active {
  transform: translateY(-2px);
}

.btn-report .btn-icon {
  font-size: 36px;
  line-height: 1;
}

.btn-report .btn-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.btn-report .btn-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn-bulk-download {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
}

.btn-bulk-download .btn-text,
.btn-bulk-download .btn-desc {
  color: white;
}

.btn-bulk-download:hover {
  background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
  border-color: #5568d3;
  transform: translateY(-4px);
}

.btn-bulk-download:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid var(--accent);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warning); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.report-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20px;
  animation: fadeIn 0.3s ease-out;
}

.report-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  background: rgba(15, 23, 42, 0.95);

  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.report-container {
  position: relative;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
  animation: fadeIn 0.4s ease-out;
}

.report-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  justify-content: center;
}

.report-paper {
  width: 210mm;
  min-height: 297mm;
  background: #fff !important;
  color: #000;
  padding: 8mm 12mm 12mm 12mm;
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius);
  box-sizing: border-box;
}

.report-page {
  page-break-after: avoid;
  page-break-inside: avoid;
  background: #fff !important;
}

.bug-report {
  font-size: 10px;
  color: #111;
  line-height: 1.25;
}

.bug-report .bug-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.bug-report .bug-field {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 5px 6px;
  min-height: 28px;
}

.bug-report .bug-field label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.bug-report .bug-field .line {
  min-height: 12px;
  border-bottom: 1px dashed #d1d5db;
}

.bug-report .report-header.compact {
  margin-bottom: 4px;
  padding-bottom: 4px;
}

.bug-report .report-section.compact {
  margin-bottom: 4px;
}

.bug-report .report-section.compact h2 {
  font-size: 9px;
  margin-bottom: 2px;
  padding-bottom: 1px;
}

.bug-report .report-table.compact td,
.bug-report .report-table.compact th {
  padding: 2px 3px;
  font-size: 8px;
  line-height: 1.2;
}

.bug-report .bug-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 6px;
  align-items: start;
}

.bug-report .bug-two-col .report-section.compact {
  margin-bottom: 0;
}

.bug-report .bug-span-2 {
  grid-column: span 2;
}

.bug-report .bug-list {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  list-style: none;
  padding: 0;
}

.bug-report .bug-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.bug-report .box {
  width: 12px;
  height: 12px;
  border: 1px solid #9ca3af;
  display: inline-block;
  border-radius: 2px;
}

.page-break {
  page-break-before: always;
  break-before: page;
  margin: 0;
  padding: 0;
  border: none;
}

@media print {
  .report-page {
    page-break-after: auto;
  }

  .page-break {
    border: none;
    margin: 0;
    padding: 0;
  }
}

.report-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #000;
  position: relative;
}

.report-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: 80px;
  height: auto;
  object-fit: contain;
}

.report-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #000;
}

.report-header p {
  font-size: 14px;
  color: #666;
  margin: 4px 0;
}

.report-header .warning {
  background: #f5f5f5;
  border: 1px solid #999;
  padding: 8px 16px;
  margin-top: 16px;
  font-weight: 600;
  color: #333;
}

.report-section {
  margin-bottom: 24px;
}

.report-section h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ccc;
  color: #000;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.report-table td,
.report-table th {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.report-table th {
  background: #f5f5f5;
  font-weight: 600;
  color: #000;
}

.report-table tr.highlight td {
  background: #f9f9f9;
  font-weight: 600;
}

.report-table tr.total td {
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.small-option.disabled {
  background: rgba(255, 255, 255, 0.06);
  color: #9aa4b2;
  border-color: rgba(255, 255, 255, 0.12);
  cursor: not-allowed;
  opacity: 0.65;
  position: relative;
}
.small-option.disabled:hover {
  background: rgba(255, 255, 255, 0.08);
}
.small-option .custom-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.18s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  z-index: 10;
}
.small-option .custom-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(17, 24, 39, 0.95) transparent transparent transparent;
}
.small-option.disabled:hover .custom-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

.order-table td,
.order-table th {
  text-align: center;
}

.order-table td:first-child,
.order-table th:first-child {
  text-align: left;
}

.report-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #ccc;
}

.report-footer p {
  font-size: 12px;
  color: #666;
  text-align: center;
}

.report-footer .note {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
}

.signature-area {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
}

.signature-box {
  width: 45%;
  text-align: center;
}

.signature-box p {
  font-size: 12px;
  margin-bottom: 40px;
}

.signature-line {
  border-top: 1px solid #000;
  margin-top: 40px;
}

.report-header.compact {
  margin-bottom: 6px;
  padding-bottom: 4px;
}

.report-header.compact h1 {
  font-size: 14px;
  margin-bottom: 1px;
}

.report-header.compact p {
  font-size: 9px;
  margin: 1px 0;
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.report-section.compact {
  margin-bottom: 6px;
}

.report-section.compact h2 {
  font-size: 10px;
  margin-bottom: 4px;
  padding-bottom: 2px;
}

.report-section.compact h2 small {
  font-weight: 400;
  color: #666;
}

.report-table.compact td,
.report-table.compact th {
  padding: 3px 5px;
  font-size: 9px;
}

.report-table.compact tr.highlight td {
  padding: 3px 5px;
}

.report-table.compact tr.total td {
  font-size: 10px;
  padding: 4px 5px;
}

.report-section.compact.final {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #ccc;
}

.report-section.compact.final h2 {
  font-size: 10px;
}

.quote-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1a1a1a;
  line-height: 1.4;
}

.quote-banner {
  background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
  color: white;
  padding: 20px;
  margin: -20px -20px 20px -20px;
  border-radius: 0;
}

.quote-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quote-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.5px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.company-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}

.company-slogan {
  font-size: 10px;
  opacity: 0.8;
  letter-spacing: 0.5px;
}

.quote-title-box {
  text-align: right;
}

.quote-title-box h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 3px;
  margin: 0 0 6px 0;
}

.quote-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  opacity: 0.9;
}

.section-badge {
  display: inline-block;
  background: #1e3a5f;
  color: white;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.quote-customer-section {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

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

.customer-info-grid .full-width {
  grid-column: 1 / -1;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 9px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
}

.quote-product-section {
  margin-bottom: 16px;
}

.product-highlight {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid #bae6fd;
}

.product-icon {
  color: #0369a1;
}

.product-main-info h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #0c4a6e;
}

.product-subtitle {
  font-size: 11px;
  color: #0369a1;
  margin: 0;
}

.product-badge {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-badge.indoor {
  background: #dcfce7;
  color: #166534;
}

.product-badge.outdoor {
  background: #fef3c7;
  color: #92400e;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.spec-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow 0.2s;
}

.spec-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.spec-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: 8px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
}

.spec-sub {
  font-size: 9px;
  color: #6b7280;
}

.quote-price-section {
  margin-bottom: 16px;
}

.price-card {
  background: linear-gradient(135deg, #1e3a5f 0%, #0d1b2a 100%);
  color: white;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.price-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.9;
}

.discount-badge {
  background: #ef4444;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.price-amount {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 4px;
}

.price-amount .currency {
  font-size: 24px;
  font-weight: 600;
  opacity: 0.9;
}

.price-amount .amount {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
}

.price-footer {
  margin-top: 8px;
  font-size: 10px;
  opacity: 0.8;
}

.quote-features {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 14px 0;
  margin-bottom: 16px;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #4b5563;
}

.feature-icon {
  color: #10b981;
  font-weight: bold;
}

.quote-footer {
  margin-top: auto;
}

.footer-note {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.footer-note p {
  font-size: 9px;
  color: #92400e;
  margin: 3px 0;
}

.quote-footer .signature-area {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 24px;
}

.quote-footer .signature-box {
  flex: 1;
  text-align: center;
}

.quote-footer .signature-box p {
  font-size: 10px;
  color: #6b7280;
  margin-bottom: 30px;
}

.quote-footer .signature-line {
  border-top: 1px solid #1a1a1a;
  width: 100%;
}

.quote-professional {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #000;
  line-height: 1.4;
  padding: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.quote-pro-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid #333;
}

.quote-pro-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.quote-logo-img {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.quote-pro-title {
  text-align: right;
  flex-grow: 1;
}

.quote-pro-title h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
  letter-spacing: 2px;
  color: #000;
}

.quote-pro-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-item {
  display: flex;
  gap: 6px;
  font-size: 11px;
  justify-content: flex-end;
}

.meta-label {
  font-weight: 600;
  color: #666;
}

.meta-value {
  color: #000;
}

.quote-pro-section {
  margin-bottom: 10px;
  page-break-inside: avoid;
}

.section-header {
  background: #f5f5f5;
  padding: 5px 10px;
  margin-bottom: 6px;
  border-left: 4px solid #333;
}

.section-header h2 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  color: #000;
}

.section-content {
  padding: 0 6px;
}

.section-content-dual {
  display: flex;
  gap: 16px;
  padding: 0 6px;
}

.customer-info-col,
.specs-info-col {
  flex: 1;
  min-width: 0;
}

.info-table,
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr,
.specs-table tr {
  border-bottom: 1px solid #e0e0e0;
}

.info-label,
.spec-label {
  width: 100px;
  padding: 5px 6px;
  font-weight: 600;
  color: #555;
  font-size: 11px;
  vertical-align: top;
}

.info-value,
.spec-value {
  padding: 5px 6px;
  color: #000;
  font-size: 11px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}

.price-table tr {
  border-bottom: 1px solid #e0e0e0;
}

.price-label {
  padding: 6px 6px;
  font-size: 11px;
  color: #333;
}

.price-amount {
  padding: 6px 6px;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  color: #000;
}

.price-amount.discount {
  color: #d32f2f;
}

.discount-row {
  background: #fff3e0;
}

.total-row {
  background: #f5f5f5;
  border-top: 2px solid #333;
  border-bottom: 2px solid #333;
}

.total-row .price-label,
.total-row .price-amount {
  font-size: 13px;
  padding: 10px 6px;
}

.total-row .price-amount.total {
  color: #1976d2;
  font-size: 16px;
}

.tax-note {
  background: none;
  border: none;
}

.note-text {
  padding: 4px 6px;
  text-align: right;
  font-size: 9px;
  color: #666;
  font-style: italic;
}

.terms-section .section-content {
  padding: 6px 12px;
}

.term-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.terms-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.terms-list li {
  padding: 1px 0;
  padding-left: 16px;
  position: relative;
  font-size: 10px;
  color: #555;
  line-height: 1.3;
}

.terms-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  font-weight: bold;
  color: #333;
}

.quote-pro-footer {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 2px solid #333;
}

.footer-contact {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-item {
  font-size: 11px;
  color: #111;
  font-weight: 500;
}

.contact-item strong {
  color: #000;
  margin-right: 4px;
  font-weight: 700;
}

.quote-preview-section {
  padding: 20px;
  text-align: center;
}

.quote-preview-image {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.manufacturing-preview-image {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #30d158;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.preview-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #555;
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-block;
}

@media screen and (max-width: 768px) {
  .quote-professional {
    padding: 12px;
  }

  .quote-pro-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .quote-pro-title {
    text-align: left;
    margin-top: 12px;
  }

  .quote-pro-title h1 {
    font-size: 22px;
  }

  .meta-item {
    justify-content: flex-start;
  }

  .footer-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media print {
  .quote-professional {
    padding: 5px 8px;
    font-size: 9px;
    line-height: 1.3;
  }

  .quote-logo-img {
    width: 60px;
  }

  .quote-pro-title h1 {
    font-size: 16px;
    letter-spacing: 1.5px;
    margin: 0 0 6px 0;
  }

  .meta-item {
    font-size: 8px;
    gap: 4px;
  }

  .quote-pro-header {
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #333;
  }

  .quote-pro-section {
    page-break-inside: avoid;
    margin-bottom: 8px;
  }

  .section-header {
    padding: 4px 8px;
    margin-bottom: 6px;
    border-left: 3px solid #333;
  }

  .section-header h2 {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .info-label,
  .spec-label,
  .info-value,
  .spec-value {
    padding: 4px 4px;
    font-size: 9px;
    line-height: 1.3;
  }

  .info-label,
  .spec-label {
    width: 120px;
  }

  .price-table {
    margin-top: 2px;
  }

  .price-label,
  .price-amount {
    padding: 5px 4px;
    font-size: 9px;
  }

  .total-row .price-label,
  .total-row .price-amount {
    padding: 8px 4px;
    font-size: 11px;
  }

  .total-row .price-amount.total {
    font-size: 13px;
  }

  .terms-list li {
    padding: 3px 0;
    padding-left: 12px;
    font-size: 8px;
    line-height: 1.4;
  }

  .quote-pro-footer {
    margin-top: 12px;
    padding-top: 8px;
    page-break-inside: avoid;
    border-top: 2px solid #333;
  }

  .footer-contact {
    gap: 8px;
  }

  .contact-item {
    font-size: 8px;
  }

  .note-text {
    padding: 4px;
    font-size: 8px;
  }

  .customer-section {
    page-break-after: avoid;
  }

  .specs-section {
    page-break-before: auto;
    page-break-after: avoid;
  }

  .price-section {
    page-break-before: auto;
  }

  .price-table tr {
    page-break-inside: avoid;
  }

  .total-row {
    page-break-before: avoid;
  }

  .info-table tr,
  .specs-table tr {
    border-bottom: 1px solid #ddd;
  }

  .price-table tr {
    border-bottom: 1px solid #ddd;
  }

  .quote-preview-section {
    padding: 10px;
  }

  .quote-preview-image {
    max-width: 100%;
    border: 1px solid #ccc;
  }

  .preview-legend {
    gap: 16px;
    margin-top: 12px;
  }

  .legend-item {
    font-size: 10px;
  }

  .legend-color {
    width: 20px;
    height: 20px;
  }
}

.order-form-large {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #000;
  padding: 10px;
}

.order-header {
  text-align: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #000;
  position: relative;
}

.order-header .report-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: 70px;
  height: auto;
  object-fit: contain;
}

.order-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px 0;
  letter-spacing: 2px;
}

.order-date {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.order-supplier {
  font-size: 16px;
  font-weight: 600;
  margin: 8px 0 0 0;
}

.order-section {
  margin-top: 15px;
}

.order-section h2 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #ccc;
}

.order-table-large {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.order-table-large th,
.order-table-large td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.order-table-large th {
  background: #f5f5f5;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-table-large td.qty {
  text-align: center;
  font-weight: 700;
  font-size: 22px;
}

.order-table-large th:last-child,
.order-table-large td:last-child {
  text-align: center;
  width: 100px;
}

.order-table-large tbody tr:hover {
  background: #fafafa;
}

.order-parties {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e0e0e0;
}

.order-party {
  flex: 1;
  text-align: center;
}

.order-party h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 12px;
}

.order-party .party-name {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  margin: 0;
}

@media print {
  .order-parties {
    margin-top: 30px;
    padding-top: 20px;
  }

  .order-party h3 {
    font-size: 12px;
  }

  .order-party .party-name {
    font-size: 16px;
  }
}

.validation-message {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  animation: slideIn 0.3s ease-out;
}

.validation-message.error {
  background: var(--error-light);
  color: var(--error);
  border: 1px solid var(--error);
}

.validation-message.warning {
  background: var(--warning-light);
  color: #b45309;
  border: 1px solid var(--warning);
}

.validation-message.success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid var(--success);
}

@media (max-width: 1024px) {
  .app-container {
    grid-template-columns: 1fr;
  }

  .side-panel {
    border-left: none;
    border-top: 1px solid var(--border);
    position: relative;
    height: auto;
  }

  .report-buttons {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .main-panel {
    padding: 24px;
  }

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

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

  .report-paper {
    width: 100%;
    min-height: auto;
    padding: 16px;
  }

  .step-title {
    font-size: 24px;
  }

  .supplier-cards {
    grid-template-columns: 1fr;
  }
}

.supplier-summary {
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  gap: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.supplier-summary .summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.supplier-summary .label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.supplier-summary .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.supplier-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.supplier-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.supplier-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.supplier-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.supplier-card.cheapest .supplier-header {
  background: linear-gradient(90deg, rgba(34,197,94,0.1) 0%, transparent 100%);
}

.supplier-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-left: 4px solid var(--accent);
  background: var(--surface-hover);
}

.supplier-logo {
  font-size: 24px;
}

.supplier-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  flex: 1;
}

.cheapest-badge {
  background: var(--success);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.supplier-prices {
  padding: 16px;
}

.supplier-prices .price-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.supplier-prices .price-line:last-child {
  border-bottom: none;
}

.supplier-prices .price-line span {
  font-size: 12px;
  color: var(--text-secondary);
}

.supplier-prices .price-line strong {
  font-size: 13px;
  color: var(--text);
}

.supplier-prices .price-line.total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 2px solid var(--border);
  border-bottom: none;
}

.supplier-prices .price-line.total span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.supplier-prices .price-line.total strong {
  font-size: 18px;
  color: var(--accent);
}

.supplier-card.selected .price-line.total strong {
  color: var(--success);
}

.supplier-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.category-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.category-icon {
  font-size: 20px;
}

.category-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.category-detail {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--surface-hover);
  padding: 4px 10px;
  border-radius: 12px;
}

.category-suppliers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}

.category-supplier {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.category-supplier:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.category-supplier.selected {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px var(--accent-light);
}

.category-supplier.cheapest .cs-header {
  background: linear-gradient(90deg, rgba(34,197,94,0.1) 0%, transparent 100%);
}

.category-supplier.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--border);
  background: var(--surface);
}

.category-supplier.unavailable:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.cs-badge.unavailable {
  background: var(--error);
}

.cs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-left: 3px solid var(--accent);
}

.cs-logo {
  font-size: 18px;
}

.cs-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  flex: 1;
}

.cs-badge {
  background: var(--success);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

.cs-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: white;
  border-top: 1px solid var(--border);
}

.cs-unit {
  font-size: 11px;
  color: var(--text-secondary);
}

.cs-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.category-supplier.selected .cs-total {
  color: var(--accent);
}

.cs-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.supplier-total-summary {
  background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  color: white;
}

.sts-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sts-row span {
  font-size: 14px;
  opacity: 0.9;
}

.sts-row strong {
  font-size: 24px;
  font-weight: 700;
}

.sts-detail {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.sts-detail span {
  font-size: 12px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 4px;
}

.quick-select-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.quick-btn {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.quick-btn.secondary {
  background: white;
  color: var(--accent);
}

.quick-btn.secondary:hover {
  background: var(--accent-light);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.single-supplier-modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  animation: slideUp 0.3s ease;
}

.single-supplier-modal h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.single-supplier-modal p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.single-supplier-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.single-supplier-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.single-supplier-option:hover {
  border-color: var(--accent);
  background: white;
}

.single-supplier-option.cheapest {
  background: linear-gradient(90deg, rgba(34,197,94,0.1) 0%, transparent 100%);
}

.single-supplier-option.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--surface);
  border-color: var(--border);
}

.single-supplier-option.unavailable:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.sso-badge.unavailable {
  background: var(--error);
}

.sso-logo {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: white;
}

.sso-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.sso-badge {
  background: var(--success);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.sso-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.modal-close-btn {
  width: 100%;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@media (max-width: 768px) {
  .category-suppliers {
    grid-template-columns: 1fr;
  }

  .quick-select-buttons {
    flex-direction: column;
  }

  .sts-detail {
    flex-direction: column;
    gap: 8px;
  }
}

.currency-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.currency-selector .btn-small {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.currency-selector .btn-small:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
}

.currency-selector .btn-small.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.exchange-info {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .currency-selector {
    flex-direction: column;
    align-items: stretch;
  }

  .currency-selector .btn-small {
    width: 100%;
    text-align: center;
  }

  .exchange-info {
    margin-left: 0;
    text-align: center;
    margin-top: 8px;
  }
}
