/* AInsight representative management v1.6 */
.representatives-page-head{position:relative}.representative-stats small{display:block;margin-top:9px;color:var(--muted);font-size:10px}.representatives-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(330px,.72fr);gap:20px;align-items:start}.representatives-list-panel,.representative-form-panel{margin-top:20px}.representative-form-panel{position:sticky;top:calc(var(--topbar) + 18px)}.representatives-toolbar{align-items:flex-start}.representatives-filters{display:grid;grid-template-columns:minmax(190px,1fr) 150px auto;gap:8px;min-width:min(100%,520px)}.representatives-filters .search-input{height:44px}.representative-cards{display:grid;gap:13px}.representative-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:15px;align-items:center;padding:18px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(145deg,var(--surface),var(--surface-2));transition:.2s ease}.representative-card:hover{transform:translateY(-2px);border-color:rgba(230,185,87,.55);box-shadow:var(--shadow-soft)}.representative-avatar{display:grid;place-items:center;width:52px;height:52px;border-radius:17px;background:linear-gradient(145deg,#fff3c8,var(--gold));color:#614207;font-weight:950;font-size:16px}.representative-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.representative-title-row h3{margin:0 0 4px;font-size:15px}.rep-code{display:inline-flex;padding:3px 8px;border-radius:8px;background:var(--surface-3);color:var(--muted);font-size:10px;font-weight:800}.rep-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:9px;font-weight:900}.rep-status.active{background:#dff8ee;color:#087b53}.rep-status.inactive{background:#edf1f5;color:#687687}.rep-status.suspended{background:#ffe5ea;color:#b4233b}.representative-meta,.representative-kpis{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:10px;color:var(--muted);font-size:10px}.representative-kpis{padding-top:10px;border-top:1px dashed var(--line)}.representative-kpis b{color:var(--text);font-size:11px}.representative-actions{display:grid;gap:7px;min-width:112px}.representative-actions form{margin:0}.representative-actions .button{width:100%;white-space:nowrap}.representative-form .form-grid{gap:0 12px}.representative-delete-form{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}.representative-installer{max-width:760px}.register-representative-field{grid-column:1/-1;padding:15px;border:1px solid rgba(230,185,87,.34);border-radius:15px;background:linear-gradient(145deg,rgba(230,185,87,.09),rgba(49,196,141,.05))}.register-representative-field small{display:block;color:var(--muted);font-weight:500;line-height:1.8}.register-ref-badge{display:inline-flex;align-items:center;gap:7px;margin-top:8px;padding:6px 10px;border-radius:999px;background:#dff8ee;color:#087b53;font-size:10px;font-weight:900}.table-wrap{overflow:auto}
@media(max-width:1120px){.representatives-layout{grid-template-columns:1fr}.representative-form-panel{position:static}.representatives-toolbar{display:grid}.representatives-filters{width:100%;min-width:0}}
@media(max-width:760px){.representatives-filters{grid-template-columns:1fr}.representative-card{grid-template-columns:auto 1fr}.representative-actions{grid-column:1/-1;grid-template-columns:repeat(3,1fr)}.representative-title-row{display:grid}.representative-meta,.representative-kpis{display:grid;gap:5px}.representative-actions .button{font-size:9px;padding-inline:8px}}


/* Representative self-registration and portal v1.8 */
.representative-register-card{width:min(760px,100%)}.account-type-selector{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0!important;border:0!important;margin:0 0 20px!important}.account-type-selector legend{grid-column:1/-1;padding:0!important;margin-bottom:4px;color:var(--text)!important;font-size:12px;font-weight:900}.account-type-card{position:relative;display:grid!important;grid-template-columns:auto 1fr;align-items:center;gap:12px;margin:0!important;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--surface-2);cursor:pointer;transition:.2s}.account-type-card:hover{border-color:rgba(230,185,87,.55);transform:translateY(-1px)}.account-type-card input{position:absolute;opacity:0;pointer-events:none}.account-type-card:has(input:checked){border-color:var(--gold);background:linear-gradient(145deg,rgba(230,185,87,.14),rgba(49,196,141,.06));box-shadow:0 0 0 4px rgba(230,185,87,.08)}.account-type-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:var(--surface);color:#9b6d16;font-size:20px}.account-type-card strong,.account-type-card small{display:block}.account-type-card small{margin-top:3px;color:var(--muted);font-size:9px;line-height:1.7}.representative-application-fields{margin:18px 0;padding:20px;border:1px solid rgba(230,185,87,.36);border-radius:20px;background:linear-gradient(145deg,rgba(230,185,87,.08),rgba(76,166,255,.045))}.representative-application-fields[hidden],[data-customer-only][hidden],[data-representative-only][hidden]{display:none!important}.representative-approval-note{display:flex;align-items:flex-start;gap:12px;margin-top:15px;padding:14px;border:1px solid rgba(76,166,255,.2);border-radius:14px;background:rgba(76,166,255,.07)}.representative-approval-note>span{display:grid;place-items:center;min-width:34px;height:34px;border-radius:11px;background:rgba(76,166,255,.13)}.representative-approval-note strong{display:block}.representative-approval-note p{margin:3px 0 0;color:var(--muted);font-size:10px}.rep-status.pending{background:#fff0d1;color:#8c6212}.rep-status.rejected{background:#ffe5ea;color:#b4233b}.representative-dashboard-notice{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;margin:0 0 20px;padding:16px 18px;border:1px solid #f2d58d;border-radius:16px;background:linear-gradient(145deg,#fff8e6,#fffdf7);box-shadow:var(--shadow-soft)}.representative-dashboard-notice>span{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:#fff0c7}.representative-dashboard-notice p{margin:3px 0 0;color:#7a6844;font-size:10px}.representative-dashboard-notice>b{color:#8c641b;font-size:10px}.representative-dashboard-notice.rejected{border-color:#ffd2da;background:#fff4f6}.representative-application-status{max-width:950px}.application-status-hero{display:flex;align-items:flex-start;gap:18px;padding:22px;border-radius:20px;background:var(--surface-2)}.application-status-icon{display:grid;place-items:center;min-width:62px;height:62px;border-radius:20px;background:#fff0d1;font-size:25px}.application-status-hero h2{margin:10px 0 5px}.application-status-hero p{margin:0;color:var(--muted)}.representative-application-details{margin:20px 0}.representative-application-details .card span,.representative-portal-stats .card span{display:block;color:var(--muted);font-size:10px}.representative-application-details .card strong,.representative-portal-stats .card strong{display:block;margin-top:7px;font-size:20px}.representative-welcome-card{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(280px,.75fr);align-items:center;gap:18px;margin-bottom:20px;padding:22px;border:1px solid rgba(230,185,87,.36);border-radius:22px;background:linear-gradient(145deg,var(--navy-900),#12384e);color:#fff;box-shadow:var(--shadow)}.representative-welcome-icon{display:grid;place-items:center;width:64px;height:64px;border-radius:20px;background:linear-gradient(145deg,var(--gold-strong),var(--gold));color:#392500;font-size:28px}.representative-welcome-card h2{margin:9px 0 5px}.representative-welcome-card p{margin:0;color:#a9bdc9;font-size:11px}.representative-ref-link{display:grid;grid-template-columns:1fr auto;gap:7px}.representative-ref-link input{min-width:0;border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.08);color:#fff}.representative-commission-card{background:linear-gradient(145deg,#fff9e9,var(--surface));border-color:rgba(230,185,87,.35)}.representative-commission-card h2{font-size:30px;margin:10px 0 5px}.representative-commission-card p,.representative-commission-card small{color:var(--muted)}.commission-usdt{display:flex;justify-content:space-between;margin:15px 0;padding:12px;border-radius:12px;background:var(--surface-2)}.commission-usdt span{color:var(--muted);font-size:9px}.representative-users-table td strong,.representative-users-table td small{display:block}.representative-users-table td small{color:var(--muted);font-size:9px}.representative-application-summary{display:grid;gap:5px;margin-top:10px;padding:10px;border-radius:12px;background:#fff8e6;color:#72581e;font-size:10px}.representative-application-summary p{margin:3px 0 0;line-height:1.8}.representative-review-form{display:grid!important;gap:5px}.representative-review-form input{width:100%;min-height:35px;padding:6px 8px;border:1px solid var(--line);border-radius:9px;background:var(--surface);font-size:9px}.representative-pending-stat{border-color:rgba(242,169,59,.35);background:linear-gradient(145deg,#fff8e6,var(--surface))}

html[data-theme="dark"] .representative-dashboard-notice{background:#332a17;border-color:#655022;color:#f5dc9c}html[data-theme="dark"] .representative-dashboard-notice p{color:#c6ad73}html[data-theme="dark"] .representative-commission-card,html[data-theme="dark"] .representative-pending-stat{background:linear-gradient(145deg,#2c271a,var(--surface));border-color:#5e4d25}html[data-theme="dark"] .representative-application-summary{background:#332a17;color:#f0d99b}
@media(max-width:920px){.representative-welcome-card{grid-template-columns:auto 1fr}.representative-ref-link{grid-column:1/-1}.account-type-selector{grid-template-columns:1fr}}@media(max-width:620px){.representative-dashboard-notice{grid-template-columns:auto 1fr}.representative-dashboard-notice>b{grid-column:1/-1}.representative-welcome-card{grid-template-columns:1fr;text-align:center}.representative-welcome-icon{margin:auto}.representative-ref-link{grid-template-columns:1fr}.application-status-hero{display:grid}.representative-application-fields{padding:15px}}
