:root {
  --ig-primary: #3730a3;
  --ig-primary-hover: #312e81;
  --ig-bg-card: #ffffff;
  --ig-border: #e2e8f0;
  --ig-text-main: #0f172a;
  --ig-text-muted: #64748b;
  --ig-pill-bg: #f1f5f9;
  --ig-pill-hover: #e2e8f0;
  --ig-result-bg: #f8fafc;
}

.ig-tool-container {
  max-width: 900px;
  margin: 0 auto 3rem auto;
  font-family: inherit;
  color: var(--ig-text-main);
}

.ig-editor-card {
  background: var(--ig-bg-card);
  border: 1px solid var(--ig-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ig-presets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ig-border);
}

.ig-presets-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ig-text-muted);
}

.ig-pill-btn {
  background: var(--ig-pill-bg);
  border: 1px solid var(--ig-border);
  color: var(--ig-text-main);
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ig-pill-btn:hover {
  background: var(--ig-pill-hover);
  border-color: var(--ig-primary);
}

.ig-action-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ig-primary-btn {
  flex: 2;
  background: var(--ig-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ig-primary-btn:hover {
  background: var(--ig-primary-hover);
}

.ig-secondary-btn {
  background: var(--ig-pill-bg);
  color: var(--ig-text-main);
  border: 1px solid var(--ig-border);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

/* Printable Sheet Structure */
.ig-sheet {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--ig-border);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.ig-sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 680px) {
  .ig-sheet-header {
    flex-direction: column;
  }
}

.ig-sender-box {
  flex: 1;
}

.ig-input-title {
  width: 100%;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  border: none;
  background: transparent;
  padding: 0.2rem 0;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}

.ig-input-sub {
  width: 100%;
  font-size: 0.85rem;
  color: #475569;
  border: 1px dashed transparent;
  background: transparent;
  padding: 0.4rem 0.2rem;
  resize: vertical;
  line-height: 1.5;
  box-sizing: border-box;
}

.ig-input-sub:hover,
.ig-input-sub:focus {
  border-color: #cbd5e1;
  outline: none;
}

.ig-meta-box {
  text-align: right;
  min-width: 240px;
}

.ig-wordmark-inv {
  font-size: 2rem;
  font-weight: 900;
  color: #0284c7;
  letter-spacing: 2px;
  margin: 0 0 1rem 0;
}

.ig-meta-field {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.ig-meta-field label {
  font-weight: 700;
  color: #64748b;
}

.ig-meta-field input {
  width: 130px;
  padding: 0.35rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: right;
}

.ig-client-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.ig-section-label {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #64748b;
  display: block;
  margin-bottom: 0.4rem;
}

.ig-input-client {
  width: 100%;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  border: none;
  background: transparent;
  padding: 0.2rem 0;
  margin-bottom: 0.25rem;
}

.ig-currency-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
}

.ig-currency-row select {
  padding: 0.3rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

/* Line Items Table */
.ig-items-wrap {
  margin-bottom: 2rem;
  overflow-x: auto;
}

.ig-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.ig-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid #e2e8f0;
}

.ig-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
}

.ig-item-desc {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-sizing: border-box;
}

.ig-item-qty,
.ig-item-rate {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-sizing: border-box;
  text-align: right;
}

.ig-row-amt {
  font-weight: 700;
  color: #0f172a;
  display: block;
  text-align: right;
  padding-right: 0.5rem;
}

.ig-del-row-btn {
  background: transparent;
  color: #dc2626;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

.ig-add-item-btn {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  color: #0284c7;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.ig-add-item-btn:hover {
  background: #e0f2fe;
}

/* Summary Section */
.ig-summary-section {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

@media (max-width: 680px) {
  .ig-summary-section {
    flex-direction: column;
  }
}

.ig-payment-notes {
  flex: 1;
}

.ig-textarea-notes {
  width: 100%;
  padding: 0.5rem;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.5;
  box-sizing: border-box;
}

.ig-totals-box {
  width: 280px;
}

.ig-tot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #475569;
}

.ig-tax-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ig-rate-input {
  width: 60px;
  padding: 0.25rem 0.4rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  text-align: right;
}

.ig-grand-total {
  border-top: 2px solid #0f172a;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
}

/* Results & Specs */
.ig-results-card {
  background: var(--ig-result-bg);
  border: 1px solid var(--ig-border);
  border-radius: 12px;
  padding: 1.75rem;
}

.ig-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .ig-specs-grid {
    grid-template-columns: 1fr;
  }
}

.ig-spec-item {
  background: var(--ig-bg-card);
  border: 1px solid var(--ig-border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ig-spec-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ig-text-muted);
}

.ig-spec-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ig-text-main);
}

.ig-spec-sub {
  font-size: 0.75rem;
  color: var(--ig-text-muted);
}

.ig-tip-box {
  background: var(--ig-bg-card);
  border: 1px solid var(--ig-border);
  border-radius: 8px;
  padding: 1.25rem;
}

.ig-tip-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--ig-primary);
}

.ig-tip-box p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ig-text-muted);
  line-height: 1.5;
}

/* Print Media Stylesheet */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .tf-site-header,
  .tf-intro,
  .tf-disclaimer,
  .tf-guide,
  .tf-faq,
  .tf-related,
  .tf-site-footer,
  .tf-consent-banner,
  .ig-presets-row,
  .ig-action-row,
  .ig-results-card,
  .ig-add-item-btn,
  .ig-del-row-btn,
  .ig-currency-row {
    display: none !important;
  }
  .ig-tool-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .ig-editor-card {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  .ig-sheet {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  input, textarea, select {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}

.ig-top-actions {
  justify-content: flex-start;
}

.ig-ad {
  overflow: hidden;
  min-height: 280px;
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --ig-primary: #8681da;
  --ig-primary-hover: #7c79cf;
  --ig-bg-card: var(--tf-surface);
  --ig-border: var(--tf-surface);
  --ig-text-main: var(--tf-ink);
  --ig-text-muted: var(--tf-ink-faint);
  --ig-pill-bg: var(--tf-surface);
  --ig-pill-hover: var(--tf-surface);
  --ig-result-bg: var(--tf-surface);
}
