/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Default Blue Theme */
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --secondary: #64748b;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --bg-hover: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
body[data-theme="dark"] {
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #334155;
  --bg-hover: #334155;
  
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --border: #334155;
  --border-light: #1e293b;
}

/* Grey Theme */
body[data-theme="grey"] {
  --primary: #4b5563;
  --primary-light: #6b7280;
  --primary-dark: #374151;
  
  --bg-main: #f9fafb;
  --bg-card: #ffffff;
  --bg-input: #f3f4f6;
  --bg-hover: #f3f4f6;
  
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  
  --border: #e5e7eb;
  --border-light: #f3f4f6;
}

/* Green Theme */
body[data-theme="green"] {
  --primary: #065f46;
  --primary-light: #10b981;
  --primary-dark: #064e3b;
  
  --bg-main: #f0fdf4;
  --bg-card: #ffffff;
  --bg-input: #dcfce7;
  --bg-hover: #dcfce7;
  
  --text-primary: #064e3b;
  --text-secondary: #047857;
  --text-muted: #6ee7b7;
}

/* Purple Theme */
body[data-theme="purple"] {
  --primary: #4c1d95;
  --primary-light: #8b5cf6;
  --primary-dark: #3730a3;
  
  --bg-main: #faf5ff;
  --bg-card: #ffffff;
  --bg-input: #f3e8ff;
  --bg-hover: #f3e8ff;
  
  --text-primary: #3730a3;
  --text-secondary: #6d28d9;
  --text-muted: #c4b5fd;
}

/* Orange Theme */
body[data-theme="orange"] {
  --primary: #92400e;
  --primary-light: #f59e0b;
  --primary-dark: #78350f;
  
  --bg-main: #fffbeb;
  --bg-card: #ffffff;
  --bg-input: #fef3c7;
  --bg-hover: #fef3c7;
  
  --text-primary: #78350f;
  --text-secondary: #92400e;
  --text-muted: #fcd34d;
}

/* Red Theme */
body[data-theme="red"] {
  --primary: #991b1b;
  --primary-light: #ef4444;
  --primary-dark: #7f1d1d;
  
  --bg-main: #fef2f2;
  --bg-card: #ffffff;
  --bg-input: #fee2e2;
  --bg-hover: #fee2e2;
  
  --text-primary: #7f1d1d;
  --text-secondary: #991b1b;
  --text-muted: #fca5a5;
}

/* Teal Theme */
body[data-theme="teal"] {
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --primary-dark: #115e59;
  
  --bg-main: #f0fdfa;
  --bg-card: #ffffff;
  --bg-input: #ccfbf1;
  --bg-hover: #ccfbf1;
  
  --text-primary: #115e59;
  --text-secondary: #0f766e;
  --text-muted: #5eead4;
}

body {
  font-family: 'Poppins', 'Noto Nastaliq Urdu', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition);
}

/* ===== HEADER ===== */
.main-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow);
}

.logo-icon svg {
  width: 28px;
  height: 28px;
}

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

.logo-main {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-pro {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.header-nav {
  display: flex;
  gap: 0.5rem;
}

.nav-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.nav-btn svg {
  width: 18px;
  height: 18px;
}

.nav-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: var(--shadow);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.page-title {
  margin-bottom: 2rem;
  text-align: center;
}

.page-title h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.page-title h1 svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.page-title p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ===== TAB PANELS ===== */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

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

/* ===== CALCULATOR GRID ===== */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 2rem;
  align-items: start;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-header svg {
  width: 20px;
  height: 20px;
}

/* ===== FORMS ===== */
.form-grid {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== IMPRESSIONS CARD ===== */
.impressions-card {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border: none;
}

.impressions-card .card-header {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.impressions-grid {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.impression-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.impression-item label {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.impression-item input {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
}

.impression-item input:read-only {
  background: rgba(255, 255, 255, 0.8);
  cursor: not-allowed;
}

.impression-note {
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-size: 0.9rem;
}

.impression-note svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ===== FINISHING OPTIONS ===== */
.finishing-options {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.toggle-item:hover {
  background: var(--border-light);
  transform: translateX(5px);
}

.toggle-item input[type="checkbox"] {
  display: none;
}

.toggle-box {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 6px;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}

.toggle-item input[type="checkbox"]:checked + .toggle-box {
  background: var(--primary);
  border-color: var(--primary);
}

.toggle-item input[type="checkbox"]:checked + .toggle-box::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.toggle-item span:not(.toggle-box) {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
}

.inline-select,
.inline-cost {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 0.9rem;
  transition: var(--transition);
}

.inline-cost {
  width: 100px;
  text-align: right;
}

/* ===== BUTTONS ===== */
.btn-calculate {
  width: 100%;
  padding: 1.25rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.btn-calculate:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-calculate svg {
  width: 22px;
  height: 22px;
}

.btn-primary,
.btn-secondary {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

/* ===== RESULTS PANEL ===== */
.results-panel {
  position: relative;
}

.results-sticky {
  position: sticky;
  top: 100px;
}

.results-card {
  margin-bottom: 1.5rem;
}

.results-header {
  background: linear-gradient(135deg, var(--success), #34d399);
}

.cost-breakdown {
  padding: 1.5rem;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.cost-row:hover {
  background: var(--bg-hover);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: var(--radius-sm);
}

.cost-row span:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.cost-row span:first-child svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.cost-row span:last-child {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

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

.cost-row.subtotal,
.cost-row.profit,
.cost-row.tax {
  font-weight: 600;
  font-size: 1.05rem;
}

.cost-row.grand-total {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  border: none;
  font-size: 1.25rem;
  font-weight: 700;
}

.cost-row.grand-total span {
  color: white;
}

.per-unit-box {
  padding: 1.5rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  margin: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.per-unit-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.per-unit-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.per-unit-item strong {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 700;
}

.action-btns {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ===== CHART ===== */
.chart-card {
  background: var(--bg-card);
}

.chart-bars {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-bar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chart-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.chart-bar-fill {
  height: 12px;
  background: var(--bg-hover);
  border-radius: 6px;
  overflow: hidden;
}

.chart-bar-value {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 6px;
  transition: width 0.5s ease;
}

/* ===== JOB CARD ===== */
.jobcard-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.jobcard-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.jc-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jc-company {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.jc-logo {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.jc-logo svg {
  width: 32px;
  height: 32px;
}

.jc-company-info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.jc-company-info p {
  font-size: 0.9rem;
  opacity: 0.9;
}

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

.jc-title-box h3 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.jc-title-box p {
  font-size: 1rem;
  opacity: 0.9;
}

.jc-number {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
  display: inline-block;
  font-weight: 600;
}

.jc-body {
  padding: 2rem;
}

.jc-section {
  margin-bottom: 2rem;
}

.jc-section-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.jc-info-block {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.jc-block-title {
  background: var(--primary);
  color: white;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.jc-block-title svg {
  width: 18px;
  height: 18px;
}

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

.jc-table tr {
  border-bottom: 1px solid var(--border-light);
}

.jc-table tr:last-child {
  border-bottom: none;
}

.jc-table td {
  padding: 0.875rem 1.25rem;
  font-size: 0.95rem;
}

.jc-table td:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.jc-table td:last-child {
  color: var(--text-primary);
  font-weight: 600;
}

.jc-spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}

.jc-spec-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: center;
}

.jc-spec-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.jc-spec-item strong {
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 700;
}

.jc-finishing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}

.jc-tag {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.jc-tag.none-tag {
  background: var(--text-muted);
}

.jc-cost-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.jc-cost-table thead {
  background: var(--primary);
  color: white;
}

.jc-cost-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
}

.jc-cost-table tbody tr {
  border-bottom: 1px solid var(--border-light);
}

.jc-cost-table tbody td {
  padding: 0.875rem 1.25rem;
}

.jc-cost-table tfoot tr {
  font-weight: 600;
}

.jc-cost-table tfoot td {
  padding: 1rem 1.25rem;
}

.jc-subtotal-row {
  background: var(--bg-card);
}

.jc-grand-row {
  background: var(--primary);
  color: white;
  font-size: 1.1rem;
}

.jc-perunit-row {
  background: var(--primary-light);
  color: white;
}

.jc-notes {
  padding: 1.25rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}

.jc-notes textarea {
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.jc-approval {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  margin-top: 3rem;
  align-items: end;
}

.jc-sign-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.jc-sign-line {
  height: 2px;
  background: var(--border);
  margin-bottom: 0.5rem;
}

.jc-sign-box p {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.jc-stamp-box {
  display: flex;
  align-items: center;
  justify-content: center;
}

.jc-stamp {
  width: 120px;
  height: 120px;
  border: 3px solid var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  font-weight: 700;
  font-size: 1.25rem;
  transform: rotate(-15deg);
}

.jc-footer {
  background: var(--bg-hover);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
}

.jc-footer p {
  margin: 0.25rem 0;
}

/* ===== QUOTATION ===== */
.quotation-wrapper {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.qt-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qt-company {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.qt-logo {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qt-logo svg {
  width: 32px;
  height: 32px;
}

.qt-company-info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.qt-company-info p {
  font-size: 0.9rem;
  opacity: 0.9;
}

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

.qt-title-box h3 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.qt-title-box p {
  font-size: 1rem;
  opacity: 0.9;
}

.qt-number,
.qt-date {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
  display: inline-block;
  font-weight: 600;
}

.qt-date {
  display: block;
  margin-top: 0.5rem;
}

.qt-body {
  padding: 2rem;
}

.qt-section {
  margin-bottom: 2rem;
}

.qt-block-title {
  background: var(--primary);
  color: white;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.qt-block-title svg {
  width: 18px;
  height: 18px;
}

.qt-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qt-table tr {
  border-bottom: 1px solid var(--border-light);
}

.qt-table tr:last-child {
  border-bottom: none;
}

.qt-table td {
  padding: 0.875rem 1.25rem;
  font-size: 0.95rem;
}

.qt-table td:first-child {
  color: var(--text-secondary);
  font-weight: 500;
  width: 30%;
}

.qt-table td:nth-child(2) {
  color: var(--text-primary);
  font-weight: 600;
}

.qt-specs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qt-specs-table tr {
  border-bottom: 1px solid var(--border-light);
}

.qt-specs-table tr:last-child {
  border-bottom: none;
}

.qt-specs-table td {
  padding: 0.875rem 1.25rem;
  font-size: 0.95rem;
}

.qt-specs-table td:nth-child(odd) {
  color: var(--text-secondary);
  font-weight: 500;
  width: 25%;
}

.qt-specs-table td:nth-child(even) {
  color: var(--text-primary);
  font-weight: 600;
}

.qt-finishing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}

.qt-finish-tag {
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.qt-cost-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qt-cost-table thead {
  background: var(--primary);
  color: white;
}

.qt-cost-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
}

.qt-cost-table tbody tr {
  border-bottom: 1px solid var(--border-light);
}

.qt-cost-table tbody td {
  padding: 0.875rem 1.25rem;
}

.qt-cost-table tfoot tr {
  font-weight: 600;
}

.qt-cost-table tfoot td {
  padding: 1rem 1.25rem;
}

.qt-subtotal-row {
  background: var(--bg-card);
}

.qt-grand-row {
  background: var(--primary);
  color: white;
  font-size: 1.1rem;
}

.qt-terms {
  padding: 1.25rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}

.qt-terms ul {
  list-style: none;
  padding: 0;
}

.qt-terms li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
}

.qt-terms li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
  font-size: 1.5rem;
}

.qt-approval {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.qt-sign-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.qt-sign-line {
  height: 2px;
  background: var(--border);
  margin-bottom: 0.5rem;
}

.qt-sign-box p {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.qt-sign-date {
  font-size: 0.85rem;
  font-weight: 400;
  margin-top: 0.25rem;
}

.qt-footer {
  background: var(--bg-hover);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
}

.qt-footer p {
  margin: 0.25rem 0;
}

/* ===== SETTINGS ===== */
.settings-grid {
  display: grid;
  gap: 2rem;
}

.theme-selector {
  padding: 1.5rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.theme-card {
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.theme-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.theme-card.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.theme-preview {
  height: 80px;
  width: 100%;
}

.theme-card span {
  display: block;
  padding: 0.75rem;
  text-align: center;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-card);
}

.theme-options {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.theme-opt {
  padding: 1.5rem;
  border-radius: var(--radius);
  color: white;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 3px solid transparent;
}

.theme-opt:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.theme-opt.active {
  border-color: white;
  box-shadow: var(--shadow-xl);
}

/* ===== FOOTER ===== */
.main-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  margin-top: 4rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
  
  .results-sticky {
    position: static;
  }
  
  .theme-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .jc-section-grid,
  .qt-approval {
    grid-template-columns: 1fr;
  }
  
  .jc-spec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .theme-options {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .per-unit-box {
    grid-template-columns: 1fr;
  }
}

@media print {
  .main-header,
  .main-footer,
  .jobcard-actions,
  .page-title,
  .nav-btn {
    display: none !important;
  }
  
  .jobcard-wrapper,
  .quotation-wrapper {
    box-shadow: none;
    max-width: 100%;
  }
  
  body {
    background: white;
  }
}