:root {
  --cash-pink: #ff3677;
  --cash-navy: #22253b;
  --cash-heading: #22253b;
  --cash-bg: #f5f5f4;
  --cash-panel: #ffffff;
  --cash-border: #d2d9e1;
  --cash-muted: #888888;
  --cash-shadow: 0 12px 38px rgba(34, 37, 59, .11);
  --cash-hero: #22253b;
  --cash-hero-height: 270px;
}

* { box-sizing: border-box; }
body { background: linear-gradient(to bottom, var(--cash-hero) 0, var(--cash-hero) var(--cash-hero-height), var(--cash-bg) var(--cash-hero-height), var(--cash-bg) 100%); color: var(--cash-navy); }
button, input { font: inherit; }
button { touch-action: manipulation; }
.cash-counter-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 56px; }
.app-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 0 0 22px; }
.counter-title { margin: 0; color: #f8f8fa !important; font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.title-stack { min-width: 0; }
.byline { display: flex; align-items: center; gap: 9px; margin: 12px 0 0; color: #c4c6cf; font-size: 1.05rem; line-height: 1; }
.byline a { display: inline-flex; align-items: center; }
.byline img { display: block; width: 172px; height: auto; }
.header-controls { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.currency-control { position: relative; display: inline-flex; align-items: center; gap: 7px; width: 96px; height: 42px; padding: 4px 10px 4px 6px; color: var(--cash-navy); background: var(--cash-panel); border: 1px solid var(--cash-border); border-radius: 999px; cursor: pointer; }
.currency-control img { display: block; width: 27px; height: 27px; border-radius: 50%; object-fit: cover; }
.currency-control > span:not(.sr-only) { font-size: .78rem; font-weight: 700; line-height: 1; }
.currency-control select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.currency-control option { color: #22253b; background: #fff; }
.currency-control select:focus-visible { outline: 2px solid var(--cash-pink); outline-offset: 2px; }
.currency-control:hover, .currency-control:focus-within { color: var(--cash-pink); border-color: var(--cash-pink); }
.theme-toggle { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; color: var(--cash-navy); background: var(--cash-panel); border: 1px solid var(--cash-border); border-radius: 50%; }
.theme-toggle:hover { color: var(--cash-pink); border-color: var(--cash-pink); }
.counter-grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(330px, .84fr); gap: 24px; align-items: start; }
.entry-column, .summary-column { display: grid; gap: 24px; }
.summary-column { position: sticky; top: 20px; }
.panel { background: var(--cash-panel); border-radius: 18px; box-shadow: var(--cash-shadow); padding: clamp(20px, 3vw, 32px); }
.panel h2 { margin: 0 0 20px; color: var(--cash-navy); font-size: clamp(1.35rem, 2.5vw, 1.7rem); }
.panel h2 i { margin-right: 7px; color: var(--cash-pink); font-size: .85em; }
.card-title-icon { display: inline-block; width: 1em; height: 1em; margin: 0 7px -1px 0; vertical-align: baseline; background-color: var(--cash-pink); -webkit-mask: url("../images/icons/coins-rolls-solid.svg?v=20260911a") center / contain no-repeat; mask: url("../images/icons/coins-rolls-solid.svg?v=20260911a") center / contain no-repeat; }
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 54px; height: 29px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-slider { width: 100%; height: 100%; background: #c8c9cd; border-radius: 999px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); cursor: pointer; transition: .2s ease; }
.switch-slider::after { content: ""; display: block; width: 25px; height: 25px; margin: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: .2s ease; }
.switch input:checked + .switch-slider { background: var(--cash-pink); }
.switch input:checked + .switch-slider::after { transform: translateX(25px); }
.switch input:focus-visible + .switch-slider { outline: 3px solid rgba(255, 54, 119, .3); outline-offset: 2px; }
.options-panel { padding-bottom: 24px; }
.options-panel h2 { margin-bottom: 10px; }
.option-row, .sales-tax-rate { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; padding: 8px 0; color: var(--cash-navy); border-bottom: 1px solid #edf0f3; font-size: .96rem; font-weight: 500; }
.option-label { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.tooltip-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.tooltip-trigger { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; color: var(--cash-pink); background: transparent; border: 0; border-radius: 50%; font-size: .8rem; cursor: help; }
.tooltip-trigger:hover, .tooltip-trigger:focus-visible { color: #fff; background: var(--cash-pink); outline: none; }
.tooltip-content { position: absolute; z-index: 8; top: calc(100% + 9px); left: 50%; width: max-content; max-width: min(280px, calc(100vw - 48px)); padding: 10px 12px; visibility: hidden; color: #fff; background: #22253b; border: 1px solid rgba(255, 255, 255, .55); border-radius: 8px; box-shadow: 0 10px 26px rgba(0, 0, 0, .22); font-size: .76rem; font-weight: 400; line-height: 1.4; opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(-3px); transition: opacity .16s ease, transform .16s ease, visibility .16s ease; }
.tooltip-content::before { position: absolute; bottom: 100%; left: 50%; width: 0; height: 0; border-right: 6px solid transparent; border-bottom: 6px solid #22253b; border-left: 6px solid transparent; content: ""; transform: translateX(-50%); }
.tooltip-wrap:hover .tooltip-content, .tooltip-wrap:focus-within .tooltip-content { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(0); }
.sales-tax-rate { position: relative; border-bottom: 0; }
.rate-field { display: inline-flex; align-items: center; width: 126px; height: 36px; overflow: hidden; color: var(--cash-navy); border: 1px solid var(--cash-border); border-radius: 9px; }
.rate-field input { width: 100%; min-width: 0; height: 100%; padding: 4px 2px 4px 8px; color: inherit; background: transparent; border: 0; text-align: right; }
.rate-field span { padding-right: 9px; color: var(--cash-muted); }
.rate-field input:focus { outline: none; }
.rate-field:focus-within { border-color: var(--cash-pink); box-shadow: 0 0 0 3px rgba(255, 54, 119, .15); }
.rate-field:has(.is-invalid) { border-color: #dc3545; box-shadow: 0 0 0 3px rgba(220, 53, 69, .12); }
.denomination-panel { padding-bottom: 24px; }
.denomination-panel h2 { margin-bottom: 16px; }
.denomination-list { display: grid; gap: 9px; }
.denomination-row { position: relative; display: grid; grid-template-columns: 50px 13px 32px minmax(62px, 90px) 32px 13px minmax(96px, 1fr); gap: 7px; align-items: center; min-height: 40px; }
.rolls-panel .denomination-row { grid-template-columns: 65px 13px 32px minmax(62px, 90px) 32px 13px minmax(96px, 1fr); }
.denomination-label, .multiplier, .equals { font-size: 1rem; color: var(--cash-navy); }
.denomination-label { font-weight: 500; white-space: nowrap; }
.multiplier, .equals { text-align: center; }
.stepper { display: contents; }
.round-button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: var(--cash-pink); background: transparent; border: 2px solid var(--cash-pink); border-radius: 50%; font-size: .95rem; font-weight: 700; line-height: 1; }
.round-button:hover { color: #fff; background: var(--cash-pink); }
.round-button.plus { color: #fff; background: var(--cash-pink); }
.round-button.plus:hover { background: #e72666; border-color: #e72666; }
.count-input, .amount-input { width: 100%; height: 36px; padding: 3px 8px; color: var(--cash-navy); background: transparent; border: 1px solid var(--cash-border); border-radius: 9px; font-size: .98rem; text-align: center; }
.amount-input { color: var(--cash-navy); border-color: #edf0f3; text-align: right; }
.denomination-row.is-zero .amount-input { color: #c5cbd3; }
.denomination-row:not(.is-zero) .amount-input { border-color: var(--cash-border); }
.denomination-row.is-editing { grid-template-columns: 50px 13px minmax(0, 1fr) 13px minmax(96px, 1fr); }
.rolls-panel .denomination-row.is-editing { grid-template-columns: 65px 13px minmax(0, 1fr) 13px minmax(96px, 1fr); }
.denomination-row.is-editing .round-button { display: none; }
.denomination-row.is-invalid .amount-input, .denomination-row.is-invalid .count-input { border-color: #dc3545; box-shadow: 0 0 0 3px rgba(220, 53, 69, .12); }
.denomination-row.is-invalid:has(.field-error) .count-input:not(.is-invalid), .denomination-row.is-invalid:has(.field-error) .amount-input:not(.is-invalid) { border-color: var(--cash-border); box-shadow: none; }
.field-error { position: absolute; z-index: 9; top: calc(100% + 8px); left: 0; width: min(100%, 360px); padding: 10px 12px; color: #fff; background: #22253b; border: 1px solid rgba(255, 255, 255, .55); border-radius: 8px; box-shadow: 0 10px 26px rgba(0, 0, 0, .24); font-size: .76rem; font-weight: 400; line-height: 1.4; pointer-events: none; }
.field-error::before { position: absolute; bottom: 100%; left: clamp(12px, var(--error-anchor), calc(100% - 12px)); width: 0; height: 0; border-right: 6px solid transparent; border-bottom: 6px solid #22253b; border-left: 6px solid transparent; content: ""; transform: translateX(-50%); }
.sales-tax-rate .field-error { right: 0; left: auto; width: min(100%, 360px); }
.sales-tax-rate .field-error::before { left: auto; right: 50px; transform: none; }
.totals-panel { padding-bottom: 26px; }
.totals-list { margin: 0; }
.totals-list > div { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid #edf0f3; }
.totals-list dt, .totals-list dd { margin: 0; color: var(--cash-navy); font-size: 1rem; }
.totals-list dd { font-variant-numeric: tabular-nums; font-weight: 500; text-align: right; }
.totals-list .total { padding-top: 16px; border-top: 2px solid #22253b; border-bottom: 0; text-transform: uppercase; }
.totals-list .total dt, .totals-list .total dd { font-size: 1.15rem; font-weight: 700; }
.sales-totals { margin-top: 22px; padding-top: 16px; border-top: 2px solid var(--cash-border); }
.tax-totals > div { padding-top: 16px; border-top: 1px solid var(--cash-border); border-bottom: 0; }
.compact-switch { width: 48px; height: 26px; }
.compact-switch .switch-slider::after { width: 22px; height: 22px; }
.compact-switch input:checked + .switch-slider::after { transform: translateX(22px); }
.action-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 22px; }
.action-button, .clear-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 9px 10px; font-size: .83rem; line-height: 1; white-space: nowrap; }
.action-button i, .clear-button i { display: inline-grid; place-items: center; line-height: 1; transform: translateY(-.5px); }
.export-menu { position: relative; min-width: 0; }
.export-toggle { width: 100%; }
.export-toggle[aria-expanded="true"] .fa-caret-down { transform: rotate(180deg); }
.export-options { position: absolute; z-index: 5; top: calc(100% + 7px); left: 0; right: 0; display: grid; gap: 2px; min-width: 150px; padding: 6px; background: var(--cash-panel); border: 1px solid var(--cash-border); border-radius: 10px; box-shadow: 0 12px 28px rgba(34, 37, 59, .2); }
.export-options[hidden] { display: none; }
.export-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 39px; padding: 8px 10px; color: var(--cash-heading); background: transparent; border: 0; border-radius: 7px; font-size: .85rem; text-align: left; cursor: pointer; }
.export-option:hover, .export-option:focus-visible { color: var(--cash-pink); background: #fdd5df; outline: none; }
.clear-button { color: #fff; background: #dc3545; border: 1px solid #dc3545; }
.clear-button::after { display: none; }
.clear-button:hover, .clear-button:focus-visible { color: #dc3545; background: #fdd5df; border-color: #fdd5df; }
.panel.promo-carousel { position: relative; overflow: hidden; padding: 0; background: transparent; }
.cash-promo-slider { position: relative; }
.cash-promo-slider:not(.slick-initialized) .promo-slide:not(:first-child) { display: none; }
.promo-carousel .slick-track { display: flex; }
.promo-carousel .slick-slide { display: grid; flex: 0 0 auto; float: none; height: auto; }
.promo-slide { min-height: 540px; padding-bottom: 48px; }
.promo-slide h2 { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.1rem); line-height: 1.12; }
.promo-slide p { line-height: 1.42; }
.promo-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 10px 18px; border-radius: 8px; font-size: .9rem; font-weight: 700; text-decoration: none; }
.promo-carousel .slick-dots { position: absolute; z-index: 4; right: 0; bottom: 12px; left: 0; display: flex; justify-content: center; gap: 8px; width: max-content; margin: 0 auto; padding: 7px 10px; background: rgba(34, 37, 59, .86); border-radius: 999px; list-style: none; }
.promo-carousel .slick-dots li { display: flex; margin: 0; }
.promo-carousel .slick-dots button { width: 9px; height: 9px; padding: 0; overflow: hidden; color: transparent; background: rgba(255, 255, 255, .52); border: 0; border-radius: 999px; font-size: 0; cursor: pointer; transition: width .2s ease, background-color .2s ease; }
.promo-carousel .slick-dots button:hover, .promo-carousel .slick-dots button:focus-visible { background: #fff; outline: 2px solid #fff; outline-offset: 2px; }
.promo-carousel .slick-dots .slick-active button { width: 25px; background: #fff; }
.xero-promo { gap: 0; color: #fff; background: #23435f; text-align: center; }
.xero-promo-content { display: grid; justify-items: center; gap: 18px; padding: 30px 26px 18px; }
.xero-promo-logo { display: block; width: min(145px, 58%); height: auto; }
.xero-promo h2 { color: #fff !important; }
.xero-promo-copy { max-width: 25ch; margin: 0; color: #fff; font-size: 1rem; line-height: 1.42; }
.xero-promo-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 10px 18px; color: #064e68 !important; background: #c0f1ff; border: 1px solid #c0f1ff; border-radius: 8px; font-size: .9rem; font-weight: 700; text-decoration: none; }
.xero-promo-link:hover, .xero-promo-link:focus-visible { color: #fff !important; background: #13b5ea; border-color: #13b5ea; }
.xero-promo-art { display: block; width: 74%; margin: 0 auto; }
.bookkeeping-promo { grid-template-rows: auto 1fr; color: #fff; background: #22253b; text-align: center; }
.bookkeeping-promo-content { display: grid; justify-items: center; gap: 14px; padding: 28px 26px 8px; }
.bookkeeping-promo-logo { display: block; width: min(185px, 68%); height: auto; }
.bookkeeping-promo h2 { max-width: 15ch; color: #fff !important; }
.bookkeeping-promo p { max-width: 31ch; margin: 0; color: #c4c6cf; font-size: .95rem; }
.balanceable-promo-button { color: #fff !important; background: var(--cash-pink); border: 1px solid var(--cash-pink); }
.balanceable-promo-button:hover, .balanceable-promo-button:focus-visible { color: var(--cash-pink) !important; background: #fdd5df; border-color: #fdd5df; }
.bookkeeping-promo-art { align-self: end; display: block; width: 68%; max-height: 245px; margin: 8px auto 0; object-fit: contain; }
.domain-promo { place-items: center; color: #22253b; background: #fff; text-align: center; }
.domain-promo-content { display: grid; justify-items: center; gap: 18px; width: 100%; padding: 34px 28px 18px; }
.domain-promo-logo { display: block; width: min(230px, 78%); height: auto; }
.domain-promo h2 { max-width: 15ch; color: #22253b !important; }
.domain-promo p { max-width: 31ch; margin: 0; color: #656878; font-size: .95rem; }
.domain-search-visual { display: grid; justify-items: center; gap: 13px; width: 100%; margin: 12px 0 4px; }
.domain-search-visual > i { display: grid; place-items: center; width: 78px; height: 78px; color: #fff; background: #a90c0e; border-radius: 50%; font-size: 2.15rem; box-shadow: 0 12px 28px rgba(169, 12, 14, .2); }
.domain-search-visual span { display: block; width: min(100%, 310px); padding: 13px 16px; overflow: hidden; color: #22253b; background: #fff; border: 3px solid rgba(169, 12, 14, .3); border-radius: 10px; font-size: .92rem; font-weight: 700; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.domain-search-visual small { margin-right: 2px; color: #697386; font: inherit; font-weight: 400; }
.domain-promo-button { color: #fff !important; background: #a90c0e; border: 1px solid #a90c0e; }
.domain-promo-button:hover, .domain-promo-button:focus-visible { color: #a90c0e !important; background: #f1d6d6; border-color: #f1d6d6; }
.page-footer { display: grid; justify-items: center; gap: 10px; padding: 46px 16px 4px; text-align: center; }
.page-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; color: var(--cash-navy); font-size: 1rem; }
.page-footer nav a { color: var(--cash-navy); }
.icon-attribution { color: var(--cash-muted); font-size: .875rem; }
.icon-attribution a { color: inherit; text-decoration: underline; }
.page-footer small { color: var(--cash-muted); font-size: .875rem; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; background: rgba(21, 24, 41, .5); }
.dialog-backdrop[hidden] { display: none; }
.clear-dialog { width: min(100%, 420px); padding: 28px; background: var(--cash-panel); border-radius: 16px; box-shadow: 0 18px 48px rgba(0, 0, 0, .24); }
.clear-dialog h2 { margin: 0 0 9px; font-size: 1.45rem; }
.clear-dialog p { margin: 0; color: var(--cash-muted); line-height: 1.5; }
.dialog-actions { display: flex; justify-content: end; gap: 10px; margin-top: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 820px) {
  :root { --cash-hero-height: 230px; }
  .cash-counter-shell { width: min(620px, calc(100% - 24px)); padding-top: 24px; }
  .counter-grid { grid-template-columns: 1fr; }
  .summary-column { position: static; grid-row: auto; }
  .totals-panel { order: 0; }
}
@media (max-width: 440px) {
  .cash-counter-shell { width: min(100% - 18px, 620px); }
  .app-heading { gap: 10px; }
  .counter-title { font-size: 1.75rem; }
  .byline { font-size: .9rem; }
  .byline img { width: 142px; }
  .header-controls { gap: 5px; }
  .currency-control { width: 90px; height: 38px; padding-right: 6px; }
  .currency-control img { width: 24px; height: 24px; }
  .theme-toggle { width: 38px; height: 38px; }
  .panel { padding: 18px 15px; border-radius: 15px; }
  .option-row { position: relative; }
  .tooltip-wrap { position: static; }
  .tooltip-content { right: 0; left: 0; width: auto; max-width: none; transform: translateY(-3px); }
  .tooltip-content::before { display: none; }
  .tooltip-wrap:hover .tooltip-content, .tooltip-wrap:focus-within .tooltip-content { transform: translateY(0); }
  .xero-promo-content { padding: 25px 20px 14px; }
  .xero-promo-logo { width: min(130px, 58%); }
  .denomination-row { grid-template-columns: 37px 10px 25px minmax(47px, 1fr) 25px 10px minmax(74px, 1.15fr); gap: 4px; }
  .denomination-row.is-editing { grid-template-columns: 37px 10px minmax(0, 1fr) 10px minmax(74px, 1.15fr); }
  .rolls-panel .denomination-row { grid-template-columns: 48px 10px 25px minmax(47px, 1fr) 25px 10px minmax(74px, 1.15fr); }
  .rolls-panel .denomination-row.is-editing { grid-template-columns: 48px 10px minmax(0, 1fr) 10px minmax(74px, 1.15fr); }
  .denomination-label, .multiplier, .equals { font-size: .92rem; }
  .round-button { width: 24px; height: 24px; border-width: 2px; font-size: .8rem; }
  .count-input, .amount-input { height: 34px; padding: 3px 4px; font-size: .9rem; }
  .action-button, .clear-button { font-size: .82rem; }
  .page-footer { padding-top: 34px; }
}

@media (prefers-color-scheme: dark) {
  :root { --cash-bg: #171928; --cash-panel: #22253b; --cash-border: #cfd4df; --cash-muted: #c4c6cf; --cash-heading: #f8f8fa; --cash-shadow: 0 12px 34px rgba(0, 0, 0, .24); --cash-hero: #171928; }
  body { color: #f8f8fa; }
  .theme-toggle, .currency-control, .count-input, .amount-input, .rate-field { color: #f8f8fa; }
  .panel h2, .denomination-label, .multiplier, .equals, .totals-list dt, .totals-list dd, .option-row, .sales-tax-rate, .page-footer nav, .page-footer nav a { color: #f8f8fa; }
  .counter-title { color: #f8f8fa !important; }
  .amount-input { border-color: rgba(255, 255, 255, .5); }
  .denomination-row.is-zero .amount-input { color: #a5a7b0; }
  .totals-list > div { border-color: rgba(255, 255, 255, .16); }
  .option-row { border-color: rgba(255, 255, 255, .16); }
  .totals-list .total { border-color: #f8f8fa; }
}

html[data-theme="light"] { --cash-bg: #f5f5f4; --cash-panel: #ffffff; --cash-border: #d2d9e1; --cash-muted: #888888; --cash-heading: #22253b; --cash-shadow: 0 12px 38px rgba(34, 37, 59, .11); --cash-hero: #22253b; }
html[data-theme="light"] body { color: #22253b; }
html[data-theme="light"] .counter-title { color: #f8f8fa !important; }
html[data-theme="light"] .theme-toggle, html[data-theme="light"] .currency-control, html[data-theme="light"] .count-input, html[data-theme="light"] .amount-input, html[data-theme="light"] .rate-field { color: #22253b; }
html[data-theme="light"] .panel h2, html[data-theme="light"] .denomination-label, html[data-theme="light"] .multiplier, html[data-theme="light"] .equals, html[data-theme="light"] .totals-list dt, html[data-theme="light"] .totals-list dd, html[data-theme="light"] .option-row, html[data-theme="light"] .sales-tax-rate, html[data-theme="light"] .page-footer nav, html[data-theme="light"] .page-footer nav a { color: #22253b; }
html[data-theme="light"] .amount-input { border-color: #edf0f3; }
html[data-theme="light"] .denomination-row.is-zero .amount-input { color: #c5cbd3; }
html[data-theme="light"] .totals-list > div { border-color: #edf0f3; }
html[data-theme="light"] .option-row { border-color: #edf0f3; }
html[data-theme="light"] .totals-list .total { border-color: #22253b; }

html[data-theme="dark"] { --cash-bg: #171928; --cash-panel: #22253b; --cash-border: #cfd4df; --cash-muted: #c4c6cf; --cash-heading: #f8f8fa; --cash-shadow: 0 12px 34px rgba(0, 0, 0, .24); --cash-hero: #171928; }
html[data-theme="dark"] body { color: #f8f8fa; }
html[data-theme="dark"] .counter-title { color: #f8f8fa !important; }
html[data-theme="dark"] .theme-toggle, html[data-theme="dark"] .currency-control, html[data-theme="dark"] .count-input, html[data-theme="dark"] .amount-input, html[data-theme="dark"] .rate-field { color: #f8f8fa; }
html[data-theme="dark"] .panel h2, html[data-theme="dark"] .denomination-label, html[data-theme="dark"] .multiplier, html[data-theme="dark"] .equals, html[data-theme="dark"] .totals-list dt, html[data-theme="dark"] .totals-list dd, html[data-theme="dark"] .option-row, html[data-theme="dark"] .sales-tax-rate, html[data-theme="dark"] .page-footer nav, html[data-theme="dark"] .page-footer nav a { color: #f8f8fa; }
html[data-theme="dark"] .amount-input { border-color: rgba(255, 255, 255, .5); }
html[data-theme="dark"] .denomination-row.is-zero .amount-input { color: #a5a7b0; }
html[data-theme="dark"] .totals-list > div { border-color: rgba(255, 255, 255, .16); }
html[data-theme="dark"] .option-row { border-color: rgba(255, 255, 255, .16); }
html[data-theme="dark"] .totals-list .total { border-color: #f8f8fa; }

/* Keep both editable fields equally prominent, including after dark-mode rules load. */
.count-input:focus, .amount-input:focus {
  border-color: var(--cash-pink) !important;
  box-shadow: 0 0 0 3px rgba(255, 54, 119, .15) !important;
  outline: none;
}
.denomination-row.is-invalid .count-input:focus, .denomination-row.is-invalid .amount-input:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, .12) !important;
}
