:root{color-scheme:dark;--bg:#0b0c0e;--panel:#111317;--panel2:#171a1e;--line:#30343a;--line2:#22262b;--text:#f2f3f4;--sub:#9ca2a9;--dim:#686e75;--white:#fff;--primary:#303030;--secondary:#181818;--accent:#fff;--primary-fg:#fff;--body-bg:#0b0c0e;--body-fg:#f2f3f4;--header-bg:#090a0c;--header-color:#fff;--header-branding-color:#fff;--link-fg:#ddd;--link-hover-color:#fff;--darkened-bg:#171a1e;--selected-bg:#25292e;--hairline-color:#30343a;--border-color:#30343a;--breadcrumbs-bg:#101216;--breadcrumbs-fg:#eee}
*{box-sizing:border-box;border-radius:0!important}html,body{margin:0;background:var(--bg);color:var(--text);font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif}a{color:var(--text);text-decoration:none}a:hover{color:#fff}button,input[type=submit],input[type=button]{cursor:pointer}
/* Shared top bar */
.bni-top,#header{min-height:72px;background:#090a0c!important;border-bottom:1px solid var(--line)!important;display:flex;align-items:center;gap:24px;padding:0 30px!important}.bni-brand{display:flex;flex-direction:column;line-height:1}.bni-wordmark{font-size:21px;font-weight:850;letter-spacing:.08em;color:#fff}.bni-sub{margin-top:7px;font-size:9px;letter-spacing:.22em;color:var(--sub)}.bni-top nav,.bni-global{margin-left:auto;display:flex;align-items:center;gap:18px;flex-wrap:wrap}.bni-top nav>a,.bni-back,.bni-home{font-size:11px;font-weight:750;letter-spacing:.06em;color:#d9dcdf}.bni-security{font-size:9px;letter-spacing:.11em;color:#555b62;cursor:not-allowed;user-select:none}.bni-lang{display:inline-flex;align-items:center;gap:6px;color:#555b62}.bni-lang button{border:0;background:transparent;color:#686e75;padding:7px 2px;font-size:10px;font-weight:800;letter-spacing:.08em}.bni-lang button.active{color:#fff;border-bottom:1px solid #fff}.bni-top form{margin:0}.bni-top form button{background:transparent;color:#cfd2d5;border:1px solid #3b3f45;padding:8px 12px;font-size:10px;letter-spacing:.06em}
/* Console */
.bni-console main{max-width:1440px;margin:auto;padding:34px 30px}.bni-pagehead{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:18px}.eyebrow{margin:0 0 7px;font-size:10px;letter-spacing:.18em;color:var(--sub);font-weight:750}.bni-console h1{margin:0;font-size:30px;line-height:1.2;letter-spacing:.01em}.bni-console h2{margin:0;font-size:20px}.bni-role{font-size:10px;letter-spacing:.12em;color:var(--sub);border:1px solid var(--line);padding:8px 10px}.bni-meta{display:flex;gap:18px;align-items:center;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:11px 0;color:var(--sub);font-size:12px}.bni-meta b{font-size:9px;letter-spacing:.1em;margin-right:7px;color:#d5d8db}.bni-state{margin-left:auto;color:#d9dcdf}.notice{margin:20px 0 0;border-left:2px solid #777d84;padding:11px 15px;background:#121418;color:#bfc3c7;font-size:12px}.bni-deploy{font-size:11px;color:var(--sub)}section{margin-top:34px;border-top:1px solid var(--line);padding-top:18px}.bni-sectionhead{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:12px}.bni-action{font-size:10px;font-weight:800;letter-spacing:.07em;border-bottom:1px solid #777d84;padding-bottom:3px}.bni-muted{color:var(--sub);font-size:12px}.table-scroll{overflow-x:auto;border:1px solid var(--line2)}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:13px 14px;border-bottom:1px solid var(--line2);white-space:nowrap}th{background:#101216;color:var(--sub);font-size:10px;letter-spacing:.08em;font-weight:750}tbody tr{background:var(--panel)}tbody tr:hover{background:var(--panel2)}tbody tr:last-child td,tbody tr:last-child th{border-bottom:0}.bni-key,.bni-key a{font-weight:850;color:#fff}.bni-roomlist{border:1px solid var(--line2)}.bni-room{display:grid;grid-template-columns:minmax(150px,1fr) 100px minmax(180px,2fr) auto;gap:16px;align-items:center;padding:14px;border-bottom:1px solid var(--line2);background:var(--panel)}.bni-room:last-child{border-bottom:0}.bni-room:hover{background:var(--panel2)}.bni-room span{color:#c6cacf}.bni-room strong{font-size:17px}.bni-room em{font-style:normal;font-size:9px;letter-spacing:.08em;color:var(--sub)}footer{margin-top:34px;padding-top:16px;border-top:1px solid var(--line);color:var(--dim);font-size:11px}
/* Django admin */
#header{box-sizing:border-box}#branding{min-width:230px}#branding h1{margin:0}#user-tools{margin-left:auto!important;color:var(--sub)!important;font-size:10px!important}#user-tools a{color:#ddd!important}#nav-global{margin-left:0!important}.breadcrumbs{background:#101216!important;border-bottom:1px solid var(--line2)!important;color:var(--sub)!important;padding:11px 30px!important;font-size:10px!important}.breadcrumbs a{color:#d7dade!important}#container,.main{background:var(--bg)!important}#nav-sidebar{background:#0e1012!important;border-right:1px solid var(--line)!important;width:245px!important}.toggle-nav-sidebar{background:#0e1012!important;border-right:1px solid var(--line)!important;color:var(--sub)!important}.module{background:var(--panel)!important;border:1px solid var(--line2)!important;box-shadow:none!important;margin-bottom:18px!important}.module h2,.module caption,#nav-sidebar .module caption{background:transparent!important;color:var(--sub)!important;border-bottom:1px solid var(--line)!important;text-transform:uppercase;font-size:10px!important;letter-spacing:.1em;padding:13px!important}#nav-sidebar .module{border:0!important;margin:0!important;background:transparent!important}#nav-sidebar a{color:#c9cdd1!important;font-size:12px!important}#nav-sidebar tr{border-bottom:1px solid #181b1f!important}#nav-sidebar tr.current-model{background:#1b1e22!important}#content{padding:28px 32px!important;max-width:none!important}#content h1{color:#fff!important;font-size:22px!important;font-weight:750!important;margin:0 0 24px!important}#changelist .results{overflow-x:auto!important}#changelist table{width:100%!important;table-layout:auto!important}#changelist table thead th{background:#101216!important;color:var(--sub)!important;font-size:10px!important;letter-spacing:.05em;white-space:nowrap;padding:12px 14px!important}#changelist table tbody td,#changelist table tbody th{padding:13px 14px!important;white-space:nowrap!important;vertical-align:middle!important}.module tbody tr{background:var(--panel)!important;border-bottom:1px solid var(--line2)!important}.module tbody tr:hover{background:var(--panel2)!important}.module td,.module th{color:var(--text)!important;border-color:var(--line2)!important}.module a{color:#f0f1f2!important}.object-tools a,.button,input[type=submit],input[type=button],.submit-row input{background:#e9eaec!important;color:#0b0c0e!important;border:1px solid #e9eaec!important;font-weight:850!important;box-shadow:none!important;padding:10px 16px!important}.submit-row{background:transparent!important;border:0!important;border-top:1px solid var(--line)!important;padding:18px 0!important}.submit-row a.deletelink{background:transparent!important;color:#aaa!important;border:1px solid #555!important}.form-row{border-bottom:1px solid var(--line2)!important;padding:15px 12px!important}.form-row label{color:#cfd2d5!important;font-size:12px!important}.help,.helptext,p.help{color:var(--dim)!important;font-size:11px!important}.readonly{color:#b7bbc0!important}input,textarea,select,.vTextField{background:#0c0e10!important;color:#fff!important;border:1px solid #3a3f45!important;padding:9px 10px!important}input:focus,textarea:focus,select:focus{border-color:#aeb3b8!important;outline:none!important;box-shadow:none!important}fieldset.module{padding:0!important}.aligned label{width:190px!important}.messagelist li{background:#15181b!important;color:#e7e8ea!important;border:1px solid var(--line)!important}.errornote{background:#171719!important;color:#fff!important;border:1px solid #6c6c70!important}.login #container{background:#0d0f11!important;border:1px solid var(--line)!important}.login #header{justify-content:center}
@media(max-width:900px){.bni-top,#header{padding:14px 16px!important;gap:12px;flex-wrap:wrap}.bni-top nav,.bni-global{margin-left:0;width:100%;gap:12px}.bni-security{display:none}.bni-console main{padding:24px 18px}.bni-pagehead{align-items:flex-start;flex-direction:column}.bni-room{grid-template-columns:1fr 80px}.bni-room em{display:none}#nav-sidebar{width:210px!important}#content{padding:20px 18px!important}.aligned label{width:150px!important}}
/* UI-1.2 */
.bni-lead{margin:.4rem 0 0;color:#a9a9a9;max-width:760px}.bni-quickgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:#3a3a3a;border:1px solid #3a3a3a;margin:28px 0}.bni-quick{position:relative;display:flex;min-height:142px;flex-direction:column;gap:7px;padding:22px;background:#151515;text-decoration:none!important}.bni-quick:hover{background:#202020}.bni-quick strong{font-size:18px;color:#fff}.bni-quick small{color:#999}.bni-quick em{position:absolute;right:20px;bottom:18px;font-style:normal;font-weight:800}.bni-quick.bni-primary{background:#1c1c1c}.bni-statusbar{display:flex;gap:24px;align-items:center;flex-wrap:wrap;padding:13px 16px;border:1px solid #3c3c3c;background:#151515;color:#aaa;font-size:13px}.bni-statusbar b{color:#eee;margin-right:8px}.bni-security-panel{margin-top:44px}.bni-security-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:#333;border:1px solid #333}.bni-disabled{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:18px;background:#141414;color:#6f6f6f;cursor:not-allowed}.bni-disabled strong{font-size:12px;letter-spacing:.08em}.bni-disabled small{border:1px solid #3a3a3a;padding:3px 7px}.bni-locked{opacity:.48;cursor:not-allowed}.bni-legacy-hidden{display:none!important}.bni-global{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.bni-global .bni-security{display:flex;gap:10px}.bni-lang button.active{background:#eee!important;color:#111!important;border-color:#eee!important}.bni-console section{scroll-margin-top:24px}@media(max-width:900px){.bni-quickgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.bni-quickgrid,.bni-security-grid{grid-template-columns:1fr}.bni-quick{min-height:116px}.bni-disabled{grid-template-columns:auto 1fr}.bni-disabled small{grid-column:2}.bni-statusbar{align-items:flex-start;flex-direction:column;gap:7px}}
/* UI-1.3 compact Dark Series */
.bni-pagehead-compact{margin-bottom:14px}.bni-quickgrid-compact{margin:18px 0 20px}.bni-quickgrid-compact .bni-quick{min-height:92px;padding:17px 20px;justify-content:center}.bni-quickgrid-compact .bni-quick strong{font-size:16px}.bni-statusbar-compact{padding:10px 14px}.bni-empty{margin:0;padding:16px;color:var(--dim)}
/* prevent JP/EN labels from visually running together in admin */
#nav-sidebar th,#nav-sidebar td,#nav-sidebar a,.module th,.module td{word-break:keep-all}#nav-sidebar a{display:inline-block;line-height:1.45}.bni-quick .eyebrow{display:block;margin-bottom:3px}.bni-quick strong{display:block}

/* UI-1.4 admin list Dark Series correction */
#changelist .paginator{background:var(--panel)!important;color:var(--sub)!important;border:1px solid var(--line2)!important;border-top:0!important;margin:0!important;padding:11px 14px!important;font-size:11px!important;}
#changelist .paginator a{color:#fff!important;}
#changelist .actions{background:var(--panel)!important;color:var(--sub)!important;border:1px solid var(--line2)!important;border-bottom:0!important;padding:10px 12px!important;}
#changelist .actions select{min-height:34px!important;}
#changelist .results + .paginator{background:var(--panel)!important;}
#changelist-form{background:transparent!important;}
#changelist table tbody tr.selected{background:#1b1e22!important;}
#changelist table tbody tr.selected td,#changelist table tbody tr.selected th{background:#1b1e22!important;}

/* UI-1.5 color-only refinement: softer industrial charcoal, lower contrast */
:root{--bg:#17191c;--panel:#1d2024;--panel2:#24282d;--line:#393e44;--line2:#30353a;--text:#dedfe1;--sub:#a1a6ac;--dim:#777d84;--white:#e7e8e9;--primary:#34383d;--secondary:#22262a;--accent:#d7d9db;--primary-fg:#e7e8e9;--body-bg:#17191c;--body-fg:#dedfe1;--header-bg:#202328;--header-color:#e7e8e9;--header-branding-color:#e7e8e9;--link-fg:#d2d5d8;--link-hover-color:#f0f1f2;--darkened-bg:#24282d;--selected-bg:#2d3237;--hairline-color:#393e44;--border-color:#393e44;--breadcrumbs-bg:#1d2024;--breadcrumbs-fg:#c8cbce}
html,body{background:var(--bg)!important;color:var(--text)!important}.bni-top,#header{background:#202328!important}.bni-wordmark,#content h1,.bni-console h1,.bni-console h2,.bni-key,.bni-key a{color:#e7e8e9!important}.breadcrumbs,#changelist table thead th,th{background:#1d2024!important}#container,.main{background:var(--bg)!important}#nav-sidebar,.toggle-nav-sidebar{background:#1b1e22!important}.module,.module tbody tr,.bni-room{background:var(--panel)!important}.module tbody tr:hover,.bni-room:hover{background:var(--panel2)!important}
input,textarea,select,.vTextField{background:#25292e!important;color:#e3e5e7!important;border-color:#464c53!important}input:focus,textarea:focus,select:focus{border-color:#7d848b!important}.object-tools a,.button,input[type=submit],input[type=button],.submit-row input{background:#3b4046!important;color:#eef0f1!important;border-color:#555b62!important}.object-tools a:hover,.button:hover,input[type=submit]:hover,input[type=button]:hover,.submit-row input:hover{background:#474d54!important;border-color:#686f77!important}.submit-row a.deletelink{color:#c6c9cc!important;border-color:#555b62!important}
.bni-quickgrid,.bni-security-grid{background:#393e44!important;border-color:#393e44!important}.bni-quick,.bni-quick.bni-primary{background:#202328!important}.bni-quick:hover{background:#292d32!important}.bni-statusbar,.bni-disabled,.notice{background:#202328!important}.bni-lang button.active{background:#3b4046!important;color:#eef0f1!important;border-color:#555b62!important}
#changelist .paginator,#changelist .actions{background:var(--panel)!important}.login{background:#17191c!important}.login #container{background:#202328!important;border-color:#3d4248!important;box-shadow:none!important}.login #header{background:#202328!important;border-bottom:1px solid #393e44!important}.login #content{background:#202328!important}.login .form-row{border-color:#30353a!important}.login input[type=text],.login input[type=password]{background:#292d32!important;color:#e7e8e9!important;border-color:#4b5158!important}.login .submit-row input{background:#3b4046!important;color:#eef0f1!important;border-color:#555b62!important}

/* UI-1.6 grayscale-only correction: black -> gray hierarchy, no white surfaces */
:root{--bg:#080808;--panel:#111111;--panel2:#191919;--line:#343434;--line2:#262626;--text:#eeeeee;--sub:#b5b5b5;--dim:#858585;--body-bg:#080808;--body-fg:#eeeeee;--header-bg:#050505;--darkened-bg:#191919;--selected-bg:#222222;--hairline-color:#343434;--border-color:#343434;--breadcrumbs-bg:#101010;--breadcrumbs-fg:#d0d0d0}
html,body,#container,.main{background:#080808!important;color:#eeeeee!important}.bni-top,#header{background:#050505!important}.breadcrumbs{background:#101010!important}.module,.module tbody tr,.bni-room,#changelist .paginator,#changelist .actions{background:#111111!important}.module tbody tr:hover,.bni-room:hover,#changelist table tbody tr:hover{background:#191919!important}#nav-sidebar,.toggle-nav-sidebar{background:#0d0d0d!important}#nav-sidebar tr.current-model,#changelist table tbody tr.selected,#changelist table tbody tr.selected td,#changelist table tbody tr.selected th{background:#202020!important}
/* Django changelist search/filter surfaces */
#changelist #toolbar,#changelist .actions,#changelist-filter,#changelist-filter h2,#changelist-filter h3,#changelist-filter details,#changelist-filter summary,#changelist-filter ul,#changelist-filter li{background:#151515!important;color:#eeeeee!important;border-color:#343434!important}#changelist-filter{border-left:1px solid #343434!important}#changelist-filter h2{color:#eeeeee!important}#changelist-filter h3,#changelist-filter summary{color:#d8d8d8!important}#changelist-filter a{color:#d0d0d0!important}#changelist-filter a:hover,#changelist-filter li.selected a{color:#ffffff!important}#changelist-filter li.selected{border-left-color:#888!important}#changelist #toolbar form input[type=text],#changelist #toolbar form input[type=search]{background:#202020!important;color:#f0f0f0!important;border:1px solid #484848!important}#changelist #toolbar form input::placeholder{color:#8f8f8f!important}
/* Forms: grayscale surfaces only */
input,textarea,select,.vTextField{background:#202020!important;color:#f0f0f0!important;border-color:#484848!important}input:focus,textarea:focus,select:focus{background:#252525!important;border-color:#777!important}.object-tools a,.button,input[type=submit],input[type=button],.submit-row input{background:#3a3a3a!important;color:#ffffff!important;border-color:#5b5b5b!important}.object-tools a:hover,.button:hover,input[type=submit]:hover,input[type=button]:hover,.submit-row input:hover{background:#4a4a4a!important;border-color:#777!important}.submit-row a.deletelink{background:#1b1b1b!important;color:#dddddd!important;border-color:#555!important}
/* Dashboard and custom surfaces */
.bni-quickgrid,.bni-security-grid{background:#343434!important;border-color:#343434!important}.bni-quick,.bni-quick.bni-primary,.bni-statusbar,.bni-disabled,.notice{background:#111111!important}.bni-quick:hover{background:#1b1b1b!important}.bni-lang button.active{background:#3a3a3a!important;color:#fff!important;border-color:#666!important}
/* Login */
.login,.login body{background:#080808!important}.login #container,.login #content,.login #header{background:#111111!important}.login #container{border-color:#343434!important}.login input[type=text],.login input[type=password]{background:#202020!important;color:#f0f0f0!important;border-color:#484848!important}.login .submit-row input{background:#3a3a3a!important;color:#fff!important;border-color:#5b5b5b!important}

/* UI-1.7 admin interaction cleanup */
#changelist-filter a,
#changelist-filter summary,
#changelist-filter details,
#changelist-filter li {
  pointer-events:auto!important;
}
#changelist-filter a,
#changelist-filter summary {
  position:relative;
  z-index:2;
}
#changelist-filter a { cursor:pointer!important; }
#changelist-filter summary { cursor:pointer!important; }
#changelist-filter .bni-ui-hidden { display:none!important; }
#changelist-filter .bni-filter-clear {
  display:block!important;
  color:#eeeeee!important;
  font-weight:700!important;
  opacity:1!important;
}
#changelist-filter .bni-filter-clear:hover { color:#ffffff!important; }

/* UI-1.8 clickable-state affordance: BNiPhone dial-button style */
/* Sidebar model rows: only rows containing a real link react on hover. */
#nav-sidebar tr:has(a[href]) { transition:background-color .10s ease; }
#nav-sidebar tr:has(a[href]):hover { background:#242424!important; }
#nav-sidebar tr:has(a[href]) a { display:block!important; color:#eeeeee!important; cursor:pointer!important; }
#nav-sidebar tr:has(a[href]) a:hover { color:#ffffff!important; }
/* Admin list/object links. */
#changelist table tbody tr:has(a[href]):hover { background:#1d1d1d!important; }
#changelist table tbody a[href] { color:#eeeeee!important; cursor:pointer!important; }
#changelist table tbody a[href]:hover { color:#ffffff!important; }
/* Filter: clickable entries get a gray hover surface; headings stay static. */
#changelist-filter a[href] { display:block!important; padding:7px 10px!important; margin:1px 0!important; cursor:pointer!important; transition:background-color .10s ease; }
#changelist-filter a[href]:hover { background:#2a2a2a!important; color:#ffffff!important; }
#changelist-filter li.selected a[href] { background:#202020!important; }
#changelist-filter summary { padding:7px 10px!important; cursor:pointer!important; transition:background-color .10s ease; }
#changelist-filter summary:hover { background:#242424!important; color:#ffffff!important; }
/* Generic real links/buttons in admin controls. */
.object-tools a[href],.breadcrumbs a[href],#user-tools a[href],.bni-action[href],.bni-top a[href],.bni-global a[href] { cursor:pointer!important; transition:background-color .10s ease,color .10s ease; }
.object-tools a[href]:hover { background:#4a4a4a!important; }
.breadcrumbs a[href]:hover,#user-tools a[href]:hover { background:#242424!important; color:#ffffff!important; }
/* Keep non-links visually static. */
#nav-sidebar caption,#nav-sidebar th:not(:has(a[href])),#changelist-filter h2,#changelist-filter h3 { cursor:default!important; }

/* P5.2 - BNi SIP device UI only
 * CSS ONLY. No Python / Django Form / Model / DB / API / Asterisk / SIP changes.
 */

/* Device list: important operational columns */
#result_list .field-assigned_extension,
#result_list .field-assignment_status,
#result_list .field-state {
    font-weight: 800 !important;
}

/* Internal Endpoint must not look or behave like an operator action */
.form-row.field-endpoint .readonly a {
    color: #b7bbc0 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    pointer-events: none !important;
    cursor: default !important;
}

/* BNi: hide Django facet-count view icon only; keep the link clickable */
#changelist-filter a.viewlink {
    background-image: none !important;
    padding-left: 10px !important;
}

/* =========================================================
   DARK SERIES FINAL v5 — authoritative admin presentation
   ========================================================= */

/* Fixed dark product: no theme switch. */
.theme-toggle,[data-theme-toggle],button.theme-toggle{display:none!important}

/* ---------- LEFT NAV: navigation only, no action links ---------- */
#nav-sidebar{
  width:350px!important;min-width:350px!important;max-width:350px!important;
  background:#0b0b0c!important;border-right:1px solid #303033!important;
}
#nav-sidebar .module,#nav-sidebar table,#nav-sidebar tbody{background:transparent!important}
#nav-sidebar table{width:100%!important;table-layout:auto!important;border-collapse:collapse!important}

/* Hide +ADD / CHANGE action cells in sidebar. Model name remains the navigation link. */
#nav-sidebar td{display:none!important}

/* App headings are not shown in the flat BNi SIP sidebar. */
#nav-sidebar .module caption {
  display:none!important;
}

/* Stable model rows. Selection never changes horizontal geometry. */
#nav-sidebar tr,#nav-sidebar tr.current-model{
  position:relative!important;background:#0b0b0c!important;border-bottom:1px solid #252527!important;
  transform:none!important;translate:none!important;
}
#nav-sidebar tr:hover,#nav-sidebar tr.current-model:hover{background:#18181a!important}
#nav-sidebar tr.current-model{background:#111112!important}
#nav-sidebar th,#nav-sidebar tr.current-model th{
  display:table-cell!important;width:100%!important;max-width:none!important;
  margin:0!important;padding:0!important;background:transparent!important;
  text-align:left!important;transform:none!important;translate:none!important;
}
#nav-sidebar th a,#nav-sidebar tr.current-model th a,
#nav-sidebar th:not(:has(a[href])){
  display:block!important;box-sizing:border-box!important;width:100%!important;
  margin:0!important;padding:12px 18px!important;
  color:#e4e4e6!important;font-size:14px!important;font-weight:700!important;
  line-height:1.3!important;text-align:left!important;
  white-space:normal!important;word-break:keep-all!important;overflow-wrap:normal!important;
  transform:none!important;translate:none!important;
}
#nav-sidebar tr.current-model th a{color:#fff!important}
#nav-sidebar th a:hover{color:#fff!important}


/* Flat app links injected from Django app captions; same geometry as model rows. */
#nav-sidebar tr.bni-app-link th,
#nav-sidebar tr.bni-app-link th a{
  width:100%!important;margin:0!important;text-align:left!important;
}
#nav-sidebar tr.bni-app-link th a{
  display:block!important;box-sizing:border-box!important;padding:12px 18px!important;
  color:#e4e4e6!important;font-size:14px!important;font-weight:700!important;line-height:1.3!important;
  text-decoration:none!important;transform:none!important;translate:none!important;
}
#nav-sidebar tr.bni-app-link.current-model{background:#111112!important}
#nav-sidebar tr.bni-app-link.current-model th a{color:#fff!important}

/* ---------- ADMIN APP INDEX: make it a navigation list ---------- */
/* The /admin/ Control 管理 block should not look like a second action console. */
#content-main .app-control.module,
#content-main .app-auth.module{
  max-width:720px!important;background:#0f0f10!important;border:1px solid #303033!important;
}
#content-main .app-control.module caption,
#content-main .app-auth.module caption{
  padding:12px 16px!important;background:#0f0f10!important;color:#aaaab0!important;
  font-size:11px!important;font-weight:800!important;letter-spacing:.14em!important;
  text-align:left!important;text-transform:uppercase!important;
}
#content-main .app-control.module table,
#content-main .app-auth.module table{width:100%!important;table-layout:auto!important}
#content-main .app-control.module td,
#content-main .app-auth.module td{display:none!important}
#content-main .app-control.module th,
#content-main .app-auth.module th{
  width:100%!important;padding:0!important;background:#111112!important;text-align:left!important;
}
#content-main .app-control.module th a,
#content-main .app-auth.module th a{
  display:block!important;width:100%!important;box-sizing:border-box!important;
  padding:13px 16px!important;color:#e7e7e9!important;font-size:14px!important;font-weight:700!important;
  text-decoration:none!important;
}
#content-main .app-control.module tr:hover th,
#content-main .app-auth.module tr:hover th{background:#1a1a1c!important}
#content-main .app-control.module th a:hover,
#content-main .app-auth.module th a:hover{color:#fff!important}

/* ---------- FILTER: two columns normally; drawer only on demand ---------- */
#changelist{position:relative!important}
#changelist .changelist-form-container{min-width:0!important;width:100%!important}
#changelist-filter{
 position:fixed!important;z-index:1200!important;top:88px!important;right:0!important;bottom:0!important;
 width:244px!important;min-width:244px!important;max-width:244px!important;overflow:auto!important;
 background:#101011!important;border-left:1px solid #303033!important;
 box-shadow:-12px 0 28px rgba(0,0,0,.38)!important;
 transform:translateX(101%)!important;visibility:hidden!important;pointer-events:none!important;
 transition:transform .14s ease,visibility 0s linear .14s!important;font-size:12px!important;
}
body.bni-filter-open #changelist-filter{
 transform:translateX(0)!important;visibility:visible!important;pointer-events:auto!important;
 transition:transform .14s ease!important;
}
.bni-filter-toggle{
 display:inline-flex!important;align-items:center!important;float:right!important;
 margin:0 0 10px 10px!important;padding:8px 12px!important;border:1px solid #4a4a4d!important;
 background:#202022!important;color:#eee!important;font-size:12px!important;font-weight:750!important;
 cursor:pointer!important;border-radius:0!important;
}
.bni-filter-toggle:hover,.bni-filter-toggle[aria-expanded="true"]{background:#2b2b2e!important;color:#fff!important}
.bni-filter-close{
 position:sticky!important;top:0!important;z-index:2!important;width:100%!important;
 border:0!important;border-bottom:1px solid #303033!important;background:#18181a!important;color:#ddd!important;
 padding:10px 12px!important;text-align:right!important;font-size:12px!important;cursor:pointer!important;
}
#changelist-filter a.viewlink{background-image:none!important}

/* Django colored related/action artwork -> monochrome. */
.related-widget-wrapper-link{filter:grayscale(1)!important;opacity:.75!important}
.related-widget-wrapper-link:hover{filter:grayscale(1) brightness(1.5)!important;opacity:1!important}

/* Dashboard: preserve the accepted five-column desktop layout. */
.bni-quickgrid,.bni-quickgrid-compact{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important}

@media(max-width:1050px){
 #nav-sidebar{width:320px!important;min-width:320px!important;max-width:320px!important}
 .bni-quickgrid,.bni-quickgrid-compact{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:760px){
 .bni-quickgrid,.bni-quickgrid-compact{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* ===== BNi SIP FINAL ADMIN HEADER ===== */
#user-tools.bni-final-user-tools {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    font-size: 15px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

#user-tools .bni-admin-name {
    color: #f2f2f2 !important;
    font-size: 17px !important;
    font-weight: 800 !important;
    letter-spacing: .04em !important;
}

#user-tools.bni-final-user-tools a,
#user-tools.bni-final-user-tools button {
    color: #e8e8e8 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

#user-tools.bni-final-user-tools a {
    text-decoration: none !important;
    border-bottom: 1px solid #777 !important;
    padding-bottom: 3px !important;
}

#user-tools.bni-final-user-tools a:hover,
#user-tools.bni-final-user-tools button:hover {
    color: #fff !important;
}

#user-tools .bni-user-separator {
    display: block !important;
    width: 1px !important;
    height: 22px !important;
    background: #666 !important;
    flex: 0 0 1px !important;
}

#user-tools.bni-final-user-tools #logout-form {
    display: inline-flex !important;
    margin: 0 !important;
}

#user-tools.bni-final-user-tools #logout-form button {
    margin: 0 !important;
    padding: 0 0 3px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #777 !important;
    background: transparent !important;
    cursor: pointer !important;
}

/* ===== BNi SIP FINAL SELECTED NAV ===== */
#nav-sidebar tr.current-model {
    background: #1b1b1d !important;
}

#nav-sidebar tr.current-model th a[aria-current="page"] {
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: inset 3px 0 0 #b8b8bc !important;
}

/* ===== BNi SIP UI FINAL 2026-09-26 ===== */
/* Header: adopted monochrome logo concept #3. */
.bni-top,#header{min-height:92px!important;padding:0 32px!important}
.bni-brand-link{display:inline-flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;text-decoration:none!important;color:#fff!important;min-width:max-content}
.bni-logo{display:flex!important;align-items:center!important;gap:12px!important;letter-spacing:0!important;line-height:1!important}
.bni-logo-box{display:inline-block;border:1px solid #a8aaad;padding:5px 9px 6px;font-size:27px;font-weight:900;letter-spacing:.025em;background:linear-gradient(180deg,#f5f5f5 0%,#9b9da0 48%,#f0f0f0 100%);-webkit-background-clip:text;background-clip:text;color:transparent;box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}
.bni-logo-sip{font-size:31px;font-weight:760;letter-spacing:.035em;background:linear-gradient(180deg,#f6f6f6 0%,#a3a5a8 50%,#ededed 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
.bni-brand .bni-sub{margin:7px 0 0 1px!important;font-size:10px!important;letter-spacing:.34em!important;color:#9da0a4!important}
.bni-brand-link:hover .bni-logo-box{border-color:#d2d3d5}
.bni-top nav,.bni-global{gap:20px!important}
.bni-top nav>a,.bni-back,.bni-home{font-size:13px!important}
.bni-security{font-size:10px!important}
.bni-lang button{font-size:12px!important;padding:9px 4px!important}
.bni-top form button{font-size:12px!important;padding:10px 15px!important}

/* Dashboard cards: small separation and restrained float, no rounded-card styling. */
.bni-quickgrid,.bni-quickgrid-compact{gap:9px!important;background:transparent!important;border:0!important;margin:28px 0 30px!important}
.bni-quick{min-height:142px!important;padding:23px 24px!important;border:1px solid #37393c!important;background:#141516!important;box-shadow:0 3px 10px rgba(0,0,0,.22)!important;transition:transform .14s ease,border-color .14s ease,background .14s ease,box-shadow .14s ease!important}
.bni-quick:hover{transform:translateY(-2px);border-color:#5a5d61!important;background:#18191b!important;box-shadow:0 7px 18px rgba(0,0,0,.28)!important}
.bni-quick .eyebrow{font-size:11px!important;letter-spacing:.20em!important}
.bni-quick strong{font-size:21px!important;line-height:1.22!important;letter-spacing:-.01em!important}

/* SIP status: stronger hierarchy and readability. */
.bni-console section .eyebrow{font-size:11px!important;letter-spacing:.20em!important}
.bni-console section h2{font-size:25px!important;line-height:1.25!important}
.bni-console section .table-scroll{border-color:#303236!important;box-shadow:0 3px 10px rgba(0,0,0,.18)!important}
.bni-console section table th{font-size:12px!important;letter-spacing:.08em!important;padding:15px 16px!important}
.bni-console section table td{font-size:15px!important;padding:15px 16px!important}

@media(max-width:900px){
 .bni-top,#header{min-height:82px!important;padding:14px 16px!important}
 .bni-logo-box{font-size:23px}.bni-logo-sip{font-size:27px}
}

/* P6: settings text follows the sidebar; buttons expand without clipping. */
body { --bni-settings-font: 14px; }
#nav-sidebar .app-auth caption { display:none !important; }
.bni-global .bni-home { font-size:var(--bni-settings-font) !important; }
#content .form-row, #content .form-row label, #content input:not([type=checkbox]):not([type=radio]),
#content select, #content textarea, #content .readonly, #content .help,
#content .inline-group th, #content .inline-group td, #content .object-tools a,
#content .submit-row input, #content .submit-row a, #content .aligned label,
#content .selector, #content .selector h2, #content .selector select,
#content .breadcrumbs { font-size:var(--bni-settings-font) !important; line-height:1.5 !important; }
#content .submit-row { display:flex !important; flex-wrap:wrap; align-items:center; gap:10px; overflow:visible !important; }
#content .submit-row a.deletelink { display:inline-flex !important; align-items:center; justify-content:center;
 box-sizing:border-box !important; height:auto !important; min-height:42px; padding:10px 18px !important;
 line-height:1.5 !important; margin:0 !important; overflow:visible !important; border:1px solid #555 !important; }
#content .object-tools { display:flex; flex-wrap:wrap; gap:8px; }
#content .object-tools li { margin:0 !important; }
#content .object-tools a { display:inline-flex; align-items:center; min-height:38px; box-sizing:border-box; }
.breadcrumbs { font-size:var(--bni-settings-font) !important; }

/* P8 UI only: match the existing 14px sidebar throughout admin page content. */
#content p, #content li, #content legend, #content h2, #content h3,
#content table th, #content table td, #content .paginator, #content .actions,
#content .actions label, #content .actions span, #content .helptext,
#content .errorlist, #content .errornote, #content .selector-filter label,
#content .selector-available h2, #content .selector-chosen h2,
#content .related-widget-wrapper, #content .related-widget-wrapper-link,
#content .submit-row a, #content .submit-row input,
#changelist-filter h2, #changelist-filter h3, #changelist-filter li,
#changelist-filter summary, #changelist-filter a {
 font-size:var(--bni-settings-font)!important; line-height:1.5!important;
}
#content .submit-row a.deletelink { margin-left:auto!important; order:99; }
/* Desktop: ten entries, five columns and two rows; retain narrow-screen adaptation. */
@media(min-width:1051px){.bni-quickgrid-compact{grid-template-columns:repeat(5,minmax(0,1fr))!important}}
/* Override Django/legacy selectors with the same content scope. */
#content #changelist table thead th, #content #changelist table tbody th,
#content #changelist table tbody td, #content #changelist .paginator,
#content #changelist .actions label, #content #changelist .actions span,
#content #changelist-filter h2, #content #changelist-filter h3,
#content #changelist-filter li, #content #changelist-filter summary {
 font-size:var(--bni-settings-font)!important; line-height:1.5!important;
}

/* Corrected P8: never show related-object popup links, including readonly widgets. */
.related-widget-wrapper-link { display:none!important; }
#bni-add-participant-groups { margin:8px 12px; padding:9px 14px; font-size:14px; }
#bni-participant-feedback { font-size:14px; }

/* P9 participant registration: click-to-transfer, compact single-row group action. */
.bni-participant-transfer { display:grid; grid-template-columns:1fr 1fr; gap:12px; max-width:850px; width:100%; }
.bni-participant-transfer > div { border:1px solid #444; padding:10px; min-width:0; }
.bni-participant-transfer > div > div { max-height:320px; overflow-y:auto; margin-top:8px; }
#content .bni-member-transfer { display:block; width:100%; text-align:left; padding:9px 10px; margin:4px 0; border:1px solid #444; background:#222; color:#eee; font-size:14px; }
#content .field-participant_groups > div { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
#content .field-participant_groups label { flex:0 0 190px; }
#content select.bni-group-dropdown { height:42px!important; min-height:42px!important; max-width:320px; width:100%; }
#content #bni-add-participant-groups { height:42px!important; min-height:42px!important; padding:8px 14px!important; margin:0!important; flex:0 0 auto; }
#content #bni-participant-feedback { flex:0 0 auto; }
@media(max-width:600px){.bni-participant-transfer{grid-template-columns:1fr}#content select.bni-group-dropdown{max-width:210px}}
