:root{color-scheme:dark;--bg:#0d1118;--panel:#171d27;--panel2:#1c2430;--line:#2c3542;--text:#edf1f5;--muted:#929dab;--accent:#d8aa59;--accent-soft:#322b23;--good:#83c7a5;--bad:#d99091;--blue:#95b8db;--shadow:0 16px 40px #070b1290}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 Manrope,Arial,sans-serif}
button,input,select{font:inherit}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.skip-link{position:absolute;left:-1000px;top:8px;z-index:100;background:var(--accent);color:#171717;padding:8px 12px}
.skip-link:focus{left:8px}
.app-shell{min-height:100vh;display:grid;grid-template-columns:244px minmax(0,1fr)}
.sidebar{position:sticky;top:0;height:100vh;background:#121822;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:28px 16px 20px}
.brand{display:flex;align-items:center;gap:12px;padding:2px 12px 32px}
.brand-mark{display:grid;place-items:center;width:37px;height:37px;border:1px solid #a6864b;border-radius:10px;color:var(--accent);font-size:22px;background:#29261f}
.brand strong{display:block;font-size:16px;letter-spacing:.17em;line-height:1.15}
.brand small{display:block;color:var(--muted);font-size:10px;letter-spacing:.1em;margin-top:4px}
.side-label,.eyebrow{color:var(--accent);font-weight:800;font-size:10px;letter-spacing:.16em}
.side-label{color:#687585;padding:0 14px 10px}
.nav-list{display:grid;gap:5px}
.nav-link{display:flex;align-items:center;gap:12px;min-height:44px;padding:10px 14px;border-radius:9px;color:#a3aeba;font-weight:700}
.nav-link:hover,.nav-link.active{background:#252b34;color:var(--text)}
.nav-link.active{box-shadow:inset 3px 0 var(--accent)}
.nav-icon{display:inline-grid;place-items:center;width:22px;font-size:17px;color:var(--accent)}
.sidebar-bottom{margin-top:auto;padding:14px;color:#82909d;font-size:11px;display:flex;gap:9px;align-items:center;border-top:1px solid var(--line)}
.online-dot{width:7px;height:7px;border-radius:50%;background:var(--good);box-shadow:0 0 8px var(--good)}
.main-column{min-width:0}
.topbar{height:75px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 clamp(20px,4vw,56px);background:#111720}
.breadcrumb{display:flex;gap:12px;align-items:center;color:#7d8996;font-size:12px}
.breadcrumb strong{color:#cbd2da;font-weight:700}.breadcrumb-sep{color:#4c5865}
.account{display:flex;align-items:center;gap:10px;min-width:0}.account-name{font-size:12px;font-weight:700;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.avatar{width:32px;height:32px;flex:none;border-radius:50%;display:grid;place-items:center;background:#293748;color:var(--accent);font-size:13px;font-weight:800}
main{max-width:1440px;margin:0 auto;padding:34px clamp(20px,4vw,56px) 80px;min-height:calc(100vh - 75px)}
.page-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:24px}
.page-head h1{font-size:clamp(25px,3vw,34px);letter-spacing:-.035em;line-height:1.14;margin:8px 0 5px}
.page-head p{margin:0;color:var(--muted);font-size:13px}
.page-actions{display:flex;gap:10px;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:39px;border:1px solid var(--line);border-radius:8px;background:#242c37;color:var(--text);padding:8px 14px;font-weight:800;font-size:12px;white-space:nowrap}
.btn:hover{background:#303947}.btn.primary{border-color:#c99e55;background:var(--accent);color:#16191d}.btn.primary:hover{background:#e6ba70}.btn.ghost{background:transparent}.btn.danger{color:#f0b0b0;border-color:#75474e;background:#34252b}.btn:disabled{opacity:.45;cursor:not-allowed}
.grid{display:grid;gap:18px}.overview-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}.split{grid-template-columns:minmax(0,1.7fr) minmax(290px,.8fr)}.event-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.card,.stat{background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}
.card{padding:22px}.card-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.card-header h2,.card h2{font-size:16px;letter-spacing:-.02em;margin:0}.card-header a{font-size:11px;color:var(--accent);font-weight:800}
.stat{padding:18px 20px;position:relative;overflow:hidden}.stat:after{content:'✦';position:absolute;right:12px;top:3px;font-size:40px;color:#ffffff08}.stat-label{color:var(--muted);font-size:11px;font-weight:700}.stat-value{font-size:27px;font-weight:800;letter-spacing:-.04em;margin-top:6px;line-height:1.1}.stat-note{font-size:10px;color:#71808f;margin-top:6px}
.list{display:grid;gap:0}.list-row{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:13px 0;border-top:1px solid var(--line)}.list-row:first-child{border-top:0;padding-top:0}.list-row:last-child{padding-bottom:0}.row-main{min-width:0}.row-title{font-weight:800;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row-sub{font-size:11px;color:var(--muted);margin-top:3px}.row-right{text-align:right;white-space:nowrap}.pill{display:inline-flex;align-items:center;border:1px solid #4b5260;background:#303741;color:#ced5dc;border-radius:999px;padding:3px 8px;font-size:10px;font-weight:800;white-space:nowrap}.pill.planned{border-color:#695532;background:#302a22;color:#e3bd79}.pill.closed{border-color:#435869;background:#25333e;color:#adc7d9}.pill.good{border-color:#456456;background:#24372e;color:#a7d8b9}.pill.bad{border-color:#694950;background:#37272c;color:#e4aaaa}
.empty{display:grid;justify-items:center;text-align:center;gap:8px;padding:34px 20px;color:var(--muted);font-size:12px}.empty-symbol{font-size:28px;color:var(--accent)}.empty strong{font-size:14px;color:var(--text)}.empty p{margin:0;max-width:330px}.loading-state{display:flex;justify-content:center;align-items:center;gap:12px;padding:80px 10px;color:var(--muted)}.spinner{width:17px;height:17px;border:2px solid #596573;border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.event-card{padding:20px;display:flex;flex-direction:column;gap:15px}.event-card-top{display:flex;justify-content:space-between;gap:12px;align-items:start}.event-card h2{font-size:16px;line-height:1.35;margin:0}.event-date{font-size:12px;color:var(--muted)}.event-card-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid var(--line);padding-top:14px;margin-top:auto}.event-id{font-size:10px;color:#6e7b88}
.detail-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:20px}.detail-head .btn{margin-right:auto}.detail-head h2{font-size:19px;margin:0}.detail-summary{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.detail-summary span{background:#222b36;border:1px solid var(--line);border-radius:8px;padding:9px 12px;font-size:12px;color:#bdc8d3}.detail-summary strong{color:var(--text)}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:grid;gap:7px;min-width:0}.field>span{font-size:11px;color:#aab5c0;font-weight:800}.field input,.field select,.search{width:100%;min-height:40px;border:1px solid #46505c;border-radius:7px;background:#101720;color:var(--text);padding:8px 11px;outline:none}.field input:focus,.field select:focus,.search:focus{border-color:var(--accent)}.field small{font-size:10px;color:var(--muted)}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.full{grid-column:1/-1}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:10px}.table{width:100%;border-collapse:collapse;min-width:590px;font-size:12px}.table th{text-align:left;color:#8998a8;background:#1f2935;font-size:10px;letter-spacing:.04em;text-transform:uppercase}.table th,.table td{padding:11px 14px;border-bottom:1px solid var(--line);white-space:nowrap}.table tr:last-child td{border-bottom:0}.table td:first-child{font-weight:800}.table tbody tr:hover{background:#ffffff06}.table .num{text-align:right;font-variant-numeric:tabular-nums}.table .muted{color:var(--muted)}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px;flex-wrap:wrap}.toolbar .search{max-width:270px}.toolbar-note{color:var(--muted);font-size:11px}
.activity-wrap .table{min-width:max-content}.activity-wrap th:first-child,.activity-wrap td:first-child{position:sticky;left:0;z-index:2;background:#1b2430;min-width:160px}.activity-wrap th:first-child{z-index:3;background:#25313e}.activity-wrap th{position:sticky;top:0;z-index:1}.activity-wrap td:first-child{background:#171d27}.activity-wrap .points-positive{color:var(--good);font-weight:800}.activity-wrap .points-negative{color:var(--bad);font-weight:800}.activity-wrap .total-col{background:#272b2b;color:var(--accent);font-weight:800}
.note{font-size:11px;color:var(--muted);margin:11px 0 0}.notice{padding:12px 14px;border:1px solid #665837;border-radius:8px;background:#312a21;color:#e4ca96;font-size:12px}.error{border-color:#774a50;background:#34242a;color:#e9aaaa}.toast{position:fixed;right:24px;bottom:24px;z-index:20;max-width:min(380px,calc(100vw - 32px));padding:12px 16px;border-radius:9px;background:#304434;color:#dbf4df;border:1px solid #65836b;box-shadow:var(--shadow);font-weight:700;font-size:12px}.toast.error{background:#4a2e33;color:#ffdbdb;border-color:#95616b}
.mobile-nav{display:none}.login-card{max-width:560px;margin:8vh auto;background:var(--panel);border:1px solid var(--line);padding:36px;border-radius:14px;text-align:center}.login-card .brand-mark{margin:0 auto 18px;width:52px;height:52px;font-size:30px}.login-card h1{font-size:26px;margin:0 0 8px}.login-card p{color:var(--muted);font-size:13px;margin:0 auto 24px;max-width:390px}.login-card .btn{min-width:200px}
@media(max-width:1050px){.overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.split{grid-template-columns:1fr}}
@media(max-width:760px){.app-shell{display:block}.sidebar{display:none}.topbar{height:60px;padding:0 18px}.breadcrumb{font-size:11px}.account-name{max-width:100px}.avatar{width:28px;height:28px}main{padding:25px 16px 100px;min-height:calc(100vh - 60px)}.page-head{align-items:start;flex-direction:column;margin-bottom:20px}.page-head h1{font-size:27px}.page-actions{width:100%}.page-actions .btn{flex:1}.event-grid{grid-template-columns:1fr}.mobile-nav{position:fixed;display:flex;left:0;right:0;bottom:0;z-index:10;background:#141c26;border-top:1px solid var(--line);padding:5px 4px calc(5px + env(safe-area-inset-bottom));justify-content:space-around;box-shadow:0 -8px 24px #0005}.mobile-link{min-width:0;flex:1;display:grid;place-items:center;gap:1px;color:#9ca9b6;font-size:9px;font-weight:700;padding:4px 1px;border-radius:6px}.mobile-link .nav-icon{font-size:19px}.mobile-link.active{color:var(--accent);background:#2c2a26}.toast{bottom:75px;right:16px}.login-card{margin:7vh auto;padding:30px 22px}.card{padding:18px}}
@media(max-width:520px){.overview-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.stat{padding:13px}.stat-value{font-size:23px}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.detail-head .btn{margin-right:0}.toolbar .search{max-width:none}.card-header{align-items:start}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.spinner{animation:none}}

.list-row-link{display:flex;justify-content:space-between;align-items:center;gap:15px;width:100%}.list-row-link:hover .row-title{color:var(--accent)}

/* Grid items must shrink independently of their scrollable tables. */
.grid,.grid>*{min-width:0}.table-wrap{max-width:100%;min-width:0}
@media(max-width:1050px){.split{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){.topbar .account{min-width:0;gap:6px}.topbar .account-name{max-width:85px}.breadcrumb{gap:6px}.detail-summary>span{white-space:normal;overflow-wrap:anywhere}.page-actions .btn{min-width:0}.form-actions{flex-wrap:wrap}}

.login-card form{display:grid;gap:16px;max-width:360px;margin:24px auto 0}.login-card input{width:100%;min-height:46px;border:1px solid #46505c;border-radius:7px;background:#101720;color:var(--text);padding:10px 12px}.login-card form p{margin:0}.login-card button:disabled{opacity:.6}
.section-title{font-size:18px;margin:28px 0 12px}
.settings-card{margin-bottom:18px}
.settings-card h2{margin-bottom:16px}
.directory-toolbar{justify-content:flex-start}
.directory-toolbar .search{flex:1 1 240px;max-width:340px}
.directory-toolbar select{min-height:40px;border:1px solid #46505c;border-radius:7px;background:#101720;color:var(--text);padding:8px 11px;max-width:240px}
.directory-toolbar .toolbar-note{margin-left:auto}
.role-badges{display:flex;gap:5px;flex-wrap:wrap;min-width:180px}
.role-badge{display:inline-flex;border:1px solid var(--line);border-radius:999px;padding:2px 8px;background:#222b36;color:var(--text);font-size:11px}
.directory-table{min-width:680px}
.directory-table td{white-space:normal}
.accounts-table{min-width:830px}
.accounts-table td{white-space:normal}
.accounts-table select{max-width:160px;min-height:35px;border:1px solid #46505c;border-radius:7px;background:#101720;color:var(--text);padding:5px 8px;margin-right:6px}
.account-actions{display:flex;gap:6px;flex-wrap:wrap}
.btn.compact{min-height:33px;padding:5px 9px}
@media(max-width:760px){.directory-toolbar .search,.directory-toolbar select{max-width:none;flex:1 1 100%}.directory-toolbar .toolbar-note{margin-left:0}}
/* TeamHub-inspired light dashboard palette and spacing. */
:root{color-scheme:light;--bg:#f6f8f6;--panel:#fff;--panel2:#f0f5ef;--line:#dce8df;--text:#173b2b;--muted:#6d8377;--accent:#1c6a49;--accent-soft:#e4f1df;--good:#2d8054;--bad:#b75353;--blue:#4c8972;--shadow:0 12px 36px #173b2b0b}
body{background:var(--bg);color:var(--text);font-family:Inter,Manrope,"Segoe UI",Arial,sans-serif}
.sidebar{background:#fff;border-color:var(--line);padding:30px 18px 20px}
.brand{padding:4px 12px 34px}
.brand-mark{background:#e5f3d4;color:#145638;border:0;border-radius:13px}
.brand strong{color:#164932;letter-spacing:.06em}
.brand small{color:var(--muted)}
.side-label{color:#879c8f}
.nav-link{color:#6b8072;border-radius:11px}
.nav-link:hover,.nav-link.active{background:#e7f2e5;color:#145638}
.nav-link.active{box-shadow:none}
.nav-icon{color:#29805a}
.sidebar-bottom{color:var(--muted);border-color:var(--line)}
.online-dot{background:#43ad73;box-shadow:0 0 0 3px #ddf2e2}
.topbar{background:#fff;border-color:var(--line)}
.breadcrumb{color:#87998e}.breadcrumb strong{color:#214a35}.breadcrumb-sep{color:#b5c5b8}
.account-name{color:#244a35}
.avatar{background:#dcefcf;color:#245838}
main{max-width:1480px}
.page-head h1{font-size:clamp(29px,3vw,38px);letter-spacing:-.04em}
.page-head p{font-size:14px}
.eyebrow{color:#36855d}
.btn{border-color:#d5e4d8;background:#fff;color:#27513a;border-radius:10px;box-shadow:0 2px 5px #183d2807}
.btn:hover{background:#eaf4e9}
.btn.primary{background:#145f40;border-color:#145f40;color:#fff}
.btn.primary:hover{background:#0d4f34}
.btn.ghost{background:#f6faf6}
.btn.danger{background:#fff4f3;color:#ad4e4e;border-color:#f2d0cd}
.card,.stat{border-color:#e5eee6;box-shadow:var(--shadow);border-radius:18px}
.card{padding:24px}.stat{padding:22px 24px}
.stat:after{color:#26744d0c}
.stat-label{color:#617a69}.stat-value{color:#15482f}.stat-note{color:#859b89}
.card-header a{color:#227347}
.list-row,.event-card-footer{border-color:var(--line)}
.row-sub{color:var(--muted)}
.pill{background:#edf4ef;border-color:#dce8df;color:#4e735d}
.pill.planned{background:#f0f5dd;border-color:#dceab8;color:#617934}
.pill.closed{background:#e9f0ec;border-color:#d3e2d8;color:#557362}
.pill.good{background:#e6f6e9;border-color:#c7e8cf;color:#2b7950}
.pill.bad{background:#fff0ee;border-color:#efd0cc;color:#a94b49}
.empty{color:var(--muted)}.empty strong{color:var(--text)}
.detail-summary span{background:#edf5ed;border-color:var(--line);color:#54725e}.detail-summary strong{color:var(--text)}
.field>span{color:#456451}
.field input,.field select,.search,.directory-toolbar select,.accounts-table select{background:#fafdf9;border-color:#d9e7dc;color:#163e2b;border-radius:10px}
.field input:focus,.field select:focus,.search:focus{border-color:#36855d}
.table-wrap{border-color:var(--line);border-radius:12px}
.table th{background:#eff6ef;color:#63806a}
.table th,.table td{border-color:#e7eee7}
.table tbody tr:hover{background:#f5faf4}
.table .muted{color:var(--muted)}
.activity-wrap .table th:first-child,.activity-wrap th:first-child{background:#e8f3e9}
.activity-wrap td:first-child{background:#fff}
.activity-wrap .total-col{background:#f0f6e9;color:#1b6543}
.notice{background:#f4f6e8;border-color:#dce8ba;color:#5d7133}
.error{background:#fff1ef;border-color:#e8c4bd;color:#ae5150}
.toast{background:#e2f4e6;color:#1c643d;border-color:#a8d4b0}
.toast.error{background:#fff1ef;color:#a94f4d;border-color:#e9c2bd}
.mobile-nav{background:#fff;border-color:var(--line)}
.mobile-link{color:#728876}.mobile-link.active{color:#126240;background:#e6f2e4}
.login-mode .sidebar,.login-mode .topbar,.login-mode .mobile-nav{display:none}
.login-mode .app-shell{display:block}
.login-mode main{max-width:none;min-height:100vh;padding:clamp(16px,3vw,40px);display:grid;place-items:center}
.login-card{display:grid;grid-template-columns:minmax(280px,1fr) minmax(300px,1fr);max-width:1050px;width:100%;min-height:590px;margin:0;padding:0;background:#fff;border:1px solid #e0eae0;border-radius:26px;overflow:hidden;box-shadow:0 25px 70px #16482c20;text-align:left}
.login-welcome{position:relative;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;padding:clamp(32px,5vw,66px);background:radial-gradient(circle at 85% 10%,#5da47750,transparent 36%),radial-gradient(circle at 10% 75%,#a7d8a635,transparent 42%),linear-gradient(145deg,#0a3c28,#126342);color:#fff;overflow:hidden}
.login-welcome:before{content:"";position:absolute;width:460px;height:460px;border:1px solid #ffffff1c;border-radius:45% 55% 50% 50%;right:-180px;top:-170px;transform:rotate(28deg)}
.login-welcome .brand-mark{position:absolute;top:40px;left:clamp(32px,5vw,66px);width:50px;height:50px;background:#cde7b0;color:#145a3b;border-radius:15px}
.login-welcome .eyebrow{color:#bdddb9}
.login-welcome h1{font-size:clamp(34px,4vw,52px);line-height:1.1;margin:12px 0}
.login-welcome p{color:#d3ead9;font-size:15px;max-width:330px;margin:0}
.login-panel{display:flex;flex-direction:column;justify-content:center;padding:clamp(32px,6vw,78px)}
.login-panel .eyebrow{color:#367e56}
.login-panel h2{font-size:32px;margin:8px 0 12px}
.login-card form{max-width:none;width:100%;margin:16px 0 0;gap:15px}
.login-card input{background:#f8fbf8;color:#173b2b;border-color:#dbe8dd;border-radius:10px}
.login-card .btn{width:100%;min-height:45px}
.role-badge{background:#eef6ef;border-color:#d6e7d9;color:#26573b}
@media(max-width:760px){.login-card{grid-template-columns:1fr;min-height:0}.login-welcome{min-height:230px;padding:32px;justify-content:flex-end}.login-welcome .brand-mark{top:25px;left:32px;width:40px;height:40px}.login-welcome h1{font-size:29px}.login-panel{padding:32px}.mobile-link .nav-icon{color:#317a50}}
@media(max-width:520px){.login-mode main{padding:12px}.login-welcome{min-height:195px}.login-panel{padding:26px}}
.directory-role-list{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 18px}.role-chip{border-radius:999px;min-height:31px;padding:5px 10px;font-weight:700;background:#f0f7ef}
/* Reference accents: teal navigation/actions and lime metric captions. */
:root{--accent:#2fbda2;--accent-soft:#e9f6e5}
.nav-link:hover,.nav-link.active{background:#2fbda2;color:#fff}
.nav-link:hover .nav-icon,.nav-link.active .nav-icon{color:#fff}
.btn.primary{background:#2fbda2;border-color:#2fbda2;color:#fff}
.btn.primary:hover{background:#219c84}
.card-header a,.page-head .eyebrow{color:#239e81}
.stat{padding:0;display:flex;flex-direction:column;justify-content:space-between}
.stat-label{padding:17px 20px 0}
.stat-value{padding:0 20px 15px;margin-top:3px}
.stat-note{background:#e7f2d7;padding:9px 20px;margin:0;color:#647d59;border-radius:0 0 17px 17px}
.login-welcome{background:radial-gradient(circle at 70% 12%,#70ceaf66,transparent 36%),radial-gradient(circle at 10% 75%,#a7d8a635,transparent 42%),linear-gradient(145deg,#096a56,#21a486)}
.login-card .btn.primary{background:#2fbda2;border-color:#2fbda2}
.mobile-link.active{background:#e1f6ef;color:#12977d}
.role-chip:hover{background:#dff4e9;color:#16765c}
.accounts-table td input{width:150px;min-height:34px;border:1px solid #d9e7dc;border-radius:8px;background:#fafdf9;color:var(--text);padding:5px 8px;margin:0 6px 6px 0}.accounts-table td input[type=password]{width:160px}.accounts-table td .btn{margin-bottom:6px}
.login-language{margin:0 0 8px;max-width:180px}.login-language select{background:#f8fbf8;color:#173b2b;border-color:#dbe8dd}.login-panel .field>span{color:#4d715a}

/* Clearer separation and readable text while retaining the light TeamHub layout. */
:root{--bg:#e9efeb;--panel:#fff;--panel2:#eef3ef;--line:#acbdb2;--text:#152b20;--muted:#475f50;--accent:#006b50;--accent-soft:#deeee4;--good:#176338;--bad:#922b2b;--shadow:0 8px 24px #173b2b12}
body{color:var(--text)}
.sidebar,.topbar,.mobile-nav{border-color:#afc0b5}
.brand strong,.account-name,.breadcrumb strong{color:#163b27}
.brand small,.sidebar-bottom,.breadcrumb,.side-label{color:#4a6253}
.breadcrumb-sep{color:#657b6b}
.nav-link,.mobile-link{color:#344f3e;font-weight:650}
.nav-icon{color:#3c654c}
.nav-link.active,.nav-link.active:hover{background:#006b50;color:#fff}
.nav-link:hover{background:#dcebe1;color:#123d28}
.nav-link:hover .nav-icon{color:#123d28}
.nav-link.active .nav-icon{color:#fff}
.mobile-link.active{background:#006b50;color:#fff}
.mobile-link.active .nav-icon{color:#fff}
.page-head h1,.card h2,.login-panel h2,.stat-value{color:#142e20}
.page-head p,.row-sub,.note,.toolbar-note,.empty,.field small{color:#475f50}
.eyebrow,.card-header a,.page-head .eyebrow{color:#00664a}
.card,.stat{background:#fff;border:1px solid #b4c5b9;box-shadow:var(--shadow)}
.stat-label{color:#405b49}
.stat-note{background:#dcebbd;color:#34512b;border-top:1px solid #bdd39c}
.btn{background:#fff;color:#234531;border-color:#94ad9e;font-weight:700;box-shadow:0 1px 3px #173b2b0d}
.btn:hover,.btn.ghost:hover{background:#e3eee7;border-color:#597e66}
.btn.ghost{background:#f1f6f2;color:#234531}
.btn.primary,.login-card .btn.primary{background:#006b50;color:#fff;border-color:#005c44}
.btn.primary:hover,.login-card .btn.primary:hover{background:#00523d;border-color:#004633}
.btn.danger{color:#922b2b;border-color:#c28787;background:#fff1ef}
.field>span,.login-panel .field>span{color:#304d3a;font-weight:700}
.field input,.field select,.search,.directory-toolbar select,.accounts-table select,.accounts-table td input,.login-card input,.login-language select{background:#fff;color:#193e28;border:1px solid #879f90}
input::placeholder{color:#586e60;opacity:1}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #006b50;outline-offset:3px}
.field input:focus,.field select:focus,.search:focus{border-color:#006b50;box-shadow:0 0 0 2px #006b501a}
.table-wrap{border-color:#a5b9ac}
.table th{background:#dce8df;color:#304c39;font-weight:750}
.table th,.table td{border-color:#c9d8ce}
.table tbody tr:nth-child(even){background:#f2f6f3}
.table tbody tr:hover{background:#e5f0e8}
.activity-wrap .table th:first-child,.activity-wrap th:first-child{background:#dce8df}
.activity-wrap .total-col{background:#e2edcf;color:#254c2d}
.pill,.role-badge,.role-chip{background:#e5f0e8;color:#284b34;border-color:#a4bda9}
.role-chip:hover{background:#d2e7d9;color:#143c24;border-color:#6e967b}
.pill.planned{background:#edf1d4;color:#475c1f;border-color:#acbd7c}
.pill.closed{background:#e4ebe7;color:#405b4b;border-color:#a7b9af}
.pill.good{background:#e1f2e4;color:#225b32;border-color:#8db999}
.pill.bad,.error,.toast.error{background:#fff0ee;color:#922b2b;border-color:#c68a84}
.detail-summary span{background:#e2ede5;color:#36533f;border-color:#acbdb2}
.notice{background:#edf2d8;color:#425823;border-color:#b2c389}
.login-card{border-color:#a9c0b1;box-shadow:0 25px 70px #16482c26}
.login-welcome{background:radial-gradient(circle at 70% 12%,#54ab8e33,transparent 36%),linear-gradient(145deg,#064936,#08735a)}
.login-welcome p,.login-welcome .eyebrow{color:#e1f2e6}
/* Compact role browsing and the dedicated character register. */
.directory-role-details{margin:2px 0 16px}
.directory-role-details>summary{display:inline-flex;align-items:center;gap:7px;cursor:pointer;color:#234531;font-size:12px;font-weight:750;list-style:none;padding:7px 10px;border:1px solid #a4bda9;border-radius:9px;background:#e5f0e8}
.directory-role-details>summary::-webkit-details-marker,.role-more>summary::-webkit-details-marker{display:none}
.directory-role-details>summary:before{content:"▸";font-size:12px}
.directory-role-details[open]>summary:before{content:"▾"}
.directory-role-details .directory-role-list{margin:12px 0 0}
.role-chip.active,.role-chip[aria-pressed=true]{background:#006b50;color:#fff;border-color:#005c44}
.role-chip.active:hover,.role-chip[aria-pressed=true]:hover{background:#00523d;color:#fff}
.role-more{display:inline-block;min-width:0}
.role-more>summary{display:inline-flex;cursor:pointer;align-items:center;border:1px solid #a4bda9;border-radius:999px;background:#eef4ef;color:#24583b;padding:2px 8px;font-size:11px;font-weight:750;list-style:none}
.role-more[open]{flex-basis:100%}
.role-badges-expanded{margin-top:6px}
.visually-hidden{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}
.characters-toolbar{justify-content:flex-start}
.characters-toolbar .search{flex:1 1 260px;max-width:400px}
.characters-toolbar select{min-height:40px;border:1px solid #879f90;border-radius:10px;background:#fff;color:#193e28;padding:8px 11px}
.characters-toolbar .toolbar-note{margin-left:auto}
.characters-table{min-width:920px}
.characters-table td{white-space:normal}
.characters-table td:first-child{min-width:150px}
@media(max-width:760px){.characters-toolbar .search,.characters-toolbar select{max-width:none;flex:1 1 100%}.characters-toolbar .toolbar-note{margin-left:0}.mobile-link{font-size:8px}}
/* Market-style collapsible role grid. */
.directory-role-details{border:1px solid #68797e;border-radius:14px;background:#171b21;padding:16px 20px;color:#d9e5f5}
.directory-role-details>summary{border:0;background:transparent;color:#5d9cff;font-size:17px;padding:0;line-height:1.2}
.directory-role-details>summary:before{color:#6ba4ff}
.directory-role-details .directory-role-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:22px 0 0}
.directory-role-list .role-chip{display:flex;flex-direction:column;align-items:stretch;gap:8px;white-space:normal;text-align:left;background:transparent;border:0;box-shadow:none;padding:0;color:#c6d4eb;border-radius:0}
.directory-role-list .role-chip:hover{background:transparent;color:#fff;border:0}
.role-chip .role-name{font-weight:500;font-size:13px;line-height:1.3;min-height:18px}
.role-chip .role-count{display:flex;align-items:center;min-height:48px;border:1px solid #405063;border-radius:11px;background:#0e131b;padding:9px 14px;color:#fff;font-size:15px;font-weight:600}
.directory-role-list .role-chip.active,.directory-role-list .role-chip[aria-pressed=true]{background:transparent;color:#9cc3ff;border:0}
.role-chip.active .role-count,.role-chip[aria-pressed=true] .role-count{border-color:#6ba4ff;background:#193453;color:#fff}
.role-chip:hover .role-count{border-color:#6ba4ff}
.role-badges{align-items:flex-start}
.page-head .eyebrow{display:none}
@media(max-width:900px){.directory-role-details .directory-role-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.directory-role-details .directory-role-list{grid-template-columns:1fr}.directory-role-details{padding:14px}}
/* Owner and pilot menus in both registers. */
.link-menu{min-width:170px}
.link-menu>summary{list-style:none;display:inline-flex;align-items:center;cursor:pointer;border:1px solid #8ea997;background:#edf5ee;border-radius:8px;padding:6px 9px;color:#164b31;font-weight:700;font-size:11px}
.link-menu>summary::-webkit-details-marker{display:none}
.link-menu>summary:after{content:"▾";margin-left:7px}
.link-menu[open]>summary:after{content:"▴"}
.link-menu-content{display:grid;gap:9px;min-width:245px;max-width:330px;margin-top:9px;padding:11px;border:1px solid #b4c5b9;border-radius:10px;background:#fff;box-shadow:0 8px 20px #173b2b14}
.link-menu .search{width:100%;max-width:none;min-height:35px}
.link-item{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;white-space:normal}
.link-item span{overflow-wrap:anywhere}
.link-menu-actions{display:flex;flex-wrap:wrap;gap:6px}
.link-menu-actions .btn{white-space:normal;min-height:31px}
.sort-head{appearance:none;border:0;background:transparent;color:inherit;font:inherit;font-weight:inherit;text-align:inherit;letter-spacing:inherit;text-transform:inherit;padding:0;cursor:pointer}
.sort-head:hover{text-decoration:underline}
th[aria-sort=ascending] .sort-head:after{content:" ↑";color:#006b50}
th[aria-sort=descending] .sort-head:after{content:" ↓";color:#006b50}
.characters-table,.directory-table{min-width:1050px}
.characters-table td,.directory-table td{vertical-align:top}
.page-head.actions-only{justify-content:flex-end;align-items:center}.page-head.actions-only[hidden]{display:none}
.breadcrumb>span{display:none}

/* BDM Planner visual system: graphite surfaces with emerald accents. */
:root{color-scheme:dark;--bg:#101115;--panel:#15161b;--panel2:#1d1f26;--line:#30323b;--text:#f4f5f7;--muted:#a4adbb;--accent:#54d6a0;--accent-soft:#17362b;--good:#69d7aa;--bad:#ff8c92;--blue:#54d6a0;--shadow:0 8px 24px #0002}
html,body{background:#101115;color:var(--text);font-family:"Segoe UI Variable","Segoe UI",Arial,sans-serif;font-size:14px;line-height:1.45}
body{scrollbar-color:#414650 #15161b}*{scrollbar-width:thin}
.app-shell{grid-template-columns:260px minmax(0,1fr)}
.sidebar{background:#0c0c0f;border-color:#24262d;padding:24px 18px 18px}
.brand{padding:4px 10px 28px;gap:12px}.brand-mark{background:#183b2c;color:#70d7a7;border:1px solid #3f8c68;border-radius:9px;box-shadow:none}
.brand strong{color:#f4f5f7;letter-spacing:.02em}.brand small,.sidebar-bottom,.side-label{color:#929aa8}.side-label{font-size:10px;letter-spacing:.1em}
.nav-list{gap:6px}.nav-link{min-height:44px;padding:11px 12px;border:1px solid transparent;border-radius:8px;color:#aeb5c0;font-weight:600;font-size:13px}
.nav-icon{color:#8d98a6}.nav-link:hover{background:#17181d;color:#fff}.nav-link:hover .nav-icon{color:#b9c2ce}
.nav-link.active,.nav-link.active:hover{border-color:#345244;background:#1d2923;color:#fff;box-shadow:inset 3px 0 var(--accent)}.nav-link.active .nav-icon{color:var(--accent)}
.sidebar-bottom{border-color:#24262d;font-size:11px}.online-dot{background:var(--accent);box-shadow:0 0 0 3px #54d6a015}
.topbar{height:70px;background:#101115;border-color:#282a31;padding:0 30px}.breadcrumb,.breadcrumb strong{color:#f4f5f7;font-size:17px;font-weight:600}.account-name{color:#e6e9ee;font-size:12px}.avatar{background:#183b2c;border:1px solid #3f8c68;color:#70d7a7;border-radius:50%}
main{max-width:1600px;padding:28px 30px 48px;background:#101115}.page-head{margin-bottom:20px}.eyebrow,.card-header a{color:var(--accent)}
.card,.stat{background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:none}.card{padding:20px}.card h2,.login-panel h2,.stat-value{color:var(--text)}.card h2{font-size:16px;font-weight:600}.card-header{margin-bottom:18px}
.stat{padding:18px 20px;gap:6px}.stat:after{display:none}.stat-label{padding:0;color:var(--muted);font-weight:500}.stat-value{padding:0;margin:0;font-size:30px;font-weight:650}.stat-note{padding:0;margin:0;background:transparent;border:0;color:var(--accent);font-size:11px;border-radius:0}
.btn{background:#22242c;border:1px solid #3b3f49;color:#d6dce5;border-radius:7px;min-height:38px;font-size:12px;font-weight:600;box-shadow:none}.btn:hover,.btn.ghost:hover{background:#2a2e37;border-color:#626b78;color:#fff}.btn.ghost{background:transparent;color:#b6bfcc;border-color:#343842}
.btn.primary,.login-card .btn.primary{background:#54d6a0;border-color:#54d6a0;color:#09271b}.btn.primary:hover,.login-card .btn.primary:hover{background:#7ce5b8;border-color:#7ce5b8;color:#09271b}.btn.danger{background:#321d23;border-color:#743f49;color:#ff9aa1}
.row-sub,.note,.toolbar-note,.empty,.field small,.event-date,.event-id{color:var(--muted)}.empty strong{color:var(--text)}.empty-symbol{color:var(--accent)}.row-title{font-weight:600}.list-row,.event-card-footer{border-color:var(--line)}
.field>span,.login-panel .field>span{color:#b9c1ce;font-weight:500;font-size:12px}.field input,.field select,.search,.directory-toolbar select,.characters-toolbar select,.accounts-table select,.accounts-table td input,.login-card input,.login-language select{background:#0e1219;color:#f4f5f7;border:1px solid #3b424f;border-radius:9px;min-height:40px;font-size:13px}
input::placeholder{color:#8f99a9;opacity:1}input,select{accent-color:var(--accent)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.field input:focus,.field select:focus,.search:focus{border-color:var(--accent);box-shadow:0 0 0 2px #54d6a018}
.table-wrap{border-color:var(--line);border-radius:9px}.table{font-size:12px}.table th{background:#1d1f26;color:#b4bdcc;font-size:10px;font-weight:600;letter-spacing:.04em}.table th,.table td{border-color:#2d3039;padding:12px 14px}.table tbody tr{background:#17191f}.table tbody tr:nth-child(even){background:#1b1d24}.table tbody tr:hover{background:#242a2e}.table td:first-child{font-weight:600}.table .muted{color:var(--muted)}.sort-head:hover{color:#fff;text-decoration:none}th[aria-sort=ascending] .sort-head:after,th[aria-sort=descending] .sort-head:after{color:var(--accent)}
.activity-wrap .table th:first-child,.activity-wrap th:first-child{background:#1d1f26}.activity-wrap td:first-child{background:#17191f}.activity-wrap .total-col{background:#193026;color:#88e6bc}
.pill,.role-badge{background:#23262f;border:1px solid #3c414d;color:#c1cad7;font-weight:500}.pill.planned,.pill.good{background:#173027;border-color:#34785f;color:#83e3b7}.pill.closed{background:#23252d;border-color:#414652;color:#b7c0ce}.pill.bad,.error,.toast.error{background:#321e24;border-color:#7c454d;color:#ff9da4}.detail-summary span{background:#1d1f26;color:#bac3d0;border-color:var(--line)}.detail-summary strong{color:var(--text)}.notice{background:#2c271b;border-color:#6b5a35;color:#ebd08f}.notice.error{background:#321e24;border-color:#7c454d;color:#ff9da4}.toast{background:#17372a;border-color:#367d5b;color:#b5f1d2;box-shadow:0 8px 30px #0005}
.directory-role-details{background:#15161b;border:1px solid #30323b;border-radius:12px;padding:16px 18px}.directory-role-details>summary,.directory-role-details>summary:before{color:var(--accent)}.directory-role-details>summary{font-size:15px;font-weight:600}.directory-role-list .role-chip{color:#b9c2cf}.directory-role-list .role-chip:hover{color:#fff}.role-chip .role-count{background:#0e1219;border-color:#3b424f;color:#f4f5f7;border-radius:9px;min-height:44px;font-weight:500}.directory-role-list .role-chip.active,.directory-role-list .role-chip[aria-pressed=true]{color:#91e8bd}.role-chip.active .role-count,.role-chip[aria-pressed=true] .role-count{background:#17362b;border-color:#54d6a0;color:#c9f7df}.role-chip:hover .role-count{border-color:#54d6a0}
.link-menu>summary{background:#22242c;border-color:#3b424f;color:#bdebd3;border-radius:7px;font-weight:600}.link-menu-content{background:#15161b;border-color:#414751;color:var(--text);box-shadow:0 8px 20px #0005}
.login-card{background:#15161b;border-color:#30323b;border-radius:16px;box-shadow:0 25px 70px #0006;min-height:550px;max-width:960px}.login-welcome{background:radial-gradient(circle at 20% 90%,#54d6a014,transparent 55%),#111b17;border-right:1px solid #2d4136;padding:48px}.login-welcome:before{border-color:#54d6a012}.login-welcome .brand-mark{background:#183b2c;border:1px solid #3f8c68;color:#70d7a7;border-radius:10px;top:40px;left:48px}.login-welcome .eyebrow{color:#83d9ac}.login-welcome h1{color:#f4f5f7;font-size:40px;font-weight:600;letter-spacing:-.03em}.login-welcome p{color:#a9bdb1;font-size:14px}.login-panel{padding:48px}.login-panel .eyebrow{color:var(--accent)}.login-panel h2{font-size:28px;font-weight:600}.login-language select{min-height:38px}
.mobile-nav{background:#0c0c0f;border-color:#30323b;box-shadow:0 -8px 24px #0004}.mobile-link{color:#9da8b7;font-weight:500}.mobile-link .nav-icon{color:#9da8b7}.mobile-link.active{background:#17362b;color:#91e8bd}.mobile-link.active .nav-icon{color:var(--accent)}
@media(max-width:1050px){.app-shell{grid-template-columns:220px minmax(0,1fr)}main{padding:24px}.sidebar{padding-left:12px;padding-right:12px}}
@media(max-width:760px){.app-shell{display:block}.topbar{height:64px;padding:0 16px}.breadcrumb,.breadcrumb strong{font-size:15px}main{padding:22px 16px 100px}.card{padding:16px}.stat{padding:16px}.stat-value{font-size:25px}.login-card{min-height:0}.login-welcome{padding:30px;border-right:0;border-bottom:1px solid #2d4136}.login-welcome .brand-mark{left:30px;top:24px}.login-welcome h1{font-size:29px}.login-panel{padding:30px}}
@media(max-width:520px){.stat{padding:14px}.stat-label,.stat-note{font-size:10px}.stat-value{font-size:24px}.login-panel{padding:26px}}
/* Compact roles and focused owner/pilot dialog for the graphite theme. */
.directory-role-details .directory-role-list{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0}
.directory-role-list .role-chip,.directory-role-list .role-chip:hover{display:inline-flex;align-items:center;white-space:normal;text-align:left;min-height:30px;padding:5px 11px;border:1px solid #46544d;border-radius:999px;background:#242d29;color:#d2e8dc;font-size:11px;font-weight:600;box-shadow:none}
.directory-role-list .role-chip:hover{border-color:#54d6a0;background:#2b3a32;color:#fff}
.directory-role-list .role-chip.active,.directory-role-list .role-chip[aria-pressed=true]{border:1px solid #54d6a0;background:#194333;color:#d7ffe8}
.directory-role-list .role-chip.active:hover{background:#20563f;color:#fff}
.link-action-menu{min-width:35px;position:relative}
.link-action-menu>summary{display:grid;place-items:center;list-style:none;width:32px;height:32px;border:1px solid #414751;border-radius:7px;background:#22242c;color:#d9eee1;cursor:pointer;font-size:22px;line-height:1}
.link-action-menu>summary::-webkit-details-marker{display:none}
.link-action-menu[open]>summary{border-color:#54d6a0}
.link-action-item{display:block;white-space:nowrap;text-align:left;margin:5px 0 0;padding:7px 10px;border:1px solid #414751;border-radius:7px;background:#22242c;color:#e4eee7;font-size:11px}
.link-action-item:hover{background:#2a4637}
.action-cell{width:48px}
.link-dialog{width:min(520px,calc(100vw - 24px));max-height:min(85vh,760px);padding:22px;border:1px solid #4a5950;border-radius:14px;background:#171b1a;color:#f4f5f7;box-shadow:0 28px 90px #0009}
.link-dialog::backdrop{background:#020504bd}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}
.dialog-head h2{font-size:19px;margin:0;color:#f4f5f7}
.dialog-close{display:grid;place-items:center;border:1px solid #45564b;border-radius:7px;background:#222b26;color:#e5efe8;width:32px;height:32px;font-size:21px;line-height:1}
.link-dialog>.search{display:block;width:100%;max-width:none;background:#101511;color:#f4f5f7;border-color:#45564b}
.current-links{display:grid;gap:8px;margin:20px 0}
.current-links h3{font-size:15px;margin:0 0 2px;color:#f4f5f7}
.current-links h4{font-size:12px;margin:12px 0 0;color:#a4adbb;font-weight:600}
.current-link-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:43px;padding:8px 10px;border:1px solid #363f39;border-radius:8px;background:#202723}
.current-link-copy{display:flex;align-items:center;gap:10px;min-width:0}
.current-link-copy strong{font-size:12px;overflow-wrap:anywhere}
.link-kind{font-size:10px;color:#7ddbb0;min-width:42px}
.link-order-actions{display:flex;gap:4px;flex:none}
.icon-action{display:grid;place-items:center;min-width:27px;height:27px;padding:0;border:1px solid #46564b;border-radius:6px;background:#28332b;color:#d3f4df;font-size:14px}
.icon-action:hover{background:#315b40}
.icon-action.danger{color:#ffc2c3;border-color:#715254}
.icon-action.danger:hover{background:#5a3034}
.icon-action:disabled{opacity:.35;cursor:default}
.dialog-link-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dialog-link-actions .btn{min-width:0;white-space:normal;line-height:1.2}
@media(max-width:480px){.link-dialog{padding:16px}.dialog-link-actions{gap:8px}}
.priority-note{font-size:11px;color:#9cad9f;margin:0 0 3px}

.dialog-link-actions{margin-top:12px}

.confirm-link-dialog{max-width:360px}.confirm-link-dialog h2{font-size:18px;margin:0 0 20px}


/* Sidebar identity, Lucide controls, and unclipped link menu. */
.sidebar-account{margin:0 2px 24px;padding:11px 9px;border:1px solid #303d36;border-radius:10px;background:#17221c}
.sidebar-account .account-copy{min-width:0;flex:1}
.sidebar-account .row-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-logout,.icon-action{display:inline-grid;place-items:center;flex:none;border:0;background:transparent;color:#b7c9bd;padding:5px;border-radius:7px;min-width:30px;height:30px;cursor:pointer}
.account-logout:hover,.icon-action:hover{background:#2a3d31;color:#eafff1}
.account-logout svg,.icon-action svg{width:18px;height:18px;stroke-width:1.8}
.icon-action.danger{border:0;background:transparent;color:#ffa7aa}
.icon-action.danger:hover{background:#503033;color:#fff}
.icon-action:disabled{opacity:.3;cursor:default}
.icon-action:disabled:hover{background:transparent}
.nav-icon svg{width:18px;height:18px;stroke-width:1.8}
.brand-mark svg,.empty-symbol svg{width:21px;height:21px}
.login-welcome .brand-mark svg{width:25px;height:25px}
.mobile-account{display:none}
main{min-height:100vh}
.link-action-popup{position:fixed;z-index:1000;min-width:190px;padding:5px;border:1px solid #47594d;border-radius:9px;background:#202821;box-shadow:0 12px 32px #0009}
.link-action-popup .link-action-item{display:block;width:100%;margin:0;border:0;background:transparent;color:#f0f7f1;border-radius:6px;text-align:left;padding:9px 12px;font-size:12px}
.link-action-popup .link-action-item:hover,.link-action-popup .link-action-item:focus-visible{background:#315443}
.action-cell .action-trigger{margin:auto}
.link-dialog .dialog-head h2{overflow-wrap:anywhere}
.link-dialog>.search,.link-dialog>input[type=search]{display:block;width:100%;max-width:none;background:#101511;color:#f4f5f7;border:1px solid #45564b;border-radius:9px;min-height:42px;padding:9px 12px}
.link-dialog .current-links{display:grid;gap:18px;margin:20px 0 0}
.link-section{display:grid;gap:8px}
.link-section h3{font-size:14px;font-weight:600;margin:0;color:#f4f5f7}
.link-section .muted{font-size:12px}
.link-section .current-link-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:43px;padding:7px 10px;border:1px solid #363f39;border-radius:8px;background:#202723}
.link-section .current-link-row strong{min-width:0;font-size:12px;font-weight:600;overflow-wrap:anywhere}
.link-order-actions{display:flex;align-items:center;gap:1px;flex:none}
.link-dialog .dialog-close{width:31px;height:31px;min-width:31px}
.dialog-link-actions{margin-top:12px}
@media(max-width:760px){
  .mobile-account{display:flex;min-height:60px;padding:10px 16px;border-bottom:1px solid #30323b;background:#0c0c0f}
  .mobile-account .account-copy{min-width:0;flex:1}
  .mobile-account .row-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  main{min-height:calc(100vh - 60px);padding-top:20px}
  .login-mode .mobile-account{display:none}
}

.sort-head{display:inline-flex;align-items:center;gap:5px}
.sort-head svg{width:12px;height:12px;color:var(--accent);flex:none}
th[aria-sort=ascending] .sort-head:after,th[aria-sort=descending] .sort-head:after{content:none}

.page-head h1{color:var(--text);font-size:28px;font-weight:600;letter-spacing:-.025em;margin:0}.page-head{align-items:center;justify-content:space-between}

/* Tables provide the section boundary; avoid a second enclosing card frame. */
.card:has(.table-wrap){border:0;background:transparent;box-shadow:none;padding:0}


/* Read-only weekly event calendar. */
.weekly-calendar{border:1px solid #343a3b;border-radius:15px;background:#15191a;overflow:hidden;box-shadow:0 14px 38px #0002}
.calendar-placeholder{display:inline-flex;align-items:center;min-height:29px;padding:4px 11px;border:1px solid #6a5937;border-radius:999px;background:#322a1d;color:#f6d994;font-size:11px;font-weight:700;letter-spacing:.02em}
.calendar-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px;border-bottom:1px solid #343a3b;background:#1b201e}
.calendar-range{font-size:17px;font-weight:650;color:#f1f5ef;text-align:center}
.calendar-nav-button,.calendar-today{gap:5px;min-width:0;white-space:normal}
.calendar-nav-button svg{width:16px;height:16px;flex:none}
.calendar-day-header,.calendar-layout{display:grid;grid-template-columns:56px repeat(7,minmax(0,1fr))}
.calendar-day-header{background:#1b201e;border-bottom:1px solid #343a3b}
.calendar-corner{display:flex;align-items:center;justify-content:center;color:#90a599;font-size:10px;font-weight:700}
.calendar-day-heading{display:flex;align-items:baseline;justify-content:center;gap:7px;min-width:0;padding:13px 4px;border-left:1px solid #343a3b;color:#a8bbb0;text-transform:capitalize;font-size:12px}
.calendar-day-heading strong{color:#eef4ee;font-size:15px}
.calendar-day-heading.is-today strong{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#54d6a0;color:#0b2018}
.calendar-day-picker{display:none}
.calendar-layout{background:#15191a}
.calendar-time-axis{height:896px;position:relative;background:#171d1a}
.calendar-time-label{position:absolute;right:8px;transform:translateY(-50%);font-size:10px;letter-spacing:.01em;color:#96a79d;font-variant-numeric:tabular-nums}
.calendar-time-label:first-child{transform:translateY(2px)}
.calendar-time-label:last-child{transform:translateY(-100%)}
.calendar-day{height:896px;min-width:0;position:relative;border-left:1px solid #343a3b;background:repeating-linear-gradient(to bottom,transparent 0,transparent 63px,#343a3b 63px,#343a3b 64px)}
.calendar-day:nth-child(even){background-color:#191e1c}
.calendar-event{position:absolute;z-index:1;min-width:0;min-height:48px;display:flex;flex-direction:column;justify-content:space-between;gap:3px;padding:7px 7px 8px;border:1px solid var(--calendar-border);border-left:3px solid var(--calendar-strong);border-radius:9px;background:var(--calendar-bg);color:#f8fbf8;overflow:hidden;box-shadow:0 4px 12px #0003}
.calendar-event strong{font-size:12px;font-weight:700;line-height:1.16;overflow-wrap:anywhere}
.calendar-event-time{font-size:11px;line-height:1.2;font-weight:700;color:#f1fff4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.calendar-event-node{--calendar-bg:#214735;--calendar-border:#418f67;--calendar-strong:#71e4a4}
.calendar-event-meeting{--calendar-bg:#3a3152;--calendar-border:#7965b2;--calendar-strong:#bca9f6}
.calendar-event-arena{--calendar-bg:#493827;--calendar-border:#ad8247;--calendar-strong:#f5c978}
.calendar-event-boss{--calendar-bg:#493039;--calendar-border:#aa6073;--calendar-strong:#f9a5b6}
.calendar-event-castle{--calendar-bg:#263f53;--calendar-border:#508cb5;--calendar-strong:#9bd5fc}
.calendar-event-coop{--calendar-bg:#244249;--calendar-border:#4b9ba7;--calendar-strong:#96e4ec}
.calendar-event-dark{--calendar-bg:#383449;--calendar-border:#8172a2;--calendar-strong:#c5b9f4}
@media(max-width:1100px){
 .calendar-controls{padding:12px;gap:7px}
 .calendar-nav-button{font-size:11px;padding:7px}
 .calendar-range{font-size:14px}
 .calendar-day-header,.calendar-layout{grid-template-columns:49px repeat(7,minmax(0,1fr))}
 .calendar-event{padding:6px 5px}
 .calendar-event strong{font-size:11px}
 .calendar-event-time{font-size:10px}
}
@media(max-width:760px){
 .weekly-calendar{border-radius:12px}
 .calendar-controls{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;padding:12px}
 .calendar-range{grid-column:1/-1;grid-row:1;font-size:15px}
 .calendar-nav-button:first-child{grid-column:1;grid-row:2}
 .calendar-today{grid-column:2;grid-row:2}
 .calendar-nav-button:last-child{grid-column:3;grid-row:2}
 .calendar-nav-button{justify-content:center;font-size:0;padding:7px;min-height:36px}
 .calendar-nav-button svg{width:20px;height:20px}
 .calendar-today{font-size:11px;padding:6px 9px;min-height:36px}
 .calendar-day-header{display:none}
 .calendar-day-picker{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;padding:8px 6px;background:#1b201e;border-bottom:1px solid #343a3b}
 .calendar-day-button{display:grid;justify-items:center;gap:2px;min-width:0;min-height:49px;padding:5px 1px;border:1px solid transparent;border-radius:8px;background:transparent;color:#a8bbb0;font-size:10px;text-transform:capitalize}
 .calendar-day-button strong{font-size:14px;color:#eaf2ea}
 .calendar-day-button[aria-pressed=true]{border-color:#55be92;background:#1e4734;color:#c4f5d8}
 .calendar-layout{grid-template-columns:48px minmax(0,1fr)}
 .calendar-day{display:none}
 .calendar-day.is-selected{display:block}
 .calendar-event{padding:8px 10px;min-height:48px}
 .calendar-event strong{font-size:14px;line-height:1.18}
 .calendar-event-time{font-size:12px}
}
/* Keep schedule times readable and navigation icons unframed. */
.calendar-event-time{font-size:12px}
.calendar-nav-button{border:0;background:transparent}
@media(max-width:1100px){.calendar-event-time{font-size:12px}}
@media(max-width:760px){.calendar-event-time{font-size:14px}.calendar-time-label{font-size:11px}}
.schedule-dialog{width:min(850px,calc(100vw - 28px));max-height:88dvh;padding:22px;border:1px solid #42494a;border-radius:16px;background:#181c1e;color:#f1f5f2;overflow:auto}
.schedule-dialog::backdrop{background:#000b}.schedule-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.schedule-dialog h2{font-size:22px;margin:0}.schedule-dialog textarea{min-height:85px;resize:vertical;width:100%}.schedule-check{display:flex;align-items:center;gap:10px;min-height:38px}.schedule-check input{width:18px;height:18px}.schedule-type-list{margin-top:15px}.schedule-type-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #353c3e}.schedule-session-time{font-size:17px;margin-bottom:16px}.schedule-description{white-space:pre-wrap}.schedule-image{width:100%;max-height:180px;object-fit:cover;border-radius:9px}.schedule-submit{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:18px 0}.schedule-submit .field{flex:1;min-width:160px}.schedule-event{cursor:pointer;text-align:left;font-family:inherit;min-height:30px;padding:4px 6px;justify-content:start;gap:3px}.schedule-event:focus-visible{outline:2px solid #fff;outline-offset:1px}.schedule-event strong{font-size:12px}.schedule-event .calendar-event-time{font-size:12px}.schedule-event-status{font-size:10px;opacity:.9}.schedule-event.is-cancelled{opacity:.45;text-decoration:line-through}.calendar-layout{height:var(--calendar-height,1536px)}.calendar-time-axis{height:100%}.schedule-rules{margin-top:20px}.schedule-rules summary{cursor:pointer;padding:12px 0;font-weight:700}
@media(max-width:760px){.schedule-dialog{padding:16px}.schedule-event strong{font-size:14px}.schedule-event .calendar-event-time{font-size:13px}.schedule-event-status{font-size:11px}.schedule-type-row{font-size:13px}.schedule-dialog .form-grid{grid-template-columns:1fr}}
.calendar-layout{max-height:72dvh;overflow-y:auto;overscroll-behavior:contain}.calendar-day{background-size:100% 120px}.schedule-event .calendar-event-time{line-height:1.1}.schedule-event strong{line-height:1.1}@media(max-width:760px){.schedule-event strong{font-size:13px}.schedule-event .calendar-event-time{font-size:12px}.calendar-layout{max-height:65dvh}}
.calendar-day{background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 119px,#343a3b 119px,#343a3b 120px)}
@media(max-width:760px){.page-head:has(+ .weekly-calendar) .page-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.page-head:has(+ .weekly-calendar) .page-actions .btn{min-width:0;white-space:normal;line-height:1.25;padding:9px 8px}.page-head:has(+ .weekly-calendar) .page-actions select{width:100%;min-width:0}}
.files-toolbar{display:flex;gap:12px;justify-content:space-between;margin:20px 0}.files-toolbar input{max-width:360px;min-width:0}.files-assignments{margin-bottom:24px}.files-assignments summary{cursor:pointer;color:var(--accent,#57b887);padding:12px 0;font-weight:600}.files-assignments .form-grid{margin-top:12px}.file-preview{width:112px;height:64px;object-fit:cover;border-radius:5px;background:#161b19}.file-name{max-width:300px;overflow-wrap:anywhere}.file-name a{color:inherit}@media(max-width:600px){.files-toolbar{flex-wrap:wrap}.files-toolbar input{flex:1}.file-preview{width:76px;height:48px}.files-assignments .form-grid{grid-template-columns:1fr}}

/* One scroll surface keeps weekday headings aligned with their columns. */
.calendar-scroll{max-height:72dvh;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.calendar-scroll .calendar-day-header{position:sticky;top:0;z-index:5}
.calendar-scroll .calendar-layout{position:relative;max-height:none;overflow:visible;height:var(--calendar-height)}
.calendar-scroll .calendar-day{background-image:none}
.calendar-gap{position:absolute;left:0;right:0;z-index:3;height:26px;display:flex;align-items:center;justify-content:center;gap:6px;padding:0 6px;border:0;border-top:1px solid #39463f;border-bottom:1px solid #39463f;background:#222d27;color:#bbd0c2;font:inherit;font-size:11px;cursor:pointer}
.calendar-gap svg{width:14px;height:14px}.calendar-gap:focus-visible{outline:2px solid #71e4a4;outline-offset:-2px}
.calendar-scroll .schedule-event{min-height:24px;padding:2px 4px;gap:1px;border-radius:5px}
.calendar-scroll .schedule-event strong{font-size:11px;line-height:1.05}
.calendar-scroll .schedule-event .calendar-event-time{font-size:10px;line-height:1.05}
@media(max-width:760px){.calendar-scroll{max-height:65dvh}.calendar-scroll .schedule-event strong{font-size:12px}.calendar-scroll .schedule-event .calendar-event-time{font-size:11px}}

/* Compact controls and top-layer menus shared by every section. */
.guild-select{position:relative;display:inline-block;width:var(--select-width,180px);max-width:100%;min-width:0;justify-self:start;flex:0 1 var(--select-width,180px);vertical-align:middle}
.guild-select>select[hidden]{display:none!important}
.guild-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;min-width:0;min-height:40px;padding:9px 12px;border:1px solid #414a47;border-radius:8px;background:#171d1a;color:#edf4ef;font:inherit;font-size:13px;line-height:1.35;text-align:left;cursor:pointer;box-shadow:0 1px 2px #0002}
.guild-select-trigger:hover{border-color:#718c7d;background:#1c2721}.guild-select-trigger[aria-expanded=true]{border-color:#54d6a0;background:#1c2b23;box-shadow:0 0 0 2px #54d6a015}.guild-select-trigger:disabled{opacity:.45;cursor:default}
.guild-select-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.guild-select-trigger>svg{width:16px;height:16px;flex:none;color:#9cb7a8}
.guild-select-popup{position:fixed;inset:auto;margin:0;padding:5px;border:1px solid #4b6054;border-radius:10px;background:#1b231e;color:#edf4ef;box-shadow:0 14px 40px #0008;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#56685c transparent;z-index:1000}
.guild-select-search{display:block;position:sticky;top:0;z-index:1;width:100%;min-height:38px;margin:0 0 5px;padding:8px 10px;border:1px solid #4b6054;border-radius:6px;background:#101813;color:#edf4ef;font:inherit;font-size:13px}
.guild-select-search[hidden]{display:none}.guild-select-option{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:36px;padding:8px 10px;border-radius:5px;font-size:13px;line-height:1.35;cursor:pointer;overflow-wrap:anywhere}
.guild-select-option>span{min-width:0}.guild-select-option>svg{width:15px;height:15px;flex:none;color:#6de1a6}.guild-select-option[aria-selected=true]{color:#90f0bc;background:#254333}.guild-select-option.is-active{background:#344b3c;color:#fff}.guild-select-empty{padding:14px 10px;color:#b1c1b6;font-size:13px}
.settings-card>.field{max-width:340px;margin-bottom:16px}.settings-card .form-actions{justify-content:flex-start}
.directory-toolbar .guild-select,.characters-toolbar .guild-select{flex:0 1 var(--select-width);max-width:320px}
.page-actions .guild-select{align-self:center}.form-grid:has(.guild-select){grid-template-columns:repeat(2,minmax(0,340px))}
@media(max-width:760px){.guild-select-trigger{min-height:44px;font-size:14px}.guild-select-option{min-height:44px;font-size:14px}.guild-select-search{font-size:16px}.guild-select-popup{border-radius:10px}.directory-toolbar .guild-select,.characters-toolbar .guild-select{flex:0 1 var(--select-width);max-width:100%}.form-grid:has(.guild-select){grid-template-columns:1fr}}

.guild-select-popup:popover-open{display:flex;flex-direction:column;overflow:hidden}
.guild-select-list{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#56685c transparent}
.guild-select-search{position:static;flex:none}
.settings-card:has(> .field){max-width:560px}

/* Overlapping event backgrounds, with every label above the shared stack. */
.calendar-scroll .schedule-event{z-index:auto;overflow:visible;background:transparent;border:0;box-shadow:none;padding:5px 4px;display:flex;justify-content:flex-start;align-items:center;isolation:auto}
.calendar-scroll .schedule-event::before{content:"";position:absolute;inset:1px 0;border:1px solid var(--calendar-border);border-left:3px solid var(--calendar-strong);border-radius:6px;background:color-mix(in srgb,var(--calendar-border) 28%,#121a16);box-shadow:0 2px 6px #0003;z-index:1;pointer-events:none}
.calendar-event-content{position:relative;z-index:2;display:flex;flex-direction:column;gap:4px;max-width:var(--event-label-width,100%);min-width:0;pointer-events:none}
.calendar-scroll .schedule-event[data-align=left]{align-items:flex-start;text-align:left}
.calendar-scroll .schedule-event[data-align=right]{align-items:flex-end;text-align:right}
.calendar-scroll .schedule-event[data-align=center]{align-items:center;text-align:center}
.calendar-scroll .schedule-event strong{font-size:12px;line-height:1.15;overflow-wrap:anywhere}
.calendar-scroll .schedule-event .calendar-event-time{font-size:11px;line-height:1.15;white-space:normal}
.calendar-scroll .schedule-event:hover::before,.calendar-scroll .schedule-event:focus-visible::before{z-index:3;filter:brightness(1.25)}
.calendar-scroll .schedule-event:hover .calendar-event-content,.calendar-scroll .schedule-event:focus-visible .calendar-event-content{z-index:4;max-width:100%}
.calendar-scroll .schedule-event.is-cancelled{opacity:1}.calendar-scroll .schedule-event.is-cancelled::before{opacity:.45}.calendar-scroll .schedule-event.is-cancelled .calendar-event-content{opacity:.6}
@media(max-width:760px){.calendar-scroll .schedule-event strong{font-size:13px}.calendar-scroll .schedule-event .calendar-event-time{font-size:12px}}

.calendar-scroll .schedule-event strong{font-size:11px;line-height:1.12}
.calendar-scroll .schedule-event .calendar-event-time{font-size:9px;line-height:1.15;white-space:nowrap}
.calendar-event-content{gap:3px;pointer-events:auto}
@media(max-width:760px){.calendar-scroll .schedule-event strong{font-size:13px}.calendar-scroll .schedule-event .calendar-event-time{font-size:12px}}

/* Compact time cells; short announcements use the full card for their title. */
.calendar-scroll .schedule-event{padding:3px 4px}
.calendar-scroll .schedule-event[data-type=fishing] strong,
.calendar-scroll .schedule-event[data-type=coop] strong{white-space:nowrap;overflow-wrap:normal}
.calendar-scroll .schedule-event[data-type=fishing] .calendar-event-content,
.calendar-scroll .schedule-event[data-type=coop] .calendar-event-content{width:max-content;max-width:100%}

@media(max-width:760px){
 .calendar-scroll .schedule-event strong{font-size:12px;line-height:1.05}
 .calendar-scroll .schedule-event .calendar-event-time{font-size:11px;line-height:1.05}
 .calendar-scroll .schedule-event .calendar-event-content{gap:1px}
}

.calendar-scroll .schedule-event[data-type=sefer] strong{white-space:nowrap;overflow-wrap:normal}
.calendar-scroll .schedule-event[data-type=sefer] .calendar-event-content{width:max-content;max-width:100%}

.character-history-button{padding:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;text-decoration:underline;text-decoration-color:#54d6a066;text-underline-offset:4px}.character-history-button:hover{color:var(--accent)}
