:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#242820;background:#f6f6f2;font-synthesis:none;--line:#dfe2d8;--muted:#687061;--accent:#34442f}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}a{color:inherit}button,.button{min-height:44px;border:1px solid var(--line);border-radius:9px;background:white;color:#242820;padding:10px 15px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:600;font-size:14px}button:hover,.button:hover{background:#edf0e8}button:disabled{opacity:.55;cursor:wait}.primary{background:var(--accent);color:#fff;border-color:var(--accent)}.primary:hover{background:#263922}.danger{color:#a12c25}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #9fae8b;outline-offset:3px}.layout{display:grid;grid-template-columns:226px minmax(0,1fr);min-height:100vh}.sidebar{padding:30px 18px;border-right:1px solid var(--line);background:#fff;display:flex;flex-direction:column;gap:30px}.brand{font-size:19px;font-weight:750;letter-spacing:-.5px;text-decoration:none}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:1.6px;color:var(--muted);font-weight:650}.sidebar nav{display:grid;gap:6px}.sidebar nav button{justify-content:flex-start;border:0;background:transparent}.sidebar nav button[aria-current=page]{background:#eaf0e3;color:#283f20}.sidebar footer{margin-top:auto;display:grid;gap:14px;font-size:12px;color:var(--muted)}.workspace{min-width:0;padding:38px clamp(20px,4vw,60px);max-width:1500px;width:100%;margin:0 auto}.top{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:28px}.top h1{margin:8px 0;font-size:clamp(27px,3vw,36px);letter-spacing:-1.1px;font-weight:650}.muted{color:var(--muted);font-size:14px;line-height:1.6}.top p{margin:0;max-width:620px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:24px 0}.stat,.card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:22px;min-width:0}.stat strong{display:block;font-size:28px;margin-top:10px;letter-spacing:-.6px}.stat span{font-size:12px;color:var(--muted)}.section-title{font-size:17px;margin:0}.card-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:20px}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.stack{display:grid;gap:16px}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.person{display:flex;gap:12px;align-items:center}.avatar{width:40px;height:40px;flex-shrink:0;border-radius:50%;background:#edf0e8;display:grid;place-items:center;font-weight:650;color:#49563d}.person strong{display:block;font-size:15px}.person small{display:block;color:var(--muted);margin-top:4px;overflow-wrap:anywhere}.badge{font-size:11px;background:#edf0e8;padding:5px 8px;border-radius:5px;display:inline-block;white-space:nowrap;text-transform:capitalize}.badge.warning{background:#fff0d8;color:#795b1f}.badge.good{background:#e5f1e2;color:#335329}.badge.bad{background:#f9e8e5;color:#92372e}.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.detail{margin:18px 0;font-size:14px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.progress{height:6px;background:#eceee8;border-radius:6px;margin:15px 0 9px;overflow:hidden}.progress i{display:block;height:100%;background:#718963}.small{font-size:12px;color:var(--muted)}.empty{text-align:center;padding:50px 20px;background:#fff;border:1px dashed #d1d7c9;border-radius:13px}.empty h2{font-size:19px;margin:0 0 10px}.empty p{max-width:480px;margin:0 auto;color:var(--muted);line-height:1.7}.notice{border:1px solid #ded7bf;background:#fffaf0;padding:16px 18px;border-radius:9px;font-size:13px;line-height:1.6;margin-bottom:20px}.error{color:#962f25;background:#fff1ee;border:1px solid #e5c3bc;padding:13px;border-radius:8px;line-height:1.6}.notice a{font-weight:650}.filters{display:flex;gap:10px;margin:20px 0;flex-wrap:wrap}.filters input{flex:1;min-width:160px}.filters select{width:auto;min-width:130px}.table-wrap{overflow:auto;max-width:100%}table{width:100%;border-collapse:collapse;font-size:13px}th{text-align:left;font-weight:600;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.8px}td,th{padding:14px 12px;border-bottom:1px solid var(--line);vertical-align:top}td:first-child,th:first-child{padding-left:0}td{overflow-wrap:anywhere}form{display:grid;gap:16px}label{display:grid;gap:7px;font-weight:600;font-size:13px}input,textarea,select{width:100%;max-width:100%;border:1px solid #cdd3c7;border-radius:8px;padding:11px 12px;min-height:44px;background:#fff;color:#242820}textarea{min-height:120px;resize:vertical}input[readonly]{background:#f7f8f4}.form-note{font-size:12px;line-height:1.65;color:var(--muted);margin:0}.fields{display:grid;grid-template-columns:1fr 1fr;gap:16px}.auth-page{max-width:1100px;margin:0 auto;padding:35px 24px}.auth-top{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:60px}.auth-grid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(30px,6vw,100px);align-items:start}.auth-copy h1{font-size:clamp(34px,5vw,52px);line-height:1.08;letter-spacing:-1.9px;font-weight:650;margin:16px 0 24px}.auth-copy p{font-size:16px;line-height:1.8;color:var(--muted)}.rules{list-style:none;padding:0;margin:32px 0;display:grid;gap:16px}.rules li{padding-left:28px;position:relative;font-size:14px;line-height:1.6}.rules li:before{content:'✓';position:absolute;left:0;color:#596f46}.auth-card{padding:28px;background:#fff;border:1px solid var(--line);border-radius:14px}.auth-card h2{font-size:21px;letter-spacing:-.4px;margin:0 0 22px}.auth-card .primary{width:100%}dialog{width:min(680px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--line);border-radius:15px;padding:26px;background:#f9faf7;color:#242820}dialog::backdrop{background:#161d165e;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:20px}.dialog-head h2{margin:5px 0;font-size:22px}.thread{display:grid;gap:12px;margin-bottom:24px;max-height:40vh;overflow:auto}.message{padding:16px;border:1px solid var(--line);border-radius:10px;background:#fff}.message.outbound{background:#edf2e7;margin-left:20px}.message p{font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}.message .small{display:flex;justify-content:space-between;gap:8px}.thread-status{font-size:11px;color:var(--muted)}#toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);max-width:calc(100% - 30px);padding:13px 20px;border-radius:10px;background:#263323;color:#fff;font-size:14px;z-index:20;display:none;box-shadow:0 5px 30px #0002}.loading{padding:70px;text-align:center;color:var(--muted)}.linkbox{display:flex;gap:8px;align-items:center;margin-top:12px}.linkbox input{min-width:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}@media(max-width:1000px){.layout{grid-template-columns:190px minmax(0,1fr)}.workspace{padding:28px 22px}.cards{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.layout{display:block}.sidebar{padding:18px 16px;gap:16px;border-right:0;border-bottom:1px solid var(--line)}.sidebar nav{display:flex;overflow:auto;gap:4px;padding-bottom:2px}.sidebar nav button{white-space:nowrap;flex-shrink:0;font-size:13px;padding:10px}.sidebar footer{display:none}.workspace{padding:24px 16px}.top{gap:10px}.top .button,.top button{padding:10px;flex-shrink:0}.stats{gap:10px}.stat{padding:16px}.stat strong{font-size:25px}.card{padding:18px}.auth-top{margin-bottom:30px}.auth-page{padding:22px 18px}.auth-grid{grid-template-columns:1fr;gap:20px}.auth-copy h1{font-size:36px}.rules{margin:20px 0}.auth-card{padding:22px}.fields{grid-template-columns:1fr}.card-header{flex-wrap:wrap}dialog{padding:20px}.message.outbound{margin-left:8px}.actions button{flex-grow:1}.linkbox{align-items:stretch}.table-wrap table{min-width:480px}}

/* Owner program section embedded within the existing Affiliates tab. */
.embedded{background:#f6f6f2}.embedded .layout{display:block;min-height:0}.embedded .sidebar{display:block;padding:12px 16px;border-right:0;border-bottom:1px solid var(--line)}.embedded .sidebar>div,.embedded .sidebar footer{display:none}.embedded .sidebar nav{display:flex;gap:4px;flex-wrap:wrap;overflow:visible}.embedded .sidebar nav button{min-height:44px;white-space:nowrap}.embedded .workspace{padding:24px 20px;max-width:none}.embedded .top{margin-bottom:20px}.embedded .top h1{font-size:28px}.embedded .cards{grid-template-columns:repeat(2,minmax(0,1fr))}.person{min-width:0}.person>div{min-width:0}.person strong,.dialog-head h2{overflow-wrap:anywhere}@media(max-width:900px){.embedded .cards{grid-template-columns:1fr}}@media(max-width:700px){.embedded .sidebar{padding:8px}.embedded .sidebar nav button{padding:10px;font-size:12px}.embedded .workspace{padding:20px 12px}.embedded .top{flex-wrap:wrap}.embedded .top h1{font-size:25px}}

.embedded{--line:#303034;--muted:#a1a1aa;--accent:#e4e4e7;background:#080808;color:#f4f4f5;color-scheme:dark}.embedded .sidebar,.embedded .stat,.embedded .card,.embedded .empty,.embedded .message{background:#0b0b0c}.embedded .sidebar nav button{color:#a1a1aa}.embedded .sidebar nav button[aria-current=page]{background:#27272a;color:#fafafa}.embedded button,.embedded .button{background:#18181b;color:#f4f4f5}.embedded button:hover{background:#27272a}.embedded .primary{background:#e4e4e7;color:#18181b}.embedded .primary:hover{background:#fafafa}.embedded .danger{color:#fca5a5}.embedded input,.embedded textarea,.embedded select{background:#101012;color:#f4f4f5;border-color:#3f3f46}.embedded .notice{background:#191811;border-color:#49412d;color:#e7dfc9}.embedded .empty{border-color:#3f3f46}.embedded .avatar,.embedded .badge{background:#27272a;color:#e4e4e7}.embedded .badge.warning{background:#422f12;color:#fcd997}.embedded .badge.good{background:#183026;color:#a7e6bd}.embedded .badge.bad,.embedded .error{background:#321a1a;color:#fca5a5;border-color:#6a3030}.embedded .progress{background:#27272a}.embedded dialog{background:#111113;color:#f4f4f5}.embedded .message.outbound{background:#18231b}.embedded .person small{color:#a1a1aa}.embedded #toast{background:#e4e4e7;color:#18181b}

/* The standalone and embedded manager surfaces use the employee backend palette. */
:root{color-scheme:dark;--line:#303034;--muted:#a1a1aa;--accent:#e4e4e7;color:#f4f4f5;background:#000}
html,body,#app{min-height:100%;background:#000}html{height:100%}body{min-height:100dvh}
.embedded,.embedded #app{background:#080808;min-height:100dvh}.embedded .layout{min-height:100dvh}
.sidebar,.stat,.card,.empty,.message,.auth-card{background:#0b0b0c;border-color:var(--line)}
.sidebar{position:sticky;top:0;height:100dvh}.sidebar nav button{color:#a1a1aa}
.sidebar nav button[aria-current=page]{background:#27272a;color:#fafafa}
button,.button{background:#18181b;color:#f4f4f5;transition:background-color .15s,border-color .15s}
button:hover,.button:hover{background:#27272a;border-color:#52525b}
button.primary,.button.primary{background:#e4e4e7;color:#18181b;border-color:#e4e4e7}
button.primary:hover,.button.primary:hover{background:#fafafa;color:#18181b}
.danger{color:#fca5a5}button:disabled{cursor:default;opacity:.55}
input,textarea,select{background:#101012;color:#f4f4f5;border-color:#3f3f46;min-height:44px}
input[readonly]{background:#101012;color:#f4f4f5}.linkbox button{min-width:108px;white-space:nowrap}
input::placeholder,textarea::placeholder{color:#85858f}input:-webkit-autofill{-webkit-text-fill-color:#f4f4f5;box-shadow:0 0 0 1000px #101012 inset}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #6ee7b7;outline-offset:3px}
.notice{background:#171810;border-color:#49412d;color:#e7dfc9;line-height:1.65}
.avatar,.badge{background:#27272a;color:#e4e4e7}.badge.warning{background:#422f12;color:#fcd997}.badge.good{background:#183026;color:#a7e6bd}.badge.bad,.error{background:#321a1a;color:#fca5a5;border-color:#6a3030}
.progress{background:#27272a}.progress i{background:#6ee7b7}.person small{color:var(--muted)}
dialog{position:fixed;inset:0;margin:auto;background:#111113;color:#f4f4f5;box-shadow:0 24px 100px #0009}dialog::backdrop{background:#000a;backdrop-filter:blur(5px)}
.message.outbound{background:#18231b}.message p{font-size:16px}.thread{max-height:46dvh;scrollbar-gutter:stable}
#toast{background:#e4e4e7;color:#18181b;box-shadow:0 12px 40px #0008}
.auth-copy h1{font-size:clamp(32px,4vw,48px);line-height:1.12}.auth-card{box-shadow:0 18px 60px #0004}.rules li:before{color:#6ee7b7}
.security-card{max-width:680px}.security-card h2{margin:12px 0 4px}.security-card hr{border:0;border-top:1px solid var(--line);margin:24px 0}
.row{flex-wrap:wrap}.person strong,.person small,.detail,.card h2,.muted{overflow-wrap:anywhere}.top>div{min-width:0}.card,.stat{border-radius:16px}
.embedded .sidebar{position:static;height:auto}.embedded .workspace{padding-bottom:36px}
@media(max-width:700px){.sidebar{position:static;height:auto}.top{flex-wrap:wrap}.workspace{padding-top:20px}.auth-top{gap:16px}.auth-copy h1{font-size:34px}.linkbox{flex-wrap:wrap}.linkbox input{flex:1 1 220px}.linkbox button{flex:1}.security-card{max-width:none}.stats .stat{min-width:0}.stat span{overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){button,.button{transition:none}}
