/* ============ PAXBESPOKE CALCULATOR STYLES ============ */
/* Clean, professional design matching paxbespoke.uk branding */

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

:root {
  /* PaxBespoke Brand Colors */
  --black: #0a0a0a;
  --dark: #141414;
  --dark-light: #1a1a1a;
  --dark-border: #2a2a2a;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --accent: #ffffff;
  --accent-muted: rgba(255,255,255,0.7);
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Courier New', monospace;
  
  /* Borders & Shadows */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--white);
  background: var(--black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ============ LIGHT MODE ============ */
body.light-mode {
  --black: #ffffff;
  --dark: #f8f8f8;
  --dark-light: #f0f0f0;
  --dark-border: #e0e0e0;
  --white: #0a0a0a;
  --gray-100: #1a1a1a;
  --gray-200: #2a2a2a;
  --gray-300: #3a3a3a;
  --gray-400: #666666;
  --gray-500: #888888;
  --gray-600: #aaaaaa;
  background: #ffffff;
  color: #0a0a0a;
}

body.light-mode .calc-header .logo {
  filter: invert(1);
}

body.light-mode .quote-section {
  background: #0a0a0a;
  color: #ffffff;
}

body.light-mode .quote-section h2 {
  color: #d4d4d4;
}

body.light-mode .quote-details {
  background: #ffffff;
  color: #0a0a0a;
}

body.light-mode .quote-total {
  background: #0a0a0a;
  color: #ffffff;
}

body.light-mode .btn-primary {
  background: #0a0a0a;
  color: #ffffff;
}

body.light-mode .admin-header .btn-secondary,
body.light-mode .modal-footer .btn-secondary {
  color: #0a0a0a;
  border-color: #e0e0e0;
}

body.light-mode .nav-btn.active {
  background: #0a0a0a;
  color: #ffffff;
}

/* ============ CALCULATOR LAYOUT ============ */
.calculator-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--space-lg);
  min-height: 100vh;
}

/* Header */
.calc-header {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  margin-bottom: var(--space-xl);
}

.calc-header .logo {
  height: 40px;
  margin-bottom: var(--space-lg);
  filter: brightness(1);
}

.calc-header h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.calc-header .subtitle {
  color: var(--gray-400);
  font-size: 1rem;
  font-weight: 400;
}

/* Sections */
.calc-section {
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-md);
}

.calc-section h2 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--white);
  color: var(--black);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ============ PACKAGE CARDS ============ */
.package-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.package-card {
  background: var(--dark-light);
  border: 2px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.package-card:hover {
  border-color: var(--gray-500);
  transform: translateY(-2px);
}

.package-card.selected {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
}

.package-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.package-card .package-desc {
  font-size: 0.8125rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ============ CATEGORY LIST ============ */
.category-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-height: 400px;
  overflow-y: auto;
}

.category-list::-webkit-scrollbar {
  width: 6px;
}

.category-list::-webkit-scrollbar-track {
  background: var(--dark-light);
  border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb {
  background: var(--gray-600);
  border-radius: 3px;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--dark-light);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.category-item:hover {
  border-color: var(--gray-500);
  background: rgba(255,255,255,0.02);
}

.category-item.selected {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
}

.category-name {
  font-size: 0.9375rem;
  font-weight: 500;
}

.category-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-300);
  font-family: var(--font-mono);
}

/* ============ WIDTH INPUT ============ */
.width-input-group {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.width-input-group label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-300);
}

.width-input-group input {
  width: 140px;
  padding: var(--space-md);
  font-size: 1.125rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: var(--dark-light);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  color: var(--white);
  text-align: center;
  transition: border-color 0.15s ease;
}

.width-input-group input:focus {
  outline: none;
  border-color: var(--white);
}

.width-input-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.width-hint {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* ============ ADD-ONS ============ */
.addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-sm);
}

.addon-item {
  background: var(--dark-light);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: border-color 0.15s ease;
}

.addon-item:has(.addon-checkbox:checked) {
  border-color: var(--white);
  background: rgba(255,255,255,0.03);
}

.addon-info {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.addon-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--white);
  cursor: pointer;
}

.addon-info label {
  cursor: pointer;
  flex: 1;
}

.addon-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.addon-price {
  font-size: 0.8125rem;
  color: var(--gray-400);
  font-family: var(--font-mono);
}

.addon-qty {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--dark-border);
}

.addon-qty.hidden {
  display: none;
}

/* ============ SUPPLY FEE SECTION ============ */
.supply-fee-section {
  padding: var(--space-md);
}

.supply-fee-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
  background: var(--dark-light);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
}

.supply-fee-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.supply-fee-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--white);
  cursor: pointer;
}

.supply-fee-price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--success);
}

/* ============ MATERIALS SECTION ============ */
.materials-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.material-item {
  background: var(--dark-light);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.material-item:hover {
  border-color: var(--gray-500);
}

.material-item.selected {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.material-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
}

.material-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--success);
  cursor: pointer;
  flex-shrink: 0;
}

.material-info label {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: var(--space-md);
}

.material-name {
  font-size: 0.9375rem;
  font-weight: 500;
}

.material-price {
  font-size: 0.875rem;
  color: var(--gray-400);
  font-family: var(--font-mono);
  background: var(--dark);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

.material-qty {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  width: 0;
  overflow: hidden;
  transition: all 0.2s ease;
}

.material-qty.visible {
  opacity: 1;
  visibility: visible;
  width: auto;
}

.material-qty.hidden {
  display: none;
}

.material-qty-label {
  font-size: 0.8125rem;
  color: var(--gray-400);
  white-space: nowrap;
}

.material-length-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  padding: var(--space-xs);
}

.material-length {
  width: 60px;
  padding: var(--space-sm);
  text-align: center;
  background: transparent;
  border: none;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
}

.material-length:focus {
  outline: none;
}

.material-unit {
  font-size: 0.8125rem;
  color: var(--gray-500);
  padding-right: var(--space-sm);
}

.material-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--dark-border);
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.material-btn:hover {
  background: var(--gray-500);
}

/* Responsive materials */
@media (max-width: 600px) {
  .material-item {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
  }
  
  .material-qty.visible {
    justify-content: center;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--dark-border);
  }
}

/* Quote line styles for materials and supply */
.quote-line.material-line,
.quote-line.supply-line {
  color: var(--gray-600);
}

/* ============ SETUP COSTS SECTION ============ */
.setup-costs-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.setup-item {
  background: var(--dark-light);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  transition: border-color 0.15s ease;
}

.setup-item:focus-within {
  border-color: var(--success);
}

.setup-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--white);
}

.setup-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  min-width: 140px;
}

.setup-input-wrapper .currency-symbol {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-right: var(--space-sm);
}

.setup-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.25rem;
  font-family: var(--font-mono);
  font-weight: 600;
  width: 80px;
  text-align: right;
}

.setup-input:focus {
  outline: none;
}

.setup-input::placeholder {
  color: var(--gray-600);
}

/* Discount input */
.discount-item {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.1) 0%, rgba(234, 88, 12, 0.05) 100%);
  border-color: rgba(234, 88, 12, 0.3);
}

.discount-item:focus-within {
  border-color: #ea580c;
}

.discount-wrapper {
  background: rgba(234, 88, 12, 0.1);
}

.percent-symbol {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ea580c;
  margin-left: var(--space-sm);
}

/* ============ DISCOUNT STYLES ============ */
.quote-line.discount-line {
  background: rgba(234, 88, 12, 0.15);
  margin: var(--space-sm) calc(var(--space-md) * -1);
  padding: var(--space-md) !important;
  border-radius: var(--radius-sm);
}

.quote-line.discount-line span:first-child {
  color: #ea580c;
  font-weight: 600;
}

.quote-line.discount-line span:last-child {
  color: #ea580c;
  font-weight: 700;
  font-size: 1.1rem;
}

.discount-badge {
  display: inline-block;
  background: #ea580c;
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: var(--space-sm);
}

.discount-badge * {
  color: #ffffff !important;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  background: var(--dark);
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.qty-btn:hover {
  border-color: var(--gray-500);
  background: var(--dark-light);
}

.qty-input {
  width: 50px;
  padding: var(--space-sm);
  text-align: center;
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-mono);
}

/* ============ THEME TOGGLE ============ */
.btn-theme-toggle,
#themeToggle {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: var(--dark-light);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.btn-theme-toggle:hover,
#themeToggle:hover {
  border-color: var(--gray-500);
}

.icon-moon { display: inline; }
.icon-sun { display: none; }

body.light-mode .icon-moon { display: none; }
body.light-mode .icon-sun { display: inline; }

.calc-header {
  position: relative;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-icon {
  padding: var(--space-sm);
}

/* ============ DELETE COLUMN BUTTON ============ */
.btn-delete-col {
  display: block;
  margin: 4px auto 0;
  background: transparent;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.btn-delete-col:hover {
  background: var(--error);
  color: var(--white);
}

/* ============ QUOTE SUMMARY ============ */
.quote-section {
  background: var(--white);
  color: var(--black);
  border: none;
}

.quote-section h2 {
  color: var(--gray-600);
}

.quote-section .step-number {
  background: var(--black);
  color: var(--white);
}

.quote-placeholder {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--gray-500);
}

.quote-error {
  text-align: center;
  padding: var(--space-xl);
  background: #fef2f2;
  border-radius: var(--radius-md);
  color: var(--error);
}

.quote-details {
  padding: var(--space-md) 0;
}

.quote-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--gray-200);
}

.quote-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.quote-header p {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.quote-line-items {
  margin-bottom: var(--space-lg);
}

.quote-line {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  font-size: 0.9375rem;
}

.quote-line span:last-child {
  font-family: var(--font-mono);
  font-weight: 500;
}

.quote-line.addon-line {
  color: var(--gray-600);
  font-size: 0.875rem;
  padding-left: var(--space-md);
}

.quote-line.subtotal {
  border-top: 1px solid var(--gray-200);
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  font-weight: 500;
}

.quote-line.vat {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.quote-total {
  display: flex;
  justify-content: space-between;
  padding: var(--space-lg);
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: var(--space-md);
}

.quote-total span:last-child {
  font-family: var(--font-mono);
}

.quote-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  justify-content: center;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--black);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--dark);
}

.btn-secondary {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-100);
}

.btn-danger {
  background: var(--error);
  color: var(--white);
}

.btn-small {
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
}

/* ============ FOOTER ============ */
.calc-footer {
  text-align: center;
  padding: var(--space-xl);
  color: var(--gray-600);
  font-size: 0.8125rem;
}

.calc-footer a {
  color: var(--gray-500);
  text-decoration: none;
  transition: color 0.15s ease;
}

.calc-footer a:hover {
  color: var(--white);
}

/* Placeholder text */
.placeholder {
  color: var(--gray-500);
  text-align: center;
  padding: var(--space-xl);
  font-size: 0.9375rem;
}

.error {
  color: var(--error);
  text-align: center;
  padding: var(--space-lg);
}

/* ============ ADMIN STYLES ============ */
.admin-body {
  background: var(--black);
}

.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

.admin-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

.admin-header .btn-secondary {
  color: var(--white);
  border-color: var(--dark-border);
}

.admin-header .btn-secondary:hover {
  background: var(--dark-light);
  border-color: var(--gray-500);
}

.admin-nav {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-sm);
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  overflow-x: auto;
}

.nav-btn {
  padding: var(--space-sm) var(--space-lg);
  border: none;
  background: transparent;
  color: var(--gray-400);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.nav-btn:hover {
  color: var(--white);
  background: var(--dark-light);
}

.nav-btn.active {
  background: var(--white);
  color: var(--black);
}

.admin-main {
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  min-height: 600px;
}

.tab-content {
  display: none;
}

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

.tab-header {
  margin-bottom: var(--space-xl);
}

.tab-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.tab-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.muted {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.package-filter {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.package-filter label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-400);
}

.package-filter select {
  min-width: 200px;
  padding: var(--space-sm) var(--space-md);
  background: var(--dark-light);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 0.875rem;
  font-family: var(--font-sans);
}

.package-filter select:focus {
  outline: none;
  border-color: var(--white);
}

/* ============ DATA TABLES ============ */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.data-table th,
.data-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--dark-border);
}

.data-table th {
  background: var(--dark-light);
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.data-table td {
  vertical-align: middle;
}

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

.data-table .package-cell {
  font-weight: 500;
  color: var(--gray-300);
  white-space: nowrap;
}

.data-table input[type="text"],
.data-table input[type="number"] {
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.8125rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-sans);
  transition: all 0.15s ease;
}

.data-table input:hover {
  border-color: var(--dark-border);
  background: var(--dark-light);
}

.data-table input:focus {
  outline: none;
  border-color: var(--white);
  background: var(--dark-light);
}

.data-table .price-input {
  width: 80px;
  text-align: right;
  font-family: var(--font-mono);
}

.data-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--white);
  cursor: pointer;
}

/* Input states */
.saving {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: var(--warning) !important;
}

.saved {
  background: rgba(34, 197, 94, 0.2) !important;
  border-color: var(--success) !important;
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-300);
}

.form-group input,
.form-group select {
  width: 100%;
  max-width: 300px;
  padding: var(--space-md);
  background: var(--dark-light);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--white);
}

.settings-form {
  max-width: 400px;
}

hr {
  border: none;
  border-top: 1px solid var(--dark-border);
  margin: var(--space-2xl) 0;
}

/* ============ MODAL ============ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-lg);
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--dark);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--dark-border);
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--white);
}

.modal-body {
  padding: var(--space-xl);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--dark-border);
  background: var(--dark-light);
}

.modal-footer .btn-secondary {
  color: var(--white);
  border-color: var(--dark-border);
}

.modal-footer .btn-primary {
  background: var(--white);
  color: var(--black);
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 1001;
  transition: all 0.3s ease;
}

.toast.hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.toast.info {
  background: var(--dark);
  color: var(--white);
  border: 1px solid var(--dark-border);
}

.toast.success {
  background: var(--success);
  color: var(--white);
}

.toast.error {
  background: var(--error);
  color: var(--white);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .calculator-container {
    padding: var(--space-md);
  }
  
  .calc-header {
    padding: var(--space-xl) var(--space-md);
  }
  
  .calc-header h1 {
    font-size: 1.5rem;
  }
  
  .calc-section {
    padding: var(--space-lg);
  }
  
  .package-cards {
    grid-template-columns: 1fr;
  }
  
  .width-input-group {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .addons-grid {
    grid-template-columns: 1fr;
  }
  
  .quote-actions {
    flex-direction: column;
  }
  
  .quote-actions .btn {
    width: 100%;
  }
  
  .admin-header {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
  
  .admin-nav {
    justify-content: flex-start;
  }
  
  .data-table {
    font-size: 0.75rem;
  }
  
  .data-table th,
  .data-table td {
    padding: var(--space-xs) var(--space-sm);
  }
  
  .data-table .price-input {
    width: 60px;
  }
}

/* ============ PRINT ============ */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .calc-header,
  .calc-section:not(.quote-section),
  .calc-footer,
  .quote-actions {
    display: none;
  }
  
  .calculator-container {
    padding: 0;
  }
  
  .quote-section {
    border: none;
    padding: 0;
  }
  
  .quote-total {
    background: #f5f5f5;
    color: black;
  }
}
