/* CasinoLab administration v25.6 | clean white surface / responsive management */
:root{color-scheme:light!important;background:#f5f7fb!important;color:#172033!important;font:13px/1.48 Inter,system-ui,-apple-system,'Segoe UI',sans-serif}
body{background:#f5f7fb;color:#172033}
.shell{grid-template-columns:232px minmax(0,1fr);background:#f5f7fb}
.nav{position:sticky;top:0;height:100vh;background:#fff;border-right:1px solid #e4e9f1;padding:19px 12px;gap:6px;z-index:51;box-shadow:2px 0 15px #15244205}
.nav h2{color:#132039;padding:14px 11px 23px;font-size:15px;letter-spacing:.07em}
.nav h2 svg{stroke:#3368b0!important}
.nav button,.nav a{border:0;background:transparent;color:#56647a;border-radius:8px;padding:12px;font-size:12px;font-weight:650}
.nav .active,.nav button:hover,.nav a:hover{background:#edf3ff;color:#214f9b}
.nav small{color:#8894a7}
.main{padding:30px clamp(16px,2.8vw,42px);background:#f5f7fb;min-width:0}
.main-head{margin-bottom:24px;gap:15px}
.eyebrow{color:#657790;letter-spacing:.12em}
.main-head h1{color:#12213c;font-size:27px;letter-spacing:-.035em}
.sub,.small{color:#728098}
.head-actions{display:flex;gap:8px;flex-wrap:wrap}
.panel,.profile-card,.account-detail{background:#fff;border:1px solid #e2e8f1;border-radius:13px;box-shadow:0 5px 20px #172b4910}
.panel{padding:19px;margin-bottom:16px}
.panel h2,.profile-card h3{color:#19283f}
.metric{background:#fff;border:1px solid #e0e6ef;border-radius:12px;box-shadow:0 2px 8px #0c254007}
.metric span{color:#69798f}.metric strong{color:#162943}
.btn{border:1px solid #d6deea;background:#fff;color:#34465f;border-radius:8px;padding:9px 13px;font-size:12px;font-weight:650;transition:background .15s,border-color .15s,transform .15s}
.btn.primary{background:#315eab;border-color:#315eab;color:#fff}
.btn.primary:hover{background:#204b91;border-color:#204b91}
.btn:hover{filter:none;background:#eff3fa;border-color:#b9c8e0}.btn.primary:hover{color:#fff}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn.danger{background:#fff1f2;border-color:#ffbdc5;color:#b42e3b}
th{background:#f8fafd;color:#667891;border-bottom:1px solid #e5eaf2;font-weight:750;letter-spacing:.06em;font-size:10px}
td{color:#273950;border-bottom:1px solid #edf0f5;font-size:12px}
tbody tr:hover td{background:#f8faff}
.chip{color:#14644a;background:#e5f8ec;padding:4px 8px;border-radius:6px;font-weight:700}.chip.bad{color:#ac3544;background:#fff0f1}
.field{color:#50627a;font-weight:700}
.field input,.field select,.margin-form input,#margin-symbol-search,#margin-symbol,.trade-user-field input[type=search]{background:#fff!important;border:1px solid #d8e0eb!important;color:#23334e!important;border-radius:8px!important;padding:10px 11px!important;min-height:38px!important;box-shadow:0 1px 2px #15284206}
.field input:focus,.field select:focus,.margin-form input:focus,#margin-symbol-search:focus,#margin-symbol:focus,.trade-user-field input[type=search]:focus{border-color:#6892d2!important;outline:2px solid #dbe7ff;outline-offset:0}
#margin-symbol option{background:#fff}
.modal-backdrop{background:#14233c77;backdrop-filter:blur(2px)}
.modal,#login-box .modal{background:#fff;border:1px solid #dfe6f0;color:#14223a;box-shadow:0 20px 70px #13233b38}
.modal p,.danger-note{color:#61718a}
#login-box{background:linear-gradient(135deg,#f1f6ff,#f9fbff 60%,#e8effb)}
#notify{background:#233653!important;color:#fff;border:1px solid #5c769a;box-shadow:0 16px 35px #19314d30}
.tabbuttons{border-bottom:1px solid #e3e9f2;gap:4px}.tabbuttons button{color:#64748c;font-weight:700;border-radius:7px 7px 0 0}.tabbuttons button.active{color:#28559f;border-bottom-color:#356ebc;background:#f0f5fd}
.account-info,.account-info strong{color:#243853}
.trade-filters{gap:13px}.trade-filters .tabbuttons{border-bottom-color:#dfe6ef}
.trade-filters .tabbuttons button{font-size:12px;padding:11px 15px}
.trade-filter-controls{display:grid;grid-template-columns:minmax(210px,1.2fr) minmax(220px,1.1fr) auto;gap:13px;padding:15px;border:1px solid #e4eaf3;border-radius:11px;background:#f8fafd;align-items:end}
.trade-filter-controls .field{gap:7px;font-size:11px}
.trade-filter-controls .field>input,.trade-filter-controls .field>select{background:#fff}
.trade-user-field select{margin-top:2px}
.clear-trade-filters{height:39px;white-space:nowrap}
.trade-table-wrap{border:1px solid #e2e9f2;border-radius:10px;max-height:70vh}
.trade-data-table th{background:#f3f6fb;color:#5e6c83}
.trade-data-table tbody tr:not(.trade-edit-row):hover td{background:#f6f9fe}
.trade-live-price{color:#1e3654}.trade-money.positive{color:#14845b}.trade-money.negative{color:#c3464b}
.admin-trade-id{color:#8592a5;font:11px ui-monospace,Consolas,monospace}.admin-trade-id strong{color:#20344e;font-weight:850}
.admin-side-badge.long{color:#0b7554;background:#e0f7ee}.admin-side-badge.short{color:#b33c45;background:#ffe8eb}
.trade-edit-form{background:#f6f9ff;border:1px solid #dbe6f5;border-radius:10px}.trade-edit-form label{color:#596b86}.trade-edit-form input{background:#fff;color:#1c304b;border:1px solid #cdd9ea}.trade-edit-form p{color:#77859a}
.health-item{background:#fff;border:1px solid #e3eaf2;border-radius:10px}.health-item p{color:#687991}
.health-state{background:#e0f8e8;color:#0c7853}.health-state.error{background:#ffeded;color:#b13d48}.health-state.warning{background:#fff2da;color:#875e19}
.health-item.error{border-color:#ffcdd2}.health-item.warning{border-color:#f5d9a0}
.status-report>div{background:#f7f9fd;border:1px solid #e1e8f0}.status-report strong{color:#223652}.status-error-list{background:#fff1f1;color:#b33541;border-color:#ffd3d8}
.margin-form{gap:15px;align-items:end}.margin-form input{min-height:42px!important}
#symbol-margin-form{grid-template-columns:1.1fr 1fr .55fr auto;gap:14px}
.margin-example{padding:0;background:#fff;border:1px solid #e3e8f2;color:#233855;overflow:hidden;border-radius:12px}
.margin-example strong{color:#173151}.margin-note{padding:10px 15px;color:#71819a;font-size:11px;border-top:1px solid #edf0f4}
.margin-example-head{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:18px;background:#f6f9ff;border-bottom:1px solid #e7edf6}
.margin-example-head>div+div{border-left:1px solid #e3eaf2;padding-left:18px}
.margin-example-head small{display:block;font-size:10px;color:#7b8aa1;letter-spacing:.08em;font-weight:800}
.margin-example-head h3{font-size:19px;margin:4px 0}.margin-example-head h3 span{color:#2c5fad;background:#e5edfc;border-radius:6px;padding:2px 7px;font-size:13px}
.margin-example-head strong{font-size:17px}.margin-example-head p{font-size:12px;margin:5px 0 0;color:#7b8799}
.margin-example table{min-width:450px}.margin-example th,.margin-example td{padding:11px 17px}
.margin-example th{background:#f8faff}
#margin-list{border:1px solid #e3e9f1;border-radius:9px}
#margin-symbol-count{color:#71829a}
.profile-card{padding:19px;margin-bottom:16px}
.profile-card h3{margin:0 0 10px;font-size:15px}.profile-card>.small{margin-top:0;line-height:1.65}
.account-detail{scroll-margin-top:22px;padding:20px;margin:22px 0 10px}
.account-detail>.split-head h2{margin:4px 0;font-size:20px;display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.profile-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}
.profile-metrics>div{background:#f5f8fc;border:1px solid #e4eaf3;border-radius:9px;padding:12px}
.profile-metrics small{display:block;color:#728099;font-size:11px}.profile-metrics strong{font-size:19px;display:block;color:#20344d;margin-top:6px}
.profile-layout{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(330px,1.1fr);gap:16px}
.profile-card dl{display:grid;grid-template-columns:max-content 1fr;gap:10px 14px;font-size:12px;color:#415470;margin-top:18px}
.profile-card dt{color:#6c7b91}.profile-card dd{margin:0;text-align:right;overflow-wrap:anywhere}
.profile-card code{color:#233d61;background:#f0f4fa;padding:2px 5px;border-radius:5px}
.profile-field{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}.profile-field label{grid-column:1/-1;font-size:11px;color:#63748c;font-weight:800}
.profile-field select{background:#fff;border:1px solid #d6dfed;border-radius:8px;color:#273e59;padding:9px;width:100%;min-width:0}
.account-activity{max-height:350px;overflow-y:auto;padding:4px 3px 5px 9px}
.audit-event{display:grid;grid-template-columns:15px 1fr;gap:6px;padding:0 0 15px;position:relative}
.audit-event:not(:last-child):before{content:'';position:absolute;top:12px;bottom:-2px;left:4px;width:1px;background:#e2e8f2}
.audit-dot{width:9px;height:9px;border-radius:50%;background:#8daacf;border:2px solid #d9e6f5;margin-top:4px}
.audit-event strong{font-size:12px;color:#24354c;display:block}
.audit-event small,.audit-event time{display:block;font-size:11px;color:#71819a;margin-top:3px;line-height:1.5}
.account-action-form{padding:13px;margin-top:13px;background:#f7f9fd;border:1px solid #e5ecf4;border-radius:10px}
.account-action-form .field{min-width:0}
.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.permission-grid label{display:flex;align-items:center;gap:7px;background:#f8fafe;border:1px solid #e5ebf3;border-radius:7px;padding:9px;font-size:11px;color:#445671;cursor:pointer}
.permission-grid input{accent-color:#3566ae;width:15px;height:15px;flex:0 0 auto}
.profile-card .table-wrap{max-height:320px}
.mobile-nav-toggle,.mobile-nav-backdrop{display:none}
@media(max-width:1060px){.main{padding:24px 20px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-layout{grid-template-columns:1fr}}
@media(max-width:850px){.shell{display:block}.nav{position:fixed;top:0;left:0;bottom:0;z-index:99;width:min(280px,82vw);height:100dvh;display:flex;flex-direction:column;align-items:stretch;flex-wrap:nowrap;transform:translateX(-110%);transition:transform .2s ease;box-shadow:10px 0 30px #192d4730;overflow:auto;padding:20px 12px}.nav h2{width:auto}.nav button,.nav a{width:100%}.nav-open .nav{transform:translateX(0)}.mobile-nav-backdrop{display:none;position:fixed;inset:0;background:#14253f72;z-index:98}.nav-open .mobile-nav-backdrop{display:block}.mobile-nav-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 38px;height:38px;padding:6px;margin-right:2px}.main{padding:16px}.main-head{justify-content:flex-start;flex-wrap:wrap;gap:10px}.main-head>div:nth-child(2){flex:1 1 180px}.main-head h1{font-size:21px}.head-actions{width:auto;justify-content:flex-end}.account-detail{padding:14px}.profile-metrics{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.trade-filter-controls{grid-template-columns:1fr;gap:10px;padding:12px}.clear-trade-filters{width:100%}.panel{padding:13px}.metrics{gap:8px}.metric{padding:11px}.metric strong{font-size:18px}.main-head{margin-bottom:13px}.main-head h1{font-size:20px}.head-actions{width:100%}.head-actions .btn{flex:1 1 auto}.profile-metrics{gap:7px}.profile-metrics>div{padding:9px}.profile-metrics strong{font-size:16px}.profile-card{padding:13px}.profile-field{grid-template-columns:1fr}.profile-field label{grid-column:auto}.margin-example-head{grid-template-columns:1fr;gap:10px;padding:13px}.margin-example-head>div+div{border-left:0;padding:10px 0 0;border-top:1px solid #dbe5f1}#symbol-margin-form{grid-template-columns:1fr}.margin-form{flex-direction:column;align-items:stretch}.margin-form .field{min-width:0;width:100%}.form-grid{grid-template-columns:1fr}.permission-grid{grid-template-columns:1fr}.trade-filters .tabbuttons button{padding:10px}.account-detail>.split-head{align-items:flex-start}}

/* Small-screen account directory */
.mobile-users-list{display:none}
@media(max-width:620px){
 #users-view>.panel .table-wrap{display:none}
 .mobile-users-list{display:grid;gap:10px}
 .mobile-user-card{background:#fbfcff;border:1px solid #e3e9f1;border-radius:10px;padding:12px;display:grid;gap:10px}
 .mobile-user-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
 .mobile-user-head strong{display:block;font-size:13px;color:#223752;overflow-wrap:anywhere}
 .mobile-user-head small{display:block;color:#7d8ca1;margin-top:3px;font-size:10px}
 .mobile-user-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .mobile-user-metrics>span{display:flex;flex-direction:column;gap:2px;color:#78869a;font-size:10px;background:#f2f6fc;padding:8px;border-radius:7px}
 .mobile-user-metrics strong{color:#233954;font-size:11px;white-space:nowrap}
 .mobile-user-card>.btn{width:100%}
}
