/* CasinoLab v25.21: light, legible admin workspace and responsive synthetic trade modal. */
#dashboard{--cl-ink:#203956;--cl-muted:#7588a0;--cl-line:#e1e8f1;--cl-blue:#275da4;--cl-pale:#f5f8fc}
/* Navigation: clear hierarchy, visible current page, compact and keyboard accessible */
#dashboard .nav{background:#fff!important;border:1px solid #e2e9f3!important;box-shadow:0 8px 28px #183d6a0d!important}
#dashboard .nav h2{color:#18385f!important;font-weight:900!important;letter-spacing:.09em!important}
#dashboard .nav h2 svg{stroke:#3472c0!important}
#dashboard .admin-nav-label{font-size:9px!important;letter-spacing:.115em!important;text-transform:uppercase!important;color:#9aa9bc!important;font-weight:850!important}
#dashboard .nav button,#dashboard .nav a{transition:background .14s,color .14s,border-color .14s!important;border:1px solid transparent!important;border-radius:9px!important;color:#587089!important;min-height:40px!important;font-weight:720!important;line-height:1.35!important}
#dashboard .nav button svg,#dashboard .nav a svg{width:17px;height:17px;opacity:.84}
#dashboard .nav button:hover,#dashboard .nav a:hover{background:#f2f6fc!important;border-color:#e6edf7!important;color:#285b9b!important}
#dashboard .nav button.active{background:#eaf2ff!important;color:#1c58a2!important;border-color:#cfdff5!important;box-shadow:inset 3px 0 #326ec0,0 2px 7px #234c830b!important}
#dashboard .nav button.active svg{opacity:1;color:#2567b3!important}
#dashboard .nav .admin-nav-group-bottom{border-top:1px solid #edf1f6!important;padding-top:12px!important}
#dashboard .nav small{font-size:10px!important;color:#96a4b6!important}
#dashboard button:focus-visible,#dashboard a:focus-visible,#dashboard select:focus-visible,#dashboard input:focus-visible{outline:2px solid #558bda!important;outline-offset:2px!important}
#dashboard .head-actions .admin-fake-trigger{background:#edf5ff!important;color:#265d9f!important;border-color:#cfdff4!important;font-weight:800!important}
#dashboard .head-actions .admin-fake-trigger:hover{background:#dceaff!important}
/* Page intro sections */
#dashboard .admin-section-intro{display:flex;align-items:center;gap:14px;margin:0 0 16px;padding:18px 21px;border:1px solid #dae6f5;border-radius:13px;background:linear-gradient(106deg,#eaf3ff 0%,#f9fbff 76%,#fff);box-shadow:0 3px 15px #294b7709}
#dashboard .admin-section-intro .section-intro-icon{display:grid;place-items:center;width:44px;height:44px;flex:none;background:#fff;color:#3472bc;border:1px solid #d9e7f8;border-radius:12px;font-size:21px;font-weight:800}
#dashboard .admin-section-intro h2{color:#1e3c62!important;font-size:17px!important;letter-spacing:-.02em;margin:0 0 4px!important}
#dashboard .admin-section-intro p{margin:0;color:#667f9e;font-size:11px;line-height:1.6}
/* Balance audit: light filter bar, legible audit ledger and useful financial summaries */
#dashboard #audit-view>.panel,#dashboard #status-view>.panel,#dashboard #margin-view>.panel{border:1px solid #e0e8f3!important;border-radius:13px!important;background:#fff!important;box-shadow:0 5px 21px #24446d0a!important;margin-bottom:16px!important;padding:21px!important}
#dashboard #audit-view .split-head,#dashboard #status-view .split-head,#dashboard #margin-view .split-head{margin-bottom:18px!important;padding-bottom:15px!important;border-bottom:1px solid #e9edf4}
#dashboard #audit-view .split-head h2,#dashboard #status-view .split-head h2,#dashboard #margin-view .split-head h2{font-size:16px!important;color:#1e3859!important;letter-spacing:-.025em}
#dashboard #audit-view .audit-sort-controls{background:#f6f9fd!important;border:1px solid #e1e8f2!important;border-radius:10px!important;margin:0 0 16px!important;padding:12px!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,240px));gap:12px!important;justify-content:start!important}
#dashboard #audit-view .audit-sort-controls .field{font-size:11px;color:#536d8c;font-weight:730;min-width:0}
#dashboard #audit-view .audit-sort-controls select{min-height:39px!important;border:1px solid #d5e2f1!important;border-radius:8px!important;background:#fff!important;color:#253f5c!important;padding:9px 12px!important;max-width:100%}
#dashboard #audit-view .table-wrap{border:1px solid #e5ebf3;border-radius:11px;overflow:auto;max-height:65vh}
#dashboard #audit-view table{width:100%;min-width:650px;border-collapse:separate;border-spacing:0}
#dashboard #audit-view th{background:#f6f8fc!important;color:#75869c!important;text-transform:uppercase;letter-spacing:.08em;font-size:10px!important;font-weight:850!important;padding:14px 13px!important;position:sticky;top:0;z-index:1}
#dashboard #audit-view td{background:#fff!important;color:#334a68!important;padding:13px!important;vertical-align:middle;border-top:1px solid #edf1f7!important;font-size:11px!important;line-height:1.5}
#dashboard #audit-view tbody tr:nth-child(even) td{background:#fbfcff!important}
#dashboard #audit-view tbody tr:hover td{background:#f1f7ff!important}
#dashboard #audit-view .audit-event-chip{display:inline-flex;align-items:center;font-weight:750;padding:6px 8px;border-radius:7px;color:#2b629f;background:#edf4ff;border:1px solid #d9e6fa;font-size:10px;white-space:normal;max-width:240px;overflow-wrap:anywhere}
#dashboard #audit-view .audit-amount-credit{color:#138a65!important;font-weight:830}
#dashboard #audit-view .audit-amount-debit{color:#c5505d!important;font-weight:830}
#dashboard #audit-view .audit-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
#dashboard #audit-view .audit-summary-item{border:1px solid #dfe8f4;border-radius:11px;background:#fbfdff;padding:13px 15px}
#dashboard #audit-view .audit-summary-item span{display:block;color:#7890aa;font-weight:720;font-size:10px;margin-bottom:5px}
#dashboard #audit-view .audit-summary-item strong{display:block;font-size:20px;font-weight:840;color:#254366;font-variant-numeric:tabular-nums}
#dashboard #audit-view .audit-summary-item.is-credit{background:#f2fbf7;border-color:#d5eddf}
#dashboard #audit-view .audit-summary-item.is-credit strong{color:#16805e}
#dashboard #audit-view .audit-summary-item.is-debit{background:#fff7f7;border-color:#f3dedf}
#dashboard #audit-view .audit-summary-item.is-debit strong{color:#b84d56}
/* Health page: structured service cards, sensible warnings, prominent latest run */
#dashboard #status-view .status-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(230px,1fr))!important;gap:12px!important}
#dashboard #status-view .health-item{background:#fff!important;border:1px solid #e0e8f3!important;border-radius:11px!important;box-shadow:0 2px 10px #14325c08!important;padding:16px!important;min-height:125px!important;border-left:4px solid #36ac83!important}
#dashboard #status-view .health-item.warning{border-left-color:#d8a34b!important;background:#fffefa!important}
#dashboard #status-view .health-item.error{border-left-color:#d76168!important;background:#fffafa!important}
#dashboard #status-view .health-item .health-title{font-size:12px!important;color:#243d5a!important;font-weight:800!important;gap:7px}
#dashboard #status-view .health-item p{color:#697e99!important;font-size:11px!important;line-height:1.6!important;overflow-wrap:anywhere}
#dashboard #status-view .health-state{background:#eaf9f1!important;color:#16825d!important;border:1px solid #caead9!important;padding:4px 7px!important;border-radius:7px!important;white-space:nowrap}
#dashboard #status-view .health-state.warning{color:#9e6915!important;background:#fff4dd!important;border-color:#f4e2b7!important}
#dashboard #status-view .health-state.error{color:#b64550!important;background:#fff0f1!important;border-color:#f4d5da!important}
#dashboard #status-view #status-checked-at{color:#67819f!important;background:#f5f8fc;border:1px solid #e1eaf5;border-radius:8px;padding:9px 12px;display:inline-block;margin:0 0 8px!important}
#dashboard #status-view .status-report{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(130px,1fr))!important;gap:10px!important}
#dashboard #status-view .status-report>div{padding:15px!important;background:#f7faff!important;border:1px solid #e4ecf7!important;border-radius:10px!important;min-width:0}
#dashboard #status-view .status-report span{display:block;color:#8193aa!important;font-size:10px!important;margin-bottom:5px}
#dashboard #status-view .status-report strong{color:#254566!important;font-size:16px!important;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#dashboard #status-view #status-errors{margin-top:13px!important;color:#768ba4!important;font-size:11px;line-height:1.6}
#dashboard #status-view .status-error-list{border:1px solid #f0dadd!important;border-radius:10px!important;background:#fff7f7!important;padding:14px!important;color:#aa3d4d!important}
/* Settings: keep the controls and per-user overrides visually consistent */
#dashboard #settings-view .settings-hero{border-radius:14px!important;background:linear-gradient(108deg,#163863,#235996)!important;box-shadow:0 8px 24px #26508a20!important}
#dashboard #settings-view .platform-settings-form{border:1px solid #e0e8f2;border-radius:13px;overflow:hidden;background:#fff;box-shadow:0 3px 16px #25457208}
#dashboard #settings-view .setting-option{padding:20px 22px!important;gap:15px!important;transition:background .15s}
#dashboard #settings-view .setting-option:hover{background:#fafcff!important}
#dashboard #settings-view .setting-option-copy strong{color:#223b5c!important;font-size:12px!important}
#dashboard #settings-view .setting-option-copy p{color:#7387a0!important;line-height:1.6!important}
#dashboard #settings-view .settings-footer{padding:14px 19px!important;background:#f7faff!important;border-top:1px solid #e6edf5!important}
#dashboard #settings-view .per-user-settings{margin-top:16px!important;padding:22px!important;border:1px solid #e0e8f3!important;box-shadow:0 4px 18px #2147770b!important;border-radius:13px!important;background:#fff!important}
#dashboard #settings-view .per-user-settings>.split-head{padding-bottom:15px!important;margin-bottom:17px!important;border-bottom:1px solid #e9edf5}
#dashboard #settings-view .per-user-settings input,#dashboard #settings-view .per-user-settings select{background:#fff!important;border:1px solid #dce5f1!important;color:#29415d!important;border-radius:8px!important;min-height:40px!important}
#dashboard #settings-view .settings-override-directory{border-top:1px solid #e9edf5!important}
/* Margin settings: better hierarchy, visual preview, comfortable controls */
#dashboard #margin-view .margin-form{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;margin:16px 0!important;align-items:end!important}
#dashboard #margin-view .margin-form .field{color:#58708c!important;font-size:11px!important;font-weight:720!important;min-width:0!important}
#dashboard #margin-view .margin-form input,#dashboard #margin-view .margin-form select{min-height:40px!important;background:#fff!important;border:1px solid #d5e2f1!important;border-radius:8px!important;color:#243f5f!important;min-width:0}
#dashboard #margin-view .margin-form .btn{min-height:40px!important;border-radius:8px!important;white-space:nowrap}
#dashboard #margin-view #symbol-margin-form{grid-template-columns:minmax(145px,1.5fr) minmax(160px,1.5fr) minmax(90px,.7fr) auto!important}
#dashboard #margin-view .margin-example{background:#f0f6ff!important;border:1px solid #d8e7fb!important;color:#476687!important;border-radius:12px!important;padding:16px!important}
#dashboard #margin-view .margin-example strong,#dashboard #margin-view .margin-example h3{color:#1d416c!important}
#dashboard #margin-view .margin-example .margin-example-head{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px!important}
#dashboard #margin-view .margin-example .margin-example-head>div{padding:10px!important;background:#fff!important;border-radius:10px;border:1px solid #dceafa}
#dashboard #margin-view .margin-example small{color:#6683a6!important}
#dashboard #margin-view .margin-example p,#dashboard #margin-view .margin-note{color:#6f85a0!important}
#dashboard #margin-view #margin-list{border:1px solid #e5ebf4!important;border-radius:10px!important;overflow:auto;background:#fff}
#dashboard #margin-view #margin-list table{width:100%}
#dashboard #margin-view #margin-list th{background:#f6f9fd!important;color:#6f8099!important;font-size:10px!important;text-transform:uppercase;letter-spacing:.06em;padding:13px!important}
#dashboard #margin-view #margin-list td{padding:13px!important;color:#355070!important;border-top:1px solid #edf2f7}
/* User profile vertical rhythm & timezone/appearance side-by-side */
#dashboard #account-detail .profile-ip-card{margin-top:22px!important}
#dashboard #account-detail .trade-journal-card{margin-top:20px!important}
#dashboard #account-detail .account-action-form .actions{margin-top:19px!important;padding-top:13px!important;border-top:1px solid #e5edf6!important;display:flex;flex-wrap:wrap;gap:9px}
#dashboard #account-detail .profile-settings-card{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:12px;align-content:start}
#dashboard #account-detail .profile-settings-card>.managed-section-heading,#dashboard #account-detail .profile-settings-card>.profile-security-details,#dashboard #account-detail .profile-settings-card>.profile-account-actions,#dashboard #account-detail .profile-settings-card>#account-action-content{grid-column:1/-1}
#dashboard #account-detail .profile-settings-card>.profile-setting-item{margin:0!important;min-width:0;padding:13px!important}
#dashboard #account-detail .profile-setting-item .profile-field{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:7px!important}
#dashboard #account-detail .profile-setting-item .profile-field .btn{width:auto!important;min-width:70px!important;white-space:nowrap!important;min-height:38px!important}
#dashboard #account-detail .profile-setting-item .profile-field select{min-width:0!important;max-width:100%!important}
#dashboard #account-detail .profile-settings-card .profile-security-details{margin-top:15px!important}
/* Modal: matches the admin's light visual language, accessible native dialog */
#fake-trade-dialog.fake-trade-dialog{position:fixed;inset:0;margin:auto;padding:0;width:min(750px,calc(100% - 26px));max-width:750px;max-height:calc(100dvh - 30px);overflow:auto;border:1px solid #dde6f2;border-radius:17px;background:#fff;color:#27415f;box-shadow:0 25px 110px #051d3c70;z-index:220;color-scheme:light}
#fake-trade-dialog::backdrop{background:#0a213ab2;backdrop-filter:blur(4px)}
#fake-trade-dialog *{box-sizing:border-box}
#fake-trade-dialog .fake-dialog-heading{display:flex;align-items:center;gap:13px;padding:19px 22px;border-bottom:1px solid #e5edf7;background:linear-gradient(105deg,#edf5ff,#fff);position:relative}
#fake-trade-dialog .fake-dialog-icon{flex:none;display:grid;place-items:center;width:43px;height:43px;border:1px solid #d3e4fa;border-radius:12px;background:#fff;color:#2964aa;font-size:27px;font-weight:800}
#fake-trade-dialog .fake-dialog-heading>div:nth-child(2){flex:1;min-width:0}
#fake-trade-dialog .fake-dialog-eyebrow{font-size:9px;letter-spacing:.11em;color:#5781b2;font-weight:850}
#fake-trade-dialog h2{font-size:21px;letter-spacing:-.035em;line-height:1.25;margin:4px 0 5px;font-weight:850;color:#1c395c}
#fake-trade-dialog .fake-dialog-heading p{font-size:11px;line-height:1.5;color:#6a819d;margin:0}
#fake-trade-dialog .fake-dialog-x{align-self:flex-start;flex:none;border:1px solid #dfe7f2;background:#fff;border-radius:9px;color:#6e829c;font-size:20px;width:33px;height:33px;cursor:pointer}
#fake-trade-dialog .fake-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 15px;padding:20px 22px 12px}
#fake-trade-dialog .field{display:flex;flex-direction:column;gap:6px;min-width:0;color:#4c6788;font-size:11px;font-weight:740}
#fake-trade-dialog .field small{display:inline;font-size:10px;color:#93a2b6;font-weight:550}
#fake-trade-dialog .fake-wide{grid-column:1/-1}
#fake-trade-dialog input,#fake-trade-dialog select{display:block;min-height:41px;width:100%;background:#fff;border:1px solid #d8e4f1;border-radius:8px;color:#213d5e;padding:9px 11px;font:600 12px system-ui;min-width:0}
#fake-trade-dialog input:focus,#fake-trade-dialog select:focus{outline:2px solid #76a2df;outline-offset:1px}
#fake-trade-dialog .fake-preview{margin:6px 22px 14px;border:1px solid #dbe6f5;background:#f7faff;padding:15px;border-radius:11px}
#fake-trade-dialog .fake-preview-title{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-weight:830;font-size:12px;color:#254364;margin-bottom:12px}
#fake-trade-dialog .fake-preview-title small{font-size:10px;font-weight:500;color:#8396ad}
#fake-trade-dialog .fake-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#fake-trade-dialog .fake-preview-grid>div{min-width:0;padding:10px;background:#fff;border:1px solid #e1e9f4;border-radius:8px}
#fake-trade-dialog .fake-preview-grid span{display:block;color:#8396ac;font-size:10px;margin-bottom:6px}
#fake-trade-dialog .fake-preview-grid strong{display:block;color:#274262;font-size:13px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#fake-trade-dialog .fake-preview-grid .fake-positive{color:#168762!important}
#fake-trade-dialog .fake-preview-grid .fake-negative{color:#c24b58!important}
#fake-trade-dialog .fake-preview-message{margin-top:11px;font-size:10px;color:#728aa5;line-height:1.55}
#fake-trade-dialog .fake-preview-message.fake-preview-warning{color:#aa7132}
#fake-trade-dialog .fake-form-note{margin:0 22px 14px;padding:10px 12px;border:1px solid #e6ebf2;background:#fafbfd;border-radius:8px;color:#71839c;font-size:10px;line-height:1.6}
#fake-trade-dialog .fake-form-error{margin:0 22px 12px;padding:10px 12px;border-radius:9px;background:#fff1f2;color:#b43d4b;border:1px solid #f5d5d9;font-size:11px}
#fake-trade-dialog .fake-form-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:16px 22px;border-top:1px solid #e7edf5;background:#fcfdff}
#fake-trade-dialog .fake-form-actions button{min-height:41px!important;border-radius:8px!important;padding:10px 18px!important}
#fake-trade-dialog .fake-form-actions button:disabled{opacity:.52;cursor:wait}
@media(max-width:1060px){#dashboard #margin-view #symbol-margin-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}#dashboard #margin-view #symbol-margin-form .btn{min-width:0}}
@media(max-width:800px){#dashboard .nav{border-radius:0!important}#dashboard #account-detail .profile-settings-card{grid-template-columns:1fr!important}#dashboard #account-detail .profile-settings-card>.profile-setting-item{margin-bottom:11px!important}#dashboard #audit-view>.panel,#dashboard #status-view>.panel,#dashboard #margin-view>.panel{padding:15px!important}}
@media(max-width:620px){#dashboard .admin-section-intro{padding:14px!important;align-items:flex-start;gap:11px}#dashboard .admin-section-intro .section-intro-icon{width:38px;height:38px}#dashboard #audit-view .audit-sort-controls{grid-template-columns:1fr!important}#dashboard #audit-view .audit-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#dashboard #status-view .status-grid{grid-template-columns:1fr!important}#dashboard #margin-view .margin-form,#dashboard #margin-view #symbol-margin-form{grid-template-columns:1fr!important}#dashboard #margin-view .margin-example .margin-example-head{grid-template-columns:1fr!important}#dashboard #account-detail .profile-setting-item .profile-field{grid-template-columns:1fr!important}#dashboard #account-detail .profile-setting-item .profile-field .btn{width:100%!important}#fake-trade-dialog .fake-form-grid{grid-template-columns:1fr;padding:15px;gap:11px}#fake-trade-dialog .fake-wide{grid-column:auto}#fake-trade-dialog .fake-dialog-heading{padding:15px;align-items:flex-start}#fake-trade-dialog .fake-preview{margin:3px 15px 12px;padding:12px}#fake-trade-dialog .fake-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#fake-trade-dialog .fake-form-note{margin:0 15px 12px}#fake-trade-dialog .fake-form-error{margin:0 15px 10px}#fake-trade-dialog .fake-form-actions{padding:12px 15px}#fake-trade-dialog .fake-form-actions button{flex:1;white-space:normal}}
@media(max-width:360px){#dashboard #audit-view .audit-summary-grid{grid-template-columns:1fr}#fake-trade-dialog .fake-dialog-icon{display:none}#fake-trade-dialog .fake-preview-grid{grid-template-columns:1fr 1fr}#dashboard .head-actions .admin-fake-trigger{min-width:0!important}}

/* Positive / negative P/L remain visible against white admin tables on both trade pages. */
#dashboard #trades-view .trade-money.positive,#dashboard #account-detail .trade-money.positive{color:#138662!important;font-weight:850!important}
#dashboard #trades-view .trade-money.negative,#dashboard #account-detail .trade-money.negative{color:#c34a59!important;font-weight:850!important}
#dashboard #account-detail .account-action-form #reset-password-form .actions,#dashboard #account-detail #reset-password-form .actions{margin-top:20px!important;padding-top:13px!important}
