:root{color-scheme:dark;--bg:#0b111a;--panel:#111b28;--raised:#172434;--line:#2b3949;--text:#edf2f8;--muted:#a8b8ca;--gold:#f0c778;--green:#8ce5b7;--red:#ffa8a8;--blue:#93c8ff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.55 Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif}button,input,select{font:inherit}button,a,input,select{outline-offset:4px}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}a{color:var(--gold);text-decoration:none}a:hover{text-decoration:underline}[hidden]{display:none!important}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 17px;border:1px solid var(--line);border-radius:9px;background:var(--raised);color:var(--text);font-weight:600;text-decoration:none}button:hover,.button:hover{border-color:var(--gold);text-decoration:none}.primary{background:var(--gold);border-color:var(--gold);color:#151b24}.danger{color:var(--red)}.quiet{background:transparent}.brand{display:flex;align-items:center;gap:12px;color:var(--text);font-size:20px;font-weight:700;white-space:nowrap}.brand img{width:44px;height:44px;object-fit:cover;border-radius:12px}.brand small{display:block;font-size:11px;letter-spacing:2px;color:var(--muted);font-weight:500}.eyebrow{color:var(--gold);font-size:12px;font-weight:700;letter-spacing:2px;text-transform:uppercase}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(28px,3.2vw,40px);letter-spacing:-1.2px;line-height:1.15;margin:8px 0 12px}h2{font-size:22px;letter-spacing:-.4px}h3{font-size:20px;letter-spacing:-.3px}.muted,small{color:var(--muted)}small{font-size:13px}.shell{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;border-right:1px solid var(--line);padding:30px 22px;display:flex;flex-direction:column;gap:36px;background:#0d1622}.sidebar nav{display:flex;flex-direction:column;gap:7px}.sidebar nav button,.sidebar nav a{text-align:left;justify-content:flex-start;background:none;color:var(--muted);border:1px solid transparent;font-size:15px;padding:12px 14px;border-radius:8px}.sidebar nav .active{color:var(--gold);background:#252625;border-color:#4c4433}.sidebar .bottom{margin-top:auto;display:grid;gap:12px}.sidebar .bottom small{line-height:1.7}.content{min-width:0;padding:36px 40px 44px;max-width:1720px;width:100%;margin:auto}.topbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}.topbar p{margin-bottom:0}.actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.badge{display:inline-block;border:1px solid var(--line);border-radius:30px;padding:4px 10px;font-size:12px;font-weight:700;letter-spacing:.4px;white-space:nowrap;background:var(--raised);color:var(--muted)}.badge.ready,.badge.paid,.badge.sent{background:#13352e;border-color:#2c6050;color:var(--green)}.badge.paused,.badge.open,.badge.failed{background:#3a2528;border-color:#684047;color:var(--red)}.badge.gold{color:var(--gold);background:#302a1f;border-color:#625037}.notice{padding:15px 18px;border:1px solid #655331;background:#29251e;color:#f4d89f;border-radius:10px;margin-bottom:22px;font-size:14px}.notice.error{background:#38252b;border-color:#80444f;color:#ffc0c0}.notice.success{background:#16392e;border-color:#326451;color:var(--green)}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:26px}.kpi{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:22px}.kpi .label{color:var(--muted);font-size:13px}.kpi strong{display:block;font-size:32px;font-weight:600;line-height:1.2;margin:12px 0}.kpi small{font-size:12px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:13px;overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:22px 24px;border-bottom:1px solid var(--line)}.panel-head h2{font-size:19px;margin:0}.filters{display:flex;flex-wrap:wrap;gap:12px;padding:18px 24px}.filters input{flex:1;min-width:200px}input,select{min-height:44px;border:1px solid var(--line);background:#0e1723;color:var(--text);border-radius:8px;padding:10px 12px;max-width:100%}input::placeholder{color:#8293a9}label{display:block;font-size:14px;font-weight:600;margin:0 0 7px}.form-field{margin-bottom:16px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:14px;min-width:720px}th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:1.2px;font-weight:600;color:var(--muted);background:#142030;padding:13px 22px}td{padding:18px 22px;border-top:1px solid #263243;vertical-align:middle}td strong,td small{display:block}td small{max-width:260px;overflow-wrap:anywhere}td button{font-size:12px;min-height:36px;padding:7px 10px}.table-actions{display:flex;gap:6px}.empty{padding:60px 24px;text-align:center}.empty strong{display:block;font-size:21px;margin-bottom:8px}.empty p{max-width:480px;margin:0 auto;color:var(--muted)}.pager{padding:15px 24px;display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid var(--line);font-size:13px;color:var(--muted)}.pager button{font-size:13px;min-height:38px;padding:7px 12px}.health-strip{display:flex;flex-wrap:wrap;gap:18px;color:var(--muted);font-size:13px;margin:20px 0}.health-strip b{color:var(--text)}.page-note{color:var(--muted);font-size:13px;margin:18px 0 0}.client-header{max-width:1200px;margin:auto;padding:24px 28px;display:flex;justify-content:space-between;gap:18px;align-items:center}.client-main{max-width:1200px;padding:28px;margin:0 auto 40px}.intro{max-width:670px;margin-bottom:30px}.intro p{color:var(--muted)}.plans{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin:26px 0}.plan-card{position:relative;padding:30px;border:1px solid var(--line);border-radius:15px;background:var(--panel)}.plan-card.gold-plan{border-color:#6d5934;background:linear-gradient(145deg,#24251f 0%,#111b28 70%)}.plan-card h2{margin:15px 0 5px;font-size:27px}.plan-card .symbol{color:var(--muted);font-size:14px}.price{font-size:46px;letter-spacing:-1.8px;font-weight:600;line-height:1.3;margin:20px 0}.price span{font-size:16px;font-weight:400;color:var(--muted);letter-spacing:0}.plan-card ul{padding:0;list-style:none;margin:20px 0 26px;font-size:15px}.plan-card li{padding:8px 0;border-bottom:1px solid var(--line)}.plan-card li::before{content:'✓';color:var(--gold);margin-right:10px}.plan-card button{width:100%}.plan-status{border-top:1px solid var(--line);padding-top:20px;margin-top:18px}.plan-status p{font-size:14px;color:var(--muted);margin:12px 0}.plan-status button{margin-top:10px}.account-banner{display:flex;justify-content:space-between;align-items:center;gap:20px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:22px 25px}.account-banner strong{display:block;font-size:20px}.account-banner small{display:block}.auth-wrap{max-width:460px;margin:8vh auto;padding:34px;background:var(--panel);border:1px solid var(--line);border-radius:16px}.auth-wrap input{width:100%}.auth-wrap button[type=submit]{width:100%}.auth-links{display:flex;flex-wrap:wrap;gap:14px;justify-content:center;margin-top:18px;font-size:14px}.auth-links button{padding:0;min-height:30px;background:transparent;border:0;color:var(--gold);font-size:14px}.auth-tabs{display:flex;gap:10px;margin:25px 0}.auth-tabs button{flex:1}.auth-tabs .active{background:#302a20;color:var(--gold);border-color:#675639}.modal{max-width:560px;width:calc(100% - 32px);background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:14px;padding:28px}.modal::backdrop{background:#020711cb;backdrop-filter:blur(4px)}.modal input,.modal select{width:100%}.modal .actions{margin-top:20px;justify-content:flex-end}.secret{display:block;border:1px solid #665331;background:#0b111a;color:var(--gold);padding:16px;margin:18px 0;overflow-wrap:anywhere;font:14px/1.8 ui-monospace,monospace;user-select:all}.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin:30px 0}.steps article{border-top:1px solid var(--line);padding-top:18px}.steps b{color:var(--gold);font-size:13px}.steps h3{font-size:17px;margin:8px 0}.steps p{font-size:14px;color:var(--muted)}.link-button{color:var(--gold);background:transparent}.inline-code{overflow-wrap:anywhere;font:13px/1.6 ui-monospace,monospace;color:var(--blue)}@media(max-width:1150px){.shell{grid-template-columns:205px minmax(0,1fr)}.content{padding:28px 24px}.sidebar{padding:26px 16px}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar{align-items:flex-start}td{padding:15px}}@media(max-width:760px){.shell{display:block}.sidebar{position:relative;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:18px;gap:18px}.sidebar nav{flex-direction:row;overflow:auto;gap:4px}.sidebar nav button,.sidebar nav a{white-space:nowrap;padding:9px 12px;font-size:13px}.sidebar .bottom{display:none}.content{padding:24px 16px}.topbar{flex-direction:column;gap:15px}.kpis{gap:10px}.kpi{padding:16px}.kpi strong{font-size:28px}.plans,.steps{grid-template-columns:1fr}.plan-card{padding:24px}.client-header,.client-main{padding:20px}.client-header{flex-wrap:wrap}.account-banner{align-items:flex-start;flex-direction:column}.auth-wrap{padding:24px;margin:20px auto}.filters{padding:16px}.filters input{min-width:130px}.panel-head{padding:18px}.pager{padding:14px;flex-wrap:wrap}.modal{padding:22px}}@media(prefers-reduced-motion:no-preference){button,a{transition:background .15s,border-color .15s}.plan-card{animation:enter .35s ease-out}@keyframes enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}}

/* Client downloads and installation */
.ea-download{margin-top:18px;padding:16px;border:1px solid var(--line);border-radius:10px;background:#0e1723}
.ea-download button{margin-top:0}.ea-download p{margin:10px 0 0;font-size:13px}.ea-download a{display:inline-block;margin-top:10px;font-size:13px}.ea-download strong{color:var(--text)}
.install-guide{padding:22px 24px;font-size:14px}.install-guide ol{padding-left:24px;margin:20px 0}.install-guide li{margin-bottom:14px;padding-left:4px}.install-guide li strong{color:var(--gold)}.install-guide summary{cursor:pointer;color:var(--gold);padding:10px 0}.install-guide details p{margin-top:10px}.install-guide .inline-code{overflow-wrap:anywhere}
.release-status{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.release-status article{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:18px}.release-status h2{font-size:16px;margin-bottom:10px}.release-status p{font-size:13px;color:var(--muted);margin:10px 0 0}@media(max-width:760px){.release-status{grid-template-columns:1fr}}

/* Client setup checkpoints */
.portal-status{margin-top:22px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.portal-status article{padding:20px;border:1px solid #35414c;border-radius:8px}.portal-status ol{padding-left:22px}.portal-status li{padding:6px 0}.portal-status .complete{color:#b8d9bc}.portal-status .pending{color:#d5c397}.portal-status p{font-size:.875rem;line-height:1.65;margin:12px 0}.portal-status small{display:block;line-height:1.6;color:#abb8c5}.portal-status a{color:#edcf83}.portal-status li span{display:block;font-size:.875rem}
@media(max-width:620px){.portal-status{grid-template-columns:1fr}}

/* Optional reporting follows the existing portal theme. */
.reporting-summary{border-top:1px solid var(--border,#293341);margin-top:1rem;padding-top:1rem}
.reporting-summary p{font-size:.875rem;line-height:1.6}
.reporting-modal{width:min(42rem,calc(100vw - 2rem));max-height:85vh;overflow:auto}
.reporting-notice{font-size:1rem;line-height:1.65;overflow-wrap:anywhere}
.reporting-choice{display:flex;align-items:flex-start;gap:.75rem;font-size:1rem;line-height:1.5;margin:1.25rem 0}
.reporting-choice input{width:1.25rem;height:1.25rem;flex:0 0 1.25rem;margin:.15rem 0;accent-color:#e8c778}
.reporting-modal .actions{flex-wrap:wrap}

.purchase-modal{width:min(42rem,calc(100vw - 2rem));max-height:90vh;overflow:auto}
.purchase-modal h2{margin:.4rem 0 1rem;font-size:1.7rem}
.purchase-price{display:flex;gap:1rem;align-items:baseline;flex-wrap:wrap;margin:1.3rem 0 .3rem}
.purchase-price strong{font-size:2.6rem;line-height:1.15;color:var(--gold)}
.purchase-price span,.purchase-next{font-size:.85rem;color:var(--muted)}
.purchase-details{padding-left:1.2rem;font-size:.95rem;line-height:1.6}
.purchase-details li{margin:.65rem 0;padding-left:.2rem}
.purchase-links{display:flex;gap:1.5rem;flex-wrap:wrap;font-size:.9rem}
.purchase-choice{display:flex;gap:.8rem;align-items:flex-start;font-size:.95rem;line-height:1.6;margin:1.5rem 0;padding:1rem;border:1px solid var(--line);border-radius:.6rem;background:#0c1520}
.purchase-choice input{width:1.25rem;min-height:1.25rem;height:1.25rem;flex:0 0 1.25rem;margin:.2rem 0;accent-color:var(--gold)}
.purchase-modal .actions{flex-wrap:wrap}

/* TradePulse workspace redesign. Shared tokens are supplied by /ui-assets/ui.css. */
.tp-client .client-header{max-width:1280px;padding:22px 32px;gap:24px;margin:auto}
.tp-client .client-main{max-width:1200px;padding:28px 32px 56px;margin:auto}
.tp-client .intro{margin:24px 0 26px;text-align:left;max-width:850px}
.tp-client .intro h1{font-size:clamp(30px,4vw,44px);line-height:1.15;letter-spacing:-.035em}
.tp-client .intro p{margin-left:0;max-width:740px;font-size:16px;line-height:1.65}
.tp-client .account-banner{margin:0 0 24px;padding:18px 22px;border-radius:14px;background:var(--tp-surface);border:1px solid var(--tp-border)}
.workspace-nav{display:flex;gap:6px;border-bottom:1px solid var(--tp-border);margin:0 0 26px;overflow-x:auto;padding-bottom:8px}
.workspace-nav a{white-space:nowrap;text-decoration:none;padding:12px 20px;border-radius:8px;color:var(--tp-muted);font-weight:600;min-height:44px}
.workspace-nav a[aria-current="page"]{color:var(--tp-gold);background:var(--tp-gold-soft)}
.tp-client .plans{align-items:stretch;gap:22px;margin:22px 0}
.tp-client .plan-card{padding:28px;border:1px solid var(--tp-border);border-radius:16px;box-shadow:none;background:var(--tp-surface);display:flex;flex-direction:column;min-width:0}
.tp-client .plan-card.gold-plan{background:var(--tp-surface);border-color:#75603a}
.plan-heading{display:flex;justify-content:space-between;gap:10px;align-items:center}
.tp-client .plan-card h2{font-size:26px;margin:15px 0 4px}
.tp-client .plan-card .symbol{margin:0 0 20px;font-size:14px}
.tp-client .plan-card>.badge{align-self:flex-start}
.access-detail{font-size:14px;line-height:1.6;min-height:44px}
.ea-facts{margin:8px 0 24px;display:grid;gap:0;font-size:14px}
.ea-facts>div{display:grid;grid-template-columns:110px minmax(0,1fr);gap:16px;padding:13px 0;border-bottom:1px solid var(--tp-border)}
.ea-facts dt{color:var(--tp-muted)}.ea-facts dd{margin:0;overflow-wrap:anywhere}.ea-facts dd small{display:block;margin-top:5px;color:var(--tp-muted)}
.ea-next{margin-top:auto;display:grid;gap:8px}.ea-next>small{font-size:11px;letter-spacing:.1em;color:var(--tp-muted)}
.ea-next .button{text-align:center;text-decoration:none}.plan-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0}
.plan-tools a{padding:10px 4px;font-size:13px}.plan-card>small{color:var(--tp-muted)}
.tp-client .available-plan{border-style:dashed}.tp-client .price{font-size:36px;margin:10px 0}
.tp-client .portal-status{gap:20px}.tp-client .portal-status article{border:1px solid var(--tp-border);border-radius:12px;padding:22px;background:var(--tp-bg)}
.tp-client .portal-status h3{font-size:21px;margin-top:0}.tp-client .portal-status li{padding:10px 0;font-size:14px}
.billing-summary{margin-bottom:32px}.billing-summary>article{padding:16px 0;border-bottom:1px solid var(--tp-border)}
.billing-summary>article>.badge{margin-left:14px}.billing-summary>article>p{margin-bottom:0}
.tp-client #customer-next{margin:0 0 20px}.tp-client #customer-next p{margin:5px 0 0}
.tp-client .auth-wrap{max-width:500px;margin:32px auto}.tp-client #auth-feedback{font-size:14px;line-height:1.6}
.tp-client .auth-links{gap:10px;flex-wrap:wrap}.tp-client .auth-links button{min-height:44px}
.tp-client .purchase-links{gap:12px;display:flex;flex-wrap:wrap}
.tp-admin .content{min-width:0}.tp-admin .sidebar nav{gap:6px}.tp-admin .sidebar nav a{min-height:44px;padding:12px 14px;text-decoration:none;color:var(--tp-muted);border-radius:8px;display:flex;align-items:center}
.tp-admin .sidebar nav a[aria-current="page"]{background:var(--tp-gold-soft);color:var(--tp-gold)}
.tp-admin .nav-caption{margin:20px 14px 6px;font-size:11px;color:var(--tp-muted);letter-spacing:.12em;text-transform:uppercase}
.tp-admin .kpis{margin-bottom:26px}.tp-admin .kpi strong{font-variant-numeric:tabular-nums}
.tp-admin #subtitle{max-width:700px}.tp-admin .filters{gap:12px}.tp-admin .filters input{min-width:0}
.tp-admin #table th{white-space:nowrap}.tp-admin #table td{vertical-align:top;padding:18px 16px}
.tp-admin #table .table-actions{flex-direction:column;align-items:stretch;min-width:125px}.tp-admin #table .table-actions button{font-size:13px}
.tp-admin .client-profile{position:static;width:auto;max-width:none;max-height:none;margin:0;border:0;border-radius:0;padding:0;background:transparent;box-shadow:none;overflow:visible}
.tp-admin .client-profile .profile-top{margin-bottom:20px}.tp-admin .client-profile h1{font-size:36px}
.tp-admin .client-profile .profile-tabs{overflow-x:auto;flex-wrap:nowrap}.tp-admin .client-profile .profile-tabs button{white-space:nowrap}
.tp-admin .profile-chart{min-width:560px}.tp-admin .profile-chart-wrap{overflow:auto}
@media(min-width:761px){.tp-admin .shell{grid-template-columns:220px minmax(0,1fr);width:100%;max-width:100%}.tp-admin .sidebar{position:fixed;width:220px;top:0;bottom:0;display:flex;flex-direction:column;padding:26px 16px}.tp-admin .sidebar nav{display:flex!important;flex-direction:column}.tp-admin .content{grid-column:2;grid-row:1;margin-left:0;width:100%;max-width:none;min-width:0;padding:32px}}
@media(min-width:761px) and (max-width:1100px){.tp-admin .shell{grid-template-columns:188px minmax(0,1fr)}.tp-admin .sidebar{width:188px}.tp-admin .content{grid-column:2;margin-left:0;padding:24px}.tp-admin .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.tp-client .client-header{padding:16px 20px;flex-wrap:wrap;justify-content:space-between}.tp-client .client-header nav{display:none;width:100%;flex-direction:column;align-items:stretch}.tp-client .client-header nav.is-open{display:flex}.tp-client .client-main{padding:16px 18px 40px}.tp-client .plans{grid-template-columns:1fr}.tp-client .plan-card{padding:22px}.tp-client .account-banner{align-items:flex-start;gap:16px;flex-direction:column}.tp-client .portal-status{grid-template-columns:1fr}.workspace-nav a{padding:12px 14px}.tp-client .panel-head{align-items:flex-start;flex-direction:column;gap:14px}.tp-client .ea-facts>div{grid-template-columns:95px minmax(0,1fr)}.tp-admin .shell{display:block}.tp-admin .sidebar{position:static;width:auto;padding:16px 20px;display:flex;flex-direction:row;justify-content:space-between;flex-wrap:wrap}.tp-admin .sidebar nav{display:none;flex-direction:column;width:100%;margin-top:12px}.tp-admin .sidebar nav.is-open{display:flex}.tp-admin .sidebar .bottom{display:none}.tp-admin .content{margin-left:0;padding:24px 18px}.tp-admin .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.tp-admin .kpi{padding:18px 14px}.tp-admin .kpi strong{font-size:26px}.tp-admin .filters{display:flex;flex-wrap:wrap}.tp-admin .filters input{flex:1 1 100%}.tp-admin .profile-summary,.tp-admin .profile-licenses{grid-template-columns:1fr}.tp-admin .topbar{align-items:flex-start;gap:16px;flex-direction:column}}

.tp-admin .referral-tools{margin-bottom:18px}.tp-admin .referral-tools .panel-head p{margin:5px 0 0;color:var(--tp-muted);font-size:13px}.tp-admin .referral-form{display:grid;grid-template-columns:1.2fr 1.4fr 1fr .7fr 1.8fr auto;gap:12px;align-items:end;padding:18px 22px}.tp-admin .referral-form .form-field{margin:0}.tp-admin .referral-form button{min-height:44px}.tp-admin .break-link{max-width:260px;overflow-wrap:anywhere}.tp-admin #payout-dialog input{width:100%}@media(max-width:1150px){.tp-admin .referral-form{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:760px){.tp-admin .referral-form{grid-template-columns:1fr;padding:16px 18px}}

/* Complimentary EA access */
.tp-admin .access-tools{margin-bottom:18px;overflow:hidden}
.tp-admin .access-callout{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:24px 26px;background:linear-gradient(135deg,rgba(222,190,112,.08),rgba(105,122,164,.06))}
.tp-admin .access-callout h2{margin:5px 0 7px;font-size:21px}
.tp-admin .access-callout p{margin:0;color:var(--tp-muted);max-width:760px;line-height:1.6}
.tp-admin .access-callout .primary{white-space:nowrap;min-height:46px}
.gift-modal{width:min(620px,calc(100vw - 2rem))}
.gift-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.gift-warning{display:grid;gap:3px;margin:16px 0;padding:14px 16px;border:1px solid #75603a;border-radius:10px;background:rgba(232,199,120,.07);font-size:13px;line-height:1.5}
.gift-warning span{color:var(--tp-muted)}
.gift-chip{display:grid;gap:3px;margin:14px 0;padding:12px 14px;border-radius:10px;border:1px solid #75603a;background:rgba(232,199,120,.07)}
.gift-chip strong{color:var(--tp-gold)}
.gift-chip span{font-size:13px}.gift-chip small{color:var(--tp-muted)}
.danger-soft{border-color:#8a4c4c!important;background:rgba(170,70,70,.14)!important;color:#f2c6c6!important}
@media(max-width:760px){.tp-admin .access-callout{align-items:flex-start;flex-direction:column;padding:20px}.gift-grid{grid-template-columns:1fr}.tp-admin .access-callout .primary{width:100%}}

/* TradePulse admin viewport-width correction v4.
   The fixed sidebar is represented by grid column 1; main content occupies column 2 only.
   Do not add sidebar width again as margin-left, which creates whole-page horizontal overflow. */
body.tp-admin{overflow-x:hidden}
.tp-admin .shell{max-width:100%;overflow-x:clip}
.tp-admin .content,.tp-admin #admin-list,.tp-admin .panel{min-width:0;max-width:100%}

/* TradePulse admin fit-screen fix v3
   Desktop stays a compact table. No horizontal page/table scrolling.
   Only phone-size screens switch to stacked record cards. */
.tp-admin #table.table-wrap{
  overflow-x:hidden;
  overflow-y:visible;
  max-width:100%;
}
.tp-admin #table .admin-data-table{
  width:100%;
  min-width:0;
  max-width:100%;
  table-layout:fixed;
  font-size:13px;
}
.tp-admin #table .admin-data-table th,
.tp-admin #table .admin-data-table td{
  min-width:0;
  max-width:none;
  padding:12px 9px;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.38;
}
.tp-admin #table .admin-data-table th{
  font-size:10px;
  line-height:1.25;
  letter-spacing:.8px;
}
.tp-admin #table .admin-data-table td strong,
.tp-admin #table .admin-data-table td small,
.tp-admin #table .admin-data-table td a{
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
}
.tp-admin #table .admin-data-table td small{
  font-size:11px;
  line-height:1.4;
  margin-top:3px;
}
.tp-admin #table .admin-data-table .break-link{
  max-width:100%;
  word-break:break-all;
}
.tp-admin #table .admin-data-table .table-actions{
  min-width:0;
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:stretch;
  gap:5px;
}
.tp-admin #table .admin-data-table .table-actions button,
.tp-admin #table .admin-data-table td>button{
  min-width:0;
  min-height:34px;
  padding:6px 7px;
  font-size:10.5px;
  line-height:1.2;
  white-space:normal;
}
.tp-admin #table .admin-data-table .table-actions button{flex:1 1 74px}

/* Practical desktop column proportions. Every view totals 100%. */
.tp-admin #table .view-clients th:nth-child(1){width:22%}
.tp-admin #table .view-clients th:nth-child(2){width:9%}
.tp-admin #table .view-clients th:nth-child(3){width:14%}
.tp-admin #table .view-clients th:nth-child(4){width:17%}
.tp-admin #table .view-clients th:nth-child(5){width:20%}
.tp-admin #table .view-clients th:nth-child(6){width:18%}
.tp-admin #table .view-payments th:nth-child(1){width:24%}
.tp-admin #table .view-payments th:nth-child(2){width:8%}
.tp-admin #table .view-payments th:nth-child(3){width:14%}
.tp-admin #table .view-payments th:nth-child(4){width:16%}
.tp-admin #table .view-payments th:nth-child(5){width:24%}
.tp-admin #table .view-payments th:nth-child(6){width:14%}
.tp-admin #table .view-referrals th:nth-child(1){width:18%}
.tp-admin #table .view-referrals th:nth-child(2){width:22%}
.tp-admin #table .view-referrals th:nth-child(3){width:7%}
.tp-admin #table .view-referrals th:nth-child(4){width:11%}
.tp-admin #table .view-referrals th:nth-child(5){width:12%}
.tp-admin #table .view-referrals th:nth-child(6){width:17%}
.tp-admin #table .view-referrals th:nth-child(7){width:13%}
.tp-admin #table .view-access th:nth-child(1){width:23%}
.tp-admin #table .view-access th:nth-child(2){width:9%}
.tp-admin #table .view-access th:nth-child(3){width:15%}
.tp-admin #table .view-access th:nth-child(4){width:20%}
.tp-admin #table .view-access th:nth-child(5){width:20%}
.tp-admin #table .view-access th:nth-child(6){width:13%}
.tp-admin #table .view-logs th:nth-child(1){width:15%}
.tp-admin #table .view-logs th:nth-child(2){width:17%}
.tp-admin #table .view-logs th:nth-child(3){width:13%}
.tp-admin #table .view-logs th:nth-child(4){width:20%}
.tp-admin #table .view-logs th:nth-child(5){width:35%}
.tp-admin #table .view-emails th:nth-child(1){width:23%}
.tp-admin #table .view-emails th:nth-child(2){width:14%}
.tp-admin #table .view-emails th:nth-child(3){width:22%}
.tp-admin #table .view-emails th:nth-child(4){width:16%}
.tp-admin #table .view-emails th:nth-child(5){width:9%}
.tp-admin #table .view-emails th:nth-child(6){width:16%}
.tp-admin #table .view-events th:nth-child(1){width:28%}
.tp-admin #table .view-events th:nth-child(2){width:23%}
.tp-admin #table .view-events th:nth-child(3){width:17%}
.tp-admin #table .view-events th:nth-child(4){width:20%}
.tp-admin #table .view-events th:nth-child(5){width:12%}

/* Give the business workspace more usable width without changing the visual language. */
@media(min-width:1101px){
  .tp-admin .content{padding-left:24px;padding-right:24px;max-width:none}
}
@media(min-width:761px) and (max-width:1100px){
  .tp-admin #table .admin-data-table{font-size:11.5px}
  .tp-admin #table .admin-data-table th,
  .tp-admin #table .admin-data-table td{padding:10px 6px}
  .tp-admin #table .admin-data-table td small{font-size:10px}
  .tp-admin #table .admin-data-table .table-actions button,
  .tp-admin #table .admin-data-table td>button{font-size:9.5px;padding:5px}
}

/* Phone layout: readable stacked records, still no left/right scrolling. */
@media(max-width:760px){
  .tp-admin #table.table-wrap{overflow:visible}
  .tp-admin #table .admin-data-table,
  .tp-admin #table .admin-data-table tbody{display:block;width:100%}
  .tp-admin #table .admin-data-table thead{
    position:absolute!important;width:1px!important;height:1px!important;
    padding:0!important;margin:-1px!important;overflow:hidden!important;
    clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important
  }
  .tp-admin #table .admin-data-table tbody{padding:10px;display:grid;gap:10px}
  .tp-admin #table .admin-data-table tr{
    display:block;width:100%;min-width:0;border:1px solid var(--line);
    border-radius:11px;background:#0f1926;overflow:hidden
  }
  .tp-admin #table .admin-data-table td{
    display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px;
    width:100%!important;padding:10px 12px;border-top:1px solid #263243;font-size:13px
  }
  .tp-admin #table .admin-data-table td:first-child{border-top:0}
  .tp-admin #table .admin-data-table td::before{
    content:attr(data-label);color:var(--muted);font-size:9px;font-weight:700;
    letter-spacing:.8px;line-height:1.35;text-transform:uppercase;padding-top:2px
  }
  .tp-admin #table .admin-data-table .table-actions{width:100%;display:flex;flex-wrap:wrap}
  .tp-admin #table .admin-data-table .table-actions button{font-size:11px;flex:1 1 110px}
}
@media(max-width:430px){
  .tp-admin #table .admin-data-table td{grid-template-columns:1fr;gap:4px}
}
