/* Currency-specific layout only. Visual controls belong to the global
   button, input, modal, badge, card, tab, link and scrollbar primitives. */
html body :is(.od-currency-value, .od-input-shell-global-1) > select.od-input-global-1.od-currency-trigger {
    flex: 0 0 auto;
    width: var(--od-currency-select-width, 54px);
    min-width: var(--od-currency-select-width, 54px);
    max-width: var(--od-currency-select-width, 54px);
    min-height: 30px;
    padding: 4px 2px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    appearance: auto;
}
.od-currency-trigger option { background: var(--ng-control); color: var(--ng-input-text); }
html:root:not([data-theme="dark"]) body select.od-currency-trigger,
html:root:not([data-theme="dark"]) body select.od-currency-trigger > option {
    background-color: var(--od-currency-bg, #FFFFFF);
}
.od-currency-color-layout { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 12px; }
.od-currency-palette { flex: 0 1 314px; min-width: 0; border: 0; padding: 0; margin: 0; }
.od-currency-swatches { display: grid; grid-template-columns: repeat(11, minmax(0, 24px)); gap: 5px; }
.od-currency-palette legend { float: none; width: auto; margin-bottom: 6px; font-size: 13px; }
.od-currency-swatch { position: relative; display: inline-flex; cursor: pointer; }
.od-currency-swatch input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; }
.od-currency-swatch span { display: block; width: 100%; min-width: 0; height: 24px; border: 1px solid var(--ng-border-subtle); border-radius: 5px; background: var(--od-swatch); }
.od-currency-swatch input:checked + span { outline: 2px solid var(--ng-global-7); outline-offset: 1px; }
.od-currency-swatch input:focus-visible + span { outline: 2px solid var(--ng-text); outline-offset: 2px; }
html body .od-input-shell-global-1 > select.od-currency-trigger {
    flex: 0 0 auto;
    width: var(--od-currency-select-width, 54px);
    min-width: var(--od-currency-select-width, 54px);
    max-width: var(--od-currency-select-width, 54px);
    padding-inline: 2px;
}
.od-input-shell-global-1 > .od-currency-fixed {
    flex: 0 0 auto;
    align-self: center;
    padding-inline: 5px;
    font-size: 12px;
    font-weight: normal;
}

/* Give amount digits priority over the short decimal odds column. */
[data-currency-scope] .favor-stake-table { width: 100%; table-layout: fixed; }
[data-currency-scope] .favor-stake-table .favor-col-pick { width: 20%; }
[data-currency-scope] .favor-stake-table .favor-col-amount { width: 32%; }
[data-currency-scope] .favor-stake-table .favor-col-odd { width: 20%; }
[data-currency-scope] .favor-stake-table .favor-col-benefit { width: 28%; }
[data-currency-scope] .favor-stake-table--free .favor-col-pick { width: 18%; }
[data-currency-scope] .favor-stake-table--free .favor-col-amount { width: 30%; }
[data-currency-scope] .favor-stake-table--free .favor-col-promo { width: 10%; }
[data-currency-scope] .favor-stake-table--free .favor-col-odd { width: 17%; }
[data-currency-scope] .favor-stake-table--free .favor-col-benefit { width: 25%; }
[data-currency-scope] .favor-stake-table--refund .favor-col-pick { width: 16%; }
[data-currency-scope] .favor-stake-table--refund .favor-col-amount { width: 25%; }
[data-currency-scope] .favor-stake-table--refund .favor-col-promo { width: 28%; }
[data-currency-scope] .favor-stake-table--refund .favor-col-odd { width: 13%; }
[data-currency-scope] .favor-stake-table--refund .favor-col-benefit { width: 18%; }
/* Keep amount fields comfortable rather than stretching across a QHD panel. */
html body [data-currency-scope] .favor-stake-table :is(.favor-stake-money, .favor-invested-money) { width: 100%; max-width: 240px; }
/* Readonly still prevents editing; its field blends into the normal shell. */
.calculadora-lev-container .od-input-shell-global-1 { --od-input-readonly-bg: transparent; }
[data-currency-scope] .lev-table { width: 100%; table-layout: fixed; }
[data-currency-scope] .lev-table .lev-row-no-free > :nth-child(1) { width: 17%; }
[data-currency-scope] .lev-table .lev-row-no-free > :nth-child(2) { width: 29%; }
[data-currency-scope] .lev-table .lev-row-no-free > :nth-child(5) { width: 11%; }
[data-currency-scope] .lev-table .lev-row-no-free > :nth-child(6) { width: 23%; }
[data-currency-scope] .lev-table .lev-row-no-free > :nth-child(7) { width: 20%; }
[data-currency-scope] .lev-table--free .lev-row > :nth-child(2) { width: 25%; }
[data-currency-scope] .lev-table--free .lev-row > :nth-child(5) { width: 11%; }
[data-currency-scope] .lev-table--refund .lev-row > :nth-child(2) { width: 22%; }
[data-currency-scope] .lev-table--refund .lev-row > :nth-child(5) { width: 9%; }
[data-currency-scope] .lev-table--refund .lev-refund-cell-wrap { flex: 1 1 auto; min-width: 0; max-width: none; }

/* Summary inputs use the available panel width, including narrow desktop panes. */
.od-score-page .score-detail-wrap { container: currencyScore / inline-size; }
@media (min-width: 992px) {
    .od-score-page .score-detail-calc-layout { grid-template-columns: minmax(210px, 24%) minmax(0, 1fr); }
    @container currencyScore (max-width: 699px) {
        .od-score-page .score-detail-calc-layout { grid-template-columns: minmax(0, 1fr); }
        .od-score-page .score-calc-summary-card { grid-template-columns: 100px minmax(0, 1fr); grid-template-rows: auto; gap: 10px; align-items: center; }
        .od-score-page .score-summary-split { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    }
}
.od-score-page .score-summary-line > .score-payout-input { justify-self: stretch; max-width: none; }
.od-currency-value:not(td) { display: inline-flex; align-items: center; gap: 6px; }
td.od-currency-value { white-space: nowrap; }
td.od-currency-value > .od-currency-trigger { margin-inline-start: 6px; vertical-align: middle; }
.od-currency-personal-link { margin-top: 10px; }

/* A comparator can have a narrow calculator even on a wide monitor. */
.od-currency-favor { container: currencyFavor / inline-size; }
@container currencyFavor (max-width: 520px) {
    html body .od-currency-favor table.favor-stake-table,
    html body .od-currency-favor table.favor-stake-table :is(tbody, tfoot) { display: block !important; width: 100% !important; min-width: 0 !important; }
    html body .od-currency-favor table.favor-stake-table thead { display: none !important; }
    html body .od-currency-favor table.favor-stake-table tr { display: grid !important; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); width: 100% !important; }
    html body .od-currency-favor table.favor-stake-table :is(th, td) { display: block !important; position: static !important; width: auto !important; min-width: 0 !important; padding: 8px !important; }
    html body .od-currency-favor table.favor-stake-table tbody th { grid-column: 1 / -1; }
    html body .od-currency-favor table.favor-stake-table tbody td:last-child { grid-column: 1 / -1; }
    html body .od-currency-favor table.favor-stake-table .favor-promo-cell { grid-column: 1 / -1; grid-row: 3; }
    html body .od-currency-favor table.favor-stake-table .favor-odd-cell { grid-column: 2; grid-row: 2; }
    html body .od-currency-favor table.favor-stake-table tfoot td:nth-child(n+3) { display: none !important; }
    html body .od-currency-favor table.favor-stake-table .od-table-row-card-global-1__label { display: block !important; margin-bottom: 4px; }
    html body .od-currency-favor .od-input-shell-global-1:has(> .od-currency-trigger) { display: flex !important; width: 100% !important; min-width: 0 !important; }
    html body .od-currency-favor .od-input-shell-global-1:has(> .od-currency-trigger) > input { flex: 1 1 0 !important; width: 0 !important; min-width: 0 !important; }
}
/* Override legacy Score geometry, never the global colors or typography. */
html body.od-score-page .score-page.score-page .score-detail-wrap .od-input-shell-global-1:has(> .od-currency-trigger) { display: flex !important; align-items: stretch !important; gap: 0 !important; padding: 0 !important; }

/* One composite field: amount first, compact currency suffix on the right. */
html body .od-input-shell-global-1.od-currency-shell {
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: var(--ng-border-width) solid var(--od-input-border, var(--ng-input-border));
    background: var(--od-input-bg, var(--ng-control));
    overflow: hidden;
}
html body .od-input-shell-global-1.od-currency-shell > :is(input, select.od-currency-trigger, .od-currency-fixed) {
    border: 0;
    border-radius: 0;
    background: transparent;
}
html body .od-input-shell-global-1.od-currency-shell > :is(select.od-currency-trigger, .od-currency-fixed) {
    border-inline-start: var(--ng-border-width) solid var(--od-input-border, var(--ng-input-border));
    align-self: stretch;
}
html body .od-input-shell-global-1.od-currency-shell > input { flex: 1 1 0; width: 0; min-width: 0; padding-inline: 8px; text-align: center; }
/* Keep decimal odds aligned with the centered calculator amounts. */
html body input:is(.favor-stake-odd, .lev-quote-input, .score-top-pick-input, .score-stake-odd-input, .multi-cell-odd, .eventcalc-odd) {
    text-align: center !important;
}
html body .od-input-shell-global-1.od-currency-shell:focus-within {
    border-color: var(--od-input-focus-border, var(--ng-global-7));
}
/* More specific than the composite shell's background reset above. */
html:root:not([data-theme="dark"]) body .od-input-shell-global-1.od-currency-shell > select.od-currency-trigger {
    background-color: var(--od-currency-bg, #FFFFFF);
}
.od-currency-color-preview { display: grid; gap: 6px; flex: 0 1 220px; width: min(100%, 220px); min-width: 0; }
.od-currency-color-preview > span { color: var(--ng-text-muted); font-size: 13px; }

.od-currency-modal .od-modal-global-1__dialog { display: flex; flex-direction: column; max-height: 85vh; overflow: hidden; }
.od-currency-modal .od-modal-global-1__title,
.od-currency-modal .od-modal-global-1__copy { flex: 0 0 auto; }
.od-currency-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: max-content; align-items: start; gap: 8px; min-height: 0; max-height: min(50vh, 360px); padding: 2px; overflow-y: auto; overscroll-behavior: contain; }
.od-currency-option { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; padding: 8px; overflow-wrap: anywhere; }
.od-currency-select { width: 100%; min-width: 0; justify-content: flex-start; text-align: left; }
.od-currency-select > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-currency-symbol { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 24px; height: 24px; white-space: nowrap; }
.od-currency-check { margin-inline-start: auto; }
.od-currency-check > svg { display: block; width: 16px; height: 16px; }
.od-currency-rate > label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.od-currency-rate-field { min-width: 0; }
@media (max-width: 359px) { .od-currency-options { grid-template-columns: minmax(0, 1fr); } }

.od-currency-admin { width: min(100%, 1000px); min-width: 0; justify-self: center; container: currencyAdmin / inline-size; }
.od-currency-admin .od-currency-admin-fields { grid-template-columns: minmax(80px, .55fr) minmax(140px, 1fr) minmax(170px, 1fr) minmax(240px, 1.4fr); align-items: start; }
.od-currency-admin-form > .control-global-section-head { padding-bottom: 12px; border-bottom: var(--ng-border-width) solid var(--ng-border-subtle); }
.od-currency-admin-form .control-global-field { min-width: 0; color: var(--ng-text-muted); }
.od-currency-admin-image { display: grid; gap: 8px; width: 100%; min-width: 0; }
.od-currency-admin-image input[type="file"] { min-width: 0; height: 39px; padding: 5px; font-size: 13px; }
.od-currency-admin-form .od-currency-save-actions { justify-items: end; }
.od-currency-color-layout > .od-currency-save-actions { margin-inline-start: auto; flex: 0 0 auto; max-width: 100%; }
.od-currency-admin-form .od-currency-save-actions > .od-currency-admin-save { justify-self: end; }
.od-currency-admin-preview { width: 96px; height: 64px; object-fit: contain; padding: 4px; background: var(--ng-bookmaker-icon-bg); border: var(--ng-border-width) solid var(--ng-input-border); border-radius: var(--ng-radius-sm); }
.od-currency-admin-table .od-currency-col-name { width: 44%; }
.od-currency-admin-table .od-currency-col-rate { width: 24%; }
.od-currency-admin-table .od-currency-col-active,
.od-currency-admin-table .od-currency-col-edit { width: 16%; }
.od-currency-admin-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.od-currency-admin-enabled { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-self: start; margin: 0; }
.od-currency-admin .od-currency-admin-save { justify-self: center; width: auto; max-width: 100%; padding-inline: 20px; }
.od-currency-admin-status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.od-currency-admin-status .od-switch-global-1 { flex: 0 0 auto; margin: 0; }
@container currencyAdmin (max-width: 759px) { .od-currency-admin .od-currency-admin-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container currencyAdmin (max-width: 479px) { .od-currency-admin .od-currency-admin-fields { grid-template-columns: minmax(0, 1fr); } }
.od-currency-settings-page .control-global-section { gap: 18px; }
.od-currency-settings-page .control-global-tabs > .od-tab-global-1 { flex: 1 1 0; }
.od-currency-settings-page .od-currency-save { justify-self: center; width: auto; max-width: 100%; padding-inline: 20px; }
.od-currency-save-actions { display: grid; justify-items: center; gap: 8px; }
.od-currency-save-actions > [role="status"] { margin: 0; text-align: center; }
/* Shared account navigation: layout plus existing global panel/button tokens. */
.od-account-settings-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    width: min(1600px, calc(100% - 32px));
    margin: 24px auto;
}
.od-account-settings-sidebar { display: grid; gap: 20px; padding: 16px; }
.od-account-settings-menu-header { display: flex; align-items: center; gap: 10px; }
.od-account-settings-menu-header h2 { margin: 0; font-size: 20px; color: var(--ng-text); }
.od-account-settings-menu-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--ng-radius-md); background: var(--ng-global-5); color: var(--ng-global-10); font-size: 23px; }
.od-account-settings-menu { display: grid; gap: 6px; }
.od-account-settings-link {
    --od-button-bg: transparent;
    --od-button-color: var(--ng-text);
    min-height: 44px;
    justify-content: flex-start;
    padding: 10px;
    border-color: transparent;
    text-decoration: none;
    text-align: left;
}
.od-account-settings-link > i { flex: 0 0 22px; font-size: 21px; }
.od-account-settings-link.is-active { --od-button-bg: var(--ng-global-15); --od-button-color: var(--ng-text-on-global-15); border-color: var(--ng-global-15); }
.od-account-settings-logout { margin-top: 8px; border-top-color: var(--ng-border-subtle); }
.od-account-settings-content-header .od-page-title-global-1 { margin: 0; text-align: left; }
@media (max-width: 991px) {
    .od-account-settings-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; width: calc(100% - 20px); margin-block: 16px; }
    .od-account-settings-sidebar { gap: 12px; padding: 12px; }
    .od-account-settings-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .od-account-settings-logout { margin-top: 0; border-top-color: transparent; }
}
.od-currency-catalog-wrap { overflow-x: auto; }
.od-currency-settings-heading,
.od-currency-settings-page .od-currency-settings-form { width: min(100%, 900px); min-width: 0; justify-self: center; }
.od-currency-settings-heading { display: flex; align-items: center; gap: 12px; }
.od-currency-settings-heading > div { min-width: 0; }
.od-currency-settings-heading p { margin: 5px 0 0; font-size: 14px; }
.od-currency-settings-info { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.od-currency-settings-info > i { flex: 0 0 auto; font-size: 26px; color: var(--ng-global-10); }
.od-currency-settings-info strong { font-size: 16px; font-weight: var(--ng-weight-semibold); }
.od-currency-settings-info p { margin: 4px 0 0; font-size: 14px; }
.od-currency-catalog-table { --od-table-cell-bg: var(--ng-global-2); background: var(--ng-global-2); }
.od-currency-catalog-table .od-currency-col-name { width: 44%; }
.od-currency-catalog-table .od-currency-col-rate { width: 34%; }
.od-currency-catalog-table .od-currency-col-active { width: 22%; }
.od-currency-catalog-table thead th { background: var(--ng-global-5); color: var(--ng-text); font-size: 15px; }
.od-currency-catalog-table :is(th, td) { padding: 14px 16px; }
.od-currency-catalog-table :is(th + th, td + td) { border-inline-start: 0; text-align: center; }
.od-currency-catalog-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.od-currency-catalog-identity > :last-child { min-width: 0; overflow-wrap: anywhere; }
.od-currency-catalog-icon { width: 40px; height: 28px; flex: 0 0 40px; border-radius: 0; object-fit: contain; }
img.od-currency-catalog-icon { background: var(--ng-bookmaker-icon-bg); padding: 0; }
.od-currency-select > .od-currency-catalog-icon { width: 28px; height: 20px; flex-basis: 28px; }
.od-currency-code { padding: 5px 10px; flex-shrink: 0; font-size: 13px; }
.od-currency-catalog-table .od-input-global-1 { width: min(160px, 100%); text-align: center; }
.od-currency-catalog-table .od-input-global-1:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 599px) {
    .od-currency-catalog-table :is(th, td) { padding: 10px 8px; }
    .od-currency-catalog-identity { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 8px; }
    .od-currency-catalog-icon { width: 32px; height: 22px; grid-row: 1 / 3; }
    .od-currency-code { justify-self: start; padding: 3px 6px; }
    .od-currency-catalog-identity > :last-child { grid-column: 2; font-size: 12px; }
}
.od-currency-global-suggestion { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; }
.od-currency-settings-page .od-currency-rates-table :is(th, td):nth-child(n+2) { text-align: center; }
.od-currency-settings-page .od-currency-rates-table td > input { display: inline-block; width: 160px; max-width: 100%; margin-inline: auto; text-align: center; }
.od-currency-settings-page .od-currency-apply { flex: 0 0 auto; }
.od-currency-personal-form { padding: 16px; }
.od-currency-personal-form h2 { margin: 0; }
.od-currency-personal-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.od-currency-personal-fields label { display: grid; gap: 6px; min-width: 0; }
.od-currency-personal-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.od-currency-symbol-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.od-currency-symbol-presets > button { min-width: 34px; }
.od-currency-personal-label { display: block; }
@media (max-width: 900px) { .od-currency-personal-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .od-currency-personal-fields { grid-template-columns: minmax(0, 1fr); } }
.od-currency-house-grid { display: grid; grid-auto-flow: column; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(var(--currency-rows-4), auto); gap: 8px 16px; }
.od-currency-house-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 1.25fr); align-items: center; min-width: 0; gap: 10px; padding: 9px 10px; }
.od-currency-house-row > span { min-width: 0; overflow-wrap: anywhere; }
.od-currency-house-row > select { min-width: 0; }
.od-currency-house-identity { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.od-currency-house-identity > span { min-width: 0; overflow-wrap: anywhere; }
.od-currency-house-identity > input { flex-shrink: 0; }
.od-house-preference-label { display: inline-flex; align-items: center; gap: 8px; }
.od-currency-house-icon,
.od-house-preference-label > img {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    padding: 2px;
    border-radius: var(--ng-radius-sm);
    background: var(--ng-bookmaker-icon-bg);
    object-fit: contain;
}
@media (max-width: 1439px) { .od-currency-house-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(var(--currency-rows-3), auto); } }
@media (max-width: 1199px) { .od-currency-house-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(var(--currency-rows-2), auto); } }
@media (max-width: 767px) { .od-currency-house-grid { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }.od-currency-house-row { grid-template-columns: minmax(0, 1fr) minmax(155px, 1.25fr); } }
