/* General Configuration styles */

.settings-container {
  background: #f9fafb;
  padding: 15px;
  min-height: calc(100vh - 100px);
  /* Reserve space for fixed footer (9vh) + gap so Save button & Delete link never overlap */
  padding-bottom: calc(9vh + 180px);
}

/* Collapsible Section - Dropdown like Customer Profile */
.settings-container .collapsible-section .section-content-wrapper {
  display: none;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.settings-container .collapsible-section.section-open .section-content-wrapper {
  display: block;
}

.settings-container .collapsible-section .section-header {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease, border 0.2s ease, padding 0.2s ease;
  border: 1px solid #d1d5db !important;
  border-radius: 4px;
  padding: 8px 12px !important;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 15px 0;
  position: relative;
}

.settings-container .collapsible-section .section-header::after {
  content: '';
  position: absolute !important;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #1c84c6;
}

.settings-container .collapsible-section.section-open .section-header::after {
  transform: translateY(-50%) rotate(180deg);
}

.settings-container .collapsible-section.section-open .section-header {
  border: none !important;
  padding: 0 !important;
  background-color: transparent;
  margin: 0 0 15px 0;
}

.settings-container .collapsible-section .section-header:hover {
  background-color: #f8f9fa;
  border-color: #9ca3af !important;
}

.settings-container .collapsible-section.section-open .section-header:hover {
  background-color: transparent;
  border: none !important;
}

.settings-container .collapsible-section .gc-section-hr {
  display: none !important;
  border: 1px solid #000000;
  margin: 0;
  flex: 1;
}

.settings-container .collapsible-section.section-open .gc-section-hr {
  display: block !important;
}

.settings-container .collapsible-section .gc-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1c84c6;
  white-space: nowrap;
}

.settings-container .collapsible-section .section-header .gc-section-hr {
  margin-right: 25px !important;
}

.settings-container .section-container {
  margin-top: 12px;
}

/* Tabs - glass effect (like customer profile scrollable form) */
.settings-container .nav-tabs .nav-link {
  color:#204b6c;
  background: rgba(220, 243, 243, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0 !important;
  position: relative;
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  box-shadow: 0 2px 8px rgba(28, 132, 198, 0.08);
}

.settings-container .nav-tabs .nav-link:hover {
  color: var(--themeblue, #1c84c6) !important;
  background: rgba(255, 255, 255, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 12px rgba(28, 132, 198, 0.18);
  text-decoration: none;
}

.settings-container .nav-tabs .nav-link.active {
  color: #fff !important;
  background: rgb(65 181 255 / 85%) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-color: #dee2e6 #dee2e6 transparent;
  border-radius: 0 !important;
  box-shadow: 0 2px 12px rgba(28, 132, 198, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.settings-container .tab-pane {
  padding-bottom: 10px;
}

/* General tab: extra bottom space so Save button & Delete link stay above fixed footer */
.settings-container #general.tab-pane {
  padding-bottom: calc(9vh + 100px);
}

/* Duties & Taxes tab: ensure TDS section + buttons are reachable with outer scroll */
.settings-container #duties-taxes.tab-pane {
  padding-bottom: 80px;
}

/* New tabs: same layout and bottom space as General tab */
.settings-container .gc-tab-content.tab-pane {
  padding-bottom: calc(9vh + 80px);
}

/* Subsidiary Groups: 3 larger inputs in 1 row */
#subsidiary-groups .gc-gen-two-cols {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem 2rem;
  width: 100%;
}

#subsidiary-groups .gc-gen-field-inline {
  flex: 1;
  min-width: 0;
}

#subsidiary-groups .gc-gen-field-inline .gc-gen-select {
  width: 100%;
  min-width: 200px;
  max-width: 100%;
}

/* Finance tab – Subsidiary Groups section: same select style as Agent (Sales tab / gc-gen-white-section) */
#finance .section-content .gc-gen-select,
#finance .section-content .gc-gen-input {
  display: inline-block;
  height: 36px;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: #1f2a44;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#finance .section-content .gc-gen-select:focus,
#finance .section-content .gc-gen-input:focus {
  border-color: #1c84c6;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(28, 132, 198, 0.15);
}

#finance .section-content .gc-gen-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234b5563' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

#finance .section-content .gc-gen-field-inline .gc-gen-select {
  min-width: 200px;
  width: 220px;
  max-width: 100%;
}

/* Placeholder for tabs without content yet */
.gc-tab-placeholder {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #1f2a44;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Browse button next to input: match General tab input height */
.gc-browse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  color: #4b5563;
  flex-shrink: 0;
}

.gc-browse-btn:hover {
  background-color: #f9fafb;
  border-color: #1c84c6;
  color: #1c84c6;
}

/* Tab row: allow wrap when many tabs */
.settings-container #generalConfigTabs.nav-tabs {
  flex-wrap: wrap;
}

/* Back Up tab hidden per client request; remove this rule to show again */
.settings-container .gc-tab-back-up-hidden {
  display: none;
}

/* System tab hidden; content moved to General and GST Settings */
.settings-container .gc-tab-system-hidden {
  display: none;
}

/* System tab: Web Server and EInvoice & EWay Path fields hidden per client request */
.gc-system-web-server-fields-hidden {
  display: none;
}

/* Settlement tab hidden; content moved to Finance as "Bill to Bill Settlement" */
.settings-container .gc-tab-settlement-hidden {
  display: none;
}

/* Subsidiary Groups tab hidden; content moved to Finance as "Subsidiary Groups" section */
.settings-container .gc-tab-subsidiary-groups-hidden {
  display: none;
}

/* ========== General tab: white section (only inside General tab) ========== */
.gc-gen-white-section {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  padding: 20px 24px 24px;
  margin-top: 0.5rem;
}

/* ========== General tab sections – spacing and input styling to match reference ========== */
.gc-general {
  padding-top: 0;
}

.gc-gen-section {
  margin-bottom: 2.5rem;
}

.gc-gen-section:last-of-type {
  margin-bottom: 0;
}

.gc-gen-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #1c84c6;
  margin: 0 0 0.85rem 0;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Thin light grey line to the right of the heading (same row, like Product Master) */
.gc-gen-heading::after {
  content: '';
  flex: 1;
  min-width: 0;
  height: 1px;
  background: #e5e7eb;
}

.gc-gen-row {
  display: flex;
  align-items: center;
  gap: 12px 2rem;
  margin-bottom: 0.75rem;
}

.gc-gen-row:last-child {
  margin-bottom: 0;
}

.gc-gen-label {
  font-weight: 500;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1f2a44;
  margin: 0;
  min-width: 140px;
  flex-shrink: 0;
  line-height: 1.5;
  text-align: left;
}

/* ----- General tab inputs and selects: white bg, thin grey border, uniform height (match image) ----- */
.gc-gen-white-section .gc-gen-select,
.gc-gen-white-section .gc-gen-input,
.gc-gen-white-section select.gc-gen-select,
.gc-gen-white-section input.gc-gen-input {
  display: inline-block;
  height: 36px;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: #1f2a44;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gc-gen-white-section .gc-gen-select:focus,
.gc-gen-white-section .gc-gen-input:focus {
  border-color: #1c84c6;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(28, 132, 198, 0.15);
}

.gc-gen-white-section .gc-gen-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234b5563' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.gc-gen-control,
.gc-gen-input {
  max-width: 280px;
  min-width: 120px;
}

.gc-gen-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
}

.gc-gen-white-section .gc-gen-radio-label,
.gc-gen-radio-label {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Checkbox labels: checkbox left of label text */
.gc-gen-white-section .gc-gen-check-label,
.gc-gen-check-label {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gc-gen-check-label input.form-check-input,
.gc-gen-cheque-returned input.form-check-input {
  flex-shrink: 0;
}

.gc-gen-radio-label input[type="radio"] {
  flex-shrink: 0;
  order: -1; /* radio to the left of the label text */
}

/* Use Batch Rate row: slight indent so not flush with section (match Product Type) */
.gc-gen-section:first-of-type .gc-gen-row:nth-child(4) {
  padding-left: 16px;
}

/* Transactions, Module Management, Messaging, System: indent checkbox rows under first letter of heading (match General tab) */
#transactions .gc-gen-section .gc-gen-row,
#module-management .gc-gen-section .gc-gen-row,
#settlement .gc-gen-row-checkbox,
#messaging .gc-gen-row-checkbox,
#system .gc-gen-row-checkbox {
  padding-left: 16px;
}

#settlement .gc-gen-settlement-checkboxes-row,
#finance .gc-gen-settlement-checkboxes-row {
  gap: 2rem;
}

/* Finance tab: Bill to Bill Settlement section – same checkbox row indent as Settlement */
#finance .section-content .gc-gen-row-checkbox {
  padding-left: 16px;
}

/* Finance tab: Deny Negative Cash Entry row – align with Use Settlement (section-content margin 10px + row padding 16px) */
#finance .gc-gen-deny-negative-cash-row {
  padding-left: 26px;
}

/* Messaging: align all inputs under User Name (Mobile No.) input - consistent label width */
#messaging .gc-gen-section .gc-gen-row .gc-gen-label {
  min-width: 190px;
}

/* Messaging: align Use SSL checkbox with input start (label width + gap) */
#messaging .gc-gen-row-checkbox {
  padding-left: calc(190px + 50px);
}

/* ========== System tab: Currency Settings panel (bordered) ========== */
.gc-gen-currency-panel {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px 20px;
  margin: 1rem 0 1.5rem 0;
  background: #fafafa;
}

.gc-gen-subheading {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.gc-gen-currency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 3rem;
  align-items: start;
}

.gc-gen-currency-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gc-gen-currency-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Fixed label width so all inputs align vertically - Sample Appearance aligns with Base Currency, No of Decimals */
.gc-gen-currency-field .gc-gen-label {
  width: 135px;
  min-width: 135px;
  flex-shrink: 0;
}

/* Same width for all currency inputs so they align vertically - one under the other */
.gc-gen-currency-input {
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
  flex-shrink: 0;
}

.gc-gen-printer-row {
  flex-wrap: wrap;
  gap: 12px 2rem;
}

.gc-gen-graphical-print {
  margin-left: 0;
}

/* ========== Back Up tab ========== */
/* Align checkboxes and Apply button on same left edge */
.gc-gen-backup-section .gc-gen-backup-checkbox-row {
  padding-left: 24px;
}

.gc-gen-backup-check {
  flex-shrink: 0;
}

.gc-gen-backup-scheduler-row {
  flex-wrap: wrap;
  gap: 12px 1.5rem;
  align-items: center;
}


.gc-gen-overwrite-label {
  margin-left: 1rem;
}

.gc-gen-backup-apply-row {
  align-items: center;
  gap: 22rem;
}

/* Send Backup email row: move input slightly left (smaller gap between label and input) */
.gc-gen-backup-email-row {
  gap: 8px;
} 

.gc-tab-apply-btn {
  padding: 0.35rem 1.5rem;
  background-color: #007bff;
  border-color: #007bff;
}

.gc-tab-apply-btn:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

/* ========== Inventory Settings tab: 3-column grid ========== */
.gc-gen-inventory-section {
  margin-bottom: 0;
}

.gc-gen-inventory-grid {
  display: flex;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 1200px) {
  .gc-gen-inventory-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .gc-gen-inventory-grid {
    grid-template-columns: 1fr;
  }
}

.gc-gen-inventory-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-left: 16px; /* match other tabs: checkboxes slightly right of section edge */
}

.gc-gen-inventory-col .gc-gen-row {
  margin-bottom: 0;
}

/* Rate Used in BOM & Stock Correction Voucher: same label width and control width for alignment */
.gc-gen-inventory-control-row .gc-gen-label {
  width: 100px;
}

.gc-gen-inventory-control-same {
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
  flex-shrink: 0;
}

.gc-gen-inline-check {
  align-items: center;
}

.gc-gen-inline-check .gc-gen-input {
  flex: 1;
  min-width: 80px;
}

/* Select Group For BOM: scrollable listbox with checkboxes on left */
.gc-gen-bom-listbox.gc-bom-checkbox-list {
  display: block;
  min-height: 1000px;
  max-height: 140px;
  overflow-y: auto;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  width: 100%;
}

.gc-bom-checkbox-list .gc-bom-checkbox-label {
  margin: 0;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 400;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.gc-bom-checkbox-list .gc-bom-checkbox {
  flex-shrink: 0;
  margin: 0;
  width: 14px;
  height: 14px;
  accent-color: #1c84c6;
}

/* Production tab: Rate Used in BOM + Multiple Finished Product on one row; Select Group below, aligned */
.gc-gen-production-first-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
  margin-bottom: 1rem;
}
.gc-gen-production-first-row .gc-gen-field-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gc-gen-production-first-row .gc-gen-field-inline .gc-gen-label {
  flex-shrink: 0;
  min-width: 140px;
}
.gc-gen-production-first-row .gc-gen-field-inline .gc-gen-select {
  min-width: 180px;
  width: 220px;
}
.gc-gen-production-check {
  margin: 0;
}
.gc-gen-production-second-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.gc-gen-production-second-row .gc-gen-label {
  flex-shrink: 0;
  min-width: 140px;
  padding-top: 6px;
}
.gc-gen-production-second-row .gc-gen-bom-listbox {
  flex: 1;
  min-width: 180px;
  max-width: 450px;
}

.gc-gen-hint {
  font-size: 12px;
  color: #6b7280;
  margin-left: 4px;
}


.gc-gen-options-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px 28px;
  margin-bottom: 1rem;
  padding-left: 16px; /* slight indent to match Product Type spacing */
}

/* Align Transactions & Module Management checkboxes with General Options (Use Branch, etc.) */
.gc-general .gc-gen-section-checkbox-indent .gc-gen-row {
  padding-left: 16px;
}

/* Product Type: scrollable listbox style (like Select Group For BOM) with checkboxes on left */
.gc-product-type-list {
  display: block;
  min-height: 90px;
  max-height: 140px;
  overflow-y: auto;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  width: 60%;
}

/* Inventory bottom row: Allow Negative Stock, Batch, Use Ratio BOM, Item Alias, Weighing Group – single horizontal row */
.gc-gen-inventory-bottom-row {
  display: flex;
  align-items: center;
  gap: 3rem ;
  padding-left: 16px;
}
.gc-gen-inventory-bottom-row .gc-gen-check-label {
  margin: 0;
}
.gc-gen-inventory-bottom-row .gc-gen-inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gc-gen-inventory-bottom-row .gc-gen-field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gc-gen-inventory-bottom-row .gc-gen-field-inline .gc-gen-select {
  min-width: 140px;
}

/* Weighing Group + Decimals For Inventory Rate on a single line */
.gc-gen-inventory-weighing-decimals-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2rem;
}

.gc-product-type-list .gc-checkbox-label {
  margin: 0;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.gc-product-type-list .gc-checkbox {
  flex-shrink: 0;
  margin: 0;
  width: 14px;
  height: 14px;
  accent-color: #1c84c6;
}

/* Year Ending & Inventory Groups: two pairs, label + dropdown on same line, wide gap between pairs */
.gc-gen-two-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  align-items: center;
}

.gc-gen-field-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gc-gen-field-inline .gc-gen-label {
  flex-shrink: 0;
}

.gc-gen-field-inline .gc-gen-select {
  min-width: 200px;
  width: 220px;
}

/* Sales tab: Agent, Stop Credit Sales When, Cheque(s) Returned on one row; Agent and Stop Credit input same width */
.gc-gen-sales-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
}
.gc-gen-sales-row .gc-gen-sales-field .gc-gen-select,
.gc-gen-sales-row .gc-gen-sales-field .gc-gen-sales-input,
.gc-gen-sales-row .gc-gen-sales-field .gc-gen-input {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  box-sizing: border-box;
}
.gc-gen-sales-row .gc-gen-sales-cheque {
  margin-left: 0;
}

/* Other Settings: Alt Language and Date Format on one line, equal width */
.gc-gen-other-settings-cols {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  align-items: center;
}
.gc-gen-other-settings-cols .gc-gen-field-inline {
  flex: 1;
  min-width: 0;
}
.gc-gen-other-settings-cols .gc-gen-field-inline .gc-gen-select {
  width: 60%;
  min-width: 0;
  max-width: 100%;
}

/* Other Settings: three items in one row */
.gc-gen-three-cols {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.gc-gen-three-cols .gc-gen-field-inline .gc-gen-select {
  min-width: 140px;
  width: 160px;
}

/* General Options: Stop Credit row – label, input, Cheque(s) Returned, Delete link */
.gc-gen-stop-credit-row {
  flex-wrap: wrap;
  gap: 12px 20px;
}

.gc-gen-stop-credit-row .gc-gen-input {
  max-width: 180px;
}

.gc-gen-cheque-returned {
  margin-left: 0.5rem;
}

.gc-gen-delete-link {
  margin-left: auto;
}

/* Save button: large vertical space above, centered; extra bottom so it doesn't overlap fixed footer */
.gc-gen-save-row {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.gc-gen-save-row .btn-primary {
  padding: 0.5rem 2.5rem;
  font-weight: 500;
}

.settings-container .gc-section-nested {
  margin-top: 15px;
}

/* TDS form fields - compact layout, label and control close together */
.gc-tds-fields {
  margin-bottom: 16px;
}

.gc-form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.gc-form-label {
  font-weight: 500;
  font-size: 14px;
  color: #1f2a44;
  margin: 0;
  min-width: 100px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Enable TDS - new checkbox from scratch, label before checkbox, no Bootstrap */
.gc-enable-tds-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  color: #1f2a44;
  margin: 0;
}

.gc-enable-tds-text {
  flex-shrink: 0;
}

.gc-enable-tds-checkbox {
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #1c84c6;
}

/* Enable TDS row: Enable TDS on left, TDS Account Group on right (same width as PAN/Supplier) */
.gc-enable-tds-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.gc-tds-account-group-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gc-tds-account-group-wrap .gc-tds-label-left {
  font-weight: 500;
  font-size: 14px;
  color: #1f2a44;
  margin: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.gc-tds-account-group-select {
  width: 280px;
  max-width: 280px;
  padding: 8px 32px 8px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 12px;
  background-color: #ffffff;
  box-sizing: border-box;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234b5563' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.gc-tds-account-group-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.gc-tds-account-group-input {
  width: 280px;
  max-width: 280px;
  cursor: pointer;
}

/* PAN on same row as TDS Account Group (to the right) */
.gc-tds-pan-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gc-tds-pan-wrap .gc-tds-label-left {
  font-weight: 500;
  font-size: 14px;
  color: #1f2a44;
  margin: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.gc-tds-pan-wrap .gc-pan-input {
  width: 280px;
  box-sizing: border-box;
  flex: 0 0 auto;
  height: 36px;
  background-color: white;
}

/* PAN input - same as Product Master, sits close to label */
.gc-pan-input {
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 12px;
  background-color: #ffffff;
  flex: 1;
  max-width: 280px;
}

.gc-pan-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* PAN display div (read-only, not an input) */
.gc-pan-display {
  min-height: 2.25em;
  line-height: 1.25;
  background-color: #f9fafb;
}

/* PAN and Supplier: one row, label on left of each input (same horizontal line) */
.gc-tds-pan-supplier-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}

.gc-tds-pan-supplier-row .gc-tds-label-left {
  font-weight: 500;
  font-size: 14px;
  color: #1f2a44;
  margin: 0;
  flex-shrink: 0;
  white-space: nowrap;
  text-align: left;
}

.gc-tds-pan-supplier-row .gc-pan-input,
.gc-tds-pan-supplier-row .gc-supplier-input {
  width: 280px;
  max-width: 280px;
  box-sizing: border-box;
}

.gc-supplier-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* TDS footer: common app master footer style (Save, Load, New, Delete) */
.gc-tds-footer.form-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 14px 20px;
  margin-top: 24px;
  border-top: 1px solid var(--themegrey, #c0bcbc);
  background: var(--themewhite, #fff);
  flex-wrap: wrap;
}

/* Buttons match app master .div2-footer button: blue, white text, icon right, hover scale */
.gc-tds-footer .gc-footer-btn {
  border: none;
  background-color: var(--themeblue, #1a73e8) !important;
  color: #fff;
  cursor: pointer;
  padding: 5px 10px;
  min-width: 100px;
  font-size: 14px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease;
}

.gc-tds-footer .gc-footer-btn:hover {
  transform: scale(1.05);
}

.gc-tds-footer .gc-footer-btn-delete {
  background-color: #dc3545 !important;
}

.gc-tds-footer .gc-footer-btn-delete:hover {
  background-color: #b91c1c !important;
}

/* Add row button: top right of table row (extreme right of PAN field row) */
.gc-tds-add-wrap {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Single delete button: visible only when a TDS row is selected; to the left of Add button */
.gc-tds-delete-selected-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s;
}

.gc-tds-delete-selected-btn:hover {
  border-color: #fca5a5;
  background: #fef2f2;
}

.gc-tds-delete-selected-btn img {
  width: 16px;
  height: 16px;
  opacity: 0.75;
}

.gc-tds-delete-selected-btn:hover img {
  opacity: 1;
}

/* TDS row selection highlight */
.gc-tds-row-selected {
  background-color: #dbeafe !important;
}

.gc-tds-add-table-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s;
}

.gc-tds-add-table-btn:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.gc-tds-add-table-btn .gc-tds-add-plus {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  color: #2563eb;
  user-select: none;
}

/* TDS table Delete column: narrow */
.gc-tds-action-cell {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  width: 1%;
  max-width: 44px;
  padding: 2px 4px;
}

.gc-tds-action-cell .gc-tds-row-btn {
  margin: 0;
  padding: 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.gc-tds-action-cell .gc-tds-row-btn img {
  width: 16px;
  height: 16px;
  opacity: 0.75;
}

.gc-tds-action-cell .gc-tds-row-btn:hover img {
  opacity: 1;
}

/* TDS Section - Table styling same as Opening Quantity Details */
.gc-table-container {
  width: 100%;
  margin-top: 10px;
}

/* Header wrap: reserve same width as body scroll (scrollbar gutter) so columns align */
.gc-table-header-wrap {
  width: 100%;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

/* Header table: fixed at top, no scroll */
.gc-tds-table-head {
  width: 100%;
  table-layout: fixed;
  font-size: 11px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e5e7eb;
  border-bottom: none;
}

.gc-tds-table-head thead {
  background-color: #ffffff;
}

.gc-tds-table-head th {
  background-color: #ffffff;
  color: #1c84c6;
  font-weight: 500;
  text-align: center;
  padding: 6px;
  white-space: nowrap;
  font-size: 11px;
  border: none;
  border-right: 1px solid #d1d5db;
  border-bottom: 1px solid #d1d5db;
  font-family: 'Inter', sans-serif;
}

.gc-tds-table-head th:last-child { border-right: 1px solid #d1d5db; }

/* Body: fixed-height scroll area so 10th row is always reachable; scrollbar-gutter aligns with header */
.gc-table-body-scroll {
  width: 100%;
  height: 320px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-gutter: stable;
  display: block;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e5e7eb;
  border-top: none;
}

/* Inner wrapper: ensures content height > viewport; padding-bottom so 10th row fully visible when scrolled to bottom */
.gc-table-body-inner {
  min-height: 421px;
  padding-bottom: 48px;
  display: block;
  box-sizing: border-box;
}

#tdsTable.gc-tds-table-body {
  width: 100%;
  table-layout: fixed;
  font-size: 11px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

/* Column widths set via colgroup in HTML to match header */

#tdsTable tbody {
  background-color: #ffffff;
}

#tdsTable td {
  padding: 4px 6px;
  text-align: center;
  border: none;
  border-right: 1px solid #d1d5db;
  border-bottom: 1px solid #d1d5db;
  vertical-align: middle;
  background-color: #ffffff;
}

#tdsTable td:first-child {
  border-left: 1px solid #d1d5db;
}

#tdsTable tbody tr {
  background-color: #ffffff;
  transition: background-color 0.2s;
}

#tdsTable tbody tr:hover {
  background-color: #f9fafb;
}

#tdsTable tbody tr:last-child td {
  border-bottom: 1px solid #d1d5db;
}

/* Table input fields - same as Opening Quantity Details, equal height 32px */
.gc-table-input,
#tdsTable input.gc-table-input,
#tdsTable select.gc-table-input {
  height: 32px;
  min-height: 32px;
  border: 1px solid #d1d5db;
  padding: 3px 6px;
  font-size: 11px;
  width: 100%;
  min-width: 50px;
  border-radius: 4px;
  background-color: #ffffff;
  box-sizing: border-box;
}

.gc-table-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: #ffffff;
}

.gc-table-input[readonly] {
  background-color: #e9ecef !important;
  cursor: default;
  color: #495057;
  text-align: center;
}

/* SlNo column - grey background like Opening Quantity */
#tdsTable td:first-child .gc-table-input {
  background-color: #e9ecef;
  text-align: center;
}

/* Ensure select (Active/Deactive) matches input height */
#tdsTable select.gc-table-input {
  line-height: 20px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 14px;
  padding-right: 28px;
}

/* Delete confirmation modal – product master style */
.gc-delete-modal .modal-content {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gc-delete-modal .modal-header.product-header {
  background-color: #1c84c6;
  color: #ffffff;
  border: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  padding: 10px 16px;
  min-height: 36px;
  align-items: center;
}

.gc-delete-modal .modal-title.producth4 {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
}

.gc-delete-modal .modal-header .btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.gc-delete-modal .modal-body {
  padding: 16px;
  color: #1f2a44;
  font-size: 14px;
}

.gc-delete-modal .modal-footer {
  border-top: 1px solid #e5e7eb;
  padding: 12px 16px;
  gap: 8px;
}

.gc-delete-modal .modal-footer .btn-secondary {
  background-color: #6c757d;
  border-color: #6c757d;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
}

.gc-delete-modal .modal-footer .gc-delete-confirm-btn {
  background-color: #1c84c6;
  border-color: #1c84c6;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
}

.gc-delete-modal .modal-footer .gc-delete-confirm-btn:hover {
  background-color: #1565a0;
  border-color: #1565a0;
  color: #fff;
}

/* GST Enabled checkbox above the table, indented slightly right */
.gc-gst-enabled-row {
  padding-left: 24px;
  margin-bottom: 0.5rem;
}

/* GST Enabled checkbox with EInvoice & EWay Path block to its right */
.gc-gst-enabled-with-einvoice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.gc-gst-enabled-with-einvoice-row .gc-gst-einvoice-block {
  flex: 1;
  min-width: 280px;
}
.gc-gst-einvoice-block .gc-gen-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}
.gc-gst-einvoice-block .gc-gen-row:last-child {
  margin-bottom: 0;
}
.gc-gst-einvoice-block .gc-gen-label {
  flex-shrink: 0;
  min-width: 140px;
}
.gc-gst-einvoice-block .gc-gen-input {
  flex: 1;
  min-width: 0;
}

/* Hide Web Server field in GST Settings; only EInvoice & EWay Path shown */
.gc-gst-web-server-hidden {
  display: none !important;
}

/* EInvoice & EWay Path input: same style as GST table fields (white, border, radius) */
.gc-gst-einvoice-block .gc-gst-input,
.gc-gst-einvoice-block .form-control.gc-gst-input {
  width: 100%;
  max-width: 280px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background-color: #ffffff;
  box-sizing: border-box;
}
.gc-gst-einvoice-block .gc-gst-input:focus,
.gc-gst-einvoice-block .form-control.gc-gst-input:focus {
  border-color: #1c84c6;
  outline: none;
}

/* GST Settings - 2-column table (label | value) */
.gc-gst-settings-table-wrap {
  background-color: #ffffff;
  padding: 16px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  max-width: 600px;
}

.gc-gst-settings-table {
  width: 100%;
  border-collapse: collapse;
}

.gc-gst-settings-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

.gc-gst-settings-table tbody tr:last-child {
  border-bottom: none;
}

.gc-gst-settings-table .gc-gst-label {
  font-weight: 500;
  font-size: 14px;
  color: #1f2a44;
  padding: 10px 16px 10px 0;
  vertical-align: middle;
  width: 180px;
}

.gc-gst-settings-table td:last-child {
  padding: 8px 0;
  vertical-align: middle;
}

.gc-gst-settings-table .gc-gst-input {
  width: 100%;
  max-width: 280px;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background-color: #ffffff;
}

.gc-gst-settings-table .gc-gst-input:focus {
  border-color: #1c84c6;
  outline: none;
}
