:root{
    --pink:#f25f9f;--pink2:#ff85ba;--pink3:#ffd4e5;--rose:#cf4b8a;--purple:#7f55b9;
    --header1:#f9ddea;--header2:#f2aed0;--header3:#ee80b8;
    --bg:#15111d;--bg2:#1c1627;--side:#2c1834;--panel:#21192f;--panel2:#2a203a;
    --line:rgba(255,255,255,.09);--line2:rgba(255,255,255,.13);--text:#fff8fc;--muted:#bfaec8;
    --green:#55df75;--red:#ff6070;--blue:#35a7ff;--shadow:0 22px 55px rgba(0,0,0,.24)
}
*{box-sizing:border-box}html,body{min-height:100%}body{margin:0;font-family:'Itim',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:radial-gradient(circle at 7% 95%,rgba(242,95,159,.16),transparent 24%),linear-gradient(180deg,#18121f 0%,#110e17 100%);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer}form{margin:0}svg{display:block}.app-shell{min-height:100vh;padding-top:76px;padding-left:232px}.app-header{position:fixed;inset:0 0 auto 0;height:76px;z-index:50;display:flex;align-items:center;justify-content:space-between;padding:0 22px;background:radial-gradient(circle at 82% 0%,rgba(255,255,255,.20),transparent 22%),linear-gradient(100deg,var(--header1),var(--header2) 52%,var(--header3));border-bottom:1px solid rgba(255,255,255,.28);box-shadow:0 6px 24px rgba(73,31,60,.15)}.brand-wrap{display:flex;align-items:center;gap:12px;min-width:0}.brand-logo{width:48px;height:48px;display:grid;place-items:center;border-radius:15px;background:linear-gradient(135deg,#b54c91,#ff7db7 55%,#8051bd);color:#fff;box-shadow:0 10px 22px rgba(172,69,137,.28)}.brand-logo svg{width:34px;height:34px}.brand-copy{display:flex;flex-direction:column;line-height:1}.brand-copy strong{font-size:22px;letter-spacing:.1px;color:#271b32}.brand-copy strong span{color:#ed4f96}.brand-copy small{margin-top:5px;font-size:9px;letter-spacing:2.1px;color:rgba(39,27,50,.7);font-weight:700}.header-actions{display:flex;align-items:center;gap:9px}.signed-user{display:flex;align-items:center;gap:9px;padding:6px 11px 6px 7px;border-radius:14px;background:rgba(40,23,48,.09);color:#281c30}.user-avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;font-size:14px;font-weight:800;color:#fff;background:linear-gradient(135deg,var(--pink),var(--purple));box-shadow:0 5px 14px rgba(201,73,139,.22)}.user-copy{display:flex;flex-direction:column;min-width:0}.user-copy strong{font-size:13px}.user-copy small{font-size:11px;color:rgba(40,28,48,.72)}.header-btn{height:40px;display:inline-flex;align-items:center;gap:7px;border:1px solid rgba(93,45,79,.13);border-radius:12px;padding:0 13px;background:rgba(255,255,255,.38);color:#65415a;font-weight:700;transition:.18s ease}.header-btn svg{width:18px;height:18px}.header-btn:hover{transform:translateY(-1px);background:rgba(255,255,255,.58)}.header-btn.admin-btn{color:#6b468d;background:rgba(247,239,255,.68)}.header-btn.logout-btn{color:#ad456d;background:rgba(255,245,249,.62)}.sidebar{position:fixed;left:0;top:76px;bottom:0;width:232px;z-index:30;padding:22px 14px;background:radial-gradient(circle at 5% 100%,rgba(242,95,159,.18),transparent 34%),linear-gradient(180deg,#3a203f 0%,#21152b 100%);border-right:1px solid var(--line);box-shadow:8px 0 30px rgba(0,0,0,.16)}.sidebar-menu{display:flex;flex-direction:column;gap:10px}.sidebar-menu form{width:100%}.sidebar-item{position:relative;width:100%;min-height:56px;display:flex;align-items:center;gap:13px;padding:0 16px;border:0;border-radius:16px;background:transparent;color:#f3e7f2;text-align:left;font-size:16px;font-weight:650;transition:.2s ease}.sidebar-item svg{width:22px;height:22px;flex:none;color:#dbc8de}.sidebar-item:hover{background:rgba(255,255,255,.055)}.sidebar-item.active{background:linear-gradient(90deg,rgba(242,95,159,.34),rgba(255,133,186,.13));box-shadow:inset 4px 0 0 var(--pink2),0 8px 24px rgba(242,95,159,.13)}.sidebar-item.active svg{color:#ffd7e7}.workspace-main{padding:28px 22px 40px;min-height:calc(100vh - 76px)}.dashboard-page{display:none}.dashboard-page.active{display:block;animation:fadeIn .18s ease}.panel-card{max-width:1480px;margin:0 auto;padding:24px;border:1px solid var(--line2);border-radius:22px;background:radial-gradient(circle at 22% 0%,rgba(126,85,185,.09),transparent 28%),linear-gradient(180deg,rgba(37,29,52,.98),rgba(25,20,37,.98));box-shadow:var(--shadow)}.panel-title h1{margin:0;font-size:25px;color:#fff}.panel-title span{display:block;width:172px;height:4px;margin-top:12px;border-radius:999px;background:linear-gradient(90deg,var(--pink2) 0 48%,rgba(255,255,255,.12) 48%)}.panel-subtitle{margin:12px 0 0;color:var(--muted)}.panel-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:24px 0 18px;flex-wrap:wrap}.pink-btn{height:46px;display:inline-flex;align-items:center;gap:9px;border:0;border-radius:13px;padding:0 17px;color:white;font-weight:750;background:linear-gradient(135deg,var(--pink2),var(--pink));box-shadow:0 10px 22px rgba(242,95,159,.2);transition:.18s ease}.pink-btn:hover{transform:translateY(-1px)}.pink-btn svg{width:19px;height:19px}.toolbar-right{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.select-control,.search-control{height:46px;display:flex;align-items:center;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.035);color:#d8c7df}.select-control span{padding-left:13px;font-size:13px}.select-control select{height:100%;min-width:122px;border:0;outline:0;background:transparent;color:#fff;padding:0 13px}.select-control option{color:#222}.search-control{min-width:280px;padding:0 13px;gap:9px}.search-control svg{width:18px;height:18px;color:#bda9c7}.search-control input{width:100%;border:0;outline:0;background:transparent;color:#fff}.search-control input::placeholder{color:#9e8baa}.data-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.018)}.data-table{width:100%;min-width:980px;border-collapse:separate;border-spacing:0}.data-table th,.data-table td{padding:15px 14px;border-bottom:1px solid rgba(255,255,255,.065);text-align:left;vertical-align:middle}.data-table th{background:rgba(255,255,255,.045);color:#eadfec;font-size:13px;white-space:nowrap}.data-table td{font-size:14px;color:#f5edf7}.data-table tbody tr:last-child td{border-bottom:0}.data-table tbody tr:not(.empty-row):hover{background:rgba(255,255,255,.025)}.empty-state{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#9e8eaa}.empty-state svg{width:46px;height:46px;margin-bottom:12px;color:#765c80}.empty-state strong{font-size:16px;color:#d9c9df}.empty-state span{margin-top:6px;font-size:13px}.table-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px}.records{display:flex;align-items:center;gap:10px;color:#cfc0d6;font-size:13px}.records select{height:42px;border:1px solid var(--line);border-radius:11px;background:rgba(255,255,255,.04);color:#fff;padding:0 12px}.records select option{color:#222}.pagination{display:flex;align-items:center;gap:8px}.pagination button{width:40px;height:40px;border:0;border-radius:10px;background:rgba(255,255,255,.07);color:#d6c6dd}.pagination .current{background:linear-gradient(135deg,var(--pink2),var(--pink));color:#fff}.broker-summary,.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 18px}.broker-summary>div,.stat-card{padding:18px;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.03)}.broker-summary span,.stat-card span{display:block;color:#ae9abb;font-size:13px}.broker-summary strong,.stat-card strong{display:block;margin-top:5px;font-size:26px;color:#fff}.broker-summary .online-text{font-size:18px;color:var(--green)}.admin-panel{max-width:1500px}.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:20px}.stat-card strong{color:var(--pink2)}.status-badge{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:750}.status-active,.role-user{background:rgba(85,223,117,.13);color:#79e890}.status-pending{background:rgba(255,198,79,.13);color:#ffd16b}.status-suspended,.status-rejected{background:rgba(255,96,112,.13);color:#ff8b98}.role-admin{background:rgba(159,122,234,.16);color:#c9aefe}.row-actions{display:flex;flex-wrap:wrap;gap:6px}.action-btn{min-height:32px;border:1px solid var(--line);border-radius:9px;padding:0 10px;background:rgba(255,255,255,.05);color:#eadfec}.action-btn.approve{background:rgba(85,223,117,.12);color:#76e58d}.action-btn.danger{background:rgba(255,96,112,.1);color:#ff8997}.action-btn.admin-action{background:rgba(159,122,234,.12);color:#c5a9f5}.self-note{font-size:12px;color:#a996b2}.page-alert{max-width:1480px;margin:0 auto 16px}.alert,.info-box{padding:12px 14px;border-radius:12px}.alert.error{background:#4c2534;color:#ffb4c8;border:1px solid #774052}.alert.success{background:#1e3c2a;color:#a8efba;border:1px solid #356246}.alert.notice{background:#453348;color:#f0c8dc;border:1px solid #6c4e69}.toast{position:fixed;right:22px;bottom:22px;z-index:80;max-width:360px;padding:12px 16px;border-radius:12px;background:#fff;color:#6e4155;box-shadow:0 14px 34px rgba(0,0,0,.26);opacity:0;transform:translateY(12px);pointer-events:none;transition:.2s ease}.toast.show{opacity:1;transform:none}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(135deg,#fff7fa,#fceaf2 56%,#f5edff)}.auth-card{width:100%;max-width:440px;padding:34px;border:1px solid #fff;border-radius:24px;background:rgba(255,255,255,.9);box-shadow:0 20px 50px rgba(190,104,140,.16);color:#644554}.auth-logo{width:64px;height:64px;margin:0 auto 15px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(135deg,#ffd5e6,#eadbff);color:#c95489}.auth-logo svg{width:42px;height:42px}.auth-card h1{margin:0 0 7px;text-align:center;color:#d05b8e;font-size:29px}.auth-description{text-align:center;margin:0 0 22px;color:#a66a84}.info-box{margin:14px 0;background:#fff4f8;border:1px solid #e9cada;color:#8f5a73}.auth-field{display:block;margin-top:17px;font-weight:700;color:#814f66}.auth-field input{width:100%;margin-top:7px;padding:12px 13px;border:1px solid #efbfd2;border-radius:11px;background:#fffafd;color:#694456;outline:0}.auth-field input:focus{border-color:#dc77a2;box-shadow:0 0 0 4px rgba(220,119,162,.13)}.auth-field small{display:block;margin-top:6px;color:#ad788f;font-weight:400}.primary-btn{width:100%;margin-top:24px;padding:12px;border:0;border-radius:11px;background:linear-gradient(135deg,#ee9fbe,#d96e9d);color:#fff;font-weight:800}.auth-switch{margin-top:22px;text-align:center;color:#9f6b83}.link-btn{border:0;background:transparent;color:#d45e91;font-weight:800;padding:0}.auth-card .alert{margin:14px 0}.admin-table{min-width:1050px}@keyframes fadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

.inline-note{padding:12px 14px;border:1px dashed rgba(255,133,186,.28);border-radius:14px;background:rgba(255,255,255,.03);color:#d7c6de;font-size:13px;line-height:1.5}
.pink-btn[disabled]{opacity:.6;cursor:not-allowed;box-shadow:none;transform:none}
.server-badges{display:flex;flex-wrap:wrap;gap:8px}.server-chip{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);color:#efe1f4;font-size:12px}
.nested-actions{margin-top:10px}.inline-server-form{display:inline-flex}.mini-delete-btn{min-height:28px;border:1px solid rgba(255,96,112,.18);border-radius:999px;padding:0 10px;background:rgba(255,96,112,.08);color:#ffb7c0;font-size:12px}
.compact-modal{width:min(560px,100%)}.single-grid{grid-template-columns:1fr}
@media(max-width:980px){.app-shell{padding-left:0;padding-top:132px}.app-header{height:auto;min-height:76px;padding:12px 14px;align-items:flex-start;flex-wrap:wrap}.header-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}.sidebar{top:132px;left:0;right:0;bottom:auto;width:auto;height:66px;padding:8px 12px;background:#2b1933;border-right:0;border-bottom:1px solid var(--line)}.sidebar-menu{flex-direction:row}.sidebar-menu form{width:auto}.sidebar-item{min-height:48px;width:auto;white-space:nowrap}.workspace-main{padding:18px 12px 30px}.stats-grid,.broker-summary{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.brand-copy small,.user-copy{display:none}.brand-logo{width:42px;height:42px}.header-btn span{display:none}.header-btn{width:40px;padding:0;justify-content:center}.signed-user{padding:4px;background:transparent}.app-shell{padding-top:126px}.sidebar{top:126px}.panel-card{padding:16px}.panel-toolbar{align-items:stretch}.toolbar-right,.search-control,.select-control{width:100%}.search-control{min-width:0}.select-control select{flex:1}.stats-grid,.broker-summary{grid-template-columns:1fr}.table-footer{align-items:flex-start;flex-direction:column}.brand-copy strong{font-size:19px}}


.modal-overlay{position:fixed;inset:0;z-index:120;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(15,10,20,.72);backdrop-filter:blur(6px)}
.modal-overlay[hidden]{display:none!important}
.modal-dialog{position:relative;width:min(860px,100%);max-height:min(92vh,900px);overflow:auto;padding:26px;border:1px solid rgba(255,255,255,.12);border-radius:24px;background:linear-gradient(180deg,rgba(45,35,60,.98),rgba(28,22,40,.99));box-shadow:0 28px 70px rgba(0,0,0,.38)}
.add-account-dialog{background:radial-gradient(circle at top right,rgba(242,95,159,.10),transparent 28%),radial-gradient(circle at left top,rgba(127,85,185,.10),transparent 26%),linear-gradient(180deg,rgba(45,35,60,.98),rgba(28,22,40,.99))}
.modal-close{position:absolute;right:16px;top:16px;width:40px;height:40px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(255,255,255,.05);color:#e8deec}
.modal-close svg{width:20px;height:20px;margin:auto}
.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-right:46px;margin-bottom:22px}
.modal-head h2{margin:0;font-size:28px;color:#fff}
.modal-head p{margin:7px 0 0;color:var(--muted);font-size:14px;line-height:1.6}
.modal-badge{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;background:rgba(242,95,159,.13);border:1px solid rgba(255,133,186,.28);color:#ffd2e5;font-size:12px;font-weight:800;letter-spacing:.4px}
.account-modal-form{display:flex;flex-direction:column;gap:18px}
.account-type-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.type-card{display:block;padding:16px 17px;border:1px solid rgba(255,255,255,.10);border-radius:18px;background:rgba(255,255,255,.03);cursor:pointer;transition:.18s ease}
.type-card input{position:absolute;opacity:0;pointer-events:none}
.type-card-title{display:block;font-size:17px;font-weight:800;color:#fff7fb}
.type-card small{display:block;margin-top:6px;color:#bcaac6;line-height:1.45}
.type-card.active{border-color:rgba(255,133,186,.48);background:linear-gradient(135deg,rgba(242,95,159,.18),rgba(255,133,186,.06));box-shadow:inset 0 0 0 1px rgba(255,133,186,.18),0 12px 28px rgba(242,95,159,.10)}
.account-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.form-field{display:flex;flex-direction:column;gap:8px}
.form-field span{font-size:14px;font-weight:700;color:#f5edf7}
.form-field input,.form-field select,.form-field textarea{width:100%;min-height:50px;padding:13px 14px;border:1px solid rgba(255,255,255,.09);border-radius:14px;background:rgba(14,11,20,.28);color:#fff;outline:0;transition:.18s ease}
.form-field textarea{min-height:100px;resize:vertical}
.form-field input::placeholder,.form-field textarea::placeholder{color:#95829f}
.form-field input:focus,.form-field select:focus,.form-field textarea:focus{border-color:rgba(255,133,186,.55);box-shadow:0 0 0 4px rgba(242,95,159,.10)}
.form-field option{color:#222}
.full-span{grid-column:1 / -1}
.modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding-top:4px}
.ghost-btn{height:46px;padding:0 18px;border:1px solid rgba(255,255,255,.10);border-radius:14px;background:rgba(255,255,255,.04);color:#eadfec;font-weight:700}
.ghost-btn:hover{background:rgba(255,255,255,.07)}
body.modal-open{overflow:hidden}
@media(max-width:760px){.modal-overlay{padding:12px}.modal-dialog{padding:18px;border-radius:18px}.modal-head{padding-right:36px}.modal-head h2{font-size:24px}.account-type-grid,.account-form-grid{grid-template-columns:1fr}.modal-actions{flex-direction:column-reverse;align-items:stretch}.ghost-btn,.modal-actions .pink-btn{width:100%;justify-content:center}}

.field-help{display:block;margin-top:2px;color:#a996b2;font-size:12px;line-height:1.55}.compact-modal .form-field textarea{min-height:170px;line-height:1.55}

.page-alert{transition:opacity .3s ease,transform .3s ease,max-height .3s ease,margin .3s ease,padding .3s ease}
.page-alert.auto-hide{opacity:0;transform:translateY(-8px);max-height:0;margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;overflow:hidden;pointer-events:none}

.account-dot{display:inline-block;width:10px;height:10px;margin-right:8px;border-radius:50%;vertical-align:middle}.account-dot.online{background:var(--green);box-shadow:0 0 9px rgba(85,223,117,.55)}.account-dot.offline{background:#7f7089}.broker-cell{display:flex;flex-direction:column;gap:3px}.broker-cell small{color:#a995b4}.account-role-badge{display:inline-flex;align-items:center;justify-content:center;min-width:70px;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:700}.account-role-badge.master{background:rgba(53,167,255,.16);color:#7ac7ff}.account-role-badge.slave{background:rgba(85,223,117,.15);color:#86eb9b}.profit-positive{color:#70e98a!important}.profit-negative{color:#ff8693!important}


.account-role-badge.not-configured{background:rgba(255,198,79,.12);color:#ffd16b}.copy-settings-btn{background:rgba(242,95,159,.13);color:#ffacd0;border-color:rgba(255,133,186,.2)}
.copy-settings-dialog{width:min(900px,100%)}.copy-settings-head{margin-bottom:18px}.settings-section{padding:18px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:rgba(255,255,255,.025)}.settings-section+.settings-section{margin-top:14px}.settings-section-title{display:flex;flex-direction:column;gap:3px;margin-bottom:14px}.settings-section-title strong{font-size:17px;color:#fff}.settings-section-title small{color:#ad9ab8;font-size:13px}.lot-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.lot-mode-card{display:block;padding:15px 16px;border:1px solid rgba(255,255,255,.09);border-radius:15px;background:rgba(255,255,255,.025);cursor:pointer;transition:.18s ease}.lot-mode-card input{position:absolute;opacity:0;pointer-events:none}.lot-mode-card>span{display:block;font-size:16px;font-weight:700;color:#f8eef7}.lot-mode-card>small{display:block;margin-top:5px;color:#a995b4}.lot-mode-card.active{border-color:rgba(255,133,186,.48);background:linear-gradient(135deg,rgba(242,95,159,.16),rgba(127,85,185,.08));box-shadow:inset 0 0 0 1px rgba(255,133,186,.14)}.settings-value-grid{margin-top:14px;grid-template-columns:1fr}.option-switch-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.setting-toggle-card{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:12px;min-height:72px;padding:13px 14px;border:1px solid rgba(255,255,255,.08);border-radius:15px;background:rgba(255,255,255,.025);cursor:pointer}.setting-toggle-card input{position:absolute;opacity:0;pointer-events:none}.toggle-ui{position:relative;width:44px;height:24px;border-radius:999px;background:#5b5064;transition:.18s ease}.toggle-ui:after{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;border-radius:50%;background:#fff;transition:.18s ease;box-shadow:0 2px 7px rgba(0,0,0,.25)}.setting-toggle-card input:checked+.toggle-ui{background:linear-gradient(135deg,var(--pink2),var(--pink))}.setting-toggle-card input:checked+.toggle-ui:after{transform:translateX(20px)}.toggle-copy{display:flex;flex-direction:column;gap:3px}.toggle-copy strong{color:#f6edf8;font-size:14px}.toggle-copy small{color:#a995b4;line-height:1.35}.full-setting-card{grid-column:1 / -1}.symbol-convert-section{transition:.2s ease}.symbol-convert-section.disabled-section{opacity:.48}.symbol-convert-section.disabled-section input,.symbol-convert-section.disabled-section textarea{pointer-events:none;cursor:not-allowed;filter:saturate(.45)}.field-help{display:block;margin-top:7px;color:#9f8bac;font-size:12px;line-height:1.5}
@media(max-width:720px){.lot-mode-grid,.option-switch-grid{grid-template-columns:1fr}.full-setting-card{grid-column:auto}.copy-settings-dialog{width:100%}}

/* rev012: show only the active lot input */
.settings-value-grid .form-field[hidden]{display:none!important}


/* rev015: compact Copy Trade Settings + taller desktop Symbol Map + monitor labels */
@media (min-width:761px){
    #copy-settings-modal{padding:12px}
    .copy-settings-dialog{
        width:min(1040px,calc(100vw - 24px));
        max-height:calc(100vh - 24px);
        overflow:hidden;
        padding:16px 18px;
        border-radius:20px;
    }
    .copy-settings-dialog .modal-close{right:14px;top:14px;width:36px;height:36px;border-radius:11px}
    .copy-settings-dialog .modal-close svg{width:18px;height:18px}
    .copy-settings-head{align-items:center;margin-bottom:10px;padding-right:44px}
    .copy-settings-head h2{font-size:25px;line-height:1.05}
    .copy-settings-head p{margin-top:3px;font-size:12px;line-height:1.25}
    .copy-settings-head .modal-badge{padding:6px 11px;font-size:11px}

    #copySettingsForm{
        display:grid;
        grid-template-columns:minmax(0,1fr) minmax(0,1fr);
        gap:10px 12px;
    }
    #copySettingsForm>.settings-section{margin:0!important;padding:11px 13px;border-radius:14px}
    #copySettingsForm>.settings-section:nth-of-type(1){grid-column:1}
    #copySettingsForm>.settings-section:nth-of-type(2){grid-column:2}
    #copySettingsForm>.settings-section:nth-of-type(3),
    #copySettingsForm>.settings-section:nth-of-type(4),
    #copySettingsForm>.modal-actions{grid-column:1/-1}

    .copy-settings-dialog .settings-section-title{gap:1px;margin-bottom:7px}
    .copy-settings-dialog .settings-section-title strong{font-size:15px;line-height:1.1}
    .copy-settings-dialog .settings-section-title small{font-size:11px;line-height:1.2}
    .copy-settings-dialog .form-field{gap:4px}
    .copy-settings-dialog .form-field>span{font-size:12px}
    .copy-settings-dialog .form-field input,
    .copy-settings-dialog .form-field select,
    .copy-settings-dialog .form-field textarea{
        min-height:38px;
        padding:8px 10px;
        border-radius:10px;
        font-size:14px;
    }

    .copy-settings-dialog .lot-mode-grid{gap:8px}
    .copy-settings-dialog .lot-mode-card{padding:9px 11px;border-radius:12px}
    .copy-settings-dialog .lot-mode-card>span{font-size:14px;line-height:1.1}
    .copy-settings-dialog .lot-mode-card>small{margin-top:3px;font-size:11px;line-height:1.2}
    .copy-settings-dialog .settings-value-grid{margin-top:8px}

    .copy-settings-dialog .option-switch-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
    .copy-settings-dialog .full-setting-card{grid-column:auto}
    .copy-settings-dialog .setting-toggle-card{min-height:52px;padding:8px 10px;gap:8px;border-radius:12px}
    .copy-settings-dialog .toggle-ui{width:38px;height:20px}
    .copy-settings-dialog .toggle-ui:after{width:14px;height:14px;left:3px;top:3px}
    .copy-settings-dialog .setting-toggle-card input:checked+.toggle-ui:after{transform:translateX(18px)}
    .copy-settings-dialog .toggle-copy{gap:1px}
    .copy-settings-dialog .toggle-copy strong{font-size:12px;line-height:1.1}
    .copy-settings-dialog .toggle-copy small{font-size:10px;line-height:1.15}

    .copy-settings-dialog .symbol-convert-section .account-form-grid{
        grid-template-columns:minmax(130px,.72fr) minmax(130px,.72fr) minmax(320px,1.8fr);
        gap:9px;
    }
    .copy-settings-dialog .symbol-convert-section .form-field.full-span{grid-column:auto}
    .copy-settings-dialog #symbolMap{height:104px;min-height:104px;resize:none;white-space:pre;overflow:auto}
    .copy-settings-dialog .field-help{margin-top:2px;font-size:10px;line-height:1.15}

    .copy-settings-dialog .modal-actions{padding-top:0;gap:9px}
    .copy-settings-dialog .modal-actions .ghost-btn,
    .copy-settings-dialog .modal-actions .pink-btn{height:40px;min-height:40px;border-radius:11px;padding:0 16px;font-size:13px}
}

@media (min-width:761px) and (max-height:760px){
    #copy-settings-modal{padding:6px}
    .copy-settings-dialog{max-height:calc(100vh - 12px);padding:12px 15px}
    .copy-settings-head{margin-bottom:6px}
    .copy-settings-head h2{font-size:22px}
    .copy-settings-head p,
    .copy-settings-dialog .settings-section-title small,
    .copy-settings-dialog .lot-mode-card>small,
    .copy-settings-dialog .toggle-copy small,
    .copy-settings-dialog .field-help{display:none}
    #copySettingsForm{gap:7px 9px}
    #copySettingsForm>.settings-section{padding:9px 11px}
    .copy-settings-dialog .settings-section-title{margin-bottom:5px}
    .copy-settings-dialog .form-field input,
    .copy-settings-dialog .form-field select,
    .copy-settings-dialog .form-field textarea{min-height:34px;padding:6px 9px}
    .copy-settings-dialog #symbolMap{height:88px;min-height:88px}
    .copy-settings-dialog .setting-toggle-card{min-height:44px;padding:6px 8px}
    .copy-settings-dialog .modal-actions .ghost-btn,
    .copy-settings-dialog .modal-actions .pink-btn{height:36px;min-height:36px}
}

@media (max-width:760px){
    #copy-settings-modal{padding:8px;align-items:flex-start}
    .copy-settings-dialog{
        width:100%;
        max-width:none;
        max-height:calc(100dvh - 16px);
        overflow-y:auto;
        overscroll-behavior:contain;
        padding:14px;
        border-radius:17px;
        -webkit-overflow-scrolling:touch;
    }
    .copy-settings-dialog .modal-close{right:10px;top:10px;width:40px;height:40px;z-index:6}
    .copy-settings-head{margin-bottom:10px;padding:2px 44px 2px 0;gap:8px}
    .copy-settings-head h2{font-size:22px;line-height:1.1}
    .copy-settings-head p{margin-top:4px;font-size:12px;line-height:1.3}
    .copy-settings-head .modal-badge{padding:6px 9px;font-size:11px}

    #copySettingsForm{display:flex;flex-direction:column;gap:10px}
    #copySettingsForm>.settings-section{margin:0!important;padding:12px;border-radius:14px}
    .copy-settings-dialog .settings-section-title{margin-bottom:9px}
    .copy-settings-dialog .settings-section-title strong{font-size:16px}
    .copy-settings-dialog .settings-section-title small{font-size:12px}

    .copy-settings-dialog .lot-mode-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .copy-settings-dialog .lot-mode-card{padding:11px 10px;border-radius:12px}
    .copy-settings-dialog .lot-mode-card>span{font-size:14px}
    .copy-settings-dialog .lot-mode-card>small{font-size:11px;line-height:1.25}
    .copy-settings-dialog .settings-value-grid{margin-top:9px}

    .copy-settings-dialog .option-switch-grid{grid-template-columns:1fr;gap:8px}
    .copy-settings-dialog .full-setting-card{grid-column:auto}
    .copy-settings-dialog .setting-toggle-card{min-height:58px;padding:10px 11px;border-radius:12px}
    .copy-settings-dialog .toggle-copy strong{font-size:14px}
    .copy-settings-dialog .toggle-copy small{font-size:11px}

    .copy-settings-dialog .account-form-grid,
    .copy-settings-dialog .symbol-convert-section .account-form-grid{grid-template-columns:1fr;gap:10px}
    .copy-settings-dialog .symbol-convert-section .form-field.full-span{grid-column:auto}
    .copy-settings-dialog .form-field input,
    .copy-settings-dialog .form-field select,
    .copy-settings-dialog .form-field textarea{min-height:48px;padding:11px 12px;border-radius:12px;font-size:16px}
    .copy-settings-dialog #symbolMap{min-height:84px;height:84px;resize:vertical}
    .copy-settings-dialog .field-help{font-size:11px;line-height:1.35}

    .copy-settings-dialog .modal-actions{
        position:sticky;
        bottom:-14px;
        z-index:5;
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;
        margin:2px -2px -14px;
        padding:14px 2px 14px;
        background:linear-gradient(180deg,rgba(28,22,40,0),rgba(28,22,40,.96) 28%,rgba(28,22,40,.99) 100%);
    }
    .copy-settings-dialog .modal-actions .ghost-btn,
    .copy-settings-dialog .modal-actions .pink-btn{width:100%;height:48px;justify-content:center;border-radius:12px;font-size:15px}
}

@media (max-width:420px){
    #copy-settings-modal{padding:4px}
    .copy-settings-dialog{max-height:calc(100dvh - 8px);padding:12px;border-radius:14px}
    .copy-settings-head h2{font-size:20px}
    .copy-settings-dialog .lot-mode-grid{grid-template-columns:1fr}
    .copy-settings-dialog .modal-actions{grid-template-columns:1fr 1fr}
}


/* rev022 live account status */
.account-identity{display:flex;align-items:center;gap:0;min-width:145px}.account-identity>div{display:flex;flex-direction:column;gap:2px}.account-identity small{font-size:11px;color:#9f8eaa;line-height:1.1;white-space:nowrap}.account-dot.connecting{background:#ffc64f;box-shadow:0 0 9px rgba(255,198,79,.45);animation:mtPulse 1.25s ease-in-out infinite}.account-dot.disabled{background:#5e5365;box-shadow:none}.account-dot.offline{background:#8b748e;box-shadow:none}.account-identity small.live-online{color:#7ee893}.account-identity small.live-connecting{color:#ffd16b}.account-identity small.live-offline{color:#bca8c3}.account-identity small.live-disabled{color:#8d7f94}@keyframes mtPulse{0%,100%{opacity:.55;transform:scale(.9)}50%{opacity:1;transform:scale(1.08)}}
@media(max-width:760px){.account-identity{min-width:128px}.account-identity small{font-size:10px}}

/* rev026: Copy Engine runtime + live activity monitor */
.copy-status-cell{min-width:132px}.copy-runtime-badge{display:inline-flex;align-items:center;justify-content:center;min-width:96px;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.1;white-space:nowrap;border:1px solid transparent}.copy-runtime-badge::before{content:"";width:7px;height:7px;border-radius:50%;margin-right:6px;background:currentColor;box-shadow:0 0 0 3px rgba(255,255,255,.62)}.copy-runtime-badge.running{color:#167b4d;background:#e8f8ef;border-color:#bfe8d1}.copy-runtime-badge.error{color:#b4233f;background:#fff0f3;border-color:#ffc8d3}.copy-runtime-badge.waiting{color:#946200;background:#fff7df;border-color:#f0dfa2}.copy-runtime-badge.disabled,.copy-runtime-badge.not-configured{color:#777;background:#f5f3f6;border-color:#ddd7e0}.copy-runtime-meta{display:block;max-width:150px;margin-top:5px;color:#847684;font-size:10.5px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.copy-runtime-master{color:#aaa}.account-mobile-name{display:none}.account-number{display:inline}.copy-activity-panel{margin-top:16px}.copy-activity-title{display:flex;align-items:center;justify-content:space-between;gap:16px}.copy-activity-title>div{display:flex;align-items:baseline;gap:12px;min-width:0}.copy-activity-title h2{margin:0;color:#43243d;font-size:19px}.copy-activity-title small{color:#947f90;font-size:12px}.copy-activity-live{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;background:#ecfbf2;color:#18754c;font-size:11px;font-weight:700}.copy-activity-live i{width:7px;height:7px;border-radius:50%;background:#22a66a;box-shadow:0 0 0 4px rgba(34,166,106,.12)}.copy-monitor-install-note{margin:12px 16px 0;padding:10px 12px;border:1px solid #f4c8d8;border-radius:10px;background:#fff4f8;color:#8e3457;font-size:12px}.copy-activity-wrap{max-height:310px;overflow:auto}.copy-activity-table{min-width:800px}.copy-activity-table td{padding-top:9px;padding-bottom:9px;font-size:12px}.copy-activity-table td:nth-child(2){white-space:nowrap}.copy-arrow{display:inline-block;margin:0 6px;color:#ad8aa0}.copy-side{display:inline-flex;min-width:34px;justify-content:center;margin-right:7px;padding:2px 6px;border-radius:6px;font-size:10px;font-weight:800}.copy-side.buy{background:#e8f8ef;color:#167b4d}.copy-side.sell{background:#fff0f3;color:#b4233f}.copy-result{display:inline-flex;padding:3px 8px;border-radius:999px;font-size:10.5px;font-weight:700}.copy-result.success{background:#e8f8ef;color:#167b4d}.copy-result.error{background:#fff0f3;color:#b4233f}.copy-result.info{background:#f3eef7;color:#694765}.copy-time,.copy-latency{white-space:nowrap;color:#756572}.copy-activity-empty td{text-align:center!important;color:#9b8b98;padding:22px!important}.dashboard-page:not(.active)+.copy-activity-panel{display:none}body[data-dashboard-section="brokers"] .copy-activity-panel{display:none}

@media (max-width:900px){.copy-activity-title{align-items:flex-start}.copy-activity-title>div{display:block}.copy-activity-title small{display:block;margin-top:3px}.copy-status-cell{min-width:116px}.copy-runtime-meta{max-width:120px}}

/* rev029: responsive/mobile refresh + paged Copy Activity */
.copy-activity-title h2{color:#fff7fb}
.copy-activity-title small{color:#b9a7c2}
.copy-activity-wrap{max-height:none;overflow:visible}
.copy-activity-table{min-width:0}
.copy-activity-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.copy-page-info{display:flex;align-items:center;gap:10px;color:#b9a8c2;font-size:12px}
.copy-page-info strong{color:#f3e8f6;font-weight:700}
.copy-pagination button:disabled{opacity:.35;cursor:not-allowed}
.copy-pagination button:disabled:hover{transform:none}

/* Desktop/tablet polish */
@media (max-width:1180px){
    .panel-card{padding:20px}
    .data-table th,.data-table td{padding:13px 11px}
    .search-control{min-width:230px}
}

/* Tablet and mobile use a compact top bar + bottom navigation. */
@media (max-width:980px){
    html{scroll-padding-top:72px}
    body{padding-bottom:env(safe-area-inset-bottom)}
    .app-shell{padding-left:0;padding-top:68px;padding-bottom:86px}
    .app-header{
        height:64px;min-height:64px;padding:8px max(10px,env(safe-area-inset-left)) 8px max(10px,env(safe-area-inset-right));
        align-items:center;flex-wrap:nowrap;gap:10px
    }
    .brand-wrap{gap:9px;flex:1;min-width:0}
    .brand-logo{width:42px;height:42px;border-radius:13px;flex:none}
    .brand-logo svg{width:29px;height:29px}
    .brand-copy strong{font-size:19px;white-space:nowrap}
    .brand-copy small{display:none}
    .header-actions{width:auto;flex:none;justify-content:flex-end;flex-wrap:nowrap;gap:6px}
    .signed-user{padding:4px 7px 4px 4px}
    .header-btn{height:40px;min-width:40px;padding:0 10px;justify-content:center;border-radius:11px}
    .sidebar{
        top:auto;left:10px;right:10px;bottom:max(8px,env(safe-area-inset-bottom));width:auto;height:68px;
        padding:7px;z-index:55;border:1px solid rgba(255,255,255,.11);border-radius:20px;
        background:linear-gradient(180deg,rgba(50,29,59,.97),rgba(31,20,41,.98));
        box-shadow:0 18px 45px rgba(0,0,0,.36);backdrop-filter:blur(14px)
    }
    .sidebar-menu{
        height:100%;display:grid;grid-template-columns:repeat(var(--mobile-menu-count,2),minmax(0,1fr));
        grid-template-rows:1fr;grid-auto-flow:column;gap:7px;align-items:stretch
    }
    .sidebar-menu.is-admin{--mobile-menu-count:3}
    .sidebar-menu.is-user{--mobile-menu-count:2}
    .sidebar-menu>button,.sidebar-menu>form{min-width:0;width:100%;height:100%;margin:0}
    .sidebar-menu form{display:block}
    .sidebar-item{
        width:100%;height:100%;min-height:0;padding:4px 8px;border-radius:14px;justify-content:center;
        flex-direction:column;gap:2px;text-align:center;font-size:12px;line-height:1.1
    }
    .sidebar-item svg{width:20px;height:20px;flex:none}
    .sidebar-item span{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .sidebar-menu.is-admin .sidebar-item{font-size:11px;padding-left:4px;padding-right:4px}
    .sidebar-item.active{box-shadow:inset 0 0 0 1px rgba(255,133,186,.18),0 5px 16px rgba(242,95,159,.12)}
    .workspace-main{padding:16px 12px 28px;min-height:calc(100vh - 68px)}
    .panel-card{padding:18px;border-radius:19px}
    .panel-title h1{font-size:23px}
    .panel-title span{margin-top:9px}
    .panel-subtitle{font-size:13px;line-height:1.45}
    .panel-toolbar{margin:18px 0 14px;gap:10px}
    .toolbar-right{gap:9px}
    .pink-btn,.select-control,.search-control{height:44px}
    .stats-grid,.broker-summary{gap:10px}
    .stat-card,.broker-summary>div{padding:14px}
    .stat-card strong,.broker-summary strong{font-size:23px}
    .toast{right:12px;left:12px;bottom:94px;max-width:none;text-align:center}
}

@media (max-width:760px){
    .app-header{padding-left:10px;padding-right:10px}
    .brand-copy strong{font-size:18px}
    .header-actions{gap:5px}
    .signed-user{background:transparent;padding:0}
    .user-copy{display:none}
    .user-avatar{width:38px;height:38px}
    .header-btn{width:38px;min-width:38px;height:38px;padding:0}
    .header-btn span{display:none}
    .workspace-main{padding:12px 8px 22px}
    .panel-card{padding:14px;border-radius:17px}
    .panel-title h1{font-size:22px}
    .panel-title span{width:130px;height:3px}
    .panel-toolbar{display:grid;grid-template-columns:1fr;margin-top:16px}
    .panel-toolbar>.pink-btn{width:100%;justify-content:center}
    .toolbar-right{display:grid;grid-template-columns:1fr;width:100%}
    .toolbar-right .search-control,.toolbar-right .select-control{width:100%;min-width:0}
    .select-control select{flex:1;min-width:0}
    .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .broker-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
    .broker-summary>div,.stat-card{padding:11px 10px;text-align:center}
    .broker-summary span,.stat-card span{font-size:11px}
    .broker-summary strong,.stat-card strong{font-size:20px}
    .broker-summary .online-text{font-size:13px}
    .page-alert{margin-bottom:10px;font-size:13px}

    /* All data tables become touch-friendly cards instead of horizontal scrollers. */
    .data-table-wrap{overflow:visible;border:0;background:transparent;border-radius:0}
    .data-table{display:block;width:100%;min-width:0;border:0}
    .data-table thead{display:none}
    .data-table tbody{display:grid;gap:10px;width:100%}
    .data-table tbody tr:not(.empty-row):not(.copy-activity-empty){
        display:block;width:100%;overflow:hidden;border:1px solid var(--line);border-radius:15px;
        background:rgba(255,255,255,.025);box-shadow:0 8px 18px rgba(0,0,0,.08)
    }
    .data-table tbody tr:not(.empty-row):not(.copy-activity-empty):hover{background:rgba(255,255,255,.035)}
    .data-table tbody tr:not(.empty-row):not(.copy-activity-empty)>td{
        display:flex;align-items:flex-start;justify-content:space-between;gap:14px;width:100%;
        min-height:42px;padding:10px 12px;border:0;border-bottom:1px solid rgba(255,255,255,.055);
        text-align:right;font-size:13px;overflow-wrap:anywhere
    }
    .data-table tbody tr:not(.empty-row):not(.copy-activity-empty)>td:last-child{border-bottom:0}
    .data-table tbody tr:not(.empty-row):not(.copy-activity-empty)>td::before{
        content:attr(data-label);display:block;flex:0 0 38%;max-width:38%;color:#aa98b5;font-size:11px;
        font-weight:700;line-height:1.35;text-align:left
    }
    .data-table td>.row-actions{justify-content:flex-end;max-width:62%}
    .data-table td>.broker-cell,.data-table td>.account-identity{margin-left:auto;text-align:right}
    .data-table td>.broker-cell{align-items:flex-end}
    .data-table td>.server-badges{justify-content:flex-end;max-width:62%}
    .data-table .empty-row,.data-table .copy-activity-empty{display:block;width:100%}
    .data-table .empty-row td,.data-table .copy-activity-empty td{display:block;width:100%;border:1px solid var(--line);border-radius:15px}
    .data-table .empty-row td::before,.data-table .copy-activity-empty td::before{display:none}
    .empty-state{min-height:160px;padding:18px}
    .table-footer{display:none}

    #accountsTable .copy-status-cell{min-width:0}
    #accountsTable .copy-runtime-meta{max-width:170px;margin-left:auto;text-align:right}
    #accountsTable td:last-child .row-actions{display:grid;grid-template-columns:1fr;min-width:150px;width:62%}
    #accountsTable td:last-child .row-actions>*{width:100%}
    #accountsTable td:last-child .action-btn{width:100%;min-height:38px}

    #brokersTable td:last-child{display:block;padding-top:11px;text-align:left}
    #brokersTable td:last-child::before{margin-bottom:8px;max-width:none}
    #brokersTable td:last-child .row-actions{max-width:none;justify-content:flex-start}
    #brokersTable td:last-child .nested-actions{margin-top:8px}

    .admin-table td:last-child{display:block;text-align:left}
    .admin-table td:last-child::before{margin-bottom:8px;max-width:none}
    .admin-table td:last-child .row-actions{max-width:none;justify-content:flex-start}

    /* Copy Activity: no internal scrollbar, exactly one 10-item page at a time. */
    .copy-activity-panel{margin-top:12px}
    .copy-activity-title{align-items:flex-start;gap:10px}
    .copy-activity-title>div{display:block}
    .copy-activity-title h2{font-size:18px}
    .copy-activity-title small{display:block;margin-top:3px;font-size:11px;line-height:1.3}
    .copy-activity-live{flex:none;padding:5px 8px}
    .copy-activity-table tbody{gap:8px}
    .copy-activity-table tbody tr:not(.copy-activity-empty){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:4px 0}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td{
        display:block;min-height:0;padding:8px 11px;border-bottom:0;text-align:left;font-size:12px
    }
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td::before{
        content:attr(data-label);display:block;max-width:none;margin-bottom:3px;color:#917e9c;font-size:9.5px;font-weight:700;text-transform:none
    }
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(2){grid-column:1/-1;grid-row:1}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(1){grid-column:1}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(3){grid-column:2}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(4){grid-column:1}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(5){grid-column:2}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(6){grid-column:1}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(7){grid-column:2}
    .copy-activity-footer{align-items:center;margin-top:12px;padding-top:12px}
    .copy-page-info{display:block;line-height:1.35}
    .copy-page-info span,.copy-page-info strong{display:block}
    .copy-pagination{gap:6px}
    .copy-pagination button{width:38px;height:38px}

    /* Mobile modals behave like sheets and keep actions reachable. */
    .modal-overlay{align-items:flex-end;padding:8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
    .modal-dialog,.add-account-dialog,.compact-modal{
        width:100%;max-width:none;max-height:92dvh;padding:17px 14px 14px;border-radius:20px 20px 14px 14px
    }
    .modal-head{padding-right:40px;gap:8px}
    .modal-head h2{font-size:22px}
    .modal-head p{font-size:12px;line-height:1.4}
    .modal-badge{padding:6px 9px;font-size:10px}
    .account-modal-form{gap:12px}
    .account-type-grid,.account-form-grid{grid-template-columns:1fr;gap:10px}
    .type-card{padding:12px 13px;border-radius:14px}
    .type-card-title{font-size:15px}
    .type-card small{font-size:11px}
    .form-field{gap:6px}
    .form-field input,.form-field select,.form-field textarea{min-height:48px;padding:11px 12px;border-radius:12px;font-size:16px}
    .form-field textarea{min-height:88px}
    .modal-actions{position:sticky;bottom:-14px;z-index:5;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 -2px -14px;padding:14px 2px 14px;background:linear-gradient(180deg,rgba(28,22,40,0),rgba(28,22,40,.97) 32%,rgba(28,22,40,1))}
    .ghost-btn,.modal-actions .pink-btn{width:100%;height:48px;justify-content:center}

    .auth-shell{padding:12px;min-height:100dvh}
    .auth-card{padding:24px 18px;border-radius:20px}
    .auth-logo{width:56px;height:56px;border-radius:17px}
    .auth-card h1{font-size:26px}
    .auth-description{margin-bottom:18px;font-size:13px}
    .auth-field input{min-height:50px;font-size:16px}
}

@media (max-width:420px){
    .app-header{gap:6px}
    .brand-logo{width:38px;height:38px;border-radius:12px}
    .brand-logo svg{width:26px;height:26px}
    .brand-copy strong{font-size:17px}
    .header-btn,.user-avatar{width:36px;min-width:36px;height:36px}
    .workspace-main{padding-left:6px;padding-right:6px}
    .panel-card{padding:12px;border-radius:15px}
    .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .broker-summary{gap:6px}
    .broker-summary>div{padding:9px 6px}
    .broker-summary strong{font-size:18px}
    .copy-activity-footer{gap:8px}
    .copy-page-info{font-size:10.5px}
    .copy-pagination button{width:36px;height:36px}
}


/* rev033: consistent confirm/cancel order + compact Add Broker modal */
.modal-actions>.pink-btn{order:1}
.modal-actions>.ghost-btn{order:2}

.add-broker-dialog{
    width:min(470px,calc(100vw - 32px));
    max-height:none;
    overflow:visible;
    padding:20px 22px;
    border-radius:20px;
}
.add-broker-dialog .modal-head{margin-bottom:14px;padding-right:42px}
.add-broker-dialog .modal-head h2{font-size:25px}
.add-broker-dialog .modal-head p{margin-top:5px;font-size:12.5px;line-height:1.4}
.add-broker-dialog .account-modal-form{gap:14px}
.add-broker-dialog .account-form-grid{gap:0}
.add-broker-dialog .form-field input{min-height:46px;padding:10px 12px}
.add-broker-dialog .modal-actions{
    position:static;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin:2px 0 0;
    padding:0;
    background:none;
}
.add-broker-dialog .modal-actions .pink-btn,
.add-broker-dialog .modal-actions .ghost-btn{width:100%;height:44px;justify-content:center}

@media(max-width:760px){
    .modal-actions{
        display:grid;
        grid-template-columns:minmax(0,1fr) minmax(0,1fr);
        flex-direction:initial;
        align-items:stretch;
    }
    .modal-actions>.pink-btn,.modal-actions>.ghost-btn{width:100%;justify-content:center}
    .add-broker-dialog{
        width:min(100%,470px);
        max-width:470px;
        padding:16px 14px;
        border-radius:18px;
    }
    .add-broker-dialog .modal-head{margin-bottom:12px}
    .add-broker-dialog .modal-head h2{font-size:22px}
    .add-broker-dialog .modal-actions{margin-top:2px;padding:0}
}

/* rev034: BMS-style password modal + password visibility toggles */
.password-input-wrap{position:relative;display:block;width:100%}
.auth-field .password-input-wrap{margin-top:7px}
.auth-field .password-input-wrap input{margin-top:0;padding-right:48px}
.password-visibility-toggle{position:absolute;right:8px;top:50%;z-index:4;transform:translateY(-50%);width:34px;height:34px;display:grid;place-items:center;border:1px solid rgba(225,116,165,.18);border-radius:11px;background:linear-gradient(145deg,#fff7fb,#ffe9f2);color:#c85b8c;padding:0;pointer-events:auto;box-shadow:0 3px 10px rgba(203,91,140,.08);transition:transform .16s ease,background .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease}
.password-visibility-toggle:hover{transform:translateY(-50%) scale(1.05);background:#ffe5f0;color:#e45193;border-color:rgba(228,81,147,.3);box-shadow:0 5px 14px rgba(203,91,140,.15)}
.password-visibility-toggle:active{transform:translateY(-50%) scale(.96)}
.password-visibility-toggle:focus-visible{outline:2px solid rgba(240,94,158,.45);outline-offset:2px}
.password-visibility-toggle svg{width:19px;height:19px;pointer-events:none}
.password-visibility-toggle .eye-closed{display:none}
.password-visibility-toggle.is-visible{background:linear-gradient(145deg,#ffe1ee,#ffd3e6);color:#df4d8e;border-color:rgba(223,77,142,.28)}
.password-visibility-toggle.is-visible .eye-open{display:none}
.password-visibility-toggle.is-visible .eye-closed{display:block}

.password-modal-overlay{z-index:150;align-items:center!important;padding:16px!important;background:rgba(73,52,64,.42);backdrop-filter:blur(7px)}
.password-modal-dialog{width:min(420px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:22px;border:1px solid rgba(233,165,195,.55);border-radius:20px;background:#fff;box-shadow:0 24px 70px rgba(91,45,68,.28);color:#5b4050}
.password-modal-icon{width:50px;height:50px;margin:0 auto 10px;display:grid;place-items:center;border:1px solid #f7bfd7;border-radius:15px;background:linear-gradient(135deg,#fff0f6,#ffe4ef);color:#df5f98;box-shadow:0 8px 18px rgba(220,95,152,.12)}
.password-modal-icon svg{width:25px;height:25px}
.password-modal-head{text-align:center;margin-bottom:16px}
.password-modal-head h2{margin:0;color:#5b4050;font-size:22px}
.password-modal-head p{margin:5px 0 0;color:#a1788d;font-size:12px}
.password-modal-form{display:flex;flex-direction:column;gap:13px}
.password-modal-field{display:block;color:#5d4050;font-weight:700;font-size:13px}
.password-modal-field>span:first-child{display:block;margin-bottom:6px}
.password-modal-field input{width:100%;height:46px;padding:0 46px 0 12px;border:1px solid #efbfd2;border-radius:11px;background:#fffafd;color:#5e4050;outline:0;transition:.18s ease}
.password-modal-field input:focus{border-color:#f05e9e;box-shadow:0 0 0 3px rgba(240,94,158,.12)}
.password-modal-field small{display:block;margin-top:5px;color:#a9798d;font-weight:400;font-size:11px}
.password-modal-field .password-visibility-toggle{color:#8f7180}
.password-modal-alert{margin:0 0 14px;padding:10px 12px;border-radius:11px;font-size:12px}
.password-modal-alert.error{background:#fff0f4;color:#b7456b;border:1px solid #f4c4d3}
.password-modal-alert.success{background:#edf9f0;color:#347747;border:1px solid #bfe3c8}
.password-modal-alert.notice{background:#fff6e8;color:#946b2d;border:1px solid #eed6ad}
.password-modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:2px}
.password-modal-actions .pink-btn,.password-modal-cancel{height:44px;width:100%;justify-content:center;border-radius:11px;font-weight:800}
.password-modal-cancel{border:1px solid #efd1dd;background:#fff;color:#745466}
.password-modal-cancel:hover{background:#fff6fa}

@media(max-width:560px){
    .password-modal-overlay{align-items:center!important;padding:10px!important;padding-bottom:max(10px,env(safe-area-inset-bottom))!important}
    .password-modal-dialog{width:100%;max-height:calc(100dvh - 20px);padding:18px 16px;border-radius:18px}
    .password-modal-icon{width:46px;height:46px;border-radius:14px}
    .password-modal-head h2{font-size:21px}
    .password-modal-field input{height:48px;font-size:16px}
    .password-modal-actions .pink-btn,.password-modal-cancel{height:46px}
}

/* rev036: polished Broker accordion / Server cards */
.broker-accordion-list{
    display:grid;
    gap:12px;
    margin-top:6px;
}
.broker-accordion{
    position:relative;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.09);
    border-radius:16px;
    background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(255,255,255,.018));
    box-shadow:0 8px 24px rgba(0,0,0,.08);
    transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease;
}
.broker-accordion:hover{
    border-color:rgba(255,133,186,.20);
    background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.022));
}
.broker-accordion[open]{
    border-color:rgba(255,133,186,.32);
    background:linear-gradient(145deg,rgba(242,95,159,.07),rgba(127,85,185,.045));
    box-shadow:0 14px 34px rgba(0,0,0,.13);
}
.broker-accordion-summary{
    list-style:none;
    display:flex;
    align-items:center;
    gap:12px;
    min-height:70px;
    padding:13px 16px;
    cursor:pointer;
    user-select:none;
    transition:background .18s ease;
}
.broker-accordion-summary:hover{background:rgba(255,255,255,.025)}
.broker-accordion-summary::-webkit-details-marker{display:none}
.broker-accordion-chevron{
    position:relative;
    width:30px;
    height:30px;
    flex:none;
    border:1px solid rgba(255,255,255,.09);
    border-radius:9px;
    background:rgba(255,255,255,.04);
}
.broker-accordion-chevron::after{
    content:"";
    position:absolute;
    left:10px;
    top:8px;
    width:7px;
    height:7px;
    border-right:2px solid #d8c8df;
    border-bottom:2px solid #d8c8df;
    transform:rotate(45deg);
    transition:transform .18s ease,top .18s ease;
}
.broker-accordion[open] .broker-accordion-chevron{
    background:rgba(242,95,159,.10);
    border-color:rgba(255,133,186,.22);
}
.broker-accordion[open] .broker-accordion-chevron::after{
    top:11px;
    transform:rotate(225deg);
}
.broker-accordion-main{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
    flex:1;
}
.broker-accordion-main strong{
    min-width:0;
    color:#fff;
    font-size:16px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.broker-accordion-main small{
    flex:none;
    padding:4px 9px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:999px;
    background:rgba(255,255,255,.045);
    color:#c7b7ce;
    font-size:10.5px;
    line-height:1;
}
.broker-accordion-summary .status-badge{flex:none}
.broker-accordion-body{
    padding:0 16px 16px;
    border-top:1px solid rgba(255,255,255,.06);
}
.broker-accordion-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
    padding:13px 0 12px;
}
.broker-accordion-actions .action-btn{
    min-height:34px;
    padding:0 12px;
    border-radius:10px;
}
.broker-server-list{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
    gap:8px;
}
.broker-server-row{
    display:flex;
    align-items:center;
    gap:9px;
    min-width:0;
    min-height:44px;
    padding:7px 8px 7px 11px;
    border:1px solid rgba(255,255,255,.07);
    border-radius:12px;
    background:linear-gradient(145deg,rgba(255,255,255,.038),rgba(255,255,255,.018));
    transition:border-color .16s ease,background .16s ease,transform .16s ease;
}
.broker-server-row:hover{
    transform:translateY(-1px);
    border-color:rgba(255,133,186,.18);
    background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(242,95,159,.025));
}
.server-status-dot{
    width:8px;
    height:8px;
    flex:none;
    border-radius:50%;
    background:#55df75;
    box-shadow:0 0 0 4px rgba(85,223,117,.10),0 0 10px rgba(85,223,117,.25);
}
.broker-server-name{
    min-width:0;
    flex:1;
    color:#f2e8f4;
    font-size:12.5px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.broker-server-row form{display:flex;align-items:center}
.server-delete-icon{
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    flex:none;
    border:1px solid rgba(255,96,112,.18);
    border-radius:9px;
    background:rgba(255,96,112,.07);
    color:#ff9aa6;
    font-size:18px;
    line-height:1;
    transition:background .16s ease,border-color .16s ease,transform .16s ease;
}
.server-delete-icon:hover{
    transform:scale(1.04);
    background:rgba(255,96,112,.15);
    border-color:rgba(255,96,112,.30);
    color:#ffb2bb;
}
.broker-empty-servers,.broker-empty-card{
    padding:16px;
    color:#a996b2;
    font-size:12px;
    text-align:center;
}
.broker-empty-servers{
    border:1px dashed rgba(255,255,255,.09);
    border-radius:12px;
    background:rgba(255,255,255,.018);
}
.broker-empty-card{
    display:flex;
    flex-direction:column;
    gap:5px;
    border:1px dashed var(--line);
    border-radius:15px;
}
.broker-empty-card strong{color:#d9c9df;font-size:15px}

@media(max-width:760px){
    .broker-accordion-list{gap:9px}
    .broker-accordion-summary{min-height:62px;padding:10px 11px;gap:9px}
    .broker-accordion-chevron{width:28px;height:28px;border-radius:8px}
    .broker-accordion-chevron::after{left:9px;top:7px}
    .broker-accordion[open] .broker-accordion-chevron::after{top:10px}
    .broker-accordion-main{gap:7px;align-items:flex-start;flex-direction:column}
    .broker-accordion-main strong{font-size:14px;max-width:100%}
    .broker-accordion-main small{padding:3px 7px;font-size:9.5px}
    .broker-accordion-summary .status-badge{font-size:10px;padding:4px 7px}
    .broker-accordion-body{padding:0 11px 11px}
    .broker-accordion-actions{padding:10px 0 9px}
    .broker-accordion-actions .action-btn{flex:1;justify-content:center;min-height:36px}
    .broker-accordion-actions form{flex:1}
    .broker-accordion-actions form .action-btn{width:100%}
    .broker-server-list{grid-template-columns:1fr;gap:6px}
    .broker-server-row{min-height:42px;padding:6px 7px 6px 10px}
    .broker-server-name{font-size:12px}
}


/* rev037: Account Settings + unlink Copy Master */
.account-settings-btn{
    background:rgba(159,122,234,.12);
    border-color:rgba(159,122,234,.24);
    color:#cdb7ff;
}
.account-settings-btn:hover{
    background:rgba(159,122,234,.19);
    border-color:rgba(181,147,247,.38);
}
.unlink-copy-btn{
    width:max-content;
    min-height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    margin-top:10px;
    padding:0 13px;
    border:1px solid rgba(255,96,112,.26);
    border-radius:10px;
    background:rgba(255,96,112,.08);
    color:#ff96a1;
    font-weight:750;
    transition:.18s ease;
}
.unlink-copy-btn:hover{
    transform:translateY(-1px);
    background:rgba(255,96,112,.14);
    border-color:rgba(255,115,130,.42);
}
.unlink-copy-btn svg{width:17px;height:17px;flex:none}
.unlink-copy-btn[hidden]{display:none!important}

@media(max-width:760px){
    .unlink-copy-btn{width:100%;min-height:44px;margin-top:8px}
}


/* rev038: keep Copy Activity Live as a readable green status pill.
   This overrides the generic .panel-title span underline rule only for this badge. */
.copy-activity-title .copy-activity-live{
    width:auto;
    height:auto;
    margin:0;
    padding:0 15px;
    min-height:36px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border:1px solid rgba(73,211,132,.24);
    border-radius:999px;
    background:rgba(56,205,120,.11);
    color:#75e89d;
    font-size:12px;
    font-weight:800;
    line-height:1;
    white-space:nowrap;
    flex:none;
}
.copy-activity-title .copy-activity-live i{
    width:7px;
    height:7px;
    flex:none;
    border-radius:50%;
    background:#55df75;
    box-shadow:0 0 9px rgba(85,223,117,.55);
}


/* rev041 - MirrorTrade site icon */
.brand-logo,.auth-logo{overflow:hidden;background:transparent;color:inherit;padding:0}
.brand-logo img,.auth-logo img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}

/* rev046: compact Copy Trade home screen on mobile only. Desktop remains unchanged. */
.copy-mobile-more-row{display:none}

@media (max-width:760px){
    /* Keep the main Copy Trade tools compact without changing other pages. */
    .dashboard-page[data-dashboard-page="copytrade"] .panel-card{padding:12px}
    .dashboard-page[data-dashboard-page="copytrade"] .panel-toolbar{gap:8px;margin:12px 0 10px}
    .dashboard-page[data-dashboard-page="copytrade"] .panel-toolbar>.pink-btn{height:42px}
    .dashboard-page[data-dashboard-page="copytrade"] .toolbar-right{
        display:grid;grid-template-columns:minmax(112px,.42fr) minmax(0,1fr);gap:8px
    }
    .dashboard-page[data-dashboard-page="copytrade"] .toolbar-right .select-control,
    .dashboard-page[data-dashboard-page="copytrade"] .toolbar-right .search-control{height:42px}
    .dashboard-page[data-dashboard-page="copytrade"] .select-control span{padding-left:10px;font-size:11px}
    .dashboard-page[data-dashboard-page="copytrade"] .select-control select{padding:0 8px;font-size:13px}
    .dashboard-page[data-dashboard-page="copytrade"] .search-control{padding:0 10px;gap:7px}
    .dashboard-page[data-dashboard-page="copytrade"] .search-control input{font-size:13px}

    /* Accounts become compact dashboard cards instead of a 9-row key/value card. */
    #accountsTable tbody{gap:8px}
    #accountsTable tbody tr:not(.empty-row){
        display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;
        padding:11px 11px 10px;border-radius:16px;overflow:hidden
    }
    #accountsTable tbody tr:not(.empty-row)>td{
        min-height:0!important;padding:0!important;border:0!important;display:block!important;
        text-align:left!important;overflow:visible
    }
    #accountsTable tbody tr:not(.empty-row)>td::before{display:none!important}

    #accountsTable tbody tr:not(.empty-row)>td:nth-child(1){grid-column:1/2;grid-row:1;padding-right:6px!important}
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(2){
        grid-column:2/4;grid-row:1;text-align:right!important;align-self:center;
        color:#fff;font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
    }
    #accountsTable .account-identity{margin:0;text-align:left;align-items:center;gap:7px;min-width:0}
    #accountsTable .account-identity>div{min-width:0}
    #accountsTable .account-identity strong{font-size:13px;white-space:nowrap}
    #accountsTable .account-identity small{font-size:9px;margin-top:1px}
    #accountsTable .account-dot{width:10px;height:10px;flex:none}

    #accountsTable tbody tr:not(.empty-row)>td:nth-child(3){
        grid-column:1/-1;grid-row:2;margin-top:9px;padding-top:8px!important;
        border-top:1px solid rgba(255,255,255,.06)!important
    }
    #accountsTable .broker-cell{margin:0;text-align:left;align-items:flex-start;display:flex;flex-direction:row;gap:6px;min-width:0}
    #accountsTable .broker-cell strong{font-size:12px;white-space:nowrap}
    #accountsTable .broker-cell strong::after{content:"•";margin-left:6px;color:#756481;font-weight:400}
    #accountsTable .broker-cell small{font-size:10px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#9e8baa}

    #accountsTable tbody tr:not(.empty-row)>td:nth-child(4),
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(5),
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(6){
        grid-row:3;margin-top:9px;padding:8px 5px 6px!important;text-align:center!important;
        border-top:1px solid rgba(255,255,255,.05)!important;background:rgba(255,255,255,.018)
    }
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(4){grid-column:1;border-radius:10px 0 0 10px}
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(5){grid-column:2}
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(6){grid-column:3;border-radius:0 10px 10px 0}
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(4)::before,
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(5)::before,
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(6)::before{
        display:block!important;content:attr(data-label);margin-bottom:2px;color:#8f7d99;font-size:9px;font-weight:600;text-align:center
    }
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(4),
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(5),
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(6){font-size:13px;font-weight:700}

    #accountsTable tbody tr:not(.empty-row)>td:nth-child(7){
        grid-column:1/2;grid-row:4;margin-top:9px;align-self:center
    }
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(8){
        grid-column:2/4;grid-row:4;margin-top:9px;text-align:right!important;align-self:center
    }
    #accountsTable tr[data-account-role="master"]>td:nth-child(7){grid-column:1/-1}
    #accountsTable tr[data-account-role="master"]>td:nth-child(8){display:none!important}
    #accountsTable .account-role-badge{font-size:10px;padding:5px 9px}
    #accountsTable .copy-runtime-badge{min-width:0;padding:5px 9px;font-size:10px}
    #accountsTable .copy-runtime-meta{display:none!important}

    #accountsTable tbody tr:not(.empty-row)>td:nth-child(9){
        grid-column:1/-1;grid-row:5;margin-top:9px;padding-top:9px!important;
        border-top:1px solid rgba(255,255,255,.06)!important
    }
    #accountsTable td:last-child .row-actions{
        width:100%;max-width:none;min-width:0;display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));gap:6px
    }
    #accountsTable tr[data-account-role="master"] td:last-child .row-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
    #accountsTable td:last-child .row-actions>*{width:100%;min-width:0}
    #accountsTable td:last-child .action-btn{min-height:34px;padding:0 7px;font-size:11px;white-space:nowrap}

    /* Copy Activity: 5 compact items by default; latency is detail-only on mobile. */
    .copy-activity-panel .panel-card{padding:12px}
    .copy-activity-title{align-items:center;gap:8px}
    .copy-activity-title h2{font-size:18px}
    .copy-activity-title small{display:none!important}
    .copy-activity-live{padding:0 13px;min-height:34px;font-size:11px}
    .copy-activity-table tbody{gap:6px}
    .copy-activity-table tbody tr:not(.copy-activity-empty){
        display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;
        grid-template-rows:auto auto auto;padding:9px 10px!important;gap:4px 8px;
        border-radius:13px!important
    }
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td{
        display:block!important;grid-column:auto;grid-row:auto;min-height:0!important;
        padding:0!important;border:0!important;font-size:11px!important;text-align:left!important
    }
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td::before{display:none!important}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(1){grid-column:1;grid-row:1;color:#9e8baa;align-self:center}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(3){grid-column:2;grid-row:1;align-self:center}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(6){grid-column:3;grid-row:1;align-self:center;text-align:right!important}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(2){
        grid-column:1/-1!important;grid-row:2!important;font-size:11px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
    }
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(4){grid-column:1/2;grid-row:3;color:#d8cbe0}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(5){grid-column:2/4;grid-row:3;text-align:right!important;color:#d8cbe0}
    .copy-activity-table tbody tr:not(.copy-activity-empty)>td:nth-child(7){display:none!important}
    .copy-side{min-width:30px;margin-right:5px;padding:2px 5px;font-size:9px}
    .copy-result{padding:2px 7px;font-size:9px}
    .copy-arrow{margin:0 4px}

    #copyActivityBody.mobile-collapsed tr:nth-child(n+6):not(.copy-activity-empty){display:none!important}
    .copy-mobile-more-row{display:flex;justify-content:center;margin-top:9px}
    .copy-mobile-more-row[hidden]{display:none!important}
    .copy-mobile-more-btn{
        width:100%;height:38px;border:1px solid rgba(242,95,159,.28);border-radius:11px;
        background:rgba(242,95,159,.08);color:#f6b6d2;font-weight:700;font-size:12px
    }
    .copy-mobile-more-btn:active{transform:scale(.99)}
    #copyActivityPanel:not(.mobile-expanded) .copy-activity-footer{display:none!important}
    #copyActivityPanel.mobile-expanded .copy-activity-footer{display:flex}
    #copyActivityPanel.mobile-expanded .copy-page-info{font-size:10px}
}

@media (max-width:420px){
    .dashboard-page[data-dashboard-page="copytrade"] .toolbar-right{grid-template-columns:104px minmax(0,1fr)}
    #accountsTable td:last-child .row-actions{gap:5px}
    #accountsTable td:last-child .action-btn{font-size:10px;padding:0 4px}
}


/* rev047: admin member pagination + Copy Activity spacing only. */
.admin-members-footer{
    display:flex;align-items:center;justify-content:space-between;gap:14px;
    margin-top:14px;padding-top:14px;border-top:1px solid var(--line)
}
.admin-members-pagination button:disabled{opacity:.35;cursor:not-allowed}
.admin-table tbody tr.admin-member-page-hidden{display:none!important}
.copy-activity-wrap{margin-top:10px}
.copy-activity-title .copy-activity-live{transform:none!important;align-self:center}

@media (max-width:650px){
    .admin-members-footer{align-items:center;flex-direction:row;gap:8px}
    .admin-members-footer .copy-page-info{font-size:10px}
    .admin-members-pagination{gap:6px}
    .admin-members-pagination button{width:36px;height:36px}
    .copy-activity-wrap{margin-top:9px}
    .copy-activity-title .copy-activity-live{transform:none!important;align-self:center;min-height:34px;padding:0 13px;font-size:11px}
}

/* rev048 Diagnostics / Error Status */
.account-dot.error{background:#ff5f7d;box-shadow:0 0 9px rgba(255,95,125,.45)}
.account-identity small.live-error{color:#ff8da3}
.account-diagnostic{display:block;max-width:210px;margin-top:2px;color:#ff93a8!important;font-size:10px!important;line-height:1.2!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.account-diagnostic[hidden]{display:none!important}

.copy-runtime-badge.waiting-master{color:#946200;background:#fff7df;border-color:#f0dfa2}
.copy-runtime-badge.master-offline{color:#a85f00;background:#fff4e5;border-color:#f4d0a0}
.copy-runtime-badge.slave-offline{color:#b4233f;background:#fff0f3;border-color:#ffc8d3}
.copy-runtime-badge.master-offline::before{background:#e99528}
.copy-runtime-badge.slave-offline::before{background:#e14f6d}
.copy-runtime-badge.waiting-master::before{background:#d79b22}

@media (max-width:760px){
    #accountsTable .account-diagnostic{max-width:240px;font-size:9.5px!important;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
    #accountsTable .account-diagnostic[hidden]{display:none!important}
    #accountsTable .copy-runtime-meta{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
}


.copy-activity-title .copy-activity-head-actions::before,.copy-activity-title .copy-activity-head-actions::after{content:none!important;display:none!important}
/* rev050: Copy / Error History. Scoped so the rest of the dashboard stays unchanged. */
.copy-activity-title .copy-activity-head-actions{display:inline-flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex:none!important;width:auto!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:none!important;border-radius:0!important;box-shadow:none!important;line-height:1!important}
.copy-history-open{
    min-height:36px;padding:0 15px;border:1px solid rgba(242,95,159,.30);border-radius:999px;
    background:rgba(242,95,159,.12);color:#f7bfd6;font:inherit;font-size:12px;font-weight:800;cursor:pointer;
    display:inline-flex;align-items:center;justify-content:center;line-height:1;white-space:nowrap;
    transition:.18s ease
}
.copy-history-open:hover{background:rgba(242,95,159,.17);border-color:rgba(255,130,185,.42);transform:translateY(-1px)}
.copy-history-dialog{width:min(1120px,100%);max-height:min(92vh,900px)}
.copy-history-head{margin-bottom:16px}
.copy-history-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.copy-history-filters label{display:flex;flex-direction:column;gap:6px;min-width:0}
.copy-history-filters label>span{color:#b8a7c2;font-size:11px;font-weight:700}
.copy-history-filters select{
    width:100%;height:40px;padding:0 34px 0 11px;border:1px solid rgba(255,255,255,.10);border-radius:11px;
    background:#241c31;color:#f6edf8;font-family:inherit;font-size:12px;outline:none
}
.copy-history-filters select:focus{border-color:rgba(242,95,159,.55);box-shadow:0 0 0 3px rgba(242,95,159,.10)}
.copy-history-install-note{margin:0 0 12px;padding:9px 11px;border:1px solid rgba(255,171,84,.26);border-radius:10px;background:rgba(255,171,84,.08);color:#ffd3a2;font-size:11px}
.copy-history-wrap{max-height:480px;overflow:auto;border:1px solid var(--line);border-radius:14px}
.copy-history-table{min-width:940px}
.copy-history-table td{vertical-align:top;font-size:11.5px}
.copy-history-type{display:inline-flex;align-items:center;justify-content:center;min-width:58px;padding:3px 7px;border-radius:999px;font-size:9.5px;font-weight:800;letter-spacing:.2px}
.copy-history-type.copy{background:rgba(83,181,255,.12);color:#83c8ff;border:1px solid rgba(83,181,255,.18)}
.copy-history-type.system{background:rgba(183,136,255,.12);color:#c7a9ff;border:1px solid rgba(183,136,255,.18)}
.copy-history-account{display:flex;flex-direction:column;gap:2px;min-width:0}
.copy-history-account strong{font-size:11.5px;color:#f8f1fb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.copy-history-account small{font-size:9.5px;color:#94819f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.copy-history-detail{display:flex;flex-direction:column;gap:3px;min-width:0}
.copy-history-detail-main{color:#eadfeb}
.copy-history-detail small{color:#a995b3;line-height:1.3;white-space:normal;word-break:break-word}
.copy-history-code{display:inline-flex;width:max-content;max-width:100%;padding:2px 6px;border-radius:6px;background:rgba(255,96,112,.09);color:#ff9ba6;font-size:9.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.copy-history-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}

@media (max-width:900px){
    .copy-history-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:760px){
    .copy-activity-title .copy-activity-head-actions{gap:8px!important}
    .copy-history-open{min-height:34px;padding:0 13px;font-size:11px}
    .copy-history-dialog{width:100%;max-height:92vh;padding:15px 12px 12px}
    .copy-history-head{margin-bottom:12px}
    .copy-history-head h2{font-size:20px}
    .copy-history-head p{display:none}
    .copy-history-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    .copy-history-filters select{height:38px;font-size:11px}
    .copy-history-wrap{max-height:none;overflow:visible;border:0;border-radius:0}
    .copy-history-table{min-width:0}
    .copy-history-table tbody{gap:7px}
    .copy-history-table tbody tr:not(.empty-row){
        display:grid!important;grid-template-columns:auto 1fr auto!important;gap:5px 8px;padding:9px 10px!important;border-radius:13px!important
    }
    .copy-history-table tbody tr:not(.empty-row)>td{display:block!important;min-height:0!important;padding:0!important;border:0!important;text-align:left!important}
    .copy-history-table tbody tr:not(.empty-row)>td::before{display:none!important}
    .copy-history-table tbody tr:not(.empty-row)>td:nth-child(1){grid-column:1;grid-row:1;color:#9e8baa}
    .copy-history-table tbody tr:not(.empty-row)>td:nth-child(2){grid-column:2;grid-row:1}
    .copy-history-table tbody tr:not(.empty-row)>td:nth-child(5){grid-column:3;grid-row:1;text-align:right!important}
    .copy-history-table tbody tr:not(.empty-row)>td:nth-child(3){grid-column:1/-1;grid-row:2}
    .copy-history-table tbody tr:not(.empty-row)>td:nth-child(4){grid-column:1/-1;grid-row:3}
    .copy-history-table tbody tr:not(.empty-row)>td:nth-child(6){grid-column:1/-1;grid-row:4;color:#8f7d99;font-size:10px!important}
    .copy-history-account{display:block}
    .copy-history-account strong,.copy-history-account small{display:inline}
    .copy-history-account small::before{content:" • ";color:#685873}
    .copy-history-footer{gap:8px}
    .copy-history-footer .copy-page-info{font-size:10px}
}

@media (max-width:420px){
    .copy-history-filters{grid-template-columns:1fr 1fr}
    .copy-history-filters label>span{font-size:10px}
}


/* rev052: fix Copy Activity header action placement and remove inherited pink underline */
.copy-activity-title{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.copy-activity-title>div:first-child{min-width:0;flex:1 1 auto}
.copy-activity-title .copy-activity-head-actions{align-self:flex-start}
.copy-activity-title .copy-activity-head-actions,.copy-activity-title .copy-activity-head-actions *{margin-top:0!important}
.copy-activity-title .copy-history-open,.copy-activity-title .copy-activity-live{vertical-align:top}
@media (max-width:760px){
  .copy-activity-title{align-items:center}
  .copy-activity-title .copy-activity-head-actions{align-self:center}
}

/* rev054: in-app notification center */
.notification-btn{position:relative}
.notification-count{position:absolute;right:-5px;top:-6px;min-width:18px;height:18px;padding:0 5px;display:inline-flex!important;align-items:center;justify-content:center;border-radius:999px;background:#ff4f84;color:#fff;font-size:10px;font-style:normal;font-weight:800;line-height:1;box-shadow:0 2px 8px rgba(133,34,78,.28)}
.notification-count[hidden]{display:none!important}
.notifications-dialog{width:min(680px,100%);max-height:min(88vh,760px);overflow:hidden;display:flex;flex-direction:column}
.notifications-head{margin-bottom:12px}
.notifications-list{min-height:160px;max-height:520px;overflow:auto;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.018)}
.notification-item{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;padding:12px 13px;border-bottom:1px solid rgba(255,255,255,.06);align-items:flex-start}
.notification-item:last-child{border-bottom:0}
.notification-item.unread{background:rgba(242,95,159,.055)}
.notification-icon{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;font-size:15px;font-weight:800}
.notification-icon.error{background:rgba(255,96,112,.12);color:#ff8fa0}
.notification-icon.success{background:rgba(85,223,117,.12);color:#79e890}
.notification-body{min-width:0}
.notification-body strong{display:block;color:#f8eef9;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.notification-body p{margin:3px 0 0;color:#b8a7c2;font-size:11px;line-height:1.4;word-break:break-word}
.notification-code{display:inline-flex;margin-top:5px;padding:2px 6px;border-radius:6px;background:rgba(255,96,112,.08);color:#ff9daa;font-size:9.5px}
.notification-time{color:#8f7c9a;font-size:10px;white-space:nowrap}
.notification-empty{padding:28px 14px;text-align:center;color:#9e8baa;font-size:12px}
.notifications-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}
.notifications-footer span{color:#95829f;font-size:11px}
.notifications-footer .ghost-btn{height:38px}
@media(max-width:650px){
    .notification-btn{width:38px!important;min-width:38px!important;height:38px!important;padding:0!important}
    .notifications-dialog{width:100%;max-height:90vh;padding:16px 12px}
    .notifications-head h2{font-size:21px}
    .notifications-head p{display:none}
    .notifications-head .modal-badge{display:none}
    .notifications-list{max-height:62vh}
    .notification-item{grid-template-columns:30px minmax(0,1fr);gap:8px;padding:10px}
    .notification-icon{width:30px;height:30px}
    .notification-time{grid-column:2;margin-top:-3px}
    .notifications-footer{align-items:stretch;flex-direction:column}
    .notifications-footer .ghost-btn{width:100%}
}


/* rev055: mobile modal spacing + account role filter visibility fix */
@media (max-width:760px){
    /* Account filter: mobile card layout uses display:grid!important, so hidden rows must win explicitly. */
    #accountsTable tbody tr[hidden]{display:none!important}

    /* Copy / Error History: keep the close button clear of the title/badge area. */
    .copy-history-dialog{position:relative}
    .copy-history-dialog>.modal-close{top:12px!important;right:12px!important;z-index:8}
    .copy-history-head{padding-right:52px!important;min-height:42px;align-items:flex-start}
    .copy-history-head .modal-badge{display:none!important}

    /* Notifications: give the close button its own space above the notification list border. */
    .notifications-dialog{position:relative;padding-top:18px!important}
    .notifications-dialog>.modal-close{top:12px!important;right:12px!important;z-index:8}
    .notifications-head{padding-right:52px!important;min-height:42px;margin-bottom:16px!important;align-items:flex-start}
}


/* rev056: Trading performance dashboard */
.performance-shell{display:grid;gap:18px}
.performance-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:4px 2px}
.performance-head h1{margin:0;color:#342c37;font-size:26px}
.performance-head p{margin:5px 0 0;color:#7d6e78;font-size:14px;max-width:760px}
.performance-account-filter{display:grid;gap:6px;min-width:220px;color:#7d6e78;font-size:12px}
.performance-account-filter select{height:42px;border:1px solid #ead6df;border-radius:12px;background:#fff;padding:0 12px;color:#473b43;font:inherit;outline:none}
.performance-install-note{padding:13px 16px;border:1px solid #f0c8d9;border-radius:14px;background:#fff4f8;color:#8a4b67}
.performance-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.performance-kpi{padding:18px;border:1px solid #ecdce3;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(98,70,82,.05);display:grid;gap:5px;min-height:122px;align-content:center}
.performance-kpi>span{font-size:13px;color:#806f78}
.performance-kpi>strong{font-size:27px;line-height:1.1;color:#342c37;letter-spacing:-.5px}
.performance-kpi>small{font-size:12px;color:#9b8992}
.performance-kpi.is-positive>strong,.performance-value-positive{color:#16875f!important}
.performance-kpi.is-negative>strong,.performance-value-negative{color:#d64b67!important}
.performance-kpi.dd-card>strong{color:#b6536d}
.performance-money-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.performance-money-card{padding:15px 17px;border:1px solid #eee1e6;border-radius:15px;background:#fff;display:grid;gap:3px}
.performance-money-card span{font-size:12px;color:#87747e}
.performance-money-card strong{font-size:20px;color:#3d3339}
.performance-money-card small{font-size:11px;color:#a08e97}
.performance-accounts-card{overflow:hidden}
.performance-table-title{align-items:flex-end}
.performance-table-title>div{display:grid;gap:3px}
.performance-table-title h2{margin:0;font-size:20px}
.performance-table-title small,.performance-table-title>span{font-size:11px;color:#9a8791}
.performance-table td,.performance-table th{white-space:nowrap}
.performance-account-name{display:grid;gap:2px}
.performance-account-name small{color:#9a8992}
.performance-role{display:inline-flex;padding:4px 8px;border-radius:999px;background:#f7edf2;color:#8e5870;font-size:11px}
.performance-role.master{background:#f8e6ef;color:#a04870}
.performance-footnote{padding:12px 16px;color:#96848e;font-size:11px;border-top:0}
@media(max-width:980px){.performance-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.performance-money-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.performance-head{align-items:stretch;flex-direction:column}.performance-account-filter{min-width:0;width:100%}.performance-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.performance-kpi{padding:14px;min-height:108px}.performance-kpi>strong{font-size:22px}.performance-money-grid{grid-template-columns:1fr 1fr;gap:9px}.performance-money-card{padding:12px}.performance-money-card strong{font-size:17px}}

/* rev058: compact per-account performance dashboard + mobile cards */
.performance-head-simple{align-items:center}
.performance-updated{font-size:11px;color:#9a8791;white-space:nowrap}
.performance-table-wrap{overflow-x:auto}
.performance-table th,.performance-table td{vertical-align:middle}
.performance-table td strong{font-weight:700}
.performance-dd-value{color:#b6536d;font-weight:700}

@media(max-width:760px){
  .performance-shell{gap:12px}
  .performance-head-simple{display:grid;gap:6px;padding:0 2px}
  .performance-head-simple h1{font-size:22px}
  .performance-head-simple p{font-size:12px;line-height:1.5}
  .performance-updated{justify-self:start}
  .performance-accounts-card{background:transparent;border:0;box-shadow:none;overflow:visible;padding:0}
  .performance-table-title{padding:12px 2px 8px}
  .performance-table-title h2{font-size:18px}
  .performance-table-title small{font-size:11px;line-height:1.45}
  .performance-table-wrap{overflow:visible}
  .performance-table{display:block;border:0;background:transparent}
  .performance-table thead{display:none}
  .performance-table tbody{display:grid;gap:12px}
  .performance-table tr{display:grid;grid-template-columns:1fr 1fr;background:#fff;border:1px solid #eadde3;border-radius:16px;padding:13px 14px;box-shadow:0 6px 20px rgba(91,63,77,.05);overflow:hidden}
  .performance-table tr.empty-row{display:block;padding:18px}
  .performance-table tr.empty-row td{display:block!important;border:0!important;padding:0!important;text-align:center!important}
  .performance-table td{display:grid;grid-template-columns:minmax(92px,.9fr) minmax(0,1.1fr);align-items:center;gap:8px;border:0!important;border-top:1px solid #f2e8ec!important;padding:9px 0!important;white-space:normal;text-align:right;font-size:13px;min-width:0}
  .performance-table td::before{content:attr(data-label);font-size:11px;color:#947f8a;text-align:left;font-weight:400}
  .performance-table td:nth-child(1){grid-column:1/-1;display:block;text-align:left;border-top:0!important;padding:2px 0 8px!important}
  .performance-table td:nth-child(1)::before{display:none}
  .performance-table td:nth-child(2){grid-column:1/-1;border-top:0!important;padding:0 0 9px!important;display:block;text-align:left}
  .performance-table td:nth-child(2)::before{display:none}
  .performance-table td:nth-child(3),.performance-table td:nth-child(5){grid-column:1/-1;font-size:16px}
  .performance-table td:nth-child(3) strong,.performance-table td:nth-child(5) strong{font-size:17px}
  .performance-account-name strong{font-size:15px}
  .performance-account-name small{font-size:11px}
  .performance-footnote{background:transparent;border:0;padding:8px 2px 0;font-size:10px;line-height:1.5}
}

@media(max-width:420px){
  .performance-table tr{grid-template-columns:1fr;padding:12px}
  .performance-table td{grid-column:1/-1!important;grid-template-columns:minmax(100px,.9fr) minmax(0,1.1fr)}
  .performance-table td:nth-child(1),.performance-table td:nth-child(2){display:block}
}

/* rev059: Performance Dashboard responsive layout only */
.dashboard-page[data-dashboard-page="performance"]{width:100%}
.dashboard-page[data-dashboard-page="performance"] .performance-shell{width:100%;max-width:none;margin:0}
.dashboard-page[data-dashboard-page="performance"] .performance-accounts-card{width:100%;max-width:none;margin:0}
.dashboard-page[data-dashboard-page="performance"] .performance-table-wrap{width:100%}
.dashboard-page[data-dashboard-page="performance"] .performance-table{width:100%;min-width:1080px;table-layout:fixed}
.dashboard-page[data-dashboard-page="performance"] .performance-table th,
.dashboard-page[data-dashboard-page="performance"] .performance-table td{padding-left:14px;padding-right:14px}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(1){width:16%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(2){width:8%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(3),
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(4),
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(5),
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(6){width:10%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(7),
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(8){width:11%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(9),
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(10){width:7%}

@media (min-width:981px){
  .dashboard-page[data-dashboard-page="performance"] .performance-head-simple{padding-left:2px;padding-right:2px}
  .dashboard-page[data-dashboard-page="performance"] .performance-accounts-card{padding:20px 22px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table-title{margin-bottom:14px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th{font-size:12px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table td{font-size:13px}
}

@media (max-width:650px){
  .dashboard-page[data-dashboard-page="performance"] .performance-shell{gap:8px}
  .dashboard-page[data-dashboard-page="performance"] .performance-head-simple{padding:2px 4px 6px;gap:3px}
  .dashboard-page[data-dashboard-page="performance"] .performance-head-simple h1{font-size:20px;line-height:1.15}
  .dashboard-page[data-dashboard-page="performance"] .performance-head-simple p{font-size:11px;line-height:1.45;margin-top:4px}
  .dashboard-page[data-dashboard-page="performance"] .performance-updated{font-size:10px;margin-top:2px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table-title{padding:6px 4px 8px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table-title h2{font-size:17px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table-title small{font-size:10.5px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table{min-width:0;width:100%;table-layout:auto}
  .dashboard-page[data-dashboard-page="performance"] .performance-table tbody{gap:10px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table tr{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:8px;
    padding:13px;
    border-radius:16px;
    background:linear-gradient(180deg,rgba(41,32,56,.98),rgba(28,22,41,.98));
    border:1px solid rgba(255,255,255,.10);
    box-shadow:0 8px 22px rgba(0,0,0,.14);
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td{
    grid-column:auto!important;
    display:flex!important;
    min-width:0;
    min-height:58px;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:3px;
    padding:9px 10px!important;
    border:1px solid rgba(255,255,255,.07)!important;
    border-radius:11px;
    background:rgba(255,255,255,.035);
    text-align:left!important;
    white-space:normal;
    font-size:13px;
    line-height:1.25;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td::before{
    display:block;
    content:attr(data-label);
    margin:0;
    color:#a995b3;
    font-size:10px;
    line-height:1.1;
    font-weight:400;
    text-align:left;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(1){
    grid-column:1/2!important;
    min-height:auto;
    padding:2px 0 8px!important;
    border:0!important;
    background:transparent;
    justify-content:flex-start;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(1)::before{display:none}
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(2){
    grid-column:2/3!important;
    min-height:auto;
    padding:2px 0 8px!important;
    border:0!important;
    background:transparent;
    align-items:flex-end;
    justify-content:flex-start;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(2)::before{display:none}
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(3),
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(5){font-size:15px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(3) strong,
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(5) strong{font-size:16px}
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name{gap:1px;min-width:0}
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name strong{font-size:15px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name small{font-size:10px}
  .dashboard-page[data-dashboard-page="performance"] .performance-role{font-size:10px;padding:4px 8px}
  .dashboard-page[data-dashboard-page="performance"] .performance-dd-value{font-size:14px}
  .dashboard-page[data-dashboard-page="performance"] .performance-footnote{padding:6px 4px 0;font-size:9.5px;line-height:1.45}
}


/* rev065: Performance Dashboard - 9-column desktop table */
.dashboard-page[data-dashboard-page="performance"] .performance-table{
  width:100%;
  min-width:1020px;
  table-layout:fixed;
}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(1){width:17%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(2){width:7%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(3){width:11%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(4){width:11%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(5){width:12%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(6){width:10%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(7){width:12%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(8){width:10%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(9){width:10%}

@media (max-width:650px){
  .dashboard-page[data-dashboard-page="performance"] .performance-accounts-card{
    padding:10px 8px;
    border-radius:12px;
    overflow:hidden;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table-title{
    padding:4px 2px 8px;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table-title h2{font-size:15px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table-title small{font-size:9px}
  .dashboard-page[data-dashboard-page="performance"] .performance-table-wrap{
    display:block;
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    border-radius:10px;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table{
    display:table!important;
    width:760px!important;
    min-width:760px!important;
    table-layout:fixed!important;
    border-collapse:collapse;
    background:transparent;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table thead{display:table-header-group!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table tbody{display:table-row-group!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table tr{
    display:table-row!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    padding:0!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table th,
  .dashboard-page[data-dashboard-page="performance"] .performance-table td{
    display:table-cell!important;
    min-width:0!important;
    min-height:0!important;
    padding:8px 7px!important;
    border-radius:0!important;
    background:transparent!important;
    border-left:0!important;
    border-right:0!important;
    text-align:left!important;
    vertical-align:middle!important;
    white-space:nowrap!important;
    font-size:10px!important;
    line-height:1.2!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table th{
    font-size:9px!important;
    padding-top:8px!important;
    padding-bottom:8px!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td::before{display:none!important;content:none!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(1),
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(2){
    display:table-cell!important;
    padding:8px 7px!important;
    border-top:inherit!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name strong{
    display:block;
    max-width:118px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:10.5px!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name small{font-size:8.5px!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-role{font-size:8px!important;padding:3px 5px!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-dd-value{font-size:10px!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table td strong{font-size:10.5px!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-footnote{font-size:8.5px;line-height:1.4;padding:7px 2px 0}
}


/* rev061: compact mobile performance cards, 2 metrics per row */
@media (max-width:650px){
  .dashboard-page[data-dashboard-page="performance"] .performance-accounts-card{
    padding:8px;
    border-radius:12px;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table-title{
    padding:3px 2px 7px;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table-wrap{
    overflow:visible;
    border-radius:0;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    table-layout:auto!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table thead{display:none!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table tbody{
    display:grid!important;
    grid-template-columns:1fr;
    gap:8px;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table tr{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px 6px;
    padding:9px!important;
    border:1px solid rgba(255,255,255,.10)!important;
    border-radius:11px!important;
    background:rgba(255,255,255,.035)!important;
    box-shadow:none!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:2px!important;
    min-width:0!important;
    padding:6px 7px!important;
    border:0!important;
    border-radius:8px!important;
    background:rgba(255,255,255,.035)!important;
    white-space:normal!important;
    text-align:left!important;
    font-size:10px!important;
    line-height:1.2!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td::before{
    display:block!important;
    content:attr(data-label)!important;
    font-size:8.5px!important;
    line-height:1.1!important;
    color:#a995a2!important;
    font-weight:400!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(1){
    grid-column:1/-1!important;
    display:block!important;
    padding:2px 3px 4px!important;
    background:transparent!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(1)::before{display:none!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(2){
    position:absolute!important;
    right:18px;
    margin-top:0;
    width:auto!important;
    display:block!important;
    padding:2px!important;
    background:transparent!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(2)::before{display:none!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name strong{
    max-width:72%;
    font-size:12.5px!important;
    line-height:1.15!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name small{font-size:9px!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-role{font-size:8px!important;padding:3px 6px!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table td strong{font-size:11.5px!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-dd-value{font-size:11px!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-footnote{font-size:8.5px;padding:6px 2px 0}
}

/* rev065: current floating profit */
.dashboard-page[data-dashboard-page="performance"] .performance-table td[data-label="Profit ปัจจุบัน"] strong{
  font-weight:700;
}

/* rev068: Copy Trade mobile card layout refinements */
@media (max-width:760px){
    #accountsTable tbody tr:not(.empty-row){
        cursor:pointer;
        transition:box-shadow .18s ease, border-color .18s ease, background .18s ease;
    }
    #accountsTable tbody tr:not(.empty-row).account-card-expanded{
        box-shadow:0 10px 24px rgba(242,95,159,.12);
        border-color:rgba(255,125,183,.34);
        background:rgba(255,255,255,.04);
    }

    #accountsTable tbody tr:not(.empty-row)>td:nth-child(1){
        grid-column:1/3;
        grid-row:1;
        padding-right:8px!important;
    }
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(2){
        display:none!important;
    }
    #accountsTable .account-mobile-name{
        display:inline;
        margin-left:2px;
        color:#fff;
        font-weight:700;
    }
    #accountsTable .account-identity strong{
        display:block;
        max-width:100%;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
        line-height:1.2;
    }
    #accountsTable .account-identity small{
        margin-top:3px;
    }

    #accountsTable tbody tr:not(.empty-row)>td:nth-child(7){
        grid-column:3/4;
        grid-row:1;
        margin-top:0;
        justify-self:end;
        align-self:start;
        text-align:right!important;
    }
    #accountsTable .account-role-badge{
        max-width:100%;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
        font-size:10px;
        padding:5px 8px;
    }

    #accountsTable tbody tr:not(.empty-row)>td:nth-child(8){
        grid-column:1/-1;
        grid-row:4;
        margin-top:9px;
        text-align:center!important;
        align-self:center;
    }
    #accountsTable .copy-status-cell{display:block!important;}
    #accountsTable .copy-status-cell>[data-copy-runtime],
    #accountsTable .copy-status-cell>.copy-runtime-master{
        display:inline-flex;
        margin-left:auto;
        margin-right:auto;
    }
    #accountsTable .copy-status-cell>[data-copy-runtime-meta]{
        display:block!important;
        max-width:none;
        margin-top:5px;
        margin-left:auto;
        margin-right:auto;
        text-align:center!important;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }
    #accountsTable tr[data-account-role="master"]>td:nth-child(8){display:none!important;}

    #accountsTable tbody tr:not(.empty-row)>td:nth-child(9){
        display:none!important;
        grid-column:1/-1;
        grid-row:5;
        margin-top:9px;
        padding-top:9px!important;
        border-top:1px solid rgba(255,255,255,.06)!important;
    }
    #accountsTable tbody tr:not(.empty-row).account-card-expanded>td:nth-child(9){display:block!important;}
    #accountsTable td:last-child .row-actions{
        width:100%;max-width:none;min-width:0;display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;
    }
    #accountsTable tr[data-account-role="master"] td:last-child .row-actions{grid-template-columns:repeat(2,minmax(0,1fr));}
    #accountsTable td:last-child .action-btn{min-height:34px;padding:0 6px;font-size:11px;white-space:nowrap;}
}

/* rev072: compact mobile copy status beside Online */
.account-mobile-copy-state{display:none}

@media (max-width:760px){
    #accountsTable .account-identity>div{
        display:grid;
        grid-template-columns:auto auto;
        grid-template-rows:auto auto;
        align-items:center;
        justify-content:start;
        column-gap:6px;
        row-gap:1px;
    }
    #accountsTable .account-identity strong{
        grid-column:1/-1;
        grid-row:1;
    }
    #accountsTable .account-identity [data-live-state]{
        grid-column:1;
        grid-row:2;
        margin-top:0;
    }
    #accountsTable .account-mobile-copy-state{
        grid-column:2;
        grid-row:2;
        display:inline-flex!important;
        align-items:center;
        min-height:15px;
        margin:0;
        padding:1px 5px;
        border-radius:999px;
        font-size:8px!important;
        line-height:1.2;
        font-weight:700;
        white-space:nowrap;
        border:1px solid transparent;
    }
    #accountsTable .account-mobile-copy-state.running{
        color:#79e890;
        background:rgba(85,223,117,.10);
        border-color:rgba(85,223,117,.18);
    }
    #accountsTable .account-mobile-copy-state.error,
    #accountsTable .account-mobile-copy-state.slave-offline{
        color:#ff8997;
        background:rgba(255,96,112,.10);
        border-color:rgba(255,96,112,.16);
    }
    #accountsTable .account-mobile-copy-state.waiting,
    #accountsTable .account-mobile-copy-state.waiting-master,
    #accountsTable .account-mobile-copy-state.master-offline{
        color:#ffd16b;
        background:rgba(255,198,79,.10);
        border-color:rgba(255,198,79,.16);
    }
    #accountsTable .account-mobile-copy-state.not-configured,
    #accountsTable .account-mobile-copy-state.disabled{
        color:#c9b8cc;
        background:rgba(255,255,255,.05);
        border-color:rgba(255,255,255,.08);
    }

    /* Status now lives beside Online, so remove the separate middle row. */
    #accountsTable tbody tr:not(.empty-row)>td:nth-child(8){
        display:none!important;
    }

    /* Slave cards now have the same compact height as Master cards. */
    #accountsTable tbody tr:not(.empty-row){
        padding-bottom:10px;
    }
}

/* rev073: Performance Dashboard - 10 columns with Current / Today Max / Month Max DD */
.dashboard-page[data-dashboard-page="performance"] .performance-table{
  min-width:1120px;
}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(1){width:16%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(2){width:7%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(3){width:10%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(4){width:10%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(5){width:11%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(6){width:9%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(7){width:10%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(8){width:9%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(9){width:9%}
.dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(10){width:9%}

@media(max-width:650px){
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(8),
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(9),
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(10){
    font-weight:700;
  }
}

/* rev074: weekly profit + 3x3 mobile performance metrics */
.dashboard-page[data-dashboard-page="performance"] .performance-table{min-width:1220px}
@media(max-width:650px){
.dashboard-page[data-dashboard-page="performance"] .performance-table tr{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
.dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(1){grid-column:1/-1!important}
.dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(2){right:14px!important}
.dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(n+3){min-width:0!important;padding:6px 5px!important}
.dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(n+3)::before{font-size:7.8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(n+3),.dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(n+3) strong{font-size:10.5px!important}
.dashboard-page[data-dashboard-page="performance"] .performance-dd-value{font-size:10.5px!important}
}


/* rev075: fluid desktop performance table - always fit available viewport */
@media (min-width:651px){
  .dashboard-page[data-dashboard-page="performance"] .performance-table-wrap{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table th,
  .dashboard-page[data-dashboard-page="performance"] .performance-table td{
    padding-left:clamp(4px,.52vw,10px)!important;
    padding-right:clamp(4px,.52vw,10px)!important;
    font-size:clamp(8px,.72vw,12px)!important;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table th{
    white-space:normal!important;
    line-height:1.15;
    overflow-wrap:anywhere;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td{
    white-space:nowrap;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td strong{
    font-size:inherit!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name strong{
    display:block;
    max-width:100%;
    font-size:clamp(9px,.78vw,13px)!important;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name small{
    font-size:clamp(7px,.58vw,10px)!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-role{
    font-size:clamp(7px,.58vw,10px)!important;
    padding:3px clamp(4px,.42vw,7px)!important;
  }

  /* 11 columns = 100% exactly */
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(1){width:15%}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(2){width:6%}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(3){width:9%}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(4){width:9%}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(5){width:10%}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(6){width:9%}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(7){width:10%}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(8){width:9%}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(9){width:8%}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(10){width:8%}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(11){width:7%}
}

/* extra compression for tablets / narrow browser windows without switching mobile cards */
@media (min-width:651px) and (max-width:1100px){
  .dashboard-page[data-dashboard-page="performance"] .performance-accounts-card{
    padding-left:10px!important;
    padding-right:10px!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table th,
  .dashboard-page[data-dashboard-page="performance"] .performance-table td{
    padding-left:3px!important;
    padding-right:3px!important;
    font-size:8px!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name strong{font-size:9px!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name small{font-size:7px!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-role{font-size:7px!important;padding:2px 4px!important}
}

/* rev076: remove white divider under performance table */
.performance-footnote{border-top:0!important}


/* rev079: Dashboard Performance only — Role merged into Account */
.dashboard-page[data-dashboard-page="performance"] .performance-account-heading{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}
.dashboard-page[data-dashboard-page="performance"] .performance-account-heading>strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dashboard-page[data-dashboard-page="performance"] .performance-account-heading>.performance-role{
  flex:0 0 auto;
  position:static!important;
  inset:auto!important;
  transform:none!important;
  margin:0!important;
  max-width:none!important;
  box-shadow:none!important;
  outline:0!important;
}

/* Desktop/tablet: 10 columns after removing Role column. */
@media (min-width:651px){
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(1){width:18%!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(2){width:9%!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(3){width:9%!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(4){width:10%!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(5){width:9%!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(6){width:10%!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(7){width:9%!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(8){width:9%!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(9){width:9%!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-table th:nth-child(10){width:8%!important}
}

/* Mobile: Account + Role share the top line; keep badge safely inside the card. */
@media (max-width:650px){
  .dashboard-page[data-dashboard-page="performance"] .performance-table tr{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(1){
    grid-column:1/-1!important;
    display:block!important;
    position:relative!important;
    padding:4px 10px 8px 4px!important;
    border:0!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(1)::before{display:none!important}
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name{
    display:grid!important;
    gap:2px!important;
    min-width:0!important;
    padding-right:0!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-account-heading{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:7px!important;
    min-width:0!important;
    padding-right:10px!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-account-heading>strong{
    flex:0 1 auto!important;
    max-width:calc(100% - 62px)!important;
    font-size:12px!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-account-heading>.performance-role{
    position:static!important;
    right:auto!important;
    top:auto!important;
    margin-left:2px!important;
    padding:3px 6px!important;
    font-size:8px!important;
    line-height:1.15!important;
    border-radius:999px!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-account-name>small{
    font-size:9px!important;
  }

  /* Metrics are now cells 2-10: exactly 3 columns x 3 rows. */
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(n+2){
    grid-column:auto!important;
    position:static!important;
    display:block!important;
    min-width:0!important;
    padding:6px 5px!important;
    border:0!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(n+2)::before{
    display:block!important;
    content:attr(data-label)!important;
    font-size:7.8px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    text-align:left!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(n+2),
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(n+2) strong{
    font-size:10.5px!important;
  }
}

/* rev080: restore Balance metric card after Role column removal */
@media (max-width:650px){
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(2){
    position:static!important;
    right:auto!important;
    margin-top:0!important;
    width:auto!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:2px!important;
    min-width:0!important;
    padding:6px 5px!important;
    border:0!important;
    border-radius:8px!important;
    background:rgba(255,255,255,.035)!important;
    white-space:normal!important;
    text-align:left!important;
  }
  .dashboard-page[data-dashboard-page="performance"] .performance-table td:nth-child(2)::before{
    display:block!important;
    content:attr(data-label)!important;
    font-size:7.8px!important;
    line-height:1.1!important;
    color:#a995a2!important;
    font-weight:400!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    text-align:left!important;
  }
}
