/* Buddy 4.3: layout stabilization, readable administration, accessible controls. */
:root{--v43-bg:#0e1015;--v43-panel:#191c24;--v43-border:#313540;--v43-subtle:#a4a9b8;--v43-accent:#a496fa}
.v43-header.site-header{height:76px!important;min-height:76px;background:rgba(13,15,20,.96)!important;border-bottom:1px solid #292b34!important;position:sticky;top:0;z-index:90}
.v43-header .v43-nav-inner{height:76px;min-height:0!important;gap:22px;display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;max-width:1280px;width:min(calc(100% - 40px),1280px)}
.v43-header .brand{display:inline-flex;align-items:center;gap:8px;flex:none;font-size:25px;line-height:1}
.v43-header .brand img{width:37px;height:37px;object-fit:contain}
.v43-header .site-nav.v3-nav{display:flex;flex:0 1 auto;min-width:0;margin:0!important;gap:2px;padding:4px!important;border:1px solid #292d37;border-radius:12px;background:#171920}
.v43-header .site-nav.v3-nav>a,.v43-header .v2-nav-more{font-size:12px;padding:9px 12px;height:38px;line-height:1.2;margin:0;white-space:nowrap;border-radius:8px}
.v43-header .site-nav .v41-mobile-search{display:none!important}
.v43-header .nav-actions.v43-nav-actions{display:flex;align-items:center;gap:9px;flex:none;min-width:0;margin-left:auto}
.v43-header .v42-language{height:36px;min-width:68px;display:inline-flex;justify-content:center;align-items:center;gap:7px;padding:4px 9px;border-radius:10px}
.v43-header .v43-search-trigger{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:38px;padding:0 11px;font-size:12px;font-weight:600;min-width:40px;white-space:nowrap;border-radius:10px}
.v43-header .v43-search-trigger svg{flex:none}
.v43-header .v43-search-trigger kbd{white-space:nowrap}
.v43-header .v43-account-link{height:38px;display:inline-flex;align-items:center;gap:7px;padding:0 13px;background:#1b1d25;border:1px solid #343541;border-radius:10px;font-size:12px;font-weight:680;white-space:nowrap}
.v43-header .v43-account-link:hover{background:#272736;border-color:#635a83}
.v43-header .nav-actions>.btn{min-height:38px!important;height:38px;white-space:nowrap;display:inline-flex;align-items:center;padding:0 14px!important;font-size:12px!important;border-radius:10px}
.v43-header .nav-actions .v3-header-bell{height:38px;width:38px;flex-shrink:0}
.v43-header .nav-toggle{margin-left:4px;flex:none}
/* dialog can also be opened via navigation fallback when JS is unavailable */
#v41-search-dialog{border:1px solid #454553;border-radius:21px;background:#191b23;color:#f4f5f9;box-shadow:0 28px 100px rgba(0,0,0,.8);max-width:min(610px,calc(100vw - 34px));width:610px;max-height:calc(100dvh - 32px);padding:0!important;overflow:auto}
#v41-search-dialog:not([open]){display:none!important}
#v41-search-dialog::backdrop{background:rgba(3,4,9,.78);backdrop-filter:blur(6px)}
#v41-search-dialog form{padding:26px}
#v41-search-dialog .v41-search-top{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #353640;padding-bottom:17px}
#v41-search-dialog .v41-search-top label{display:flex;align-items:center;gap:9px;color:#f0f0f8;font-size:16px;font-weight:750;letter-spacing:-.025em}
#v41-search-dialog [data-close-search]{width:32px;height:32px;display:grid;place-items:center;flex:none;background:#292b35;border:1px solid #42434d;border-radius:9px;color:#e9e9f0;cursor:pointer}
#v41-search-dialog .v41-search-input-row{margin-top:20px;display:flex;align-items:center;gap:9px}
#v41-search-dialog input[type=search]{min-height:51px;flex:1;width:100%;min-width:0;padding:12px 14px;color:#f4f4fb;border:1px solid #474656;border-radius:11px;background:#0f121a;outline:0;font-size:14px}
#v41-search-dialog input[type=search]:focus{border-color:#aa9bf9;box-shadow:0 0 0 3px #a693f927}
#v41-search-dialog .v41-search-input-row .btn{min-height:50px;flex:none}
#v41-search-dialog p{font-size:12px;color:#a5a9ba;line-height:1.6;margin:16px 0}
#v41-search-dialog .v41-search-suggestions{display:flex;flex-wrap:wrap;gap:8px}
#v41-search-dialog .v41-search-suggestions a{font-size:12px;color:#d5d2ea;padding:8px 10px;border:1px solid #363847;border-radius:9px;background:#222430;text-decoration:none}
#v41-search-dialog .v41-search-suggestions a:hover{background:#302d42}
/* Global admin surfaces */
.admin .admin-main{min-width:0}.admin .admin-page-content{max-width:1500px;margin-inline:auto;min-width:0}
.v43-section-title{margin-bottom:25px!important}.v43-section-title h1{letter-spacing:-.055em!important;margin:9px 0 8px!important}.v43-section-title p{max-width:860px!important}
.v43-role-overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0 0 21px}
.v43-metric{border:1px solid #323642;background:linear-gradient(150deg,#1d202a,#181b23);border-radius:16px;padding:21px 23px;display:flex;flex-direction:column;gap:8px;min-width:0}
.v43-metric>span{font-size:12px;color:#a6abba;font-weight:650}.v43-metric strong{font-size:31px;line-height:1.1;letter-spacing:-.05em;color:#f5f4fa;overflow-wrap:anywhere}.v43-metric small{font-size:11px;line-height:1.5;color:#80899c}
.v43-panel{background:#191c24;border:1px solid #313540;border-radius:19px;padding:0;overflow:hidden;margin:0 0 20px;box-shadow:0 16px 36px #00000017}
.v43-panel-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:26px 27px;border-bottom:1px solid #313540}
.v43-panel-header h2{font-size:22px;line-height:1.2;letter-spacing:-.035em;margin:8px 0 5px;color:#f2f3f7}
.v43-panel-header p{font-size:12px;color:#a0a7b7;line-height:1.7;max-width:780px;margin:3px 0 0}
.v43-panel-header>.btn{flex:none;font-size:12px}
.v43-staff-list{padding:0 27px}
.v43-staff-row{min-height:90px;display:flex;align-items:center;gap:17px;justify-content:space-between;border-bottom:1px solid #2b2f3a;padding:18px 0}
.v43-staff-row:last-child{border-bottom:0}
.v43-staff-identity{display:flex;align-items:center;gap:13px;flex:1;min-width:0}
.v43-staff-avatar{width:45px;height:45px;flex:none;border-radius:13px;background:#403b5f;color:#dfd7ff;display:grid;place-items:center;font-size:18px;font-weight:800;text-transform:uppercase}
.v43-staff-identity>div{display:grid;gap:6px;min-width:0}.v43-staff-identity strong{font-size:14px;overflow-wrap:anywhere}.v43-staff-identity small{font-size:12px;color:#949bac}
.v43-status{display:inline-flex;align-items:center;gap:7px;font-size:11px;border:1px solid #3d4844;border-radius:40px;padding:6px 10px;white-space:nowrap}
.v43-status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.v43-status.is-live{color:#7fd4ad;background:#1c3129}.v43-status.is-off{color:#e1abae;background:#342229;border-color:#5c3e44}
.v43-owner-chip{display:flex;gap:9px;align-items:center;padding:10px 13px;background:#2a263c;color:#d6caff;border:1px solid #534869;border-radius:10px;font-size:12px;font-weight:650;white-space:nowrap}
.v43-staff-form{display:flex;align-items:center;justify-content:end;gap:9px;min-width:0}
.v43-staff-form select{min-height:41px;min-width:160px;max-width:220px;border:1px solid #464856;border-radius:10px;padding:8px 12px;background:#232631;color:#eef0f9;font-size:12px;cursor:pointer}
.v43-staff-form .btn{min-height:41px}
.v43-matrix-note{display:flex;align-items:center;gap:10px;margin:22px 27px 17px;padding:12px 14px;background:#252436;border:1px solid #49435e;border-radius:11px;color:#cfcae8;font-size:12px;line-height:1.6}
.v43-matrix-note svg{flex:none;color:#aea2ff}
.v43-matrix-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-color:#57556d #191c24}
.v43-matrix{width:100%;min-width:675px;border-spacing:0;border-collapse:separate;text-align:center;font-size:12px;table-layout:fixed}
.v43-matrix tr>*:first-child{position:sticky;left:0;text-align:left;width:29%;min-width:195px;background:#191c24;z-index:1;box-shadow:1px 0 #363844}
.v43-matrix thead tr>*:first-child{z-index:3;background:#222631}
.v43-matrix thead th{background:#222631;border-bottom:1px solid #393d4b;padding:17px 8px 14px;color:#f2f1f9;font-weight:700;vertical-align:middle}
.v43-matrix thead th span{display:block;white-space:nowrap}
.v43-matrix thead th:first-child{padding-left:27px;color:#aeb3c2;font-size:11px;letter-spacing:.02em}
.v43-matrix thead th small{display:block;font-size:10px;color:#8c91a4;margin-top:13px}
.v43-matrix .v43-save{display:inline-flex;align-items:center;justify-content:center;gap:4px;cursor:pointer;padding:7px 10px;white-space:nowrap;background:#342e4c;color:#e6ddff;border:1px solid #5e5278;border-radius:8px;margin:11px auto 0;font-size:11px;font-weight:700;transition:background .2s}
.v43-matrix .v43-save:hover{background:#4b406e}
.v43-matrix tbody th,.v43-matrix tbody td{border-bottom:1px solid #2b2f3a;padding:12px 9px;height:52px}
.v43-matrix tbody th{padding-left:27px;color:#d7d9e3;font-weight:560;font-size:12px}
.v43-matrix tbody tr:hover td,.v43-matrix tbody tr:hover th{background-color:#232630}
.v43-matrix tbody tr:last-child>*{border-bottom:0}
.v43-matrix input[type=checkbox]{width:19px;height:19px;accent-color:#a195f1;cursor:pointer;vertical-align:middle}
.v43-matrix input[type=checkbox]:disabled{cursor:not-allowed;opacity:.3}
.v43-permission-yes{display:inline-grid;place-items:center;width:23px;height:23px;background:#24372f;border:1px solid #3e6c56;border-radius:6px;color:#91dfb5}
.v43-permissions-foot{padding:14px 27px;border-top:1px solid #2b303b;display:flex;gap:9px;font-size:11px;line-height:1.7;color:#9ea6b7}
.v43-permissions-foot span{display:flex;align-items:center;gap:9px}
.v43-permissions-foot svg{flex:none}
/* Diagnostic panel and login */
.v43-diag-word{font-size:18px!important;letter-spacing:-.02em!important}
.v43-diagnostic-list{padding:4px 27px}
.v43-diagnostic-item{display:flex;align-items:center;gap:14px;border-bottom:1px solid #30333d;padding:15px 0}
.v43-diagnostic-item:last-child{border:0}
.v43-diag-icon{width:35px;height:35px;border-radius:10px;flex:none;display:grid;place-items:center}
.v43-diag-icon.ok{background:#18352a;color:#8bd7ae}.v43-diag-icon.warn{background:#382c1c;color:#edc184}
.v43-diagnostic-item>div{flex:1;min-width:0;display:grid;gap:5px}.v43-diagnostic-item strong{font-size:13px}.v43-diagnostic-item small{font-size:12px;line-height:1.5;color:#9fa7b7}
.v43-diag-result{font-size:11px;font-weight:650;white-space:nowrap}.v43-diag-result.ok{color:#90d8b1}.v43-diag-result.warn{color:#f1c681}
.v43-copy-row{display:flex;align-items:center;gap:12px;margin:23px 27px 16px;border:1px solid #3b3e4c;background:#10131b;border-radius:12px;padding:10px 11px 10px 17px}
.v43-copy-row code{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px;color:#dad5ff}.v43-copy-row .btn{flex:none}
.v43-hint{font-size:12px!important;color:#b5b8c6;margin:0 27px 20px;line-height:1.7}
.v43-copy-row~.btn{margin:0 27px 26px}
.v42-login-screen{background:radial-gradient(ellipse at 50% 7%,rgba(116,98,191,.13),transparent 53%),#0e1016}
.v42-auth-panel{max-width:500px!important;box-shadow:0 25px 85px #0008,0 0 0 1px #242733!important}
.v42-auth-panel h1{font-size:clamp(28px,4vw,36px)!important}
.v43-discord-glyph{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;flex:none}
.v43-discord-cta{background:#7566e7!important;color:#fff!important;border-color:#9083f5!important;font-size:14px!important;font-weight:750!important}
.v43-discord-cta:hover{background:#8879ee!important}
.v43-auth-status{font-size:12px;padding:14px 16px;border:1px solid #55503b;border-radius:11px;background:#2a271b;color:#eacb8f;margin:18px 0;line-height:1.65}
@media(max-width:1280px){.v43-header .v43-nav-inner{gap:12px}.v43-header .site-nav.v3-nav>a,.v43-header .v2-nav-more{padding:9px 10px}.v43-header .v43-search-trigger span,.v43-header .v43-search-trigger kbd{display:none}.v43-header .nav-actions>.btn{padding:0 11px!important}}
@media(max-width:1070px){.v43-header .site-nav.v3-nav{display:none;position:absolute;top:76px;left:0;right:0;border:0;border-radius:0;background:#171920;max-height:calc(100dvh - 76px);overflow-y:auto;padding:16px max(22px,5vw)!important;flex-direction:column;align-items:stretch;gap:6px;box-shadow:0 20px 40px #0008;z-index:99}.v43-header .site-nav.v3-nav.show{display:flex}.v43-header .site-nav.v3-nav>a,.v43-header .v2-nav-more{width:100%;padding:13px!important;min-height:44px;height:auto;justify-content:space-between}.v43-header .site-nav .v41-mobile-search{display:flex!important}.v43-header .nav-toggle{display:inline-flex;align-items:center;justify-content:center}.v43-header .v2-nav-popover{position:static;width:100%;box-shadow:none;margin:5px 0;padding:8px;background:#22242d}.v43-header .v43-search-trigger{display:flex}.v43-header .v42-language{display:inline-flex}.v43-header .nav-actions.v43-nav-actions{margin-left:auto}}
@media(max-width:740px){.v43-header .v43-nav-inner{width:calc(100% - 28px);gap:8px}.v43-header .brand{font-size:22px}.v43-header .brand img{width:33px;height:33px}.v43-header .v43-search-trigger{display:flex!important}.v43-header .v43-account-link{padding:0 10px}.v43-header .v43-account-link svg{display:inline}.v43-header .v43-account-link{font-size:0;gap:0;width:39px;justify-content:center}.v43-header .v43-account-link svg{width:19px;height:19px}.v43-header .nav-actions>.btn{display:none}.v43-header .nav-actions .v3-header-bell{display:none}.v43-panel-header{align-items:stretch;flex-direction:column}.v43-role-overview{grid-template-columns:1fr 1fr}.v43-staff-row{flex-wrap:wrap}.v43-staff-identity{min-width:175px}.v43-staff-form{width:100%;justify-content:start}.v43-staff-form select{flex:1;max-width:none}}
@media(max-width:490px){.v43-header .v42-language{padding:3px 6px;font-size:10px;min-width:53px}.v43-header .v43-nav-inner{gap:5px}.v43-header .brand{font-size:20px}.v43-header .brand img{width:31px;height:31px}.v43-header .nav-actions.v43-nav-actions{gap:5px}.v43-header .v43-search-trigger{padding:0;width:36px;height:36px}.v43-role-overview{grid-template-columns:1fr}.v43-panel-header{padding:22px 19px}.v43-staff-list,.v43-diagnostic-list{padding:0 19px}.v43-staff-row{gap:11px}.v43-staff-identity{width:100%}.v43-staff-form{width:100%}.v43-staff-form .btn{padding:9px 11px}.v43-matrix-note{margin:17px 18px}.v43-copy-row{flex-wrap:wrap;margin:16px 18px}.v43-copy-row .btn{width:100%;justify-content:center}.v43-hint{margin:0 18px 20px}.v43-copy-row~.btn{margin:0 18px 23px}#v41-search-dialog form{padding:20px}#v41-search-dialog .v41-search-input-row{flex-direction:column}#v41-search-dialog .v41-search-input-row .btn{width:100%;justify-content:center}}
@media(prefers-reduced-motion:reduce){.v43-header *,#v41-search-dialog *{transition:none!important;animation:none!important}}
.v43-mobile-swipe{display:none;margin:0 17px 13px;font-size:11px;color:#ac9eea}
@media(max-width:740px){.v43-mobile-swipe{display:block}}


/* Buddy 4.4 – mobile navigation cleanup */
.v43-header .v43-mobile-search{display:none;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;border:1px solid #343641;background:#191b23;color:#c9cddd;flex:none}
.v43-header .v43-mobile-search:hover{background:#232531;border-color:#635d7f;color:#fff}
.v43-mobile-utility{display:none}
.v43-mobile-link{display:flex;align-items:center;gap:10px;min-height:46px;padding:13px 14px;border-radius:12px;border:1px solid #2f333d;background:#1c1f28;color:#eff0f6;text-decoration:none;font-size:13px;font-weight:640}
.v43-mobile-link:hover{background:#252834}
.v43-mobile-link svg{color:#a89dff;flex:none}
button.v43-mobile-link{width:100%;text-align:left;cursor:pointer}
.v43-mobile-language{justify-content:flex-start;gap:8px;min-height:46px;padding:0 14px;background:#1c1f28;border:1px solid #2f333d;border-radius:12px}
.v43-mobile-cta{width:100%;justify-content:center}
@media(max-width:900px){
 .v43-header.site-header{height:72px!important;min-height:72px}
 .v43-header .v43-nav-inner{height:72px;width:calc(100% - 24px);gap:8px}
 .v43-header .brand{font-size:20px;gap:7px}
 .v43-header .brand img{width:32px;height:32px}
 .v43-header .site-nav.v3-nav{top:72px;max-height:calc(100dvh - 72px);padding:14px 12px 20px!important;gap:8px;overflow-y:auto}
 .v43-header .site-nav.v3-nav>a,.v43-header .v2-nav-more{font-size:13px;padding:14px!important;min-height:48px;border-radius:12px;background:#1b1d25;border:1px solid #30333e}
 .v43-header .site-nav.v3-nav>a.active{background:#252738;border-color:#595277}
 .v43-header .v2-nav-dropdown,.v43-header .v2-nav-popover{width:100%}
 .v43-header .v2-nav-popover{margin-top:6px;border-radius:12px;background:#20232d;border:1px solid #313541}
 .v43-header .v2-nav-popover a{border-radius:10px;padding:12px 10px}
 .v43-header .nav-actions.v43-nav-actions{margin-left:auto;gap:6px}
 .v43-header .nav-actions .v42-language,
 .v43-header .nav-actions .v43-search-trigger,
 .v43-header .nav-actions .v43-account-link,
 .v43-header .nav-actions .v3-header-bell,
 .v43-header .nav-actions>.btn{display:none!important}
 .v43-header .v43-mobile-search{display:inline-flex}
 .v43-header .nav-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;border:1px solid #343641;background:#191b23;color:#fff}
 .v43-mobile-utility{display:grid;gap:8px;margin-top:8px;padding-top:8px;border-top:1px solid #2b2f39}
 .v43-header .site-nav .v41-mobile-search{display:flex!important;align-items:center;gap:10px;min-height:46px;padding:0 14px;border-radius:12px;border:1px solid #2f333d;background:#1c1f28;font-size:13px;font-weight:640}
}
@media(max-width:480px){
 .v43-header .v43-nav-inner{width:calc(100% - 20px);gap:6px}
 .v43-header .brand{font-size:18px}
 .v43-header .brand img{width:30px;height:30px}
 .v43-header .nav-toggle,.v43-header .v43-mobile-search{width:36px;height:36px}
 .v43-header .site-nav.v3-nav{padding:12px 10px 18px!important}
}
