
.theme-icon-toggle {
  position: relative;
  display: block;
  width: 46px;
  min-width: 46px;
  height: 26px;
  min-height: 26px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 999px;
  color: #ffffff;
  background: #061829;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.theme-icon-toggle.is-floating {
  position: fixed;
  z-index: 150;
  top: 14px;
  right: 14px;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #0d527a;
  box-shadow: 0 2px 7px rgba(2, 12, 22, 0.34);
  transform: translateX(0);
  transition: transform 190ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 180ms ease;
}

.theme-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transform: scale(0.68) rotate(-24deg);
  transition: opacity 140ms ease, transform 190ms ease;
}

html[data-theme="dark"] .theme-icon-moon,
html[data-theme="light"] .theme-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0);
}

html[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(20px);
}

.theme-icon-toggle:hover,
.theme-icon-toggle:focus-visible {
  border-color: #66d2f5;
  outline: none;
}

.theme-icon-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(53, 199, 243, 0.22);
}

html[data-theme="light"] body {
  color: var(--ink);
  background: #dbe7ef;
  background-image: none;
}

/* The navigation remains navy in both themes to preserve the TechMeta identity. */
html[data-theme="light"] .topbar {
  color: #ffffff;
  background: rgba(7, 32, 52, 0.97);
  border-bottom-color: rgba(56, 189, 248, 0.34);
  box-shadow: 0 8px 24px rgba(15, 51, 74, 0.14);
}

html[data-theme="light"] .topbar :is(.ghost-link, .nav-menu-link, .nav-menu-toggle, .nav-standalone) {
  color: #dcebf5;
  background-color: transparent;
}

html[data-theme="light"] .topbar :is(.ghost-link, .nav-menu-link, .nav-menu-toggle, .nav-standalone):hover,
html[data-theme="light"] .topbar :is(.ghost-link, .nav-menu-link, .nav-menu-toggle, .nav-standalone):focus-visible,
html[data-theme="light"] .topbar .is-active > :is(.nav-menu-link, .nav-menu-toggle),
html[data-theme="light"] .topbar .ghost-link.is-active {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.14);
}

html[data-theme="light"] .nav-submenu {
  color: #dcebf5;
  background: #082039;
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 14px 34px rgba(4, 19, 31, 0.26);
}

html[data-theme="light"] .nav-submenu a {
  color: #dcebf5;
}

html[data-theme="light"] :is(.workspace, .summary-panel, .login-box, .settings-section) {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 14px 38px rgba(40, 79, 105, 0.11);
}

html[data-theme="light"] :is(.workspace-title, .ai-builder, .quote-toolbar, .component-add-actions, .under-table-actions) {
  color: var(--ink);
  background: #f7fbfe;
  border-color: var(--line);
}

html[data-theme="light"] .workspace-title {
  color: #0b3658;
}

html[data-theme="light"] :is(
  .field,
  .stack-form label,
  .settings-section label,
  .ai-builder label,
  .cash-payment-copy label,
  .selected-notebook-specs label,
  .selected-part-description label
) {
  color: #49657b;
}

html[data-theme="light"] :is(input, textarea, select, .settings-section .setting-toggle) {
  color: #102a43;
  background: #ffffff;
  border-color: #bfd3e1;
}

html[data-theme="light"] :is(input, textarea)::placeholder {
  color: #5f7689;
}

html[data-theme="light"] :is(input, textarea, select):focus {
  border-color: #029fd3;
  box-shadow: 0 0 0 3px rgba(2, 159, 211, 0.12);
}

html[data-theme="light"] button,
html[data-theme="light"] .secondary-button,
html[data-theme="light"] .ghost-link {
  color: #18384f;
  background: #eef5fa;
  border-color: #bfd3e1;
}

html[data-theme="light"] :is(button, .secondary-button, .ghost-link):hover,
html[data-theme="light"] :is(button, .secondary-button, .ghost-link):focus-visible {
  color: #0b3658;
  background: #e2f1f8;
  border-color: #45add2;
}

html[data-theme="light"] .primary-button {
  color: #ffffff;
  background: #0877aa;
  border-color: #0877aa;
  box-shadow: none;
}

html[data-theme="light"] .primary-button:hover,
html[data-theme="light"] .primary-button:focus-visible {
  color: #ffffff;
  background: #066b9c;
  border-color: #066b9c;
}

html[data-theme="light"] :is(.money-input, .quick-money-input, .summary-money-input, .summary-money-field, .payment-money-field, .selected-sale-money, .notebook-money-field, .notebook-percent-field, .catalog-money, .part-installment-count) {
  color: #102a43;
  background: #f8fbfd;
  border-color: #bfd3e1;
}

html[data-theme="light"] :is(
  .money-input input,
  .summary-money-input input,
  .summary-money-field input,
  .payment-money-field input,
  .selected-sale-money input,
  .notebook-percent-field input,
  .catalog-money input,
  .part-installment-count input
) {
  color: #102a43;
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] :is(.money-input span, .quick-money-input > span) {
  color: #ffffff;
  background: #0877aa;
  border-color: #0877aa;
}

html[data-theme="light"] :is(.summary-title, .payment-strip .payment-option) {
  color: #102a43;
  background: #f3f8fc;
  border-color: #bfd3e1;
}

html[data-theme="light"] :is(.summary-title, .summary-row, .payment-strip) {
  border-color: var(--line);
}

html[data-theme="light"] :is(.summary-percent-input input, .summary-services strong) {
  color: #102a43;
}

html[data-theme="light"] .parts-table th {
  color: #33566f;
  background: #e8f3f9;
  border-color: #c5d9e6;
}

html[data-theme="light"] .parts-table td,
html[data-theme="light"] .consult-table td {
  color: #17374e;
  background: #ffffff;
  border-color: #d2e1eb;
}

html[data-theme="light"] .parts-table tr:nth-child(even) td,
html[data-theme="light"] .consult-table tr:nth-child(even) td {
  background: #f5f9fc;
}

html[data-theme="light"] .parts-table tr.is-open td {
  background: #eef8fc;
}

html[data-theme="light"] .parts-table input {
  color: #102a43;
  background: #ffffff;
  border-color: #bfd3e1;
}

html[data-theme="light"] .services-divider td {
  color: #0b5175;
  background: #e7f5fb !important;
  border-color: rgba(2, 159, 211, 0.35);
}

html[data-theme="light"] .consult-table th {
  color: #33566f;
  background: #e8f3f9;
}

html[data-theme="light"] :is(
  .suggestion-option,
  .component-picker-menu,
  .component-picker-option,
  .row-mode-toggle,
  .row-mode-menu,
  .catalog-search-panel,
  .catalog-category-card,
  .quick-product-row,
  .catalog-row,
  .computer-model-card,
  .upgrades-panel,
  .upgrade-row,
  .ai-option-card,
  .notebook-editor,
  .notebook-library,
  .notebook-catalog-card,
  .notebook-model-card,
  .part-library-item,
  .part-model-card,
  .part-individual-value
) {
  color: #17374e;
  background: #ffffff;
  border-color: #c7dae7;
  box-shadow: none;
}

html[data-theme="light"] :is(
  .suggestion-option,
  .component-picker-option,
  .catalog-category-card,
  .computer-model-card,
  .notebook-catalog-card,
  .part-library-item
):hover,
html[data-theme="light"] :is(
  .suggestion-option,
  .component-picker-option,
  .catalog-category-card,
  .computer-model-card,
  .notebook-catalog-card,
  .part-library-item
):focus-visible {
  color: #0b3658;
  background: #eef8fc;
  border-color: #45add2;
}

html[data-theme="light"] .catalog-category-card.is-active {
  color: #0b3658;
  background: #dff3fb;
  border-color: #029fd3;
}

html[data-theme="light"] .catalog-category-card.is-active strong {
  color: #ffffff;
  background: #0877aa;
}

html[data-theme="light"] :is(
  .computer-model-head h3,
  .computer-model-config-row strong,
  .ai-option-head strong,
  .ai-option-card li span,
  .notebook-search-heading h2,
  .selected-notebook-info h3,
  .notebook-option-content h3,
  .notebook-option-price,
  .notebook-library-title h3,
  .notebook-catalog-card-content strong,
  .notebook-model-content h3,
  .notebook-model-price,
  .part-option-content h3,
  .part-option-price,
  .part-library-heading strong,
  .part-library-item strong,
  .part-model-content h2,
  .part-model-price strong,
  .parts-catalog-header h1,
  .upgrades-header h3
) {
  color: #102a43;
}

html[data-theme="light"] .ai-option-head span {
  color: #ffffff;
  background: #0877aa;
}

html[data-theme="light"] .ai-tier-low .ai-option-head span {
  background: #0785a6;
}

html[data-theme="light"] .ai-tier-high .ai-option-head span {
  background: #14866d;
}

html[data-theme="light"] :is(.selected-notebook-specs input, .selected-part-description textarea, .selected-part-name input) {
  color: #102a43;
  background: #f8fbfd;
  border-color: #bfd3e1;
}

html[data-theme="light"] .selected-notebook-specs input:focus {
  color: #102a43;
  background: #ffffff;
}

html[data-theme="light"] :is(.selected-part, .part-quick-dialog) {
  color: #102a43;
  background: #ffffff;
  border-color: #45add2;
  box-shadow: 0 20px 54px rgba(30, 71, 99, 0.18);
}

html[data-theme="light"] :is(.part-quick-grid input, .part-quick-grid textarea, .part-dialog-close) {
  color: #102a43;
  background: #f8fbfd;
  border-color: #bfd3e1;
}

html[data-theme="light"] .part-quick-photo-drop:not(.has-image) {
  color: #33566f;
  background: #eef8fc;
}

html[data-theme="light"] .part-quick-photo-prompt b {
  color: #0b3658;
}

html[data-theme="light"] .selected-part .selected-sale-money > span {
  color: #ffffff;
  background: #0877aa;
}

html[data-theme="light"] .selected-part-add-button {
  color: #ffffff;
  background: #0877aa;
  border-color: #0877aa;
}

html[data-theme="light"] :is(.notebook-use-button, .notebook-register-button, .notebook-use-after-save) {
  color: #ffffff;
  background: #0877aa;
  border-color: #0877aa;
}

html[data-theme="light"] .notebook-edit-button {
  color: #0b5175;
  background: #eef5fa;
  border-color: #bfd3e1;
}

html[data-theme="light"] .quote-part-icon-button {
  color: #0b5175;
  background: #eef5fa;
  border-color: #bfd3e1;
}

html[data-theme="light"] .toast {
  color: #ffffff;
  background: #082039;
  border-color: #159fd8;
}

html[data-theme="light"] .app-version {
  color: #526b82;
  background: rgba(255, 255, 255, 0.88);
}

html[data-theme="light"] .app-version:hover,
html[data-theme="light"] .app-version:focus-visible {
  color: #0877aa;
  background: #ffffff;
}

html[data-theme="light"] .changelog-dialog {
  color: #102a43;
  background: #ffffff;
  border-color: #9fc4d9;
}

html[data-theme="light"] .changelog-close {
  color: #17374e;
  background: #eef5fa;
  border-color: #bfd3e1;
}

html[data-theme="light"] .changelog-dialog::backdrop,
html[data-theme="light"] .part-quick-dialog::backdrop {
  background: rgba(15, 42, 61, 0.56);
}


/* Stronger hierarchy for the corporate light theme. */
html[data-theme="light"] .app-shell {
  background: transparent;
}

html[data-theme="light"] :is(.workspace, .summary-panel, .login-box, .settings-section) {
  border-color: #aac4d5;
  box-shadow: 0 14px 34px rgba(31, 73, 101, 0.14);
}

html[data-theme="light"] .workspace-title {
  color: #ffffff;
  background: #0b3658;
  border-bottom-color: #159fd8;
}

html[data-theme="light"] .workspace-title .secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(125, 207, 238, 0.54);
}

html[data-theme="light"] .workspace-title .secondary-button:hover,
html[data-theme="light"] .workspace-title .secondary-button:focus-visible {
  color: #ffffff;
  background: #0e527b;
  border-color: #66c8e9;
}

html[data-theme="light"] :is(.ai-builder, .notebook-search-panel) {
  background: #e9f3f8;
  border-color: #afcadb;
}

html[data-theme="light"] :is(.quote-toolbar, .component-add-actions, .under-table-actions) {
  background: #f8fbfd;
  border-color: #bfd3e1;
}

html[data-theme="light"] :is(.summary-title, .part-summary-title) {
  color: #ffffff;
  background: #0b3658;
  border-color: #0b3658;
}

html[data-theme="light"] .summary-title :is(span, label, input),
html[data-theme="light"] .part-summary-title :is(span, label, input) {
  color: #ffffff;
}

html[data-theme="light"] .summary-panel {
  background: #f9fcfe;
}

html[data-theme="light"] .summary-row {
  border-color: #b8cfde;
}

html[data-theme="light"] .payment-strip {
  overflow: hidden;
  border: 1px solid #afc8d8;
  border-radius: 7px;
  background: #ffffff;
}

html[data-theme="light"] .payment-strip .payment-option {
  background: #eef5f9;
  border-color: #afc8d8;
}

html[data-theme="light"] .part-add-financing {
  color: #0b5175;
  background: #e2f1f7;
  border-color: #afc8d8;
}

html[data-theme="light"] .part-add-financing:hover,
html[data-theme="light"] .part-add-financing:focus-visible {
  color: #083c5a;
  background: #d1e9f3;
}

html[data-theme="light"] .parts-table th,
html[data-theme="light"] .consult-table th {
  color: #ffffff;
  background: #174a6a;
  border-color: #174a6a;
}

html[data-theme="light"] .parts-table td,
html[data-theme="light"] .consult-table td {
  border-color: #bfd3e1;
}

html[data-theme="light"] :is(
  .catalog-search-panel,
  .notebook-editor,
  .notebook-library,
  .upgrades-panel
) {
  background: #edf5f9;
  border-color: #afc8d8;
}

html[data-theme="light"] :is(
  .catalog-category-card,
  .quick-product-row,
  .catalog-row,
  .computer-model-card,
  .ai-option-card,
  .notebook-catalog-card,
  .notebook-model-card,
  .part-library-item,
  .part-model-card,
  .upgrade-row
) {
  background: #ffffff;
  border-color: #afc8d8;
}

html[data-theme="light"] :is(.notebook-option, .part-option, .selected-notebook, .selected-part) {
  color: #102a43;
  background: #ffffff;
  border-color: #91b8ce;
}

html[data-theme="light"] .selected-notebook {
  box-shadow: 0 8px 22px rgba(31, 73, 101, 0.1);
}

html[data-theme="light"] .selected-sale-price,
html[data-theme="light"] .selected-notebook-specs > label {
  background: #e5f2f8;
  border-color: #159fd8;
}

html[data-theme="light"] .selected-sale-price > span:first-child,
html[data-theme="light"] .selected-notebook-specs span {
  color: #3f6278;
}

html[data-theme="light"] .quote-part-items {
  color: #102a43;
  background: #ffffff;
  border-color: #91b8ce;
  box-shadow: 0 8px 22px rgba(31, 73, 101, 0.1);
}

html[data-theme="light"] .quote-part-items > header {
  background: #dcecf4;
  border-color: #aac4d5;
}

html[data-theme="light"] .quote-part-items > header h3,
html[data-theme="light"] .quote-part-item-copy strong {
  color: #0b3658;
}

html[data-theme="light"] .quote-part-item {
  background: #ffffff;
}

html[data-theme="light"] .quote-part-item:nth-child(even) {
  background: #f3f8fb;
}

html[data-theme="light"] .quote-part-item + .quote-part-item {
  border-color: #bfd3e1;
}

html[data-theme="light"] .quote-part-item-copy small {
  color: #547086;
}

html[data-theme="light"] .quote-part-item-price,
html[data-theme="light"] .part-individual-value strong {
  color: #00749e;
}

html[data-theme="light"] .part-sum-toggle {
  color: #31576f;
}

html[data-theme="light"] .part-individual-value {
  background: #ffffff;
  border-color: #afc8d8;
}

html[data-theme="light"] .part-individual-value span {
  color: #3f6278;
}

html[data-theme="light"] .settings-section h2,
html[data-theme="light"] .part-library-heading strong {
  color: #0b3658;
}

html[data-theme] .theme-icon-toggle {
  color: #ffffff;
  background: #061829;
  border-color: rgba(56, 189, 248, 0.38);
}

html[data-theme="light"] .theme-icon-toggle {
  background: #d9edf6;
  border-color: #62bddf;
}

html[data-theme="dark"] .theme-toggle-thumb {
  color: #ffffff;
  background: #0d527a;
}

html[data-theme="light"] .theme-toggle-thumb {
  color: #ffffff;
  background: #0877aa;
  transform: translateX(20px);
}

html[data-theme] .theme-icon-toggle:hover,
html[data-theme] .theme-icon-toggle:focus-visible {
  color: #ffffff;
  border-color: #66d2f5;
}


/* Catalog cards keep media and content clearly separated in the light theme. */
html[data-theme="light"] :is(.notebook-model-card, .part-model-card) {
  color: #102a43;
  background: #ffffff;
  border-color: #8eb5cc;
  box-shadow: 0 8px 22px rgba(31, 73, 101, 0.09);
}

html[data-theme="light"] :is(.notebook-model-image, .part-model-image) {
  color: #526b82;
  background: #f2f6f9;
  border-bottom: 1px solid #b7cfdd;
}

html[data-theme="light"] :is(.notebook-model-content, .part-model-content) {
  color: #102a43;
  background: #ffffff;
}

html[data-theme="light"] :is(.notebook-model-content > span, .part-model-content > span) {
  color: #00749e;
}

html[data-theme="light"] :is(.notebook-model-content h3, .part-model-content h2) {
  color: #0b3658;
}

html[data-theme="light"] .notebook-model-specs div {
  background: #e3f0f6;
  border-left-color: #0788b7;
}

html[data-theme="light"] .notebook-model-specs small {
  color: #49677a;
}

html[data-theme="light"] .notebook-model-specs strong {
  color: #0b3658;
}

html[data-theme="light"] .notebook-model-price {
  color: #082f4b;
}

html[data-theme="light"] :is(.notebook-model-price small, .part-model-price small) {
  color: #49677a;
}

html[data-theme="light"] .part-model-content > p {
  color: #48677c;
}

html[data-theme="light"] .part-model-price strong {
  color: #082f4b;
}

html[data-theme="light"] .part-model-actions .secondary-button {
  color: #0b5175;
  background: #e7f2f7;
  border-color: #aac7d8;
}

html[data-theme="light"] .part-model-actions .danger-button {
  color: #a9283b;
  background: #fff0f2;
  border: 1px solid #e9aab4;
}

/* Summary panels use explicit light colors so dark-theme controls never bleed through. */
html[data-theme="light"] .summary-panel {
  color: #12344d;
  background: #f7fbfd;
  border-color: #8fb3c8;
}

html[data-theme="light"] .summary-panel .summary-title,
html[data-theme="light"] .summary-panel .part-summary-title {
  color: #ffffff;
  background: #0b3658;
  border-color: #0b3658;
}

html[data-theme="light"] .summary-panel :is(.summary-title, .part-summary-title) :is(span, label, input) {
  color: #ffffff;
}

html[data-theme="light"] .summary-panel .summary-row > span:first-child {
  color: #315a73;
}

html[data-theme="light"] .summary-panel .summary-money-field {
  color: #102a43;
  background: #ffffff;
  border-color: #9ebed1;
}

html[data-theme="light"] .summary-panel .summary-money-field > span {
  color: #ffffff;
  background: #0877aa;
}

html[data-theme="light"] .summary-panel .summary-money-field input {
  color: #102a43;
  background: transparent;
}

html[data-theme="light"] .summary-panel .payment-strip {
  background: #e8f2f7;
  border-color: #8fb3c8;
}

html[data-theme="light"] .summary-panel .payment-strip .payment-option {
  color: #12344d;
  background: #edf5f9;
  border-color: #9ebed1;
}

html[data-theme="light"] .summary-panel :is(
  .cash-payment-copy > label,
  .cash-payment-copy > .notebook-payment-label,
  .payment-option > label,
  .installment-count-input
) {
  color: #315a73;
}

html[data-theme="light"] .summary-panel .cash-payment-note {
  color: #48677c;
}

html[data-theme="light"] .summary-panel .installment-count-input input {
  color: #12344d;
  background: transparent;
  border-color: #68a7c5;
  box-shadow: none;
}

html[data-theme="light"] .summary-panel .installment-count-input:focus-within input {
  color: #0b3658;
}

html[data-theme="light"] .summary-panel .payment-money-field {
  background: #ffffff;
  border-color: #dda7b1;
}

html[data-theme="light"] .summary-panel .payment-money-field > span {
  color: #ffffff;
  background: #cf354f;
}

html[data-theme="light"] .summary-panel .payment-money-field input {
  color: #bd2945;
  background: transparent;
}

html[data-theme="light"] .summary-panel .payment-money-input {
  background: #ffffff;
  border-color: #9ebed1;
}

html[data-theme="light"] .summary-panel .payment-money-input input {
  color: currentColor;
  background: transparent;
  box-shadow: none;
}

/* Complete light-theme contrast audit across quoting and administration modules. */
html[data-theme="light"] :is(.muted-note, .form-message, .ai-message) {
  color: #48677c;
}

html[data-theme="light"] :is(.section-head h2, .parts-catalog-header h1, .catalog-search-panel h2) {
  color: #0b3658;
}

/* Summary and pricing controls */
html[data-theme="light"] .summary-panel .summary-percent-input {
  color: #ffffff;
  background: #0e527b;
  border-color: #58b5d7;
}

html[data-theme="light"] .summary-panel .summary-percent-input input {
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  -webkit-text-fill-color: #ffffff;
}

html[data-theme="light"] .summary-panel .summary-percent-input span {
  color: #dff6ff;
}

html[data-theme="light"] .summary-panel .summary-percent-input:focus-within {
  border-color: #8ddcf4;
  box-shadow: 0 0 0 3px rgba(8, 127, 184, 0.2);
}

html[data-theme="light"] .summary-panel .summary-money-input {
  color: #102a43;
  background: #ffffff;
  border-color: #9ebed1;
}

html[data-theme="light"] .summary-panel .summary-money-input > span {
  color: #315a73;
}

html[data-theme="light"] .summary-panel .summary-money-input input {
  color: #102a43;
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] .summary-panel .summary-reset-button {
  color: #315a73;
  background: #edf5f9;
  border-color: #9ebed1;
}

html[data-theme="light"] .summary-panel .summary-reset-button:hover,
html[data-theme="light"] .summary-panel .summary-reset-button:focus-visible {
  color: #ffffff;
  background: #0e527b;
  border-color: #0e527b;
}

/* Auxiliary actions */
html[data-theme="light"] :is(
  .inline-search-button,
  .inline-register-button,
  .catalog-result-button,
  .product-link
) {
  color: #0b5175;
  background: #e3f1f7;
  border-color: #9fc4d7;
}

html[data-theme="light"] :is(
  .inline-search-button,
  .inline-register-button,
  .catalog-result-button,
  .product-link
):hover,
html[data-theme="light"] :is(
  .inline-search-button,
  .inline-register-button,
  .catalog-result-button,
  .product-link
):focus-visible {
  color: #ffffff;
  background: #0877aa;
  border-color: #0877aa;
}

html[data-theme="light"] :is(.inline-register-button, .catalog-result-button):disabled {
  color: #247460;
  background: #e5f5ef;
  border-color: #8dc9b8;
  opacity: 1;
}

html[data-theme="light"] :is(.icon-button, .notebook-edit-button, .quote-part-icon-button) {
  color: #0b5175;
  background: #eef5fa;
  border-color: #aac7d8;
}

html[data-theme="light"] :is(
  .danger-button,
  .remove-component,
  .upgrade-remove,
  .part-remove-financing
) {
  color: #a9283b;
  background: #fff0f2;
  border-color: #e4a2ad;
}

html[data-theme="light"] :is(
  .danger-button,
  .remove-component,
  .upgrade-remove,
  .part-remove-financing
):hover,
html[data-theme="light"] :is(
  .danger-button,
  .remove-component,
  .upgrade-remove,
  .part-remove-financing
):focus-visible {
  color: #ffffff;
  background: #b92f45;
  border-color: #b92f45;
}

/* Search results, selectors and cards */
html[data-theme="light"] :is(
  .suggestion-option,
  .component-picker-option,
  .row-mode-toggle,
  .default-choice
) {
  color: #17374e;
  background: #ffffff;
  border-color: #afc8d8;
}

html[data-theme="light"] :is(
  .suggestion-option:hover,
  .suggestion-option:focus-within,
  .suggestion-option.is-selected,
  .component-picker-option:hover,
  .component-picker-option:focus-visible
) {
  color: #0b3658;
  background: #e3f2f8;
  border-color: #159fd8;
}

html[data-theme="light"] :is(.suggestion-price, .default-choice, .component-picker-option strong) {
  color: #0b3658;
}

html[data-theme="light"] :is(.suggestion-meta, .component-picker-option small) {
  color: #48677c;
}

html[data-theme="light"] :is(.component-picker-menu, .row-mode-menu) {
  color: #17374e;
  background: #ffffff;
  border-color: #91b8ce;
  box-shadow: 0 16px 34px rgba(31, 73, 101, 0.18);
}

/* Notebook and loose-part quoting */
html[data-theme="light"] .notebook-money-input {
  color: #102a43;
  background: #ffffff;
  border-color: #9ebed1;
}

html[data-theme="light"] .notebook-money-input b {
  color: #ffffff;
  background: #0877aa;
}

html[data-theme="light"] .notebook-money-input input {
  color: #102a43;
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] :is(.selected-notebook-image, .selected-part-image) {
  color: #526b82;
  background: #f5f8fa;
  border-color: #b7cfdd;
}

html[data-theme="light"] :is(.notebook-option-image, .part-option-image) {
  color: #526b82;
  background: #f5f8fa;
  border-color: #b7cfdd;
}

html[data-theme="light"] :is(.notebook-option-content p, .part-option-content p) {
  color: #48677c;
}

html[data-theme="light"] :is(.notebook-option-actions a, .part-option-actions a) {
  color: #ffffff;
  background: #0877aa;
  border-color: #0877aa;
}

html[data-theme="light"] :is(.notebook-option.is-registered, .part-option.is-registered) {
  background: #e7f6f1;
  border-color: #69b9a3;
}

html[data-theme="light"] .part-installment-field > span:first-child {
  color: #48677c;
}

html[data-theme="light"] :is(.part-installment-count, .part-installment-money) {
  color: #102a43;
  background: #ffffff;
  border-color: #9ebed1;
}

html[data-theme="light"] .part-installment-count input {
  color: #102a43;
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] :is(.part-quick-photo-field, .part-quick-description-heading label) {
  color: #48677c;
}

/* Catalog editors and photo areas */
html[data-theme="light"] :is(.photo-drop-zone, .part-photo-drop) {
  color: #48677c;
  background: #f2f7fa;
  border-color: #83b7d1;
}

html[data-theme="light"] :is(.photo-drop-zone, .part-photo-drop):hover,
html[data-theme="light"] :is(.photo-drop-zone, .part-photo-drop):focus-visible,
html[data-theme="light"] :is(.photo-drop-zone.is-dragging, .part-photo-drop.is-dragover) {
  color: #0b5175;
  background: #e3f2f8;
  border-color: #0877aa;
}

html[data-theme="light"] :is(.photo-drop-empty strong, .part-photo-drop b) {
  color: #0b3658;
}

html[data-theme="light"] :is(.photo-drop-empty small, .part-photo-drop small) {
  color: #48677c;
}

html[data-theme="light"] :is(.notebook-catalog-thumb, .part-library-thumb) {
  color: #526b82;
  background: #f5f8fa;
  border-color: #b7cfdd;
}

html[data-theme="light"] .notebook-cash-field {
  color: #176b56;
  background: #e9f7f2;
  border-color: #82c5b2;
}

html[data-theme="light"] .notebook-cash-field > span {
  color: #ffffff;
  background: #14866d;
}

html[data-theme="light"] .notebook-cash-field input {
  color: #176b56;
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] .notebook-cash-field button {
  color: #176b56;
  background: #d9f0e8;
  border-color: #82c5b2;
}

html[data-theme="light"] .notebook-cash-field button:hover,
html[data-theme="light"] .notebook-cash-field button:focus-visible {
  color: #ffffff;
  background: #14866d;
  border-color: #14866d;
}

html[data-theme="light"] :is(.notebook-main-fields input, .notebook-spec-fields input, .notebook-library-search) {
  color: #102a43;
  background: #ffffff;
  border-color: #afc8d8;
}

html[data-theme="light"] .parts-table tr.is-service td {
  color: #174a6a;
  background: #e8f5fa;
}

html[data-theme="light"] :is(
  .catalog-category-card:hover,
  .catalog-category-card:focus-visible,
  .catalog-category-card.is-active
) .category-card-label > :is(i, svg) {
  color: #0b5175;
}

html[data-theme="light"] :is(.login-box, .result-row, .settings-section) .ghost-link {
  color: #0b5175;
  background: #eef5fa;
  border-color: #aac7d8;
}

html[data-theme="light"] .part-form-actions a {
  color: #0b5175;
  background: #eef5fa;
  border-color: #aac7d8;
}

/* Administration, tables and status surfaces */
html[data-theme="light"] :is(.password-section, .catalog-quick-panel, .catalog-panel, .models-panel, .consult-panel) {
  color: #17374e;
  background: #ffffff;
  border-color: #afc8d8;
}

html[data-theme="light"] :is(.quick-product-row, .catalog-row, .part-library-item, .notebook-catalog-card) {
  color: #17374e;
  background: #ffffff;
  border-color: #afc8d8;
}

html[data-theme="light"] :is(.quick-product-row small, .catalog-row small, .part-library-item small, .notebook-catalog-card small) {
  color: #48677c;
}

html[data-theme="light"] :is(.settings-section .setting-toggle, .part-sum-toggle) {
  color: #315a73;
  background: #edf5f9;
  border-color: #aac7d8;
}

html[data-theme="light"] :is(
  input:disabled,
  textarea:disabled,
  select:disabled,
  [data-admin-only]:disabled
) {
  color: #4b687a;
  background: #edf3f6;
  border-color: #b6cbd8;
  opacity: 1;
  -webkit-text-fill-color: #4b687a;
}

html[data-theme="light"] .summary-panel .summary-percent-input input:disabled {
  color: #ffffff;
  background: transparent;
  -webkit-text-fill-color: #ffffff;
}

html[data-theme="light"] :is(
  .summary-money-input input:disabled,
  .summary-money-field input:disabled,
  .payment-money-field input:disabled,
  .payment-money-input input:disabled
) {
  background: transparent;
  opacity: 1;
}

html[data-theme="light"] :is(
  .summary-money-input input:disabled,
  .summary-money-field input:disabled
) {
  color: #102a43;
  -webkit-text-fill-color: #102a43;
}

html[data-theme="light"] .payment-money-field input:disabled {
  color: #bd2945;
  -webkit-text-fill-color: #bd2945;
}

html[data-theme="light"] .payment-money-input.is-installment input:disabled {
  color: #00749e;
  -webkit-text-fill-color: #00749e;
}

html[data-theme="light"] :is(.status-success, .notebook-ai-status.is-success) {
  color: #176b56;
}

html[data-theme="light"] :is(.status-warning, .notebook-ai-status.is-loading) {
  color: #9a5600;
}

html[data-theme="light"] :is(.status-error, .form-message.is-error) {
  color: #a9283b;
}

/* Backup controls keep explicit contrast in the light admin theme. */
html[data-theme="light"] .backup-heading p,
html[data-theme="light"] .backup-security-note {
  color: #315a73;
}

html[data-theme="light"] .backup-status-badge {
  color: #274e68;
  background: #edf5f9;
  border-color: #9ebfd1;
}

html[data-theme="light"] .backup-status-badge[data-status="working"] {
  color: #006f9b;
  background: #dceff7;
  border-color: #65a9c5;
}

html[data-theme="light"] .backup-status-badge[data-status="success"] {
  color: #176b56;
  background: #e3f5ef;
  border-color: #7db9a8;
}

html[data-theme="light"] .backup-status-badge[data-status="error"] {
  color: #a9283b;
  background: #fbe8eb;
  border-color: #d78b98;
}

html[data-theme="light"] .backup-dialog {
  color: #17374e;
  background: #ffffff;
  border-color: #8fb7ca;
  box-shadow: 0 24px 70px rgba(25, 65, 90, 0.24);
}

html[data-theme="light"] .backup-dialog::backdrop {
  background: rgba(10, 34, 52, 0.58);
}

html[data-theme="light"] .backup-dialog h2,
html[data-theme="light"] .backup-dialog strong {
  color: #0b3658;
}

html[data-theme="light"] .backup-dialog p {
  color: #365c73;
}

html[data-theme="light"] .backup-dialog-close {
  color: #315a73;
  background: #edf5f9;
  border-color: #a8c4d4;
}

html[data-theme="light"] .backup-dialog-close:hover,
html[data-theme="light"] .backup-dialog-close:focus-visible {
  color: #0b3658;
  background: #dceef6;
  border-color: #2887ad;
}

html[data-theme="light"] .backup-dialog-warning {
  color: #7d2938;
  background: #fceff1;
}
/* Registration page contrast and hierarchy. */
html[data-theme="light"] .catalog-search-panel > label {
  color: #0b3658;
}

html[data-theme="light"] .catalog-result-count {
  color: #00749e;
}

html[data-theme="light"] :is(
  .notebook-main-fields label,
  .notebook-spec-fields label,
  .part-form-fields label > span
) {
  color: #315a73;
}

/* Parts summary toggle needs its own contrast inside the dark-blue title. */
html[data-theme="light"] .summary-panel .part-summary-title .part-sum-toggle {
  color: #0b3658;
  background: #dceef6;
  border-color: #78abc4;
}

html[data-theme="light"] .summary-panel .part-summary-title .part-sum-toggle span {
  color: inherit;
}

html[data-theme="light"] .summary-panel .part-summary-title .part-sum-toggle:hover,
html[data-theme="light"] .summary-panel .part-summary-title .part-sum-toggle:focus-within {
  color: #072b47;
  background: #c9e5f1;
  border-color: #1783ad;
}

html[data-theme="light"] .summary-panel .part-summary-title .part-sum-toggle input {
  accent-color: #0088b8;
}

@media (max-width: 600px) {
  .theme-icon-toggle {
    width: 46px;
    min-width: 46px;
    height: 26px;
    min-height: 26px;
  }

  .theme-icon-toggle.is-floating {
    top: 8px;
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-icon-toggle,
  .theme-toggle-thumb,
  .theme-icon {
    transition: none;
  }
}

@media print {
  .theme-icon-toggle {
    display: none !important;
  }
}

html[data-theme="light"] .backup-email-panel {
  border-color: #a9c6dc;
  background: #edf6fc;
}

html[data-theme="light"] .backup-email-heading h3,
html[data-theme="light"] .backup-history-heading h3,
html[data-theme="light"] .backup-history-item strong {
  color: #083454;
}

html[data-theme="light"] .backup-email-heading p,
html[data-theme="light"] .backup-history-heading span,
html[data-theme="light"] .backup-time-zone,
html[data-theme="light"] .backup-history-item span,
html[data-theme="light"] .backup-history-item p,
html[data-theme="light"] .backup-history-empty {
  color: #315d7c;
}

html[data-theme="light"] .backup-email-toggle {
  border-color: #79a9c9;
  background: #d9eef9;
  color: #073b5d;
}

html[data-theme="light"] .backup-schedule-grid,
html[data-theme="light"] .backup-history {
  border-color: #b6d0e2;
}

html[data-theme="light"] .backup-history-item {
  border-color: #b0cce0;
  background: #ffffff;
}