/* Account pages: measured against the reference admin, 2026-11-09.
   Scoped deliberately: other admin pages and the desktop client retain their theme. */
body.newmagic dialog.account-discard-confirm{width:min(520px,calc(100vw - 32px));box-sizing:border-box;border:0;border-radius:8px;padding:20px 24px;background:white;color:#262626;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 6px 24px #0003}
body.newmagic dialog.account-discard-confirm::backdrop{background:#0007}
body.newmagic .account-discard-confirm header{display:flex;justify-content:space-between;align-items:center;border:0;background:none;padding:0;color:#262626}
body.newmagic .account-discard-confirm header button{border:0;background:transparent;color:#888;font-size:24px;padding:0 4px}
body.newmagic .account-discard-confirm footer{display:flex;justify-content:flex-end;gap:8px;background:none;padding:16px 0 0}
body.newmagic .account-discard-confirm footer button{padding:4px 16px;border:1px solid #d9d9d9;border-radius:6px;background:white;color:#262626;font:14px/22px sans-serif;box-shadow:none}
body.newmagic .account-discard-confirm footer .primary{background:#ffbf00;border-color:#ffbf00;color:white}
body.newmagic:has(#main :is(.account-list,#userForm)) .page-title {background:linear-gradient(90deg,#f8fafc,#fff);border:1px solid #f4f5f7;border-radius:12px;box-shadow:none;color:#082958}
body.newmagic:has(#main :is(.account-list,#userForm)) .page-title h1 {font-size:20px;font-weight:600;letter-spacing:0;color:#082958}
body.newmagic :is(.account-list,.account-compact-form,.account-reference-detail) {font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;font-size:14px;line-height:22px;color:rgba(0,0,0,.88);letter-spacing:0;text-shadow:none}
body.newmagic .account-list {background:#fff;border:1px solid #f0f0f0;border-radius:8px;box-shadow:none;padding:24px}
body.newmagic .account-list .search-heading {margin:-24px -24px 24px;padding:16px 24px;background:linear-gradient(90deg,#f2f6ff,#fff);border-left:3px solid #1677ff;color:#082958;font-size:14px;font-weight:600}
body.newmagic .account-list>.table-wrap {border:0;border-radius:0;box-shadow:none}
body.newmagic .account-list table {font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:#082958}
body.newmagic .account-list table thead th {background:#fafafa;color:rgba(0,0,0,.88);font-size:14px;font-weight:600;padding:16px 8px;border-bottom:1px solid #f0f0f0;letter-spacing:0}
body.newmagic .account-list table tbody td {padding:16px 8px;background:#fff;border-bottom:1px solid #f0f0f0;font-size:14px;color:#082958}
body.newmagic .account-list table tbody tr:hover td {background:#fafafa}
body.newmagic .account-list :is(.muted,small) {color:#94a3b8;font-size:12px}
body.newmagic .account-list :is(.account-identity strong,.account-id-link,.agency-account-card strong) {color:#082958;font-size:14px;font-weight:600}
body.newmagic .account-list .account-inspect {width:22px;height:22px;padding:4px;border-radius:4px;color:#0ea5e9;background:#f0f9ff}
body.newmagic .account-list .account-avatar {width:46px;height:46px;flex-basis:46px;padding:0;border:0;border-radius:12px;background:#f1f5f9;overflow:hidden}
body.newmagic .account-list .account-avatar img {width:100%;height:100%;object-fit:contain}
body.newmagic .account-list .row-actions .link {border:0;background:transparent;box-shadow:none;color:#1677ff;padding:2px 6px;font-size:14px;font-weight:400;min-height:28px}
body.newmagic .account-list .account-status.is-active {color:#082958;background:#f8fafc;border-radius:4px}
body.newmagic .account-list .result-actions>button {height:32px;min-height:32px;font-size:14px;border-radius:4px;background:#fff;color:#262626;border:1px solid #d9d9d9;box-shadow:none}
body.newmagic .account-list .result-actions>.primary {background:#fec00e;border-color:#fec00e;color:#fff}
body.newmagic .agency-navigation>.checks {border:1px solid #d9d9d9;border-radius:4px;gap:0}
body.newmagic .agency-navigation>.checks>label {min-height:32px;padding:4px 16px;color:#111;font-size:14px;font-weight:400;border-color:#d9d9d9}
body.newmagic .agency-navigation>.checks>label:has(input:checked) {background:#fec00e;color:#fff}
body.newmagic .account-compact-form :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:rgba(0,0,0,.88);background:#fff;border:1px solid #d9d9d9;border-radius:4px;box-shadow:none;min-height:32px;padding:4px 11px}
body.newmagic .account-compact-form input::placeholder {color:#bfbfbf}
body.newmagic .account-compact-form :is(input,select,textarea):focus {outline:none;border-color:#fec00e;box-shadow:0 0 0 2px #fec00e20}
body.newmagic .account-compact-form label {font-size:14px;line-height:22px;color:rgba(0,0,0,.88)}
body.newmagic .account-compact-form .account-section {padding:16px 24px;margin:16px 0;background:#fff;border:1px solid #f0f0f0;border-radius:12px;box-shadow:none;display:block}
body.newmagic .account-compact-form .account-section>summary {font-size:14px;font-weight:600;color:#082958;min-height:32px}
body.newmagic .account-compact-form #childContractFields {display:block}
body.newmagic .account-compact-form .access-group-head {background:#f8fafc;color:#1677ff;border-radius:8px 8px 0 0;padding:12px 16px}
body.newmagic .account-compact-form .access-group-head button {font-size:12px;color:#94a3b8;padding:0 4px;min-height:22px}
body.newmagic .account-compact-form .access-group-head button:first-of-type {margin-left:0}
body.newmagic .account-compact-form .access-cards {grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px;padding:0 16px}
body.newmagic .account-compact-form .access-card {background:#f8fafc;border:0;padding:7px 12px;border-radius:8px;font-size:12px!important;min-height:36px}
body.newmagic .account-compact-form .access-card>span:first-child {font-weight:400;color:#475569}
body.newmagic .account-compact-form .access-card small {display:none}
body.newmagic .account-compact-form .access-switch {width:56px;height:22px;flex-basis:56px}
body.newmagic .account-compact-form .switch-track {border:0;box-shadow:none;background:#bfbfbf}
body.newmagic .account-compact-form .switch-track i {width:18px;height:18px;top:2px;left:2px}
body.newmagic .account-compact-form .access-switch input:checked+.switch-track {background:#ffbe00;border:0}
body.newmagic .account-compact-form .access-switch input:checked+.switch-track i {left:36px}
body.newmagic .account-compact-form .switch-label:after {top:2px;line-height:18px;color:white;font-size:12px;font-weight:400}
body.newmagic .account-compact-form .access-switch input:checked+.switch-track .switch-label:after {color:#fff}
body.newmagic .account-compact-form .contract-bulk {background:#f8fafc;border-radius:0;padding:12px;color:#64748b}
body.newmagic .account-compact-form .account-field-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 30px}
body.newmagic .account-compact-form .account-field-grid :is(input,select) {height:32px}
body.newmagic .account-compact-form .limit-provider {background:#fff;border:0;border-bottom:1px solid #f0f0f0;border-radius:0}
body.newmagic .account-compact-form .limit-provider>summary {color:#1677ff}
body.newmagic .account-compact-form :is(.primary,.limit-presets button) {background:#fec00e;border:1px solid #fec00e;color:#fff;border-radius:4px;box-shadow:0 2px 6px #00000012;font-size:14px}
body.newmagic .account-reference-detail {background:#fff;color:#082958}
body.newmagic .account-reference-detail .detail-toolbar {padding:8px 0;border-bottom:1px solid #f0f0f0;gap:12px}
body.newmagic .account-reference-detail .detail-toolbar button {color:#64748b;border:0;background:transparent;box-shadow:none;min-height:28px;padding:0 8px;font-size:14px}
body.newmagic .account-reference-detail .reference-card {border:1px solid #f5f5f5;border-radius:12px;margin:16px 0;overflow:hidden;background:#fff}
body.newmagic .account-reference-detail .reference-card h3 {margin:0;padding:16px 20px;background:linear-gradient(90deg,#f8fafc,#fff);font-size:14px;font-weight:600;color:#082958;display:flex;align-items:center;gap:10px}
body.newmagic .account-reference-detail .reference-card-content {padding:16px 20px}
body.newmagic .account-reference-detail .reference-row {display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-height:30px;margin:4px 0;color:#082958}
body.newmagic .account-reference-detail .reference-row>strong {font-weight:600}
body.newmagic .account-reference-detail .reference-row button {padding:5px 12px;min-height:32px;border:0;border-radius:6px;color:#d48806;background:#fff7d6;font-size:14px}
body.newmagic .account-reference-detail .reference-row button[data-detail-reset] {color:#ff4d75;background:#fff1f3}
body.newmagic .account-reference-detail .reference-row button[data-game-access] {color:#7254ff;background:#f5f3ff}
body.newmagic .account-reference-detail .detail-status {font-size:12px;border-radius:4px;padding:2px 8px;font-weight:400}
body.newmagic .account-reference-detail .detail-card-icon {background:#36a3ff;border-radius:5px;width:24px;height:24px;font-size:14px}
body.newmagic .account-reference-detail .detail-card-icon.pink {background:#ff5286}
body.newmagic .account-reference-detail .detail-card-icon.green {background:#20c6a4}
body.newmagic .account-reference-detail .detail-card-icon.gold {background:#fa9412}
@media(max-width:600px){body.newmagic .account-list{padding:12px}body.newmagic .account-list .search-heading{margin:-12px -12px 16px;padding:12px}body.newmagic .account-compact-form .access-cards{grid-template-columns:repeat(2,minmax(0,1fr));padding:0}body.newmagic .account-compact-form .account-field-grid{grid-template-columns:minmax(0,1fr)}body.newmagic .account-compact-form .account-section{padding:12px}body.newmagic .account-reference-detail .reference-card-content{padding:12px}}
body.newmagic #main:has(.account-reference-form)>.panel{background:#fff;box-shadow:none;border:1px solid #f3f4f6;border-radius:12px;color:#082958}
body.newmagic #main:has(.account-reference-form)>.panel>.panel-head{background:linear-gradient(90deg,#f8fafc,#fff);border:0;padding:16px 24px}
body.newmagic #main:has(.account-reference-form)>.panel>.panel-head h2{font-size:20px;font-weight:600;color:#082958;letter-spacing:0}
body.newmagic .account-reference-form{display:block;max-width:1100px;margin:0;padding:0;background:#fff}
body.newmagic .account-reference-form .reference-form-card{border:1px solid #f3f4f6;border-radius:12px;overflow:hidden;margin:20px 0;background:#fff}
body.newmagic .account-reference-form .reference-form-card>h3{margin:0;padding:14px 20px;font-size:14px;font-weight:600;background:linear-gradient(90deg,#f8fafc,#fff);color:#082958}
body.newmagic .account-reference-form .reference-form-content{padding:20px 24px}
body.newmagic .account-reference-form .reference-form-content>label{max-width:320px;display:grid;gap:8px;margin-bottom:16px}
body.newmagic .account-reference-form .reference-credentials{display:grid;grid-template-columns:minmax(180px,295px) minmax(150px,220px);gap:24px;margin:0 0 14px}
body.newmagic .account-reference-form .reference-credentials label{display:grid;gap:8px}
body.newmagic .account-reference-form .reference-default-password{font-size:12px;background:#f0f9ff;color:#64748b;border-radius:4px;padding:4px 8px;width:fit-content;margin:8px 0 20px}
body.newmagic .account-reference-form .reference-default-password span{display:block}
body.newmagic .account-reference-form .reference-required-title{font-size:20px;font-style:italic;color:#082958;font-weight:600;border-bottom:1px dashed #d9d9d9;padding-bottom:10px}
body.newmagic .account-reference-form .form-actions{display:flex;gap:12px;justify-content:flex-start;padding:16px 0}
body.newmagic .account-reference-form .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:700px;gap:20px 24px}
body.newmagic #modal:has(.account-reference-detail) :is(.modal-head,.modal-body){background:#fff;color:#082958}
body.newmagic #modal:has(.account-reference-detail) .modal-head{border-bottom:1px solid #f0f0f0}
@media(max-width:600px){body.newmagic .account-reference-form .reference-credentials,body.newmagic .account-reference-form .form-grid{grid-template-columns:minmax(0,1fr)}body.newmagic .account-reference-form .reference-form-content{padding:16px}body.newmagic .account-reference-form{max-width:100%}}
/* Override legacy forced widths only within the replacement forms. */
body.newmagic .account-compact-form.account-reference-form{max-width:1100px!important}
body.newmagic .account-reference-form .reference-form-content>label{max-width:320px!important}
body.newmagic .account-reference-form .reference-form-content>.form-grid{max-width:700px!important}
body.newmagic #modal:has(.account-reference-detail){background:#fff;border:1px solid #f0f0f0;box-shadow:0 8px 32px #0002;border-radius:8px}
body.newmagic #modal:has(.account-reference-detail) .modal-head h2{color:#082958;font-size:20px;font-weight:600}
body.newmagic #modal:has(.account-reference-detail) .close{background:transparent;border:0;box-shadow:none;color:#8c8c8c}
body.newmagic #main:has(.account-reference-detail)>.panel{background:#fff;border:1px solid #f3f4f6;border-radius:12px;box-shadow:none}
body.newmagic #main:has(.account-reference-detail)>.panel>.panel-head{background:linear-gradient(90deg,#f8fafc,#fff);border:0;padding:16px 24px}
body.newmagic #main:has(.account-reference-detail)>.panel>.panel-head h2{font-size:20px;font-weight:600;color:#082958;letter-spacing:0}
body.newmagic #main:has(:is(.account-reference-form,.account-reference-detail)){background:#fff}

body.newmagic .account-reference-detail .detail-card-icon{display:inline-flex;align-items:center;justify-content:center;color:#fff;flex:0 0 24px}
body.newmagic .account-reference-detail .detail-card-icon svg{width:16px;height:16px}
body.newmagic .account-reference-detail .detail-toolbar button{color:#6387b3;letter-spacing:0;font-weight:400}
/* Reference dialogs share a single white surface, including all nested actions. */
body.newmagic :is(#modal.account-reference-modal,.account-search-dialog){color:rgba(0,0,0,.88);background:#fff;border:0;border-radius:8px;padding:0;width:min(900px,calc(100vw - 32px));max-height:calc(100dvh - 48px);box-shadow:0 6px 24px #0003;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}
body.newmagic :is(#modal.account-reference-modal,.account-search-dialog)::backdrop{background:#0006;backdrop-filter:none}
body.newmagic #modal.account-reference-modal :is(#modalBody,.modal-body,.modal-head){background:#fff;color:rgba(0,0,0,.88);box-shadow:none}
body.newmagic #modal.account-reference-modal .modal-head{padding:20px 24px 14px;border-bottom:1px solid #f0f0f0;position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between}
body.newmagic #modal.account-reference-modal .modal-head h2{font-size:16px;font-weight:600;letter-spacing:0;color:#262626;margin:0}
body.newmagic #modal.account-reference-modal .modal-body{padding:20px 24px}
body.newmagic #modal.account-reference-modal .close{display:grid;place-items:center;position:static;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:4px;background:transparent;color:#8c8c8c;box-shadow:none;font:26px/1 Arial}
body.newmagic #modal.account-reference-modal .close:hover{background:#f5f5f5;color:#262626}
body.newmagic #modal.account-reference-modal :is(label,legend,p,.help){letter-spacing:0;text-shadow:none;font-size:14px;line-height:22px}
body.newmagic #modal.account-reference-modal :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:#fff;color:#262626;border:1px solid #d9d9d9;border-radius:4px;padding:4px 11px;font-family:inherit;font-size:14px;line-height:22px;min-height:32px;box-shadow:none}
body.newmagic #modal.account-reference-modal button:not(.close){border:1px solid #d9d9d9;border-radius:4px;min-height:32px;padding:4px 15px;background:#fff;color:#262626;box-shadow:0 2px 0 #00000005;font-size:14px;font-weight:400;letter-spacing:0}
body.newmagic #modal.account-reference-modal button.primary{background:#fec00e;border-color:#fec00e;color:#fff}
body.newmagic #modal.account-reference-modal .form-actions{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #f0f0f0;padding-top:16px;margin-top:20px}
body.newmagic #modal.account-reference-modal .permission-radio{border:0;border-top:1px solid #f0f0f0;padding:20px 0;margin:0;display:flex;flex-wrap:wrap;gap:16px}
body.newmagic #modal.account-reference-modal .permission-radio legend{float:left;width:100%;font-weight:600;margin-bottom:12px}
body.newmagic #modal.account-reference-modal .permission-radio label{display:inline-flex;align-items:center;gap:8px}
body.newmagic #modal.account-reference-modal input:is([type=radio],[type=checkbox]){accent-color:#ffbe00}
body.newmagic #modal.account-reference-modal .notice{background:#e6f4ff;border:1px solid #91caff;border-radius:0;padding:20px 24px;color:#262626;line-height:26px}
body.newmagic #modal.account-reference-modal .help{color:#8c8c8c}
body.newmagic .account-search-dialog{width:min(600px,calc(100vw - 32px))}
body.newmagic .account-search-dialog #searchSidebar{width:auto;min-width:0;max-width:none;max-height:none;position:static;border:0;border-radius:0;background:#fff;box-shadow:none;padding:0;display:block;overflow:visible}
body.newmagic .account-search-dialog .search-heading{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;margin:0;background:#fff;color:#262626;border:0;border-bottom:1px solid #f0f0f0;font-size:16px;font-weight:600}
body.newmagic .account-search-dialog .search-heading button{border:0;background:transparent;box-shadow:none;color:#8c8c8c;font-size:26px;padding:0;width:32px;height:32px}
body.newmagic .account-search-dialog .filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;padding:24px;margin:0;background:#fff;color:#262626}
body.newmagic .account-search-dialog .filters label{display:grid;gap:8px;color:#262626;font-size:14px}
body.newmagic .account-search-dialog :is(input:not([type=checkbox]):not([type=radio]),select){width:100%;min-width:0;height:32px;padding:4px 11px;border:1px solid #d9d9d9;border-radius:4px;background:#fff;color:#262626;font-size:14px;box-shadow:none}
body.newmagic .account-search-dialog .filter-actions{grid-column:1/-1;display:flex;gap:8px;padding:0}
body.newmagic .account-search-dialog button{min-height:32px;border:1px solid #d9d9d9;border-radius:4px;background:#fff;color:#262626;box-shadow:none;font-size:14px;padding:4px 15px}
body.newmagic .account-search-dialog button.primary{background:#fec00e;color:#fff;border-color:#fec00e}
body.newmagic .reference-dialog-footer{padding:12px 24px;border-top:1px solid #f0f0f0;display:flex;justify-content:flex-end}
body.newmagic .reference-search-trigger{position:fixed;bottom:24px;right:24px;z-index:30;display:grid;place-items:center;width:40px;height:40px;border:0;border-radius:50%;background:#fec00e;color:#fff;box-shadow:0 4px 12px #0002;padding:10px}
body.newmagic .reference-search-trigger svg{width:20px;height:20px}
body.newmagic:has(.reference-search-trigger) #floatingSearch{display:none}
body.newmagic .account-search-dialog .player-filters{display:block}
body.newmagic .account-search-dialog .player-filters .search-scroll{max-height:none;overflow:visible}
body.newmagic .account-search-dialog .player-filters .inline-label{display:grid;grid-template-columns:120px minmax(0,1fr);align-items:center;margin:12px 0}
body.newmagic .account-search-dialog .player-filters .inline-radio>div{display:flex;flex-wrap:wrap;gap:12px}
body.newmagic .account-search-dialog .player-filters .inline-radio label{display:flex;align-items:center;gap:6px}
body.newmagic .account-search-dialog .player-filters :is(.quick-dates,.date-range,.time-range){display:flex;gap:6px;margin-bottom:8px}
body.newmagic .account-list .pagination{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:16px 0;color:#082958;font-size:14px}
body.newmagic .account-list .pagination button{min-width:32px;height:32px;padding:0 6px;border:1px solid transparent;background:#fff;color:#082958;border-radius:4px;box-shadow:none}
body.newmagic .account-list .pagination button[aria-current=page]{border-color:#fec00e;color:#d99d00}
@media(max-width:600px){body.newmagic .account-search-dialog .filters{grid-template-columns:1fr;padding:16px}body.newmagic #modal.account-reference-modal .modal-body{padding:16px}body.newmagic .account-list .pagination{flex-wrap:wrap}body.newmagic .account-search-dialog .player-filters .inline-label{grid-template-columns:1fr}}

/* Explicit boundaries prevent legacy dialog and search themes leaking into these four pages. */
body.newmagic #main dialog.account-search-dialog{width:min(600px,calc(100vw - 32px));max-width:calc(100vw - 32px)}
body.newmagic #main dialog.account-search-dialog :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select){height:32px;min-height:32px;padding:4px 11px;font-weight:400}
body.newmagic #main dialog.account-search-dialog .filter-actions button{width:auto;flex:0 0 auto;min-height:32px;height:32px;padding:4px 15px;font-weight:400;letter-spacing:0}
body.newmagic #main dialog.account-search-dialog button.primary,body.newmagic #modal.account-reference-modal button.primary{background:#fec00e!important;border-color:#fec00e!important;color:#fff!important;box-shadow:0 2px 0 #00000005!important}
body.newmagic #modal.account-reference-modal .modal-head::before{display:none}
body.newmagic #modal.account-reference-modal .modal-head{min-height:56px}
body.newmagic #modal.account-reference-modal .modal-head .close{min-height:32px;flex-basis:32px}
body.newmagic #modal.account-reference-modal .form-actions button{flex:0 0 auto;width:auto;min-height:32px}
body.newmagic #main .account-list .row-actions .link{background:transparent!important;border:0!important;color:#1677ff!important;box-shadow:none!important;font-weight:400}

body.newmagic #main .account-reference-editor{background:#fff;color:#082958;padding:8px 20px}
body.newmagic #main .account-reference-editor .detail-toolbar{margin-bottom:24px;border-bottom:1px solid #f0f0f0;padding:10px 0}
body.newmagic #main .account-reference-editor .detail-toolbar button{border:0;background:transparent;color:#6387b3;box-shadow:none}
body.newmagic #main .account-reference-editor #editForm{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px;max-width:1100px!important}
body.newmagic #main .account-reference-editor #editForm>:is(p,details,section,fieldset,.form-grid,.checks,h3){grid-column:1/-1}
body.newmagic #main .account-reference-editor label{display:grid;gap:8px;font-weight:400}
body.newmagic #main .account-reference-editor button.primary,body.newmagic #main .account-list #export{background:#fec00e!important;border-color:#fec00e!important;color:#fff!important;box-shadow:none!important}
body.newmagic #main .account-reference-editor [data-save-error]{color:#cf1322;background:#fff1f0;padding:12px;border:1px solid #ffa39e}
@media(max-width:600px){body.newmagic #main .account-reference-editor #editForm{grid-template-columns:minmax(0,1fr)}body.newmagic #main .account-reference-editor{padding:0}}
body.newmagic :is(#main,#modal.account-reference-modal) .contract-value-group{margin:16px 0;padding:0 16px 16px;border-bottom:1px solid #f0f0f0}
body.newmagic :is(#main,#modal.account-reference-modal) .contract-value-group .access-group-head{display:flex;flex-wrap:wrap;align-items:center;gap:12px;background:#f8fafc;padding:12px;color:#1677ff}
body.newmagic :is(#main,#modal.account-reference-modal) .contract-value-group[data-contract-group=LIVE] .access-group-head{color:#52c41a}
body.newmagic :is(#main,#modal.account-reference-modal) .contract-value-group .access-group-head label{display:flex;align-items:center;gap:8px;margin:0;font-weight:400}
body.newmagic :is(#main,#modal.account-reference-modal) .contract-value-group .access-group-head input{width:100px!important;min-width:0}
body.newmagic :is(#main,#modal.account-reference-modal) .contract-value-group .account-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px;padding-top:16px}
body.newmagic :is(#main,#modal.account-reference-modal) .contract-number{display:flex;align-items:center;gap:8px}
body.newmagic :is(#main,#modal.account-reference-modal) .contract-number input{width:100%;min-width:0}
body.newmagic :is(#main,#modal.account-reference-modal) .contract-value-group small{font-size:12px;color:#8c8c8c;font-weight:400}
@media(max-width:600px){body.newmagic :is(#main,#modal.account-reference-modal) .contract-value-group .account-field-grid{grid-template-columns:1fr}body.newmagic :is(#main,#modal.account-reference-modal) .contract-value-group{padding:0 0 12px}}
body.newmagic #modal.account-reference-modal .reference-access-form .permission-radio{border:0;border-bottom:1px solid #f0f0f0;margin:0 0 20px;padding:0 0 20px;display:flex;flex-wrap:wrap;gap:16px}
body.newmagic #modal.account-reference-modal .reference-access-form legend{font-size:14px;font-weight:600;color:#262626;padding:0 0 16px}
body.newmagic #modal.account-reference-modal .reference-access-form .permission-radio label{display:flex;gap:8px;align-items:center;font-weight:400;margin:0}
body.newmagic #modal.account-reference-modal .reference-access-form input[type=radio]{width:16px;height:16px;min-height:0;margin:0;accent-color:#ffbf00}
body.newmagic #modal.account-reference-modal .reference-permission-info{display:flex;gap:12px;border:1px solid #91caff;background:#e6f4ff;color:#262626;padding:20px 24px;line-height:24px;font-size:14px}
body.newmagic #modal.account-reference-modal .reference-info-icon{flex:0 0 24px;width:24px;height:24px;border-radius:50%;background:#1677ff;color:#fff;text-align:center;font-weight:700}
body.newmagic #modal.account-reference-modal .reference-permission-info p{margin:0 0 8px}
body.newmagic #modal.account-reference-modal .reference-permission-info ul{margin:0;padding-left:20px}
body.newmagic #modal.account-reference-modal .reference-access-form .form-actions{margin-top:12px;padding-top:0;border:0}
body.newmagic #modal.account-reference-modal .account-wallet-reference{font-size:14px;color:#082958;padding:8px 0}
@media(max-width:600px){body.newmagic #modal.account-reference-modal .reference-permission-info{padding:16px 12px}}
body.newmagic #modal.account-reference-modal .close::before,body.newmagic #modal.account-reference-modal .close::after{content:none!important;display:none!important}
body.newmagic #modal.account-reference-modal:has(.account-reset-reference){width:min(416px,calc(100vw - 32px))}
body.newmagic #modal.account-reference-modal:has(.account-wallet-reference){width:min(520px,calc(100vw - 32px))}
body.newmagic #modal.account-reference-modal .account-reset-reference{display:block;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body.newmagic #modal.account-reference-modal .account-reset-reference .form-actions{border:0;margin-top:16px;padding-top:0}
body.newmagic #modal.account-reference-modal .account-reset-reference p{margin:0 0 12px}
body.newmagic #main .account-reference-editor #editForm{display:block;max-width:none!important}
body.newmagic #main .account-reference-editor .reference-card{margin:0 0 16px;border:1px solid #f0f0f0;border-radius:12px;background:#fff;overflow:hidden}
body.newmagic #main .account-reference-editor .reference-card h3{display:flex;align-items:center;gap:10px;margin:0;padding:14px 20px;background:linear-gradient(90deg,#f8fafc,#fff);font-size:14px;font-weight:600;color:#082958;border-bottom:1px solid #f5f5f5}
body.newmagic #main .account-reference-editor .editor-fields{padding:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 24px}
body.newmagic #main .account-reference-editor .editor-fields>:is(details,section,fieldset,.checks,p,h3){grid-column:1/-1}
body.newmagic #main .account-reference-editor .form-actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 0}
body.newmagic #main .account-reference-editor .form-actions button{width:auto;min-width:64px}
body.newmagic:has(#main :is(.account-reference-detail,.account-reference-editor)) .page-title{background:linear-gradient(90deg,#f8fafc,#fff);border:1px solid #f4f5f7;border-radius:12px;box-shadow:none;color:#082958}
@media(max-width:600px){body.newmagic #main .account-reference-editor .editor-fields{grid-template-columns:minmax(0,1fr);padding:16px}}
body.newmagic :is(#main .account-reference-form,#main .account-reference-editor,#modal.account-reference-modal) details>summary{background:#fff;color:#082958;border-bottom:1px solid #f0f0f0}
body.newmagic :is(#main .account-reference-form,#main .account-reference-editor,#modal.account-reference-modal) details>summary::after{content:'';display:block;flex:0 0 7px;width:7px;height:7px;border:0;border-right:1px solid #333;border-bottom:1px solid #333;border-radius:0;background:none;box-shadow:none;margin:0 6px 0 auto;transform:rotate(45deg)}
body.newmagic :is(#main .account-reference-form,#main .account-reference-editor,#modal.account-reference-modal) details[open]>summary::after{transform:rotate(225deg)}
body.newmagic #modal.account-reference-modal .form>.account-section{padding:0;border:0;box-shadow:none}
body.newmagic #modal.account-reference-modal .form>.account-section>summary{padding:0 0 12px;min-height:32px}

body.newmagic .reference-columns{position:absolute;z-index:10000;width:220px;padding:12px;background:#fff;color:#262626;box-shadow:0 6px 16px #0002;border:1px solid #f0f0f0;border-radius:8px;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body.newmagic .reference-columns header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #f0f0f0;padding-bottom:8px;margin-bottom:8px}
body.newmagic .reference-columns label{display:flex;align-items:center;gap:8px;padding:5px 8px;font-weight:400;cursor:pointer}
body.newmagic .reference-columns input{width:16px;height:16px;min-height:0;margin:0;accent-color:#1677ff}
body.newmagic .reference-columns button{padding:0;border:0;background:none;color:#1677ff;box-shadow:none;font:inherit}
body.newmagic .reference-columns-group{padding:4px 8px;color:#8c8c8c;font-size:12px}
body.newmagic #modal.account-reference-modal:has(.reference-credit){width:min(520px,calc(100vw - 32px))}
body.newmagic #modal.account-reference-modal .reference-credit{display:block;color:#262626;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body.newmagic #modal.account-reference-modal .credit-identity{border-bottom:1px solid #f0f0f0;margin-bottom:16px;padding-bottom:8px}
body.newmagic #modal.account-reference-modal .credit-identity p{margin:0 0 20px}
body.newmagic #modal.account-reference-modal .credit-field{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:start;gap:8px;margin:0 0 18px;font-weight:400}
body.newmagic #modal.account-reference-modal .credit-field>span{padding-top:5px;font-weight:600}
body.newmagic #modal.account-reference-modal .credit-field :is(input,select,textarea){width:100%;font:14px/22px sans-serif;min-height:32px;border:1px solid #d9d9d9;border-radius:4px;background:white;padding:4px 11px}
body.newmagic #modal.account-reference-modal .credit-field textarea{height:76px;resize:vertical}
body.newmagic #modal.account-reference-modal .credit-field :disabled{background:#f5f5f5;color:#bfbfbf}
body.newmagic #modal.account-reference-modal .credit-direction{display:flex;gap:16px;border:0;margin:0 0 20px;padding:0;align-items:center}
body.newmagic #modal.account-reference-modal .credit-direction legend{float:left;width:112px;padding:0;margin-right:8px;font-weight:600}
body.newmagic #modal.account-reference-modal .credit-direction label{display:flex;align-items:center;gap:8px;margin:0}
body.newmagic #modal.account-reference-modal .credit-direction input{min-height:0;width:16px;height:16px;margin:0;accent-color:#ffbf00}
body.newmagic #modal.account-reference-modal .credit-subtotal h3{font:600 14px/22px sans-serif;border-bottom:1px solid #f0f0f0;padding:8px 0}
body.newmagic #modal.account-reference-modal .credit-subtotal p{margin:8px 0}
body.newmagic #modal.account-reference-modal .credit-total{display:block;color:#ff7875;border-top:1px solid #f0f0f0;padding-top:16px;margin-top:16px}
body.newmagic #modal.account-reference-modal .reference-credit .form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
@media(max-width:420px){body.newmagic #modal.account-reference-modal .credit-field{grid-template-columns:1fr;gap:4px}}

body.newmagic #modal.account-reference-modal .reference-credit :is(label,legend){color:#262626}

/* Agent search uses the reference's compact horizontal field rows. */
body.newmagic #main dialog.account-search-dialog:has(.reference-agent-filters){width:min(520px,calc(100vw - 32px));border-radius:2px}
body.newmagic .account-search-dialog:has(.reference-agent-filters) .search-heading{border-bottom:0}
body.newmagic .account-search-dialog .reference-agent-filters{display:flex;flex-direction:column;gap:20px;padding:18px 32px 26px}
body.newmagic .account-search-dialog .reference-agent-filters>label{display:grid;grid-template-columns:120px minmax(0,1fr);align-items:center;gap:8px;text-align:right;margin:0;font-weight:400}
body.newmagic #main dialog.account-search-dialog .reference-agent-filters .filter-actions{display:flex;gap:8px;margin-top:32px}
body.newmagic #main dialog.account-search-dialog .reference-agent-filters .filter-actions button{height:40px}
body.newmagic #main dialog.account-search-dialog .reference-agent-filters .filter-actions button.primary{flex:1}
body.newmagic .account-search-dialog:has(.reference-agent-filters) .reference-dialog-footer{border:0;padding:16px 24px}
@media(max-width:480px){body.newmagic .account-search-dialog .reference-agent-filters{padding:16px;gap:16px}body.newmagic .account-search-dialog .reference-agent-filters>label{grid-template-columns:84px minmax(0,1fr)}}

/* Account content keeps its reference layout; the shared NEW magic shell stays themed. */
body.newmagic .account-list .reference-fixed-column{z-index:1;background:#fff;box-shadow:-1px 0 0 #f0f0f0}body.newmagic .account-list th.reference-fixed-column{z-index:2;background:#fafafa}body.newmagic .column-drag-handle{color:#bfbfbf;cursor:grab;margin-right:4px}
@media(max-width:600px){body.newmagic .account-list .reference-fixed-column{position:static!important;right:auto!important;box-shadow:none}}
body.newmagic .account-reference-detail .reference-card h3{color:#334155}
body.newmagic .account-reference-detail .reference-row{color:rgba(0,0,0,.88)}
body.newmagic .account-target-list{max-height:160px;overflow:auto;border:1px solid #d9d9d9;border-radius:4px;padding:8px 12px;margin-top:8px}
body.newmagic .account-target-list .check{display:flex;gap:8px;min-height:30px;align-items:center}
body.newmagic .account-target-list input{width:16px;height:16px;min-height:16px}
body.newmagic [data-game-targets]{padding:12px;background:#fafafa;border:1px solid #f0f0f0;border-radius:6px;margin:12px 0}
body.newmagic .game-batch-toggle{display:flex;justify-content:flex-end;align-items:center;gap:12px}
body.newmagic .game-switch-pagination [aria-current=page]{border-color:#fec00e;color:#d48806;background:#fff}
body.newmagic .game-switch-pagination select{width:auto;min-width:100px;height:32px;min-height:32px}
body.newmagic .account-discard-confirm .check{display:flex;align-items:center;gap:6px;font-size:14px;color:#262626}
body.newmagic .account-discard-confirm .check input{width:16px;height:16px;min-height:16px;margin:0}
body.newmagic [data-target-selected] button{display:inline-flex;gap:6px;min-height:24px;padding:0 6px;background:#f5f5f5;border:1px solid #d9d9d9;border-radius:4px;margin:2px;color:#262626;font-size:12px}

/* Keep account identity controls on one line and reserve readable table columns. */
body.newmagic #main .account-list table{min-width:1160px;width:100%;table-layout:auto}
body.newmagic #main .account-list .account-identity{min-width:230px;align-items:center;text-align:left}
body.newmagic #main .account-list .account-identity>div{display:flex;flex-direction:column;align-items:flex-start;gap:2px}
body.newmagic #main .account-list .account-identity>div>div:first-child{display:flex;align-items:center;gap:6px;white-space:nowrap}
body.newmagic #main .account-list .account-id-link{display:inline;padding:0;margin:0;min-height:0;width:auto;background:none;border:0;box-shadow:none;font-family:inherit;font-size:14px;font-weight:600;line-height:22px;color:#082958}
body.newmagic #main .account-list .account-inspect{display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;margin:0;min-height:22px}
body.newmagic #main .account-list .account-downline{margin:2px 0 0;padding:2px 8px;min-height:24px;font-size:12px;line-height:20px}
body.newmagic #main .account-list .agency-account-card{min-width:160px;align-items:flex-start;text-align:left}
body.newmagic #main .account-list .row-actions{min-width:230px;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:4px}
body.newmagic #main .account-list .result-actions{margin:0 0 16px;padding:0;min-height:32px}

body.newmagic #modal.account-reference-modal:has(#accountGameSwitchForm){width:1000px;max-width:calc(100vw - 32px)}
body.newmagic #accountGameSwitchForm .account-game-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;align-items:end;gap:16px;margin-bottom:20px}
body.newmagic #accountGameSwitchForm .game-provider-tabs{display:flex;flex-wrap:wrap;border-bottom:1px solid #f0f0f0;gap:0;margin-bottom:16px}
body.newmagic #accountGameSwitchForm .game-provider-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:none;box-shadow:none;font-family:inherit;font-size:14px;line-height:22px;color:#595959;padding:10px 16px}
body.newmagic #accountGameSwitchForm .game-provider-tabs button[aria-selected=true]{color:#1677ff;border-bottom-color:#1677ff}
body.newmagic #accountGameSwitchForm table{width:100%;border-collapse:collapse;min-width:580px}
body.newmagic #accountGameSwitchForm th,body.newmagic #accountGameSwitchForm td{padding:12px 8px;text-align:left;border-bottom:1px solid #f0f0f0;background:#fff;color:#262626;font-size:14px}
body.newmagic #accountGameSwitchForm th{font-weight:600;background:#fafafa}
body.newmagic #accountGameSwitchForm .game-switch-pagination{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin:16px 0}
@media(max-width:600px){body.newmagic #accountGameSwitchForm .account-game-filters{grid-template-columns:repeat(2,minmax(0,1fr))}body.newmagic #accountGameSwitchForm .account-game-filters>button{grid-column:1/-1}}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm .game-provider-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:none;box-shadow:none;color:#262626;padding:10px 16px;min-height:44px}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm .game-provider-tabs button[aria-selected=true]{color:#fec00e;border-bottom-color:#fec00e}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm .table-wrap{border:0;border-radius:0;box-shadow:none}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm table{border-collapse:collapse;border:0;border-radius:0;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:#262626}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm :is(th,td){border:0;border-bottom:1px solid #f0f0f0;padding:12px 8px;text-align:left;font-size:14px;line-height:22px;color:#262626}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm th{background:#fafafa;font-weight:600}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm td{background:#fff;font-weight:400}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm tbody tr:hover td{background:#fafafa}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm .game-switch-pagination{gap:4px;flex-wrap:wrap}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm .game-switch-pagination>span:first-child{margin-right:8px}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm .game-switch-pagination button{border:1px solid transparent;background:transparent;box-shadow:none;padding:0 6px;min-width:24px;min-height:24px;line-height:22px}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm .game-switch-pagination button[aria-current=page]{border-color:#fec00e;color:#fec00e}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm [data-target-selected] button{min-height:24px;padding:0 6px;background:#f5f5f5;border:1px solid #d9d9d9;border-radius:4px;margin:2px;color:#262626;font-size:12px;box-shadow:none}
body.newmagic #modal.account-reference-modal{scrollbar-color:#bfbfbf transparent}
body.newmagic #modal.account-reference-modal::-webkit-scrollbar-thumb{background:#bfbfbf;border:0;box-shadow:none}

body.newmagic #modal.account-reference-modal .limit-sync-options{margin:16px 0;padding:16px 0;border:0;border-top:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0}body.newmagic #modal.account-reference-modal .limit-sync-options strong{display:block;margin:8px 0}body.newmagic #modal.account-reference-modal .limit-sync-options .check{font-size:14px;font-weight:400;margin:8px 0;display:flex;align-items:center;gap:8px}

body.newmagic #modal.account-reference-modal #accountGameSwitchForm .game-provider-tabs{gap:32px;flex-wrap:nowrap;overflow-x:auto}
body.newmagic #modal.account-reference-modal #accountGameSwitchForm .game-provider-tabs button{padding:12px 0;flex-shrink:0}

body.newmagic #main #userForm.account-reference-form>.form-actions>button.primary{background:#fec00e!important;border:1px solid #fec00e!important;color:#fff!important;box-shadow:0 2px 0 #00000005!important;border-radius:4px}
body.newmagic :is(#main,#modal.account-reference-modal) .access-group[data-access-section=SLOT] .access-group-head{color:#1677ff}
body.newmagic :is(#main,#modal.account-reference-modal) .access-group[data-access-section=LIVE] .access-group-head{color:#52c41a}
body.newmagic :is(#main,#modal.account-reference-modal) .access-group .count-pill{background:#1677ff;color:#fff;border:0}
body.newmagic :is(#main,#modal.account-reference-modal) .access-group[data-access-section=LIVE] .count-pill{background:#52c41a}

body.newmagic #main .account-reference-grid{display:grid;grid-template-columns:260px minmax(0,1fr);gap:16px;align-items:start}
body.newmagic #main .account-reference-grid.search-collapsed{grid-template-columns:minmax(0,1fr)}
body.newmagic #main .account-reference-results{min-width:0}
body.newmagic #main .reference-search-trigger[hidden]{display:none!important}
body.newmagic #main .account-reference-grid>.search-sidebar{position:static;width:auto;max-width:none;margin:0;padding:0;background:#fff;border:1px solid #f0f0f0;border-radius:8px;box-shadow:none;color:#262626;max-height:none;overflow:visible}
body.newmagic #main .account-reference-grid>.search-sidebar[hidden]{display:none}
body.newmagic #main .account-reference-grid>.search-sidebar>.search-heading{display:flex;align-items:center;justify-content:space-between;padding:16px;background:linear-gradient(90deg,#f8fafc,#fff);border-bottom:1px solid #f0f0f0;font-size:14px;color:#334155;font-weight:600}
body.newmagic #main .account-reference-grid>.search-sidebar>.search-heading button{border:0;background:transparent;color:#64748b;box-shadow:none;min-width:24px;min-height:24px;padding:0}
body.newmagic #main .account-reference-grid>.search-sidebar .filters{display:grid;grid-template-columns:minmax(0,1fr);padding:16px;gap:16px;background:#fff;color:#262626;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
body.newmagic #main .account-reference-grid>.search-sidebar .filters>label{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0;color:#262626;font-size:14px;font-weight:600}
body.newmagic #main .account-reference-grid>.search-sidebar .filters :is(input,select){border:1px solid #d9d9d9;border-radius:4px;background:#fff;color:#262626;height:32px;min-height:32px;padding:4px 10px;box-shadow:none;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:0;width:100%;min-width:0}
body.newmagic #main .account-reference-grid>.search-sidebar .filter-actions{display:flex;gap:8px;flex-wrap:wrap;margin:0}
body.newmagic #main .account-reference-grid>.search-sidebar .filter-actions button{border:1px solid #d9d9d9;background:#fff;color:#262626;border-radius:4px;box-shadow:none;font-size:14px;min-height:32px;padding:4px 12px}
body.newmagic #main .account-reference-grid>.search-sidebar .filter-actions button.primary{background:#fec00e;border-color:#fec00e;color:#fff}
@media(max-width:1023px){body.newmagic #main .account-reference-grid{grid-template-columns:minmax(0,1fr)}}

@media(min-width:1024px){body.newmagic #main:has(.account-reference-grid){padding-left:40px;padding-right:40px}body.newmagic #main .account-reference-grid:not(.search-collapsed){grid-template-columns:360px minmax(0,1fr);gap:20px}body.newmagic #main .account-reference-grid>.search-sidebar .filters{padding:20px 16px 32px;gap:20px}body.newmagic #main .account-reference-grid>.search-sidebar .filters>label{grid-template-columns:100px minmax(0,1fr);align-items:center;text-align:right;font-size:13px;color:#475569}body.newmagic #main .account-reference-grid>.search-sidebar .filter-actions{margin-top:32px;flex-wrap:nowrap}body.newmagic #main .account-reference-grid>.search-sidebar .filter-actions button{height:40px;white-space:nowrap}body.newmagic #main .account-reference-grid>.search-sidebar .filter-actions button.primary{flex:1}}
body.newmagic #main .account-reference-grid>.search-sidebar>.search-heading{border-left:3px solid #1677ff;padding:12px 16px}
body.newmagic #main .account-list .row-actions{min-width:120px;max-width:150px;gap:4px;align-items:center;flex-wrap:wrap}
body.newmagic #main .account-list .row-actions .row-icon-action{display:inline-flex;align-items:center;justify-content:center;width:20px;min-width:20px;min-height:24px;padding:0}
body.newmagic #main .account-list .row-icon-action svg{width:16px;height:16px}
body.newmagic #main .account-list .row-more{border:0;background:none;box-shadow:none;border-radius:0;padding:0;margin:0;min-width:20px}
body.newmagic #main .account-list .row-more>summary{list-style:none;border:0;background:none;color:#1677ff;padding:0;cursor:pointer;font-size:18px;line-height:24px}
body.newmagic #main .account-list .row-more>summary::-webkit-details-marker{display:none}
body.newmagic #main .account-list .row-more>summary:after{display:none}
body.newmagic #main .account-list .row-more[open]{flex-basis:100%;width:100%}
body.newmagic #main .account-list .row-more>div{padding:4px 0;border-top:1px solid #f0f0f0}
body.newmagic #main .account-list .row-more>div button{display:block;white-space:nowrap}

body.newmagic #modal.account-reference-modal:has(#accountWinLimitForm){width:min(500px,calc(100vw - 32px))}
body.newmagic #modal.account-reference-modal .account-win-limit-form{display:block}
body.newmagic #modal.account-reference-modal .account-win-limit-form fieldset{border:0;border-bottom:1px solid #f0f0f0;padding:0 0 24px;margin:0 0 16px}
body.newmagic #modal.account-reference-modal .account-win-limit-form legend{font-weight:600;margin:0 0 16px;color:#262626}
body.newmagic #modal.account-reference-modal .account-win-limit-form>label{display:grid;gap:8px;margin:0 0 24px}
body.newmagic #modal.account-reference-modal .account-win-limit-form .required{color:#ff4d4f}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-result{padding:0 0 16px;border-bottom:1px dashed #f0f0f0}
body.newmagic #modal.account-reference-modal .account-win-limit-form [data-win-reset]{background:#fec00e;border:1px solid #fec00e;border-radius:4px;color:white;padding:4px 15px;min-height:32px;box-shadow:0 2px 0 #00000005}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-meta{font-size:14px;line-height:22px}
body.newmagic #modal.account-reference-modal .account-win-limit-form [data-win-submit]{width:100%;height:32px}
body.newmagic #modal.account-reference-modal .account-win-limit-form button:disabled{opacity:.5;cursor:not-allowed}
body.newmagic #modal.account-reference-modal input[type=radio]{appearance:none;width:16px;height:16px;min-width:16px;min-height:16px;border:1px solid #d9d9d9;border-radius:50%;background:#fff;padding:0;box-shadow:none}
body.newmagic #modal.account-reference-modal input[type=radio]:checked{border:5px solid #fec00e;background:#fff}
body.newmagic #main .account-list .account-identity .reference-role{display:block!important;background:transparent!important;border:0!important;border-radius:0!important;padding:0!important;margin:0 0 2px;font-size:14px;font-weight:600;line-height:22px;box-shadow:none}
body.newmagic #main .account-list .tier-badge[data-tier="2"],body.newmagic #main .agency-navigation .tier-badge[data-tier="2"]{--tier-fg:#722ed1;--tier-border:#b37feb}
body.newmagic #main .account-list .account-id-link{font-weight:400!important;color:#1677ff!important;padding:0!important}
body.newmagic #main .account-list .row-actions .link{font-weight:400!important}
body.newmagic #main .account-list>.table-wrap{padding:0!important}
body.newmagic #main .account-list table{margin:0!important;padding:0!important}
@media(min-width:1024px){body.newmagic #main .account-reference-grid>.search-sidebar{position:sticky;top:90px;max-height:calc(100vh - 110px);overflow-y:auto}}

body.newmagic #modal.account-reference-modal .account-win-limit-form fieldset{padding-bottom:16px}
body.newmagic #modal.account-reference-modal .account-win-limit-form fieldset .check{height:22px;min-height:22px;padding:0;line-height:22px}
body.newmagic #modal.account-reference-modal .account-win-limit-form legend{margin-bottom:12px}

body.newmagic #main .account-reference-grid>.search-sidebar .filters,body.newmagic #main .account-reference-grid>.search-sidebar .search-scroll{max-height:none;height:auto;overflow:visible}
body.newmagic #modal.account-reference-modal:has(#gameAccessForm){width:min(600px,calc(100vw - 32px))}
body.newmagic #modal.account-reference-modal #gameAccessForm .permission-radio{border:0;border-bottom:1px solid #f0f0f0;padding:0 0 16px;margin:0 0 20px;min-height:0}
body.newmagic #modal.account-reference-modal #gameAccessForm .permission-radio legend{font-size:14px;font-weight:600;line-height:22px;color:#262626;margin:0 0 12px;padding:0}
body.newmagic #modal.account-reference-modal #gameAccessForm .permission-radio label{height:auto;min-height:22px;padding:0;line-height:22px;margin:0 16px 0 0}
body.newmagic #modal.account-reference-modal #gameAccessForm .reference-permission-info{margin:0;padding:16px;line-height:22px}
body.newmagic #modal.account-reference-modal #gameAccessForm{display:block}body.newmagic #modal.account-reference-modal #gameAccessForm .permission-radio{row-gap:0;column-gap:16px}body.newmagic #modal.account-reference-modal #gameAccessForm .permission-radio label{margin:0}body.newmagic #modal.account-reference-modal #gameAccessForm .form-actions{margin-top:24px}
body.newmagic dialog.account-discard-confirm p{color:#262626!important;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;margin:20px 0}
body.newmagic dialog.account-discard-confirm form label.check{display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;padding:0!important;min-height:22px!important;margin:0!important;color:#262626!important;font-size:14px!important;font-weight:400!important}
body.newmagic dialog.account-discard-confirm form label.check input{appearance:auto!important;display:inline-block!important;width:16px!important;height:16px!important;min-height:16px!important;min-width:16px!important;margin:0!important;padding:0!important;accent-color:#fec00e}
body.newmagic dialog.account-discard-confirm form footer{display:flex!important;position:static!important;padding:20px 0 0!important;margin:20px 0 0!important;background:transparent!important;border-top:1px solid #f0f0f0!important;box-shadow:none!important}
body.newmagic dialog.account-discard-confirm form footer button{background:#fff!important;border:1px solid #d9d9d9!important;box-shadow:none!important;border-radius:4px!important;color:#262626!important;min-height:32px!important;height:32px!important;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;padding:4px 15px!important}
body.newmagic dialog.account-discard-confirm form footer button.primary{background:#fec00e!important;border-color:#fec00e!important;color:#fff!important}
body.newmagic dialog.account-discard-confirm::backdrop{backdrop-filter:none!important;background:#0005!important}
body.newmagic .reference-columns>header{display:flex!important;align-items:center!important;justify-content:space-between!important;position:static!important;width:auto!important;height:auto!important;min-height:0!important;background:#fff!important;color:#262626!important;border:0!important;border-bottom:1px solid #f0f0f0!important;box-shadow:none!important;padding:0 0 8px!important;margin:0 0 8px!important}
body.newmagic .reference-columns>header label{display:flex!important;align-items:center!important;gap:8px!important;color:#262626!important}
body.newmagic .reference-columns input{accent-color:#fec00e}
body.newmagic #main:has(.account-reference-grid) :focus-visible,body.newmagic .account-search-dialog :focus-visible,body.newmagic .reference-columns :focus-visible{outline:2px solid #e2ae16;outline-offset:2px}

/* Reference page structure revision 2: source measurements 2026-11-09. */
body.newmagic #main .account-list{position:relative;padding:24px;margin:0;border-radius:8px}
body.newmagic #main .account-list .search-heading{height:52px;box-sizing:border-box;margin:-24px -24px 24px;padding:15px 16px}
body.newmagic #main .account-list .result-actions{display:flex;align-items:center;gap:12px;margin:0 0 16px;justify-content:flex-end}
body.newmagic #main .account-list-agent .result-actions{position:absolute;top:102px;right:24px;margin:0;z-index:2}
body.newmagic #main .account-list-agent .result-actions #create{display:none}
body.newmagic #main .account-list .result-actions :is(#listRefresh,#listDensity,#listColumns){width:20px;min-width:20px;padding:0;border:0;background:transparent;box-shadow:none}
body.newmagic #main .account-list-agent .agency-navigation{margin:0 0 16px;padding:0;border:0;background:none}
body.newmagic #main .account-list-agent .agency-navigation>div:first-child{display:flex;align-items:center;gap:8px;min-height:52px;margin:0 0 12px;color:#6986a8;font-size:14px}
body.newmagic #main .agency-navigation .tier-badge{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0;padding:4px 12px;min-width:92px;min-height:46px;border:1px solid #f5f5f5;border-left:3px solid var(--tier-color,#a855f7);border-radius:8px;background:#fff;box-shadow:none;text-align:left;line-height:20px}
body.newmagic #main .agency-navigation .tier-badge b{font-size:14px;color:var(--tier-color,#722ed1)}
body.newmagic #main .agency-navigation .tier-badge small{font-size:16px;color:#082958;line-height:20px}
body.newmagic #main .agency-navigation>.checks{display:inline-flex;flex-wrap:nowrap;height:32px;min-height:32px;margin:0;border-radius:4px;border:1px solid #d9d9d9;background:white}
body.newmagic #main .agency-navigation>.checks>label{display:flex;align-items:center;min-height:30px;height:30px;box-sizing:border-box;padding:4px 16px;line-height:22px;font-weight:400;font-size:14px;color:#111}
body.newmagic #main .agency-navigation>.checks>label:has(input:checked){background:#ffbf00;color:white}
body.newmagic #main .account-list table{border-collapse:separate;border-spacing:0;table-layout:auto;width:100%;min-width:850px}
body.newmagic #main .account-list table thead th{padding:12px 8px;height:47px;box-sizing:border-box;font-weight:600;white-space:nowrap}
body.newmagic #main .account-list table tbody td{padding:12px 8px;height:88px;box-sizing:border-box;vertical-align:middle;line-height:22px}
body.newmagic #main .account-list-agent table th:nth-child(1){min-width:68px}
body.newmagic #main .account-list-agent table th:nth-child(2){min-width:178px}
body.newmagic #main .account-list-agent table th:nth-child(3){min-width:65px}
body.newmagic #main .account-list-agent table th:nth-child(4){min-width:78px}
body.newmagic #main .account-list-agent table th:nth-child(6){min-width:132px}
body.newmagic #main .account-list .account-identity{min-width:160px;max-width:300px;gap:10px;position:relative;line-height:20px}
body.newmagic #main .account-list-agent .account-identity{border-left:4px solid #06b6d4;padding-left:10px;border-radius:2px}
body.newmagic #main .account-list .account-identity>div{line-height:20px;gap:0}
body.newmagic #main .account-list .account-avatar{width:46px;height:46px;flex:0 0 46px;border-radius:12px;overflow:hidden;background:#f8f8f8}
body.newmagic #main .account-list .account-identity .reference-role{background:transparent;border:0;padding:0;margin:0;line-height:22px;font-size:16px;font-weight:600;color:#006d91;min-height:0;border-radius:0;box-shadow:none}
body.newmagic #main .account-list .agency-account-card{min-width:145px;padding:0 0 0 10px;border:0;border-left:4px solid #06b6d4;border-radius:2px;background:transparent;line-height:20px;text-align:left}
body.newmagic #main .account-list .agency-account-card>b{font-size:16px;color:#006d91;font-weight:600;line-height:22px}
body.newmagic #main .account-list .agency-account-card strong{font-size:12px;font-weight:400;color:#082958}
body.newmagic #main .account-list .account-id-link{font-weight:400;font-size:12px;color:#1677ff!important;line-height:20px;padding:0;min-height:0;background:none;border:0;box-shadow:none;text-align:left}
body.newmagic #main .account-list .account-inspect{margin-left:6px;width:22px;height:22px;min-width:22px;min-height:22px;display:inline-grid;place-items:center;vertical-align:middle;box-shadow:none;border:0}
body.newmagic #main .account-list .account-inspect svg{width:14px;height:14px}
body.newmagic #main .account-list .account-identity>div>div:first-child{gap:4px}
body.newmagic #main .account-list table tbody td:has(.reference-created-relative){color:#1677ff}
body.newmagic #main .account-list .reference-created-relative{display:block;font-size:12px;color:#1677ff;line-height:16px}
body.newmagic #main .account-list .reference-created-stamp{display:block;font-size:10px;color:#94a3b8;line-height:14px;white-space:nowrap}
body.newmagic #main .account-list table tbody td:nth-last-child(1){font-size:12px}
body.newmagic #main .account-list .row-actions{display:flex;gap:5px;align-items:center;flex-wrap:nowrap;min-width:100px}
body.newmagic #main .account-list .row-actions .link{padding:0;min-height:22px;line-height:22px;font-size:14px}
body.newmagic #main .account-list .row-icon-action{width:18px;min-width:18px;display:grid;place-items:center}
body.newmagic #main .account-list .row-icon-action svg{width:16px;height:16px}
body.newmagic #main .account-list .pagination{padding:16px 0 0;margin:0;gap:8px;min-height:32px}
body.newmagic #main .account-list .pagination label{display:flex;align-items:center;gap:6px;font-size:12px}
body.newmagic #main .reference-exact-create{width:100%;max-width:750px!important;margin:0;padding:16px;background:#fff;border:0;border-radius:12px;box-sizing:border-box}
body.newmagic #main:has(.reference-exact-create)>.panel{padding:0;border:0;background:transparent;box-shadow:none}
body.newmagic #main:has(.reference-exact-create)>.panel>.panel-head{display:none}
body.newmagic #main .reference-exact-create .reference-create-basics{padding:0;margin:0;display:block}
body.newmagic #main .reference-exact-create .reference-create-basics>label{display:grid;gap:8px;width:300px;max-width:100%;margin:0 0 24px;font-size:14px;line-height:22px;font-weight:400}
body.newmagic #main .reference-exact-create .reference-create-basics>label :is(input,select){width:100%;height:32px;box-sizing:border-box}
body.newmagic #main .reference-exact-create .reference-required{font-weight:600;font-size:14px;line-height:22px}
body.newmagic #main .reference-exact-create .reference-required::before{content:'*';color:#ff4d4f;margin-right:4px;font-family:SimSun,sans-serif}
body.newmagic #main .reference-exact-create .reference-create-rebate{padding:0;margin:0 0 24px;border:0;display:flex;align-items:center;gap:16px;min-width:0}
body.newmagic #main .reference-exact-create .reference-create-rebate legend{padding:0;margin:0 0 8px;font-size:14px}
body.newmagic #main .reference-exact-create .reference-create-rebate label{display:inline-flex;align-items:center;gap:8px;margin:0;font-weight:400}
body.newmagic #main .reference-exact-create input[type=radio]{width:16px;height:16px;min-height:0;margin:0;accent-color:#ffbf00}
body.newmagic #main .reference-exact-create .reference-default-password{display:flex;gap:5px;align-items:center;width:fit-content;margin:0 0 24px;padding:7px 12px;border-radius:6px;background:#f0f7ff;color:#1677ff;font-size:12px;line-height:18px}
body.newmagic #main .reference-exact-create .reference-default-password strong{font-weight:400}
body.newmagic #main .reference-exact-create .reference-required-title{font-style:normal;border-bottom:1px dashed #d9d9d9;padding:0 0 16px;margin:0 0 24px;font-size:20px;color:#082958}
body.newmagic #main .reference-exact-create .reference-form-divider{display:flex;align-items:center;gap:12px;font-size:16px;font-weight:600;color:#082958;margin:20px 0 24px;padding:0;background:none;border:0}
body.newmagic #main .reference-exact-create .reference-form-divider::after{content:'';height:1px;background:#f0f0f0;flex:1}
body.newmagic #main .reference-exact-create #childContractFields{display:block;margin:0;padding:0}
body.newmagic #main .reference-exact-create[data-account-kind=player] .account-access{display:none}
body.newmagic #main .reference-exact-create .account-section{margin:0 0 24px;padding:16px;border:1px solid #f5f5f5;border-radius:10px;background:white;box-shadow:none}
body.newmagic #main .reference-exact-create .account-section>summary{padding:0 0 16px;min-height:38px;font-size:14px;color:#082958;border:0;font-weight:600}
body.newmagic #main .reference-exact-create .contract-value-group{padding:0 0 16px;margin:0;border:0}
body.newmagic #main .reference-exact-create .contract-value-group .account-field-grid{grid-template-columns:1fr;gap:24px;padding:16px 10px 0}
body.newmagic #main .reference-exact-create .contract-value-group .account-field-grid label{gap:8px}
body.newmagic #main .reference-exact-create .contract-value-group .account-field-grid label>small{display:none}
body.newmagic #main .reference-exact-create .contract-value-group .account-field-grid label>span:first-child::before{content:'*';color:#ff4d4f;margin-right:4px}
body.newmagic #main .reference-exact-create .contract-value-group .access-group-head{padding:12px 16px;min-height:52px;box-sizing:border-box;border-radius:8px 8px 0 0;gap:8px}
body.newmagic #main .reference-exact-create .contract-value-group .access-group-head input{width:200px!important;height:32px}
body.newmagic #main .reference-exact-create .access-cards{grid-template-columns:repeat(3,minmax(0,1fr));padding:12px 0;gap:8px 12px}
body.newmagic #main .reference-exact-create .form-actions{padding:0;gap:12px;margin:0}
body.newmagic #main .reference-exact-create .form-actions button{width:auto;min-width:64px;min-height:32px;padding:4px 15px;font-size:14px;border-radius:6px;box-shadow:none;letter-spacing:0}
@media(max-width:600px){body.newmagic #main .reference-exact-create{padding:16px;max-width:100%!important}body.newmagic #main .reference-exact-create .access-cards{grid-template-columns:repeat(2,minmax(0,1fr))}body.newmagic #main .reference-exact-create .contract-value-group .access-group-head input{width:110px!important}body.newmagic #main .account-list-agent .result-actions{top:108px;right:16px;gap:8px}body.newmagic #main .account-list-agent .agency-navigation>div:first-child{padding-right:100px;flex-wrap:wrap}body.newmagic #main .account-list .agency-navigation .tier-badge{min-width:76px}body.newmagic #main .account-list{padding:16px}body.newmagic #main .account-list .search-heading{margin:-16px -16px 24px}}

body.newmagic #main .account-list .reference-number{font-size:12px;color:#6b86a8;white-space:nowrap}
body.newmagic #main .account-list .reference-row-select{width:12px;height:12px;min-height:0;margin:0 0 0 8px;vertical-align:middle;accent-color:#ffbf00}
body.newmagic #main .account-list .account-identity:has([data-tier="2"]),body.newmagic #main .account-list .agency-account-card[data-tier="2"]{border-left-color:#a855f7}
body.newmagic #main .account-list .agency-account-card[data-tier="2"]>b{color:#722ed1}
body.newmagic #main .account-list .reference-role[data-tier="2"]{color:#722ed1}
body.newmagic #main .agency-navigation .tier-badge{--tier-color:var(--tier-fg,#722ed1)}

body.newmagic #main:has(.reference-exact-create){padding:20px 40px 60px}
body.newmagic #main:has(.reference-exact-create)>.panel>.panel-body{padding:0}
body.newmagic #main .reference-exact-create{padding:24px}
body.newmagic #main .reference-exact-create .reference-create-basics>label{margin-bottom:16px}
body.newmagic #main .reference-exact-create .reference-default-password{margin-bottom:16px}
body.newmagic #main .reference-exact-create .reference-create-target{padding:0;border:0;margin:0 0 24px;min-width:0}
body.newmagic #main .reference-exact-create .reference-create-target legend{padding:0;margin:0 0 8px;font-size:14px;line-height:22px;font-weight:600}
body.newmagic #main .reference-exact-create .reference-create-target label{display:inline-flex;align-items:center;gap:8px;margin:0;font-weight:400;line-height:22px}
@media(max-width:600px){body.newmagic #main:has(.reference-exact-create){padding:16px}body.newmagic #main .reference-exact-create{padding:16px}}

body.newmagic:has(#main :is(.account-list,.reference-exact-create)){overflow-y:scroll}
body.newmagic:has(#main :is(.account-list,.reference-exact-create))>.page-title{box-sizing:border-box;height:56px;min-height:56px;padding:12px 20px;margin:24px 55px 0 40px}
body.newmagic:has(#main :is(.account-list,.reference-exact-create))>.page-title h1{display:flex;align-items:center;gap:12px;margin:0;font-size:20px;line-height:32px;font-weight:600}
body.newmagic:has(#main :is(.account-list,.reference-exact-create))>.page-title h1::before{content:'';display:block;width:32px;height:32px;flex:0 0 32px;border-radius:8px;background:#5e6cff url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2220%22 height=%2220%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22white%22 stroke-width=%221.6%22%3E%3Ccircle cx=%2211%22 cy=%227%22 r=%223.5%22/%3E%3Cpath d=%22M4 21v-3a7 7 0 0 1 13-3m3-5v8m-4-4h8%22/%3E%3C/svg%3E') center/20px no-repeat}
body.newmagic #main:has(:is(.account-list,.reference-exact-create)){padding:16px 55px 40px 40px}
body.newmagic #main .reference-exact-create{box-shadow:0 0 0 1px #fafafa}
body.newmagic #main .reference-exact-create .reference-create-target{margin-bottom:22px}
body.newmagic #main .reference-exact-create .reference-create-basics>label{margin-bottom:15px}
body.newmagic #main .reference-exact-create .reference-default-password{margin-bottom:17px}
@media(max-width:600px){body.newmagic:has(#main :is(.account-list,.reference-exact-create))>.page-title{margin:68px 16px 0;padding:12px}body.newmagic #main:has(:is(.account-list,.reference-exact-create)){padding:16px}body.newmagic #main .account-list-agent .result-actions{position:static;margin:0 0 16px}body.newmagic #main .account-list-agent .agency-navigation>div:first-child{padding:0}}

body.newmagic #main .account-list .reference-copy-number{border:0;padding:0;margin-left:6px;min-height:16px;min-width:12px;width:12px;line-height:16px;font-size:10px;background:none;color:#a2b4cb;box-shadow:none}
body.newmagic #main .reference-exact-create #childContractFields>p{display:none}

body.newmagic #main .account-list{padding:23px}
body.newmagic #main .account-list-agent .agency-navigation{display:block;gap:0;margin-bottom:17px}
body.newmagic #main .account-list-agent .agency-navigation>div:first-child{margin-bottom:6px}
body.newmagic #main .account-list :is(th,td){text-align:left!important;min-width:0}
body.newmagic #main .account-list-agent table{table-layout:fixed;min-width:791px}
body.newmagic #main .account-list-agent table th:nth-child(1){width:68px;min-width:68px}
body.newmagic #main .account-list-agent table th:nth-child(2){width:178px;min-width:178px}
body.newmagic #main .account-list-agent table th:nth-child(3){width:44px;min-width:44px}
body.newmagic #main .account-list-agent table th:nth-child(4){width:76px;min-width:76px}
body.newmagic #main .account-list-agent table th:nth-child(5){width:72px}
body.newmagic #main .account-list-agent table th:nth-child(6){width:132px;min-width:132px}
body.newmagic #main .account-list-agent table th:nth-child(7){width:72px}
body.newmagic #main .account-list-agent table th:nth-child(8){width:99px}
body.newmagic #main .account-list-agent table th:nth-child(9){width:50px}
body.newmagic #main .account-list-agent .account-identity>div>div{display:flex;align-items:center;gap:4px;white-space:nowrap}
body.newmagic #main .account-list-agent .account-identity>div>div>.muted{font-size:12px;margin:0}
body.newmagic #main .account-list .row-actions{min-width:86px;gap:4px}
body.newmagic #main .account-list .row-actions button{min-height:22px}
body.newmagic #main .account-list .pagination{box-sizing:border-box;height:48px;min-height:48px;padding:16px 0 0;align-items:center}
body.newmagic #main .account-list .pagination :is(button,label,select){height:32px;min-height:32px;box-sizing:border-box;margin:0}
body.newmagic #main .account-list .pagination label{font-size:0;gap:0}
body.newmagic #main .account-list .pagination select{font-size:14px;padding:4px 10px;border:1px solid #d9d9d9;border-radius:6px}
@media(max-width:600px){body.newmagic #main .account-list{padding:16px}body.newmagic #main .account-list-agent .result-actions{position:static}.newmagic #main .account-list .pagination{height:auto;min-height:48px;flex-wrap:wrap}}

body.newmagic #main .reference-exact-create .reference-contract-heading{height:25px;line-height:25px;font-size:16px;font-weight:500;display:flex;gap:12px;align-items:center;padding:0;margin:0 0 12px;background:none;border:0;color:#082958}
body.newmagic #main .reference-exact-create .reference-contract-heading::before{content:'';display:block;flex:0 0 16px;height:1px;background:#f0f0f0}
body.newmagic #main .reference-exact-create .reference-contract-heading::after{content:'';flex:1;height:1px;background:#f0f0f0}
body.newmagic #main .reference-exact-create[data-account-kind=player] .reference-access-heading{display:none}
.reference-apply-copy{display:none}
body.newmagic #main .reference-exact-create .reference-apply-copy{display:inline;color:#94a3b8}
body.newmagic #main .reference-exact-create .reference-apply-label{display:none}
body.newmagic #main .reference-exact-create [data-contract-apply]{order:1;padding:0;min-height:20px;min-width:16px;border:0;box-shadow:none;background:none}
body.newmagic #main .reference-exact-create .contract-value-group .access-group-head label{order:2;color:#94a3b8;font-size:12px;font-weight:400}
body.newmagic #main .reference-exact-create .contract-value-group .access-group-head b{order:0;font-size:12px;font-weight:400;border-left:3px solid currentColor;padding-left:10px}
body.newmagic #main .reference-exact-create [data-contract-feedback]{order:3}
body.newmagic #main .account-list-agent table:has(th:nth-child(10)){min-width:1050px;table-layout:auto}

body.newmagic #main .account-list-agent table{table-layout:auto}
body.newmagic #main .account-list .account-id-link{white-space:nowrap;word-break:normal;overflow-wrap:normal}
body.newmagic #main .account-list-agent .account-identity>div>div{min-width:max-content}
body.newmagic #main .account-list .search-heading svg{color:#5e6cff;background:#e9eeff;box-sizing:content-box;width:16px;height:16px;padding:5px;border-radius:5px}

body.newmagic #main .reference-exact-create[data-account-kind=agent]{padding:0;margin-top:10.59375px;box-shadow:none}
body.newmagic #main .reference-exact-create[data-account-kind=agent] .reference-required-title{box-sizing:border-box;height:40px;line-height:32px;padding:0 0 8px;margin:0 0 24px;border-bottom:6px dotted #082958;font-style:italic;font-size:20px;font-weight:600}
body.newmagic #main .reference-exact-create .reference-agent-card{margin:0 0 12px;border:0;border-radius:12px;overflow:hidden;background:white;box-shadow:0 1px 2px #0000000d,0 0 0 1px #fafafa}
body.newmagic #main .reference-exact-create .reference-agent-card>h3{display:flex;align-items:center;gap:8px;box-sizing:border-box;height:56px;padding:16px;margin:0;background:linear-gradient(90deg,#f8fafc,#fff);font-size:14px;line-height:24px;color:#082958;font-weight:600}
body.newmagic #main .reference-exact-create .reference-agent-section-icon{width:24px;height:24px;border-radius:5px;display:inline-grid;place-items:center;background:#4096ff;color:white;font-size:16px}
body.newmagic #main .reference-exact-create .reference-agent-section-icon.green{background:#23c69f}
body.newmagic #main .reference-exact-create .reference-agent-card-body{padding:12px 16px 8px}
body.newmagic #main .reference-exact-create .reference-agent-card-body label{display:grid;gap:8px;width:300px;max-width:100%;margin:0 0 15px;font-size:14px;line-height:22px;font-weight:400}
body.newmagic #main .reference-exact-create .reference-agent-credentials{display:grid;grid-template-columns:300px 206px;gap:32px}
body.newmagic #main .reference-exact-create .reference-agent-credentials>label{width:auto}
body.newmagic #main .reference-exact-create .reference-agent-card-body label.reference-agent-password{width:224px}
body.newmagic #main .reference-exact-create .reference-agent-card-body label :is(input,select){height:32px;min-height:32px;box-sizing:border-box;width:100%}
body.newmagic #main .reference-exact-create .reference-agent-amount{display:flex;align-items:center;gap:8px;width:350px;max-width:100%}
body.newmagic #main .reference-exact-create .reference-agent-amount input{width:300px;flex:0 0 300px}
body.newmagic #main .reference-exact-create .reference-agent-contract-body{padding:16px}
body.newmagic #main .reference-exact-create .reference-agent-contract-body>.account-section{border:0;margin:0;padding:12px 16px}
body.newmagic #main .reference-exact-create .reference-access-tab{padding:16px;color:#e5b012;border-bottom:1px solid #f0f0f0;font-size:14px}
body.newmagic #main .reference-exact-create [data-capabilities]{display:none}
body.newmagic #main .reference-exact-create :is(.reference-create-target,.reference-create-rebate) input[type=radio]{appearance:none;border:1px solid #d9d9d9;border-radius:50%;background:white;width:16px;height:16px;min-height:16px;padding:0;box-shadow:none;flex:0 0 16px}
body.newmagic #main .reference-exact-create :is(.reference-create-target,.reference-create-rebate) input[type=radio]:checked{border:5px solid #ffbf00;background:white}
body.newmagic #main .reference-exact-create select,body.newmagic #main .account-list .pagination select{appearance:none;background:#fff url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 12 12%22 fill=%22none%22 stroke=%22%23bfbfbf%22%3E%3Cpath d=%22m2 4 4 4 4-4%22/%3E%3C/svg%3E') right 11px center/12px no-repeat;padding-right:30px}
body.newmagic #main .account-list-agent tbody td:nth-child(3){color:#94a3b8;font-size:14px;font-weight:600}
body.newmagic #main .account-list tbody td:first-child .account-id-link{color:#6b86a8!important;font-size:12px}
body.newmagic:has(#main :is(.account-list,.reference-exact-create)) #floatingMail{position:fixed;left:24px;right:auto;bottom:24px;width:40px;height:40px;min-width:40px;min-height:40px;padding:10px;border:0;border-radius:50%;background:white;box-shadow:0 3px 12px #0002;font-size:0}
body.newmagic:has(#main :is(.account-list,.reference-exact-create)) #floatingMail span{display:none}
body.newmagic:has(#main :is(.account-list,.reference-exact-create)) #floatingMail svg{width:20px;height:20px;color:#262626}
@media(max-width:600px){body.newmagic #main .reference-exact-create .reference-agent-credentials{grid-template-columns:minmax(0,1fr);gap:0}body.newmagic #main .reference-exact-create .reference-agent-amount input{width:100%;flex:1;min-width:0}body.newmagic #main .reference-exact-create .reference-agent-card-body label{max-width:100%}}

body.newmagic #main .reference-exact-create .reference-agent-card-body label:has([name=amount]){width:auto}

body.newmagic #main .account-list .account-identity>div>div:first-child{flex-wrap:nowrap!important;min-width:max-content}
body.newmagic #main .account-list-player table{min-width:1140px}
body.newmagic #main .account-list-player th:nth-child(1){min-width:68px}
body.newmagic #main .account-list-player th:nth-child(2){min-width:166px}
body.newmagic #main .account-list-player th:nth-child(3){min-width:250px}
body.newmagic #main .account-list-player th:nth-child(4){min-width:97px}
body.newmagic #main .account-list-player td:nth-child(4){color:#94a3b8;font-size:14px;font-weight:600}

@media(max-width:600px){body.newmagic #main .reference-exact-create .reference-agent-card-body label:has([name=amount]){width:100%;min-width:0}body.newmagic #main .reference-exact-create .reference-agent-amount{width:100%;min-width:0;max-width:100%}body.newmagic #main .reference-exact-create .reference-agent-amount input{flex:1 1 0%;width:0;min-width:0}body.newmagic #main .reference-exact-create .reference-agent-amount>span{flex:0 0 auto}}
body:is([data-section="players"],[data-section="agents"]) .reference-sort{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;border:0;background:transparent;box-shadow:none;padding:0;color:inherit;font:inherit;font-weight:600;white-space:nowrap;text-align:left;cursor:pointer}
body:is([data-section="players"],[data-section="agents"]) .reference-sort svg{width:10px;height:14px;flex:none;fill:#bfbfbf}
body:is([data-section="players"],[data-section="agents"]) .reference-sort svg .is-active{fill:#ffbf00}
body:is([data-section="players"],[data-section="agents"]) .reference-sort:focus-visible{outline:2px solid #1890ff;outline-offset:3px}

/* Keep the reference mail shortcut independent from the legacy action dock. */
body.newmagic:has(#main :is(.account-list,.reference-exact-create)) .admin-quick-actions #floatingMail{position:fixed!important;left:24px;right:auto;bottom:24px}
@media(max-width:600px){body.newmagic #main .account-list .pagination{height:auto;min-height:48px;flex-wrap:wrap}body.newmagic:has(#main :is(.account-list,.reference-exact-create)) .admin-quick-actions #floatingMail{left:12px;bottom:12px}}
/* Player detail modules follow the reference cards and action hierarchy. */
body.newmagic #main:has(.account-reference-detail){padding:20px 40px 60px}
body.newmagic #main:has(.account-reference-detail)>.panel{border:0;background:white;box-shadow:none}
body.newmagic #main:has(.account-reference-detail)>.panel>.panel-body{padding:0}
body.newmagic .account-reference-detail .reference-card{margin:16px 0;border-color:#f5f5f5}
body.newmagic .account-reference-detail .reference-card h3{padding:10px 20px;min-height:44px;box-sizing:border-box;gap:8px}
body.newmagic .account-reference-detail .reference-card h3:after{content:'';height:1px;background:#edf1f5;flex:1;margin-left:4px}
body.newmagic .account-reference-detail .reference-card-content{padding:12px 20px 16px}
body.newmagic .account-reference-detail .reference-row{min-height:32px;margin:4px 0;gap:8px}
body.newmagic .account-reference-detail [data-detail-card="遊戲設定"] .detail-card-icon{background:#b66af5}
body.newmagic .account-reference-detail [data-detail-card="登入 / 綁定資訊"] .detail-card-icon{background:#fa9412}
body.newmagic .account-reference-detail [data-detail-card="錢包資訊"] .detail-card-icon{background:#4096ff}
body.newmagic .account-reference-detail [data-detail-card="盈虧限制"] .detail-card-icon{background:#ff5286}
body.newmagic .account-reference-detail .detail-login-line{display:flex;align-items:center;flex-wrap:wrap;gap:0 8px}
body.newmagic .account-reference-detail .detail-wallet-line{display:flex;align-items:flex-end;flex-wrap:wrap;gap:16px 28px}
body.newmagic .account-reference-detail .detail-wallet-balance{display:flex;flex-direction:column;gap:0;min-width:78px}
body.newmagic .account-reference-detail .detail-wallet-balance small{color:#97a5b8;font-size:12px}
body.newmagic .account-reference-detail .detail-wallet-balance strong{font:700 26px/32px ui-monospace,SFMono-Regular,Consolas,monospace;color:#082958}
body.newmagic .account-reference-detail .detail-wallet-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 4px}
body.newmagic .account-reference-detail :is([data-detail-credit],[data-detail-refresh],[data-detail-win-limit],[data-detail-view="games"]){display:inline-flex;align-items:center;gap:6px;background:#3e83f7!important;border:1px solid #3e83f7!important;color:white!important;border-radius:6px;padding:4px 12px;min-height:32px;font:14px/22px inherit;box-shadow:none}
body.newmagic .account-reference-detail .detail-wallet-actions [data-detail-route]{border:0;background:#fff3c7;color:#ad6800;border-radius:6px;padding:4px 12px;min-height:32px;font-size:14px}
body.newmagic .account-reference-detail .detail-win-limit-card{width:300px;max-width:100%;margin-top:8px;border:1px solid #f0f0f0;border-radius:10px;overflow:hidden}
body.newmagic .account-reference-detail .detail-win-limit-card h4{margin:0;padding:16px 24px;font-size:16px;line-height:22px;border-bottom:1px solid #f0f0f0}
body.newmagic .account-reference-detail .detail-win-limit-card>div{padding:24px;font-size:14px;line-height:22px}
body.newmagic #main:has(.account-reference-detail)>.panel>.panel-body>.form-actions{display:none}
body.newmagic .account-reference-detail .detail-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:0;padding:8px 0;border-bottom:0}
body.newmagic .account-reference-detail .detail-toolbar button{padding:0 12px;border-right:1px solid #e8edf5;border-radius:0;min-height:22px;font-size:13px;line-height:22px}
body.newmagic .account-reference-detail .detail-toolbar button:last-child{border-right:0}
body.newmagic:has(#main .account-reference-detail) .admin-quick-actions #floatingMail{position:fixed!important;left:12px;right:auto;bottom:12px;width:40px;height:40px;min-width:40px;padding:10px;border-radius:50%;background:white;border:0;font-size:0}
body.newmagic:has(#main .account-reference-detail) #floatingMail span,body.newmagic:has(#main .account-reference-detail) #floatingSearch{display:none!important}
/* 500px maximum win dialog, matching reference spacing rather than inherited fieldset cards. */
body.newmagic #modal.account-reference-modal:has(#accountWinLimitForm){width:min(500px,calc(100vw - 32px));margin:100px auto 0;border-radius:2px;max-height:calc(100dvh - 124px)}
body.newmagic #modal.account-reference-modal:has(#accountWinLimitForm) .modal-head{height:62px;box-sizing:border-box;padding:20px 24px 16px;margin:0 24px;padding-left:0;padding-right:0}
body.newmagic #modal.account-reference-modal:has(#accountWinLimitForm) .modal-body{padding:12px 24px 24px}
body.newmagic #modal.account-reference-modal .account-win-limit-form{padding:0;margin:0;gap:0;max-width:none}
body.newmagic #modal.account-reference-modal .account-win-limit-form fieldset{display:block;min-width:0;min-height:0;background:white;border:0;border-radius:0;box-shadow:none;border-bottom:1px solid #f0f0f0;padding:0 0 24px;margin:0 0 16px}
body.newmagic #modal.account-reference-modal .account-win-limit-form legend{padding:0;margin:0 0 12px;line-height:22px;font-size:14px}
body.newmagic #modal.account-reference-modal .account-win-limit-form fieldset .check{display:flex;align-items:center;gap:8px;line-height:22px;min-height:22px;margin:0}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-amount{display:grid;gap:8px;padding:0 0 16px;margin:0 0 16px;border-bottom:1px solid #f0f0f0}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-amount input{height:32px;min-height:32px;border:1px solid #d9d9d9;border-radius:6px;padding:4px 11px;box-sizing:border-box;color:#262626;font-size:14px}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-result{padding:0 0 16px;margin:0;border-bottom:1px dashed #f0f0f0}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-result strong{display:block;line-height:22px}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-result p{margin:16px 0 20px;font-size:14px;line-height:22px}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-meta{padding:16px 0 0;margin:0}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-meta p{margin:0 0 12px;line-height:22px}
body.newmagic #modal.account-reference-modal .account-win-limit-form code{font:14px/20px inherit;border:1px solid #d9d9d9;border-radius:2px;background:#fafafa;padding:0 4px}
body.newmagic #modal.account-reference-modal .account-win-limit-form [data-win-submit]{background:#ffbf00!important;border:1px solid #ffbf00!important;border-radius:4px;color:white;font-size:14px;font-weight:400;min-height:32px;height:32px;box-shadow:0 3px 8px #0002;margin:0}
body.newmagic #main .row-actions details[hidden]{display:none!important}
@media(max-width:600px){body.newmagic #main:has(.account-reference-detail){padding:16px}body.newmagic #modal.account-reference-modal:has(#accountWinLimitForm){margin:24px auto 0;max-height:calc(100dvh - 48px)}body.newmagic .account-reference-detail .detail-wallet-actions{gap:8px}}
body.newmagic #main .reference-exact-create[data-account-kind=player] .account-section{border:0;border-radius:0;box-shadow:none;padding:16px;margin:0 0 16px}
body.newmagic #main .reference-exact-create .reference-contract-symbol{display:inline-block;color:#8b23ff;font-size:16px;font-weight:400;margin-right:8px}
body.newmagic #main .reference-exact-create .contract-value-group .reference-contract-count{background:#1677ff;color:white;border-radius:12px;line-height:20px;font-weight:400;font-size:12px;min-width:20px;text-align:center;padding:0 6px}
body.newmagic #main .reference-exact-create .contract-value-group[data-contract-group=LIVE] .reference-contract-count{background:#52c41a}
body.newmagic #main .reference-exact-create .reference-limits-section{border:0;padding:0;margin:0}
body.newmagic #main .reference-exact-create .reference-limit-fold>summary{display:flex;align-items:center;gap:8px;font-weight:400}
body.newmagic #main .reference-exact-create .reference-limit-fold>summary>svg{color:#1677ff}
body.newmagic #main .reference-exact-create .reference-limit-fold>summary:after,body.newmagic #main .reference-exact-create .account-section>summary:after{content:'';width:12px;height:12px;background:url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 12%22 fill=%22none%22 stroke=%22%23262626%22%3E%3Cpath d=%22m2 4 4 4 4-4%22/%3E%3C/svg%3E') center/12px no-repeat;margin-left:auto;transform:none}
body.newmagic #main .reference-exact-create .reference-limit-fold [data-limit-draft-root]>.help,body.newmagic #main .reference-exact-create .limit-custom-bulk,body.newmagic #main .reference-exact-create .limit-game-details,body.newmagic #main .reference-exact-create [data-limit-all]+*,body.newmagic #main .reference-exact-create .limit-provider .account-field-grid>label:has([data-limit-search]),body.newmagic #main .reference-exact-create .limit-provider [data-limit-selected],body.newmagic #main .reference-exact-create [data-limit-default=maximum],body.newmagic #main .reference-exact-create [data-limit-default=inherit]{display:none!important}
body.newmagic #main .reference-exact-create .limit-provider{padding:16px;border:0;border-bottom:1px solid #dbe5ef;border-radius:0 0 12px 12px;margin:0 0 8px;background:white}
body.newmagic #main .reference-exact-create .limit-provider>summary{display:flex;align-items:center;gap:10px;color:#1677ff;font-size:12px;padding:0;margin:0 0 24px;border-left:3px solid #1677ff;min-height:28px}
body.newmagic #main .reference-exact-create .limit-provider .vendor-monogram{display:grid;place-items:center;width:28px;height:28px;min-width:28px;padding:0;border:0;border-radius:8px;background:#f5f7fa;margin-left:12px;overflow:hidden}
body.newmagic #main .reference-exact-create .limit-provider .vendor-monogram img{width:28px;height:28px;object-fit:contain}
body.newmagic #main .reference-exact-create .limit-provider .account-field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0}
body.newmagic #main .reference-exact-create .limit-provider .account-field-grid label{font-size:14px;font-weight:600;gap:8px}
body.newmagic #main .reference-exact-create .limit-provider .reference-required:before{content:'*';color:#ff4d4f;margin-right:4px}
body.newmagic #main .reference-exact-create .reference-limit-required{font-size:10px;font-weight:400;line-height:16px;border:1px solid #ffe58f;color:#faad14;background:#fffbe6;padding:0 6px}
body.newmagic #main .reference-exact-create .reference-limit-group-count{border-radius:50%;background:#1677ff;color:white;min-width:20px;height:20px;line-height:20px;text-align:center;margin-left:auto}
body.newmagic #main .reference-exact-create .limit-presets{margin:0 0 24px}
body.newmagic #main .reference-exact-create .limit-presets button{height:32px;min-height:32px;padding:4px 15px;font-size:14px;font-weight:400;border-radius:6px}
body.newmagic #main .reference-exact-create .limit-game-details[open]{display:block!important}
body.newmagic #main .reference-exact-create .limit-provider:has([data-limit-all] option[value=""]:checked) .limit-game-details{display:block!important}
body.newmagic #modal.account-reference-modal .account-win-limit-form code{font-family:inherit;font-size:14px;line-height:20px}
@media(max-width:600px){body.newmagic #main .reference-exact-create .limit-provider .account-field-grid{grid-template-columns:1fr}}
body.newmagic #modal.account-reference-modal:has(#accountWinLimitForm) .modal-body{padding-top:13px;padding-bottom:56px}
body.newmagic #modal.account-reference-modal .account-win-limit-form fieldset{padding-bottom:20px}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-amount{margin-bottom:11px}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-meta p:last-child{margin-bottom:10px}
body.newmagic #modal.account-reference-modal .account-win-limit-form input[type=radio]{box-sizing:border-box;flex:0 0 16px;width:16px!important;max-width:16px!important;height:16px;padding:0;margin:0}
body.newmagic #main .account-list .empty{background:white;color:#8c8c8c;border:0;border-radius:0;padding:28px 12px;min-height:80px;font-size:14px;box-shadow:none}
body.newmagic #main .account-list .empty:before,body.newmagic #main .account-list .empty:after{content:none;display:none}
body.newmagic #main .reference-exact-create [data-limit-draft-root]{display:block;grid-template-columns:none}
body.newmagic #main .reference-exact-create [data-limit-draft-root]>.limit-provider{width:100%;box-sizing:border-box}
body.newmagic #main .reference-exact-create .reference-limit-fold>summary:after,body.newmagic #main .reference-exact-create .limit-provider>summary:after{content:''!important;width:12px;height:12px;background:url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 12 12%22 fill=%22none%22 stroke=%22%23262626%22%3E%3Cpath d=%22m2 4 4 4 4-4%22/%3E%3C/svg%3E') center/12px no-repeat;transform:none!important;display:block;margin-left:8px}
body.newmagic #main .reference-exact-create .reference-limit-fold>summary:after{margin-left:auto}
body.newmagic .account-reference-detail button .detail-inline-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;margin-right:5px;vertical-align:middle}
body.newmagic .account-reference-detail .detail-inline-icon svg{width:14px;height:14px}
body.newmagic #main .reference-exact-create .reference-limit-fold>summary:after,body.newmagic #main .reference-exact-create .limit-provider>summary:after{width:12px!important;min-width:12px!important;height:12px!important;min-height:12px!important;flex:0 0 12px!important;border:0!important;border-radius:0!important;position:static!important;transform:none!important}
/* Agent action shortcuts mirror the reference: view, credit, bet limits. */
body.newmagic #main .account-list .row-actions:has([data-account-limit]){gap:0;min-width:100px;max-width:none;flex-wrap:nowrap}
body.newmagic #main .account-list .row-actions:has([data-account-limit])>.row-icon-action{width:28px;min-width:28px;border-left:1px solid #edf0f4!important;border-radius:0;padding:0 6px}
body.newmagic #main .account-list .row-actions:has([data-account-limit])>[data-detail]{margin-right:10px}
body.newmagic #main .machine-management{font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#082958}
body.newmagic .machine-management .machine-results{position:relative;margin-top:0}
body.newmagic .machine-management .search-heading{display:flex;align-items:center;gap:8px}
body.newmagic .machine-management .search-heading small{padding:0 8px;border-radius:12px;background:#f5f6f8;font-size:12px;color:#8994a5;font-weight:400}
body.newmagic .machine-management .result-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-bottom:16px}
body.newmagic .machine-management .result-actions>button{display:inline-flex;align-items:center;justify-content:center;gap:5px}
body.newmagic .machine-management .result-actions>button:not(.primary){border:0;background:none;min-width:24px;padding:0}
body.newmagic .machine-management .machine-member-avatar{display:flex;align-items:center;gap:10px;white-space:nowrap}
body.newmagic .machine-management .machine-member-avatar img{width:46px;height:46px;border-radius:12px;object-fit:contain}
body.newmagic .machine-management .machine-row-actions{display:flex;gap:12px;white-space:nowrap}
body.newmagic .machine-management .machine-row-actions button{color:#1677ff;background:none;border:0;padding:0;box-shadow:none;font:inherit;min-height:22px}
body.newmagic .machine-management .machine-notice-policy{font-size:12px;color:#64748b;margin:12px 0 0}
body.newmagic .machine-management .pagination{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:16px;flex-wrap:wrap}
body.newmagic .machine-management .pagination button{width:28px;min-height:28px;border:0;background:none;color:#1677ff;padding:0;box-shadow:none}
body.newmagic .machine-management .pagination select{height:32px;min-height:32px;width:110px;background:white;border:1px solid #d9d9d9;color:#082958;border-radius:4px;padding:4px 10px;box-shadow:none}
body.newmagic .machine-management .reference-search-trigger{margin-bottom:16px}
body.newmagic dialog.machine-reference-dialog{box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:20px 24px;border:0;border-radius:8px;background:white;color:#262626;box-shadow:0 6px 24px #0003;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body.newmagic dialog.machine-reference-dialog::backdrop{background:#0007}
body.newmagic .machine-reference-dialog>header{position:static;display:flex;align-items:center;justify-content:space-between;height:auto;min-height:0;background:none;border:0;border-bottom:1px solid #f0f0f0;box-shadow:none;color:#262626;padding:0 0 16px;margin:0 0 20px}
body.newmagic .machine-reference-dialog>header button{border:0;border-radius:0;background:none;box-shadow:none;color:#888;font-size:24px;width:28px;height:28px;padding:0;min-height:28px}
body.newmagic .machine-search-form{display:grid;gap:16px}
body.newmagic .machine-search-form label{display:grid;gap:8px;font-weight:600;color:#262626}
body.newmagic .machine-search-form :is(input:not([type=checkbox]),select){box-sizing:border-box;width:100%;height:32px;min-height:32px;border:1px solid #d9d9d9;border-radius:4px;background:white;color:#262626;padding:4px 10px;font:14px/22px inherit;box-shadow:none}
body.newmagic .machine-search-form fieldset{padding:0;border:0;margin:0}
body.newmagic .machine-search-form .machine-check{display:flex;align-items:center;gap:8px;margin-bottom:12px}
body.newmagic .machine-search-form .machine-check input{width:16px;height:16px;min-height:16px;accent-color:#ffbf00}
body.newmagic .machine-search-form .machine-date-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:8px}
body.newmagic .machine-search-form footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;background:none;border:0;padding:16px 0 0;flex-wrap:wrap}
body.newmagic .machine-search-form footer button{background:white;color:#262626;border:1px solid #d9d9d9;border-radius:4px;padding:4px 16px;min-height:32px;box-shadow:none}
body.newmagic .machine-search-form footer button.primary{background:#ffbf00;color:white;border-color:#ffbf00}
body.newmagic .machine-reference-dialog [data-error]{color:#d4380d;font-weight:600}
body.newmagic .machine-details>div{display:grid;grid-template-columns:160px minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px solid #f0f0f0}
body.newmagic .machine-details dt{font-weight:600}
body.newmagic .machine-details dd{margin:0;overflow-wrap:anywhere}
@media(max-width:600px){body.newmagic .machine-details>div{grid-template-columns:1fr;gap:4px}}

body.newmagic #main .account-list .account-status.is-active{background:#ecfdf3!important;color:#15803d!important;font-size:12px;border:0;border-radius:12px;padding:2px 8px;display:inline-flex;align-items:center;gap:6px}
body.newmagic #main .account-list .account-status.is-active:before{content:""!important;display:inline-block!important;width:7px;height:7px;min-width:7px;border-radius:50%;background:#22c55e!important;box-shadow:0 0 5px #22c55e70}
body.newmagic #main .account-list .account-status.is-inactive{background:#f1f5f9;color:#64748b}

body.newmagic #main .account-list .reference-sort{display:inline-flex!important;align-items:center;justify-content:space-between;gap:8px;min-height:22px;max-width:100%;border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;font:inherit!important;color:inherit!important}
body.newmagic #main .account-list .reference-sort>svg{display:block!important;flex:0 0 10px!important;width:10px!important;min-width:10px!important;max-width:10px!important;height:14px!important;max-height:14px!important;fill:#bfbfbf}
body.newmagic #main .account-list .reference-sort polygon.is-active{fill:#ffbf00}
body.newmagic .account-file-detail{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;min-height:22px;margin-left:4px;padding:4px;border:0;border-radius:4px;color:#9254ff;background:#f7f0ff;box-shadow:none;vertical-align:middle}
body.newmagic .account-file-detail svg{width:14px;height:14px}
body.newmagic #modal.account-reference-modal:has(.reference-credit){width:min(500px,calc(100vw - 32px))}
body.newmagic #modal.account-reference-modal .credit-identity p{display:grid;grid-template-columns:1fr 1fr;margin:0 0 24px;min-height:22px}
body.newmagic #modal.account-reference-modal .credit-field{grid-template-columns:1fr 1fr;gap:0;margin-bottom:16px}
body.newmagic #modal.account-reference-modal .credit-field :is(input,select,textarea){box-sizing:border-box;font-family:inherit;font-size:14px}
body.newmagic #modal.account-reference-modal .credit-direction{padding:0;display:flex;gap:16px;min-width:0}
body.newmagic #modal.account-reference-modal .credit-direction legend{width:50%;box-sizing:border-box;margin:0;font-size:14px}
body.newmagic #modal.account-reference-modal .credit-required:before{content:'*';color:#ff4d4f;margin-right:4px}
body.newmagic #modal.account-reference-modal .credit-refresh{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;min-height:18px;padding:0;border:0;background:none;color:#1677ff;box-shadow:none}
body.newmagic #modal.account-reference-modal .credit-subtotal p,body.newmagic #modal.account-reference-modal .credit-total{display:grid;grid-template-columns:1fr 1fr}
body.newmagic #modal.account-reference-modal .credit-subtotal p{margin:16px 0;min-height:22px;font-weight:600}
body.newmagic #modal.account-reference-modal .credit-subtotal h3{background:white;padding:8px 0;border:0;border-top:1px solid #f0f0f0;letter-spacing:0}
body.newmagic #modal.account-reference-modal .credit-total{font-weight:400;color:#ff4d4f}
body.newmagic #modal.account-reference-modal .credit-total span{color:#262626}
body.newmagic #modal.account-reference-modal:has(#accountLimitDialog){width:min(500px,calc(100vw - 32px))}
body.newmagic #modal .account-limit-reference{display:block}
body.newmagic #modal .account-limit-reference .reference-limit-tabs{display:flex;gap:32px;border-bottom:1px solid #f0f0f0;margin:0 0 24px}
body.newmagic #modal .account-limit-reference .reference-limit-tabs button{border:0;border-radius:0;background:none;box-shadow:none;font:14px/22px inherit;color:#262626;padding:0 0 12px;min-height:34px}
body.newmagic #modal .account-limit-reference .reference-limit-tabs button[aria-selected=true]{color:#ffbf00;border-bottom:2px solid #ffbf00}
body.newmagic #modal .account-limit-reference .limit-target-label{display:grid;gap:8px;margin-bottom:16px;font:14px/22px inherit}
body.newmagic #modal .account-limit-reference .limit-target-label select{width:100%;min-height:32px;height:32px;box-sizing:border-box;border:1px solid #d9d9d9;border-radius:4px;background:#f5f5f5;color:#bfbfbf;padding:4px 10px}
body.newmagic #modal .account-limit-reference .limit-presets{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
body.newmagic #modal .account-limit-reference .limit-presets button{background:#ffbf00;color:white;border:1px solid #ffbf00;border-radius:6px;box-shadow:0 3px 8px #0002;padding:4px 15px;min-height:32px;font:14px/22px inherit}
body.newmagic #modal .account-limit-reference .limit-presets [data-limit-default=inherit],body.newmagic #modal .account-limit-reference:has([aria-label="玩家列表"]) [data-limit-default=maximum]{display:none}
body.newmagic #modal .account-limit-reference [data-existing-limits]>.help:first-child{display:none}
body.newmagic #modal .account-limit-reference .limit-platform-title{font-size:14px;border-bottom:1px solid #f0f0f0;background:none;letter-spacing:0;margin:24px 0;padding-bottom:10px}
body.newmagic #modal .account-limit-reference .limit-provider{border:0;border-bottom:1px solid #dbe5ef;border-radius:0;padding:16px;margin-bottom:8px;background:white}
body.newmagic #modal .account-limit-reference .limit-provider>summary{display:flex;align-items:center;gap:10px;color:#1677ff;border-left:3px solid #1677ff;min-height:28px;padding:0 0 0 12px;margin-bottom:24px;font-size:12px}
body.newmagic #modal .account-limit-reference .vendor-monogram{display:block;width:28px;height:28px;padding:0;border:0;background:#f5f7fa;border-radius:8px}
body.newmagic #modal .account-limit-reference .vendor-monogram img{width:28px;height:28px;object-fit:contain}
body.newmagic #modal .account-limit-reference .reference-limit-required{color:#faad14;background:#fffbe6;border:1px solid #ffe58f;font-size:10px;line-height:16px;padding:0 6px}
body.newmagic #modal .account-limit-reference .reference-limit-group-count{background:#1677ff;color:white;border-radius:50%;width:20px;height:20px;line-height:20px;text-align:center;margin-left:auto}
body.newmagic #modal .account-limit-reference .limit-provider [data-limit-selected],body.newmagic #modal .account-limit-reference .account-field-grid>label:has([data-limit-search]),body.newmagic #modal .account-limit-reference .limit-custom-bulk{display:none}
body.newmagic #modal .account-limit-reference .account-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:0;gap:12px}
body.newmagic #modal .account-limit-reference .account-field-grid>label{display:grid;gap:8px;font-size:14px;font-weight:600}
body.newmagic #modal .account-limit-reference :is(.reference-required,.credit-required):before{content:'*';color:#ff4d4f;margin-right:4px}
body.newmagic #modal .account-limit-reference [data-limit-special] .empty{background:white;color:#8c8c8c;border:0;box-shadow:none;font-size:14px}
body.newmagic #modal .account-limit-reference [hidden]{display:none!important}
body.newmagic #modal:has(#accountMessageForm){width:min(600px,calc(100vw - 32px));background:white;color:#262626}
body.newmagic #modal:has(#accountMessageForm) .modal-head{background:white;color:#262626;border-bottom:1px solid #f0f0f0;font-size:16px;letter-spacing:0;box-shadow:none}
body.newmagic #modal .reference-message-form{display:grid;gap:16px;font:14px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#262626}
body.newmagic #modal .reference-message-form label.message-field{display:grid;gap:8px;margin:0;color:#262626;font:inherit}
body.newmagic #modal .reference-message-form .message-field>input{max-width:300px}
body.newmagic #modal .reference-message-form :is(input,select){box-sizing:border-box;min-height:32px;height:32px;width:100%;border:1px solid #d9d9d9;background:white;border-radius:4px;padding:4px 11px;color:#262626;font:14px/22px inherit;box-shadow:none}
body.newmagic #modal .reference-message-form .reference-required:before{content:'*';color:#ff4d4f;margin-right:4px}
body.newmagic #modal .reference-message-form .message-toggle-field{display:grid;gap:12px;font-size:14px;color:#262626}
body.newmagic #modal .reference-message-switch{position:relative;display:inline-block;width:56px;height:22px}
body.newmagic #modal .reference-message-switch input{position:absolute;inset:0;opacity:0;width:56px;height:22px;z-index:2;cursor:pointer}
body.newmagic #modal .reference-message-switch>span{display:block;position:absolute;inset:0;background:#bfbfbf;border-radius:12px}
body.newmagic #modal .reference-message-switch>span:before{content:'';position:absolute;left:2px;top:2px;width:18px;height:18px;border-radius:50%;background:white;box-shadow:0 1px 2px #0003;transition:left .15s}
body.newmagic #modal .reference-message-switch>span:after{content:'停用';position:absolute;right:6px;top:0;line-height:22px;color:white;font-size:12px}
body.newmagic #modal .reference-message-switch input:checked+span{background:#ffbf00}
body.newmagic #modal .reference-message-switch input:checked+span:before{left:36px}
body.newmagic #modal .reference-message-switch input:checked+span:after{content:'啟用';left:6px;right:auto}
body.newmagic #modal .reference-message-tabs{display:flex;border-top:1px solid #f0f0f0;padding-top:16px}
body.newmagic #modal .reference-message-tabs button{background:white;border:1px solid #d9d9d9;border-radius:0;color:#262626;padding:4px 15px;font:14px/22px inherit;min-height:32px;box-shadow:none}
body.newmagic #modal .reference-message-tabs button:first-child{border-radius:4px 0 0 4px}
body.newmagic #modal .reference-message-tabs button:last-child{border-radius:0 4px 4px 0}
body.newmagic #modal .reference-message-tabs button[aria-selected=true]{color:white;background:#ffbf00;border-color:#ffbf00}
body.newmagic #modal .reference-message-form [hidden]{display:none!important}
body.newmagic #modal .reference-message-form [data-message-language]>.message-field{margin-bottom:16px}
body.newmagic #modal .message-rich-toolbar{display:flex;flex-wrap:wrap;background:#fafafa;border:1px solid #d9d9d9;padding:4px;gap:4px;margin-top:4px}
body.newmagic #modal .message-rich-toolbar button{display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;background:none;border:0;border-radius:2px;box-shadow:none;color:#595959;font:16px/24px Georgia,serif}
body.newmagic #modal .message-rich-toolbar button:hover{background:#e8e8e8}
body.newmagic #modal .message-rich-editor{min-height:160px;padding:8px;border:1px solid #d9d9d9;border-top:0;outline:none;white-space:pre-wrap;color:#262626;overflow-wrap:anywhere}
body.newmagic #modal .message-rich-editor:empty:before{content:attr(data-placeholder);color:#999;pointer-events:none}
body.newmagic #modal .reference-message-form footer{display:flex;gap:8px;justify-content:flex-end;padding-top:16px;border-top:1px solid #f0f0f0;background:none}
body.newmagic #modal .reference-message-form footer button{border:1px solid #d9d9d9;border-radius:4px;box-shadow:none;padding:4px 15px;min-height:32px;background:white;color:#262626}
body.newmagic #modal .reference-message-form footer button.primary{background:#ffbf00;border-color:#ffbf00;color:white}
body.newmagic #modal [data-message-error]{color:#d4380d;font-weight:600}
@media(max-width:420px){body.newmagic #modal.account-reference-modal .credit-field{grid-template-columns:1fr;gap:4px}body.newmagic #modal .account-limit-reference .account-field-grid{grid-template-columns:1fr}}
body.newmagic #modal .reference-message-form .message-multi{position:relative;display:flex;align-items:center;min-height:32px;border:1px solid #d9d9d9;border-radius:4px;box-sizing:border-box;padding:2px 8px;background:white;font-size:14px}
body.newmagic #modal .reference-message-form .message-multi>[data-chips]{display:flex;align-items:center;gap:4px;flex-wrap:wrap;flex:1;color:#bfbfbf;min-width:0}
body.newmagic #modal .reference-message-form .message-chip{display:inline-flex;align-items:center;gap:4px;color:#595959;background:#f0f0f0;font-size:14px;line-height:24px;padding:0 4px;border-radius:2px}
body.newmagic #modal .reference-message-form .message-multi button{padding:0;border:0;box-shadow:none;background:none;color:#999;min-height:22px;width:20px;height:22px;font-size:14px}
body.newmagic #modal .reference-message-form .message-multi [data-pick-list]{position:absolute;top:calc(100% + 4px);left:0;right:0;max-height:220px;overflow:auto;z-index:5;border:1px solid #eee;border-radius:4px;box-shadow:0 6px 16px #0002;background:white;padding:4px;color:#262626;font-weight:400}
body.newmagic #modal .reference-message-form .message-multi [data-pick-list] label{display:flex;align-items:center;gap:8px;padding:6px 8px;font-weight:400;color:#262626}
body.newmagic #modal .reference-message-form .message-multi [data-pick-list] input{width:16px;height:16px;min-height:16px;accent-color:#ffbf00}
body.newmagic #modal .reference-message-form .message-multi.is-disabled{background:#f5f5f5}
body.newmagic #modal .message-rich-editor p{margin:0 0 8px}

/* Reference credit form: disabled controls stay visibly unavailable. */
body.newmagic #modal.account-reference-modal #creditForm :is(input,textarea,select):disabled{background:#f5f5f5!important;color:#bfbfbf!important}
body.newmagic #modal.account-reference-modal #creditForm .credit-refresh{width:18px!important;height:18px!important;min-height:18px!important;min-width:18px!important;border:0!important;background:none!important;box-shadow:none!important;padding:0!important}

/* Dialog language tabs must not inherit responsive header navigation order. */
body.newmagic #modal .reference-message-tabs{order:0!important;flex:none!important;align-self:flex-start!important;align-items:stretch;width:auto!important;min-height:0;height:auto;gap:0}
body.newmagic #modal .reference-message-tabs button{min-height:32px!important;height:32px!important;padding:4px 15px!important;line-height:22px!important}

/* Edit limits use the same supplier/market fields as the reference dialog. */
body.newmagic #modal .account-limit-reference .reference-provider-fields{--vendor-color:#1677ff;border:0;border-bottom:1px solid #dbe5ef;border-radius:0 0 12px 12px;padding:22px 16px 26px;margin:0 0 4px}
body.newmagic #modal .reference-provider-fields[data-limit-provider=RSG]{--vendor-color:#722ed1}
body.newmagic #modal .reference-provider-fields[data-limit-provider=SALONG]{--vendor-color:#52c41a}
body.newmagic #modal .reference-provider-fields[data-limit-provider=RC]{--vendor-color:#fa8c16}
body.newmagic #modal .reference-provider-fields[data-limit-provider=MT]{--vendor-color:#eb2f96}
body.newmagic #modal .account-limit-reference .reference-provider-fields>summary{position:relative;border-color:var(--vendor-color);color:var(--vendor-color);margin:0 0 22px;gap:10px;padding-right:4px;min-height:28px}
body.newmagic #modal .reference-provider-fields>summary:after{content:'';width:6px;height:6px;border-right:1px solid #262626;border-bottom:1px solid #262626;transform:rotate(45deg);margin:0 3px 3px 5px}
body.newmagic #modal .reference-provider-fields>summary::-webkit-details-marker{display:none}
body.newmagic #modal .reference-provider-fields .reference-limit-group-count{margin-left:auto!important;flex:0 0 20px;background:var(--vendor-color)}
body.newmagic #modal .account-limit-reference .reference-provider-fields .limit-game-details{display:none}
body.newmagic #modal .account-limit-reference .reference-provider-fields.reference-by-play .account-field-grid{display:none}
body.newmagic #modal .account-limit-reference .reference-provider-fields.reference-by-play .limit-game-details{display:block;margin:0;padding:0;border:0;background:none}
body.newmagic #modal .reference-by-play .limit-game-details>summary,body.newmagic #modal .reference-by-play .reference-limit-required,body.newmagic #modal .reference-provider-fields .limit-game small{display:none}
body.newmagic #modal .account-limit-reference .reference-by-play .limit-game-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:none;overflow:visible;padding:0}
body.newmagic #modal .account-limit-reference .reference-by-play .limit-game{padding:0;border:0;background:none;min-width:0}
body.newmagic #modal .account-limit-reference .reference-by-play .limit-game>label{display:grid;gap:8px;font-size:14px;font-weight:600}
body.newmagic #modal .reference-limit-select{position:relative;display:block;min-width:0;width:100%;height:32px;font-weight:400}
body.newmagic #modal .account-limit-reference .reference-limit-select>select{display:block;box-sizing:border-box;width:100%;height:32px;min-height:32px;padding:4px 24px 4px 10px;background:#fff;border:1px solid #d9d9d9;border-radius:4px;font:14px/22px Arial,'Microsoft JhengHei',sans-serif;color:#bfbfbf;box-shadow:none}
body.newmagic #modal .account-limit-reference .reference-limit-select.has-selection>select{color:transparent}
body.newmagic #modal .reference-limit-select>select option{color:#262626}
body.newmagic #modal .reference-limit-chip{position:absolute;left:4px;top:5px;max-width:calc(100% - 32px);height:22px;display:inline-flex;align-items:center;gap:3px;background:#f0f0f0;color:#333;padding:0 4px;pointer-events:none;font:14px/22px Arial,'Microsoft JhengHei',sans-serif;white-space:nowrap}
body.newmagic #modal .reference-limit-chip>span{overflow:hidden;text-overflow:ellipsis}
body.newmagic #modal .reference-limit-chip>button{pointer-events:auto;flex:0 0 12px;display:inline-flex;align-items:center;justify-content:center;min-height:0!important;min-width:0!important;width:12px;height:20px;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:#aaa;font:16px/20px Arial}
body.newmagic #modal .reference-limit-chip>button:hover{color:#444}
@media(max-width:420px){body.newmagic #modal .account-limit-reference .reference-by-play .limit-game-grid{grid-template-columns:minmax(0,1fr)}}

body.newmagic #modal .account-limit-reference .reference-provider-fields>summary{justify-content:flex-start!important;border:0!important;border-left:3px solid var(--vendor-color)!important;border-radius:0!important;box-shadow:none!important}
body.newmagic #modal .account-limit-reference .reference-provider-fields>summary:after{position:static!important;transform:rotate(45deg)!important;flex:0 0 6px}
body.newmagic #modal .account-limit-reference .reference-provider-fields [data-limit-selected],body.newmagic #modal .account-limit-reference .reference-provider-fields .account-field-grid>label:has([data-limit-search]){display:none!important}
body.newmagic #modal .account-limit-reference .reference-limit-select>select{appearance:none}
body.newmagic #modal .reference-limit-select:after{content:'';position:absolute;right:11px;top:11px;width:6px;height:6px;border-right:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;transform:rotate(45deg);pointer-events:none}
body.newmagic #modal .account-limit-reference .reference-provider-fields>summary:after{margin:0 3px 3px 5px!important}

/* Account operations: distinct semantic colours and equally sized hit areas. */
body.newmagic #main .account-list .row-actions:has([data-credit]){display:flex;align-items:center;flex-wrap:nowrap;gap:7px!important;min-width:142px;max-width:none;padding:3px 0}
body.newmagic #main .account-list .row-actions:has([data-message-user]){min-width:182px}
body.newmagic #main .account-list .row-actions:has([data-credit])>.link{--action-bg:#eff6ff;--action-fg:#2563eb;--action-edge:#cfe0ff;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:32px;min-height:32px!important;padding:0 10px!important;gap:5px;border:1px solid var(--action-edge)!important;border-radius:8px!important;background:var(--action-bg)!important;color:var(--action-fg)!important;box-shadow:0 1px 2px #1e293b08!important;font:600 13px/20px 'Segoe UI','Microsoft JhengHei',sans-serif!important;margin:0!important;white-space:nowrap}
body.newmagic #main .account-list .row-actions:has([data-credit])>.row-icon-action{width:32px!important;min-width:32px!important;flex:0 0 32px;padding:0!important}
body.newmagic #main .account-list .row-actions>[data-message-user]{--action-bg:#ecfdf5!important;--action-fg:#07845f!important;--action-edge:#b7ecd7!important}
body.newmagic #main .account-list .row-actions>[data-credit]{--action-bg:#fff7df!important;--action-fg:#a66700!important;--action-edge:#f5d68a!important}
body.newmagic #main .account-list .row-actions>[data-account-limit]{--action-bg:#f5f0ff!important;--action-fg:#7c3aed!important;--action-edge:#dfd0ff!important}
body.newmagic #main .account-list .row-actions>[data-account-win-limit]{--action-bg:#fff0f4!important;--action-fg:#d22b63!important;--action-edge:#f7c8d8!important}
body.newmagic #main .account-list .row-actions:has([data-credit])>.link:hover{filter:brightness(.96);border-color:var(--action-fg)!important}
body.newmagic #main .account-list .row-actions:has([data-credit])>.link:focus-visible{outline:2px solid var(--action-fg);outline-offset:2px}
body.newmagic #main .account-list .row-actions>.row-icon-action svg{display:block;width:17px;height:17px;flex:none;stroke-width:1.7}
/* Circular radio controls retain their geometry at every window size. */
body.newmagic #modal.account-reference-modal input[type=radio]{box-sizing:border-box!important;appearance:none!important;flex:0 0 16px!important;width:16px!important;min-width:16px!important;max-width:16px!important;height:16px!important;min-height:16px!important;max-height:16px!important;aspect-ratio:1;border-radius:50%!important;padding:0!important;outline:none!important;box-shadow:none!important;vertical-align:middle}
body.newmagic #modal.account-reference-modal input[type=radio]:focus-visible{outline:none!important;box-shadow:none!important}
body.newmagic #modal.account-reference-modal label:has(input[type=radio]:focus-visible){text-decoration:underline;text-decoration-color:#c99400;text-underline-offset:4px}

body.newmagic #main .account-list .agency-account-card{background:transparent!important;box-shadow:none!important}
body.newmagic #main .game-settings-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}
body.newmagic #main .game-settings-tabs button{border:1px solid #d9c9e6;background:#fff;color:#67377c;border-radius:8px;padding:8px 18px;font-weight:600}
body.newmagic #main .game-settings-tabs button[aria-selected=true]{background:#7f349b;color:#fff;border-color:#7f349b;box-shadow:0 2px 5px #49205f20}

body.newmagic #main .report-provider-overview>td{padding:7px 12px!important;background:#f9fafb!important;border-top:1px solid #edf0f4!important;border-bottom:1px solid #edf0f4!important}
body.newmagic #main .report-provider-strip{display:flex;align-items:flex-start;gap:10px 20px;flex-wrap:wrap;color:#071b32;font:12px/22px 'Segoe UI','Microsoft JhengHei',sans-serif}
body.newmagic #main .report-provider-category-group{flex:1 1 auto;min-width:0;border:0;border-radius:0;background:transparent;margin:0;padding:0}
body.newmagic #main .report-provider-category-group[open]{flex-basis:100%}
body.newmagic #main .report-provider-strip-item{display:flex;align-items:center;gap:9px;white-space:nowrap;list-style:none;cursor:pointer;padding:2px 0;overflow-x:auto}
body.newmagic #main .report-provider-strip-item::-webkit-details-marker{display:none}
body.newmagic #main .report-provider-strip-item:focus-visible{outline:2px solid #e2aa20;outline-offset:3px}
body.newmagic #main .strip-toggle{flex:0 0 18px;width:18px;height:18px;fill:none;stroke:#20252b;stroke-width:1.5;margin-right:8px}
body.newmagic #main details[open]>.report-provider-strip-item .strip-toggle{transform:rotate(180deg)}
body.newmagic #main .report-provider-strip .report-provider-category{display:inline-block;padding:0 8px;border-radius:0;border:1px solid #ffda73;background:#fffae8;color:#dc8d00;font-size:11px;font-weight:600}
body.newmagic #main .report-provider-strip .report-provider-category.live{background:#f4f0ff;border-color:#d8cfec;color:#78618d}
body.newmagic #main .report-provider-strip .strip-number{font-weight:650;font-variant-numeric:tabular-nums;color:#071b32}
body.newmagic #main .report-provider-strip .is-positive{color:#00953e!important}
body.newmagic #main .report-provider-strip .is-negative{color:#ef1429!important}
body.newmagic #main .report-provider-strip i{display:block;flex:0 0 1px;width:1px;height:12px;background:#5375b5}
body.newmagic #main .strip-detail-scroll{overflow-x:auto;margin:9px 0 0 28px;border-top:1px solid #d0d5dd}
body.newmagic #main .strip-detail-table{width:100%;min-width:700px;border-collapse:collapse;background:#fff;font-size:13px}
body.newmagic #main .strip-detail-table :is(th,td){border:1px solid #eceef1!important;padding:10px 12px!important;text-align:right!important;white-space:nowrap}
body.newmagic #main .strip-detail-table th{background:#f8f9fb!important;font-weight:700;color:#071b32}
body.newmagic #main .strip-detail-table th.strip-result-heading{color:#3159dc}
body.newmagic #main .strip-detail-table :is(th,td):first-child{text-align:left!important;min-width:160px}
body.newmagic #main .strip-detail-table tbody td{background:#fff!important;height:64px}
body.newmagic #main .strip-detail-table .strip-number{font-size:16px;font-weight:650}
body.newmagic #main .strip-platform{display:flex;align-items:center;gap:10px}
body.newmagic #main .strip-platform img{width:46px;height:46px;object-fit:contain;border-radius:12px;background:#f5f5f5;padding:5px;box-sizing:border-box}
@media(max-width:760px){body.newmagic #main .strip-detail-scroll{margin-left:0}}

body.newmagic #modal .instant-rebate-control{border:1px solid #e1e6ed;border-radius:10px;background:#f8fafc;padding:16px;margin:0 0 14px}
body.newmagic #modal .instant-rebate-control legend{color:#344054;font-weight:650;padding:0 6px}
body.newmagic #modal .instant-rebate-switch{position:relative;display:inline-flex;align-items:center;gap:10px;cursor:pointer}
body.newmagic #modal .instant-rebate-switch input{position:absolute;opacity:0;width:1px;height:1px;min-height:0;pointer-events:none}
body.newmagic #modal .instant-rebate-track{position:relative;display:inline-block;box-sizing:border-box;width:44px;height:24px;border-radius:14px;background:#c6cbd4;border:1px solid #b7bdc7;transition:background .15s}
body.newmagic #modal .instant-rebate-track i{position:absolute;top:2px;left:2px;width:18px;height:18px;background:white;border-radius:50%;box-shadow:0 1px 3px #0002;transition:transform .15s}
body.newmagic #modal .instant-rebate-switch input:checked+.instant-rebate-track{background:#26b873;border-color:#18a463}
body.newmagic #modal .instant-rebate-switch input:checked+.instant-rebate-track i{transform:translateX(20px)}
body.newmagic #modal .instant-rebate-switch input:focus-visible+.instant-rebate-track{outline:2px solid #6fa1df;outline-offset:3px}
body.newmagic #modal .instant-rebate-switch strong{font-size:14px;color:#344054}

body.newmagic #main .report-player-type-tabs{display:flex;gap:0;flex-wrap:wrap;margin:0 0 16px;border:1px solid #ead2df;border-radius:7px;overflow:hidden;width:fit-content;background:#fff}
body.newmagic #main .report-player-type-tabs button{border:0;border-right:1px solid #ead2df;border-radius:0;background:#fff;color:#653b59;padding:9px 18px;font-weight:650;font-size:14px;box-shadow:none}
body.newmagic #main .report-player-type-tabs button:last-child{border-right:0}
body.newmagic #main .report-player-type-tabs button[aria-selected=true]{background:#ffd448;color:#462d22}
body.newmagic #main .report-player-type-tabs button:focus-visible{outline:2px solid #b74b7c;outline-offset:-3px}
body.newmagic #main .report-funds-note{font-size:12px;color:#5c5362;margin:0 0 14px}

body.newmagic #main .reference-report-module th[data-report-field]{background:#fafafa!important;color:#06345a!important;border-top:2px solid #d7dde6!important}
body.newmagic #main .reference-report-module th:is([data-report-field=cashIn],[data-report-field=manualIn],[data-report-field=reclaim],[data-report-field=takeOut]){color:#d81864!important;border-top-color:#ef77b1!important}
body.newmagic #main .reference-report-module th:is([data-report-field=platformResult],[data-report-field=rebate],[data-report-field=result],[data-report-field=subtotal],[data-report-field=due]){color:#3158c8!important;border-top-color:#8db5f4!important}
body.newmagic #main .reference-report-module td[data-report-field=result]{background:#eaf3fd!important}
/* Keep the expanded supplier table inside the report panel, independently of the wide parent financial table. */
body.newmagic #main .reference-report-module:has(.report-provider-strip){container-type:inline-size}
body.newmagic #main .strip-detail-scroll{width:min(900px,calc(100vw - 110px));width:min(900px,calc(100cqw - 28px));max-width:100%}
@media(max-width:760px){body.newmagic #main .strip-detail-scroll{width:100cqw}}

/* Reference action strip: navigation slate, actions blue, lightweight separators. */
body.newmagic .account-reference-detail .detail-toolbar button{display:inline-flex;align-items:center;gap:4px;color:#1677ff!important;background:transparent!important;border:0;border-right:1px solid #e2e8f0;border-radius:0;box-shadow:none;padding:0 16px;font:400 13px/22px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;letter-spacing:0;min-height:22px}
body.newmagic .account-reference-detail .detail-toolbar button:is([data-view-back],[data-detail-back]){color:#64748b!important}
body.newmagic .account-reference-detail .detail-toolbar button:first-child{padding-left:0}
body.newmagic .account-reference-detail .detail-toolbar button:last-child{border-right:0}
body.newmagic .account-reference-detail .detail-toolbar button:hover{color:#4096ff!important}
body.newmagic .account-reference-detail .detail-toolbar .detail-inline-icon{display:inline-flex;align-items:center;width:14px;height:14px;flex:0 0 14px}
body.newmagic .account-reference-detail .detail-toolbar .detail-inline-icon svg{width:14px;height:14px}
body.newmagic #modal.account-reference-modal .account-win-limit-form .win-limit-types{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
body.newmagic #modal.account-reference-modal .account-win-limit-form input[type=radio]{appearance:none!important;display:inline-block!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;flex:0 0 16px!important;box-sizing:border-box!important;border:1px solid #d9d9d9!important;border-radius:50%!important;padding:0!important;margin:0!important;background:#fff!important;box-shadow:none!important;transform:none!important;vertical-align:middle}
body.newmagic #modal.account-reference-modal .account-win-limit-form input[type=radio]:checked{border-color:#ffbf00!important;background:radial-gradient(circle,#fff 0 3px,#ffbf00 3.5px)!important}
body.newmagic #modal.account-reference-modal .account-win-limit-form input[type=radio]::before,body.newmagic #modal.account-reference-modal .account-win-limit-form input[type=radio]::after{content:none!important}
body.newmagic #modal.account-reference-modal .win-loss-enabled{display:flex;align-items:center;justify-content:space-between;padding-bottom:12px}
body.newmagic #modal.account-reference-modal .win-loss-enabled input{accent-color:#ffbf00;width:18px;height:18px}
body.newmagic #modal.account-reference-modal .win-loss-note{font-size:12px;color:#64748b;margin:0 0 16px}

body.newmagic #main .machine-identity{display:grid;gap:4px;min-width:175px}
body.newmagic #main .machine-identity>div{display:flex;align-items:center;gap:6px;white-space:nowrap}
body.newmagic #main .machine-identity small{font-size:10px;color:#94a3b8;min-width:30px}
body.newmagic #main .machine-identity strong{font-size:13px;font-weight:500;color:#082958}
body.newmagic #main .machine-mac{font:10px/16px ui-monospace,monospace;color:#6387b3}
body.newmagic #main .machine-mini{display:inline-flex;align-items:center;justify-content:center;border:0;box-shadow:none;width:22px;height:22px;min-width:22px;min-height:22px;padding:3px;border-radius:5px;background:#edfaff;color:#0ea5e9;vertical-align:middle;margin-left:4px}
body.newmagic #main .machine-mini.detail{background:#f5f1ff;color:#9d6aff}
body.newmagic #main .machine-mini.copy{background:none;color:#b9c7da}
body.newmagic #main .machine-mini svg{width:14px;height:14px}
body.newmagic #main .machine-live-state{display:block;font-size:11px;margin-top:4px;color:#64748b}
body.newmagic #main .machine-live-state.good{color:#16a34a}body.newmagic #main .machine-live-state.bad{color:#e11d48}
body.newmagic #main .machine-detail-page{padding:12px;background:white}
body.newmagic #main .machine-detail-page .detail-toolbar{display:flex;align-items:center;gap:0;padding:8px 0 20px}
body.newmagic #main .machine-detail-page .detail-toolbar button{border:0;border-right:1px solid #e2e8f0;background:none;box-shadow:none;color:#64748b;font-size:13px;padding:0 16px;min-height:22px}
body.newmagic #main .machine-detail-page .detail-toolbar button:last-child{border-right:0;color:#1677ff}
body.newmagic #main .machine-detail-page .reference-card{border:1px solid #f1f3f5;border-radius:10px;overflow:hidden}
body.newmagic #main .machine-detail-page h3{font-size:14px;font-weight:600;padding:16px 24px;margin:0;background:linear-gradient(90deg,#f7fafc,#fff)}
body.newmagic #main .machine-detail-page .machine-details{padding:8px 24px;margin:0}
body.newmagic #main .machine-detail-links{display:flex;gap:12px;padding:20px 24px}
body.newmagic #main .machine-detail-links button{background:#edf6ff;border:0;color:#1677ff;border-radius:6px;font-size:13px;box-shadow:none}
body.newmagic #modal .win-limit-amount[hidden]{display:none!important}
/* Report typography belongs to its content, independent of the next navigation target. */
body.newmagic #main .reference-report-module{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif}
body.newmagic #main .reference-report-module :is(td,th){font-variant-numeric:tabular-nums}
body.newmagic #main .reference-report-module td[data-report-field]:not([data-report-field="name"]):not([data-report-field="expand"]){font-size:14px;font-weight:600}

body.newmagic #main .reference-report-module td[data-report-field]:not([data-report-field="name"]):not([data-report-field="expand"]){font-size:16px;font-weight:600}
body.newmagic #main .reference-report-module th[data-report-field]{font-size:14px;font-weight:600}
body.newmagic #main .reference-report-module th[data-report-field=share]{color:#ad4e00!important;border-top-color:#ffbb80!important}
body.newmagic #main .reference-report-module th:is([data-report-field=subtotal],[data-report-field=due]){color:#8b23df!important;border-top-color:#d5a4ff!important}

body.newmagic #main .account-reference-editor .reference-account-status,body.newmagic #main .account-reference-editor .reference-editor-rebate{display:flex;align-items:flex-start;gap:8px;border:0;background:none;border-radius:0;box-shadow:none;margin:0;padding:0;min-width:0;width:auto}
body.newmagic #main .account-reference-editor .reference-account-status legend,body.newmagic #main .account-reference-editor .reference-editor-rebate legend{float:left;padding:0;font-size:14px;font-weight:600;line-height:22px}
body.newmagic #main .account-reference-editor .reference-account-status label,body.newmagic #main .account-reference-editor .reference-editor-rebate label{display:flex;align-items:center;gap:8px;min-height:22px;margin:0;font-size:14px;font-weight:400}
body.newmagic #main .account-reference-editor :is(.reference-account-status,.reference-editor-rebate) input[type=radio]{appearance:none;flex:0 0 16px;width:16px;height:16px;min-height:16px;padding:0;margin:0;border:1px solid #d9d9d9;border-radius:50%;background:white;box-shadow:none}
body.newmagic #main .account-reference-editor :is(.reference-account-status,.reference-editor-rebate) input[type=radio]:checked{background:radial-gradient(circle,#fff 0 3px,#ffbf00 3.5px);border-color:#ffbf00}
body.newmagic #main .reference-cash-funding{display:flex;align-items:center;gap:8px;font-weight:600;font-size:14px}
body.newmagic #main .reference-cash-funding>span{display:flex;align-items:center;gap:5px}
body.newmagic #main .reference-cash-funding input[role=switch],body.newmagic #modal .win-loss-enabled input[role=switch]{appearance:none;position:relative;display:inline-block;width:36px;height:20px;min-height:20px;flex:0 0 36px;margin:0;padding:0;border:0;border-radius:12px;background:#bfbfbf;box-shadow:none}
body.newmagic #main .reference-cash-funding input[role=switch]:checked,body.newmagic #modal .win-loss-enabled input[role=switch]:checked{background:#ffbf00}
body.newmagic #main .reference-cash-funding input[role=switch]::after,body.newmagic #modal .win-loss-enabled input[role=switch]::after{content:'';position:absolute;left:2px;top:2px;width:16px;height:16px;background:white;border-radius:50%;box-shadow:0 1px 2px #0002;transition:transform .12s}
body.newmagic #main .reference-cash-funding input[role=switch]:checked::after,body.newmagic #modal .win-loss-enabled input[role=switch]:checked::after{transform:translateX(16px)}
body.newmagic #main .account-status.is-frozen{background:#fff1f0;color:#d4380d}
body.newmagic #main .reference-test-account{font-size:14px;font-weight:600;margin:0}
body.newmagic #main .reference-test-account>span{background:#f5f7f8;border-radius:10px;color:#64748b;font-size:12px;padding:2px 8px}
body.newmagic #main .reference-machine-create{display:flex;align-items:center;gap:8px;margin:14px 0;font-size:14px}
body.newmagic #main .reference-machine-create input{width:16px;height:16px;min-height:16px;accent-color:#ffbf00}

body.newmagic #main .reference-player-game-actions{display:grid;gap:12px;margin-bottom:16px}
body.newmagic #main .reference-player-game-actions>div{display:flex;align-items:center;gap:8px}
body.newmagic #main .reference-player-game-actions strong{font-size:14px;font-weight:600}
body.newmagic #main .reference-player-game-actions button{background:#fff3c7;color:#ad6800;border:0;border-radius:6px;box-shadow:none;font-size:14px;min-height:32px;padding:4px 12px}
body.newmagic #main .reference-player-game-actions [data-editor-game-view=games]{background:#3e83f7;color:white}

/* Editing retains the corresponding detail modules, with compact horizontal inputs. */
body.newmagic #main .account-reference-editor .reference-edit-row{display:flex;align-items:center;gap:12px;margin:12px 0;font-size:14px;font-weight:600}
body.newmagic #main .account-reference-editor .reference-edit-row :is(input,select){width:300px;max-width:100%;font-weight:400;min-height:32px;height:32px;margin:0;padding:4px 11px;border:1px solid #d9d9d9;border-radius:6px;background:white;color:#082958;box-shadow:none}
body.newmagic #main .account-reference-editor .reference-card-content>label:has([name=note]){display:flex;gap:12px;align-items:center;margin:16px 0;font-size:14px;font-weight:600}
body.newmagic #main .account-reference-editor [name=note]{width:300px;height:64px;min-height:64px;border:1px solid #d9d9d9;background:white;color:#082958;border-radius:6px;box-shadow:none}
body.newmagic #main .account-reference-editor .reference-account-status{margin-bottom:16px}
body.newmagic #main .account-reference-editor .reference-card-content{display:block}
@media(max-width:600px){body.newmagic #main .account-reference-editor .reference-edit-row{flex-wrap:wrap}body.newmagic #main .account-reference-editor .reference-cash-funding{flex-wrap:wrap}}

body.newmagic #main .account-reference-editor .reference-edit-row :is(input,select){background:#fff!important;border-color:#d9d9d9!important}

body.newmagic #main>.panel:has(.account-reference-editor)>.panel-head{display:none}

body.newmagic #main .account-reference-editor [name=note]{background:#fff!important;border-color:#d9d9d9!important}

body.newmagic #main .account-reference-editor>.detail-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:0;padding:8px 0;border-bottom:1px solid #f0f0f0}
body.newmagic #main .account-reference-editor>.detail-toolbar button{display:inline-flex;align-items:center;gap:5px;width:auto;min-height:28px;height:28px;padding:0 14px;background:transparent;border:0;border-radius:0;box-shadow:none;font-size:13px;font-weight:400;color:#1677ff}
body.newmagic #main .account-reference-editor>.detail-toolbar button:is([data-view-back],[data-detail-back],[data-editor-back]){color:#64748b}
body.newmagic #main .account-reference-editor>.detail-toolbar button+button{border-left:1px solid #e5eaf0}
body.newmagic #main .account-reference-editor>.detail-toolbar .detail-inline-icon{display:inline-flex;flex:0 0 14px;width:14px;height:14px}
body.newmagic #main .account-reference-editor>.detail-toolbar .detail-inline-icon svg{display:block;width:14px;height:14px;max-width:14px;max-height:14px}

body.newmagic #main .account-reference-editor .reference-edit-row{display:grid;grid-template-columns:120px minmax(0,300px);align-items:center;justify-content:start}
body.newmagic #main .account-reference-editor .reference-cash-funding{flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:center}
@media(max-width:600px){body.newmagic #main .account-reference-editor .reference-edit-row{grid-template-columns:95px minmax(0,1fr)}}

body.newmagic #main #editForm .reference-cash-funding{display:flex!important;flex-direction:row!important;align-items:center;gap:8px}
body.newmagic #main #editForm .reference-cash-funding>span{width:auto!important;flex:0 0 auto}

/* Machine/recharge flags are check controls, never text-field grid cells. */
body.newmagic #main form.account-reference-form label.check:is(.reference-machine-create,:has(>input[name="machine"]),:has(>input[name="rechargeSystem"])){display:inline-flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;width:fit-content!important;max-width:100%;min-height:24px!important;margin:14px 0!important;padding:0!important;grid-template-columns:none!important;font-size:14px;line-height:22px;cursor:pointer}
body.newmagic #main form.account-reference-form label.check>input:is([name="machine"],[name="rechargeSystem"]){appearance:auto!important;display:inline-block!important;position:static!important;flex:0 0 16px!important;width:16px!important;height:16px!important;min-width:16px!important;max-width:16px!important;min-height:16px!important;max-height:16px!important;margin:0!important;padding:0!important;box-sizing:border-box!important;transform:none!important;box-shadow:none!important;accent-color:#ffbf00!important;vertical-align:middle}

body.newmagic #main table[data-density="loose"]>thead>tr>th,body.newmagic #main table[data-density="loose"]>tbody>tr>td{padding-top:16px!important;padding-bottom:16px!important}
body.newmagic #main table[data-density="middle"]>thead>tr>th,body.newmagic #main table[data-density="middle"]>tbody>tr>td{padding-top:12px!important;padding-bottom:12px!important}
body.newmagic #main table[data-density="compact"]>thead>tr>th,body.newmagic #main table[data-density="compact"]>tbody>tr>td{padding-top:8px!important;padding-bottom:8px!important}
body.newmagic #main .machine-idle-detail h2{font-size:20px;margin:0 0 16px;color:#082958}
body.newmagic #main .machine-idle-detail .detail-toolbar{display:flex;gap:16px;margin:12px 0}
body.newmagic #main .machine-idle-detail .detail-toolbar button,body.newmagic #main .machine-row-actions [data-view]{background:transparent;border:0;box-shadow:none;color:#1677ff;font-size:14px;padding:0 4px;min-height:28px}
body.newmagic #main .machine-idle-detail .machine-details dd{display:flex;align-items:center;gap:8px}
body.newmagic #main .machine-idle-detail table{width:100%;border-collapse:collapse}
body.newmagic #main .machine-idle-detail :is(th,td){padding:12px;border:1px solid #f0f0f0;text-align:left;font-size:14px}
body.newmagic #main table[data-density]>tbody>tr>td{height:auto!important}
/* Machine details follow the reference's inline view/edit and compact information cards. */
body.newmagic #main .machine-reference-detail{background:transparent;padding:0 12px;color:#082958;font-size:14px;max-width:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
body.newmagic #main .machine-reference-detail .machine-detail-heading{border:1px solid #f5f5f5;border-radius:12px;background:linear-gradient(100deg,#f8fbff,#fff);padding:12px 20px 0;margin-bottom:16px}
body.newmagic #main .machine-reference-detail h2{font-size:20px;color:#082958;display:flex;align-items:center;gap:8px;margin:0;font-weight:600}
body.newmagic #main .machine-reference-detail h2 small{font-size:16px;margin-left:18px;color:#111}
body.newmagic #main .machine-reference-detail .reference-card{background:white;border:1px solid #f5f5f5;border-radius:12px;margin:0 0 16px;box-shadow:none}
body.newmagic #main .machine-reference-detail h3{display:flex;align-items:center;gap:8px;padding:12px 20px;background:linear-gradient(90deg,#f8fbff,#fff);font-size:14px;color:#082958}
body.newmagic #main .machine-section-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;color:white;border-radius:6px;background:linear-gradient(135deg,#35b9f5,#556bff)}
body.newmagic #main .machine-detail-heading .machine-section-icon{width:32px;height:32px;flex-basis:32px;background:#5464ff}
body.newmagic #main .machine-section-icon.is-clock{background:#8b6cff}body.newmagic #main .machine-section-icon.is-history{background:#8796ac}
body.newmagic #main .machine-reference-detail .machine-details{padding:8px 20px 16px}
body.newmagic #main .machine-reference-detail .machine-details>div{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:9px 0;border:0;min-height:32px}
body.newmagic #main .machine-reference-detail dt{font-weight:600;font-size:14px;color:#111}
body.newmagic #main .machine-reference-detail dd{font-size:14px;color:#111;display:inline-flex;align-items:center;gap:4px;min-width:0}
body.newmagic #main .machine-time-details dd{font-weight:600}
body.newmagic #main .machine-reference-detail .detail-toolbar{padding:8px 0 12px;margin:0;gap:0;display:flex;align-items:center;flex-wrap:wrap}
body.newmagic #main .machine-reference-detail .detail-toolbar button{color:#77899e!important;font-size:13px;background:none;border:0;border-right:1px solid #e5e9ef;box-shadow:none;border-radius:0;padding:0 12px;min-height:20px;display:inline-flex;align-items:center;gap:5px}
body.newmagic #main .machine-reference-detail .detail-toolbar button:first-child{padding-left:0}
body.newmagic #main .machine-reference-detail .detail-toolbar [data-machine-edit]{color:#1677ff!important}
body.newmagic #main .machine-reference-detail .detail-toolbar button:last-child{border-right:0}
body.newmagic #main .machine-reference-detail .machine-details input{width:300px;max-width:100%;height:32px;min-height:32px;border:1px solid #d9d9d9;border-radius:5px;padding:4px 11px;background:white;color:#111;box-shadow:none}
body.newmagic #main .machine-edit-actions{display:flex;align-items:center;gap:8px;padding:0 20px 20px;flex-wrap:wrap}
body.newmagic #main .machine-edit-actions b{font-size:14px;color:#111;margin-right:8px}
body.newmagic #main .machine-edit-actions button{min-height:32px;padding:4px 15px;border-radius:5px;border:1px solid #d9d9d9;background:white;color:#111;font-size:14px;box-shadow:none}
body.newmagic #main .machine-edit-actions button.primary{background:#ffbf00;border-color:#ffbf00;color:white;box-shadow:0 2px 5px #0001}
body.newmagic #main .machine-reference-detail .table-wrap{margin:8px 20px 20px}
body.newmagic #main .machine-reference-detail th,body.newmagic #main .machine-reference-detail td{border:1px solid #f0f0f0;padding:12px 8px;font-size:14px;color:#111}
body.newmagic #main .machine-reference-detail th{background:#fafafa;font-weight:600}
body.newmagic #main .machine-reference-side{position:fixed;right:16px;bottom:64px;display:flex;flex-direction:column;z-index:15;background:white;box-shadow:0 2px 12px #0002}
body.newmagic #main .machine-reference-side button{width:40px;height:36px;min-height:36px;border:0;box-shadow:none;border-radius:0;background:white;color:#444;font-size:20px;padding:5px}
body.newmagic #main .machine-reference-side button:hover{background:#f5f5f5;color:#1677ff}
@media(max-width:600px){body.newmagic #main .machine-reference-detail{padding:0}body.newmagic #main .machine-reference-detail .machine-details>div{align-items:flex-start}body.newmagic #main .machine-reference-detail .machine-details dd{max-width:100%}body.newmagic #main .machine-reference-side{right:4px}}
body.newmagic:has(#main .machine-reference-detail) .page-title{display:none!important}
body.newmagic #main .machine-reference-detail .machine-detail-heading{display:block!important;position:static;min-height:0;height:auto}
