:root{--bg-primary:#edf4fc;--bg-secondary:#f8fbff;--bg-tertiary:#e7f0fa;--bg-card:#fff;--bg-hover:#eaf2ff;--bg-sidebar:#f8fbff;--text-primary:#16344b;--text-secondary:#506a81;--text-tertiary:#71879b;--text-inverse:#fff;--border-primary:#b4c9df;--border-secondary:#9bb8d5;--border-light:#d6e3ef;--shadow-sm:0 1px 2px rgba(25,73,130,.06);--shadow-md:0 8px 24px rgba(25,73,130,.09);--shadow-lg:0 18px 48px rgba(25,73,130,.14);--accent-primary:#1467f2;--accent-success:#087b69;--accent-warning:#916018;--accent-danger:#b63b48}
html,body,#root{background:var(--bg-primary)!important}body{color:var(--text-primary);font-family:"Noto Sans SC","Microsoft YaHei UI","Microsoft YaHei",sans-serif;font-size:13px;letter-spacing:0}button,input,select,textarea{letter-spacing:0}::selection{color:#fff;background:var(--accent-primary)}
.ant-layout,.ant-layout-has-sider{background:var(--bg-primary)!important}.ant-layout-sider,.ant-layout-sider-dark,.ant-layout-sider-light,.ant-layout-sider-children{background:var(--bg-sidebar)!important}.ant-layout-sider{border-right:1px solid var(--border-primary)!important;box-shadow:none!important}.ant-layout-header{background:rgba(248,251,255,.96)!important;border-bottom:1px solid var(--border-primary)!important;box-shadow:none!important;backdrop-filter:blur(12px)}.ant-layout-content{position:relative;background:var(--bg-primary)!important}.ant-layout-content:before{background:transparent!important;opacity:0}
.ant-menu,.ant-menu-dark,.ant-menu-inline,.ant-menu-root{color:#365875!important;background:transparent!important}.ant-menu-item,.ant-menu-submenu-title{min-height:42px!important;margin:3px 10px!important;border-radius:4px!important}.ant-menu-dark .ant-menu-item,.ant-menu-dark .ant-menu-submenu-title{color:#365875!important}.ant-menu-item:hover,.ant-menu-submenu-title:hover{color:#0b50c8!important;background:#edf4fc!important}.ant-menu-dark .ant-menu-item-selected,.ant-menu-dark>.ant-menu .ant-menu-item-selected,.ant-menu-light .ant-menu-item-selected{color:#0b50c8!important;background:#e4efff!important;box-shadow:inset 3px 0 #1467f2!important}.ant-menu-dark .ant-menu-item-selected .anticon,.ant-menu-dark .ant-menu-item-selected .ant-menu-title-content{color:#0b50c8!important}.ant-menu-inline .ant-menu-item:after{display:none!important}
.ant-card,.content-card,.header-section,.sidebar-panel,.device-info-panel,.control-panel-section,.stats-section{color:var(--text-primary)!important;border:1px solid var(--border-light)!important;border-radius:6px!important;background:rgba(255,255,255,.96)!important;box-shadow:var(--shadow-sm)!important;backdrop-filter:none!important}.ant-card:hover{border-color:var(--border-primary)!important;background:#fff!important;box-shadow:var(--shadow-md)!important}.ant-card-head{min-height:48px!important;color:var(--text-primary)!important;border-bottom:1px solid var(--border-light)!important;background:#f8fbff!important}.ant-card-head-title{font-weight:700!important}.ant-card-body{background:transparent!important}
button,.ant-btn{border-radius:4px!important}.ant-btn{min-height:34px;color:var(--text-primary)!important;border:1px solid var(--border-primary)!important;background:#fff!important;box-shadow:none!important;font-weight:600}.ant-btn:hover,.ant-btn:focus-visible{color:#0b50c8!important;border-color:#1467f2!important;background:#f5f9ff!important}.ant-btn-primary{color:#fff!important;border-color:#1467f2!important;background:#1467f2!important}.ant-btn-primary:hover,.ant-btn-primary:focus-visible{color:#fff!important;border-color:#0b50c8!important;background:#0b50c8!important}.ant-btn-dangerous{color:var(--accent-danger)!important;border-color:#d8a5ac!important}.ant-btn-dangerous.ant-btn-primary{color:#fff!important;border-color:var(--accent-danger)!important;background:var(--accent-danger)!important}.theme-switch-btn{border:1px solid var(--border-primary)!important;border-radius:4px!important;background:#edf4fc!important}.theme-switch-btn .anticon{color:#0b50c8!important}
.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-picker,.ant-select-selector{color:var(--text-primary)!important;border-color:var(--border-primary)!important;border-radius:4px!important;background:#fff!important;box-shadow:none!important}.ant-input-affix-wrapper .ant-input{border:0!important;background:transparent!important}.ant-input:hover,.ant-input-affix-wrapper:hover,.ant-input-number:hover,.ant-picker:hover,.ant-select-selector:hover{border-color:#6d9bd0!important}.ant-input:focus,.ant-input-focused,.ant-input-affix-wrapper-focused,.ant-input-affix-wrapper:focus-within,.ant-picker-focused,.ant-select-focused .ant-select-selector{border-color:#1467f2!important;box-shadow:0 0 0 3px rgba(20,103,242,.14)!important}.ant-form-item-label>label{color:var(--text-primary)!important;font-weight:600}.ant-checkbox-inner{border-radius:2px!important;border-color:var(--border-secondary)!important}.ant-checkbox-checked .ant-checkbox-inner,.ant-switch-checked{border-color:#1467f2!important;background:#1467f2!important}
.ant-table,.ant-table-container,.ant-table-content{background:#fff!important}.ant-table-wrapper .ant-table{overflow:hidden;border:1px solid var(--border-light);border-radius:5px}.ant-table-thead>tr>th{height:42px;color:#365875!important;border-bottom:1px solid var(--border-primary)!important;background:#edf4fc!important;font-size:12px;font-weight:700!important}.ant-table-tbody>tr>td{color:var(--text-primary)!important;border-bottom:1px solid #e3edf6!important;background:#fff!important}.ant-table-tbody>tr:nth-child(even)>td{background:#fbfdff!important}.ant-table-tbody>tr:hover>td{background:#eef5ff!important}.device-list-item{border:1px solid var(--border-light)!important;border-radius:4px!important;background:#fff!important}.device-list-item:hover{border-color:var(--border-primary)!important;background:#f5f9ff!important}.device-list-item.selected{border-color:#1467f2!important;background:#eaf2ff!important}
.ant-tabs-nav:before{border-bottom-color:var(--border-light)!important}.ant-tabs-tab{color:var(--text-secondary)!important}.ant-tabs-tab:hover,.ant-tabs-tab-active .ant-tabs-tab-btn{color:#0b50c8!important}.ant-tabs-ink-bar{background:#1467f2!important}.custom-tabs .ant-tabs-tab{border-color:var(--border-light)!important;border-radius:4px!important;background:#fff!important;box-shadow:none!important}.custom-tabs .ant-tabs-tab-active{border-color:#9bbcf0!important;background:#eaf2ff!important}.ant-tag{border-radius:3px!important}.ant-pagination{padding:7px 10px!important;border:1px solid var(--border-light)!important;border-radius:5px!important;background:rgba(255,255,255,.92)!important;box-shadow:none!important;backdrop-filter:none!important}.ant-pagination-item{border-radius:3px!important}.ant-pagination-item-active{border-color:#1467f2!important;background:#1467f2!important}.ant-pagination-item-active a{color:#fff!important}
.ant-modal-content,.ant-drawer-content{color:var(--text-primary)!important;border:1px solid var(--border-primary)!important;border-radius:6px!important;background:#fff!important;box-shadow:var(--shadow-lg)!important}.ant-modal-header,.ant-drawer-header{border-bottom:1px solid var(--border-light)!important;background:#f8fbff!important}.ant-modal-title,.ant-drawer-title{color:var(--text-primary)!important;font-weight:700!important}.ant-dropdown-menu,.ant-select-dropdown,.ant-popover-inner{border:1px solid var(--border-primary)!important;border-radius:5px!important;background:#fff!important;box-shadow:var(--shadow-md)!important}.ant-dropdown-menu-item:hover,.ant-select-item-option-active{background:#edf4fc!important}.ant-message-notice-content,.ant-notification-notice{border:1px solid var(--border-primary)!important;border-radius:5px!important;background:#fff!important;box-shadow:var(--shadow-md)!important}
@media(max-width:768px){.ant-layout-header{padding-inline:12px!important}.ant-card{border-radius:4px!important}.ant-card-body{padding:14px!important}.ant-table-thead>tr>th,.ant-table-tbody>tr>td{padding:10px 8px!important}.ant-modal{max-width:calc(100vw - 24px)!important;margin:12px auto!important}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}

/* v2: restore contrast around the app shell and quiet the work canvas. */
:root{--bg-primary:#edf2f7;--bg-secondary:#f7f9fc;--bg-tertiary:#e8eef5;--bg-card:#fff;--bg-hover:#e8f1fc;--bg-sidebar:#102a43;--text-primary:#20364d;--text-secondary:#526a82;--text-tertiary:#71869a;--border-primary:#b8c9d9;--border-secondary:#94aec7;--border-light:#d6e0ea;--accent-primary:#1769dc;--accent-success:#087b69;--accent-warning:#9a6316;--accent-danger:#bd3346}
html,body,#root{background:#102a43!important}
.ant-layout,.ant-layout-has-sider{background:#edf2f7!important}
.ant-layout-sider,.ant-layout-sider-dark,.ant-layout-sider-light,.ant-layout-sider-children{background:#102a43!important}
.ant-layout-sider{border-right:1px solid #254a6c!important;box-shadow:none!important}
.ant-layout-sider>div>div:first-child{min-height:62px;border-bottom:1px solid rgba(185,211,234,.16)}
.ant-layout-sider>div>div:first-child div{color:#fff!important;font-weight:750!important}
.ant-layout-sider .ant-menu,.ant-layout-sider .ant-menu-dark{background:#102a43!important}
.ant-layout-sider .ant-menu-dark.ant-menu-inline .ant-menu-item{height:44px!important;margin:3px 9px!important;padding-inline:12px!important;color:#b9cde0!important;border-radius:4px!important}
.ant-layout-sider .ant-menu-dark.ant-menu-inline .ant-menu-item:hover{color:#fff!important;background:#183a59!important}
.ant-layout-sider .ant-menu-dark.ant-menu-inline .ant-menu-item-selected{color:#fff!important;background:#1769dc!important;box-shadow:none!important}
.ant-layout-sider .ant-menu-dark.ant-menu-inline .ant-menu-item-selected:after{display:none!important}
.ant-layout-sider .ant-menu-item .anticon,.ant-layout-sider .ant-menu-submenu-title .anticon{color:inherit!important}
.ant-layout-sider input{color:#eaf3fb!important;border-color:#47647e!important;background:#183a59!important}
.ant-layout-sider input::placeholder{color:#99b2c8!important}

.ant-layout-header{background:#fff!important;border-bottom:1px solid #cbd8e4!important;box-shadow:0 1px 0 rgba(23,58,90,.04)!important;backdrop-filter:none!important}
.ant-layout-header>div:first-child .ant-btn{color:#405e78!important;border-color:transparent!important;background:transparent!important}
.ant-layout-header>div:first-child .ant-btn:hover{color:#1769dc!important;background:#edf4fc!important}
.ant-layout-header>div:first-child>div:nth-child(2){color:#20364d!important;border-left-color:#d6e0ea!important}
.ant-layout-header>div:last-child span{color:#526a82!important;text-shadow:none!important}
.ant-layout-header .ant-select-selector{color:#29445e!important;border-color:#b8c9d9!important;background:#fff!important}
.ant-layout-header .ant-select-selection-item,.ant-layout-header .ant-select-arrow{color:#29445e!important}
.ant-layout-header .ant-badge-count{color:#fff!important;background:#087b69!important}
.ant-layout-header .ant-avatar,.ant-layout-header .ant-avatar *{color:#fff!important}
.ant-layout-header .ant-btn-primary,.ant-layout-header .ant-btn-primary *{color:#fff!important;background:#1769dc!important}
.ant-layout-header .theme-switch-btn,.ant-layout-header .theme-switch-btn *{color:#35536f!important;background:#f4f7fa!important}

.ant-layout-content{background:#edf2f7!important}
.ant-layout-content:before{display:none!important}
.ant-layout-content>div{color:#20364d}
.ant-layout-content [style*="background: rgb(255, 255, 255)"],.ant-layout-content [style*="background: #fff"]{border-color:#d6e0ea!important}
.ant-card,.content-card,.header-section,.sidebar-panel,.device-info-panel,.control-panel-section,.stats-section{border-color:#cbd8e4!important;background:#fff!important;box-shadow:0 1px 3px rgba(23,58,90,.06)!important}
.ant-card:hover{border-color:#a8bdd1!important;box-shadow:0 8px 24px rgba(23,58,90,.09)!important}
.ant-card-head{color:#20364d!important;border-bottom-color:#d6e0ea!important;background:#f7f9fc!important}
.ant-card-head-title{color:#20364d!important}
.ant-table-wrapper .ant-table{border-color:#cbd8e4!important}
.ant-table-thead>tr>th{color:#37546f!important;border-bottom-color:#b8c9d9!important;background:#e9f0f7!important}
.ant-table-tbody>tr>td{color:#263f57!important;border-bottom-color:#e1e8ef!important}
.ant-table-tbody>tr:nth-child(even)>td{background:#fafbfd!important}
.ant-table-tbody>tr:hover>td{background:#edf4fc!important}
.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-picker,.ant-select-selector{color:#29445e!important;border-color:#b8c9d9!important;background:#fff!important}
.ant-input::placeholder,.ant-input-affix-wrapper input::placeholder{color:#8295a8!important}
.ant-btn{color:#29445e!important;border-color:#aec1d3!important;background:#fff!important}
.ant-btn:hover,.ant-btn:focus-visible{color:#1257b8!important;border-color:#1769dc!important;background:#f4f8fd!important}
.ant-btn-primary{color:#fff!important;border-color:#1769dc!important;background:#1769dc!important}
.ant-btn-primary:hover,.ant-btn-primary:focus-visible{color:#fff!important;border-color:#0f54b8!important;background:#0f54b8!important}
.ant-btn-dangerous{color:#b52c40!important;border-color:#d7a4ad!important;background:#fff!important}
.ant-btn-dangerous.ant-btn-primary{color:#fff!important;border-color:#bd3346!important;background:#bd3346!important}
.device-list-item{border-color:#cbd8e4!important;background:#fff!important;box-shadow:0 1px 2px rgba(23,58,90,.04)!important}
.device-list-item:hover{border-color:#9fb7cc!important;background:#fff!important;box-shadow:0 6px 18px rgba(23,58,90,.08)!important}
.device-list-item.selected{border-color:#1769dc!important;background:#f4f8fd!important}
.ant-pagination{border-color:#cbd8e4!important;background:#fff!important}
.ant-modal-content,.ant-drawer-content,.ant-dropdown-menu,.ant-select-dropdown,.ant-popover-inner{border-color:#b8c9d9!important;background:#fff!important}
@media(max-width:768px){.ant-layout-header>div:last-child{gap:8px!important}.ant-layout-header>div:last-child>div:first-child{display:none!important}}

/* The supplied admin reference uses a light navigation rail. */
html,body,#root{background:#edf2f7!important}
.ant-layout-sider,.ant-layout-sider-dark,.ant-layout-sider-light,.ant-layout-sider-children{background:#f7fafe!important}
.ant-layout-sider{border-right:1px solid #b8c9d9!important}
.ant-layout-sider>div>div:first-child{border-bottom:1px solid #d6e0ea}
.ant-layout-sider>div>div:first-child div{color:#0f57c7!important;font-weight:800!important}
.ant-layout-sider .ant-menu,.ant-layout-sider .ant-menu-dark{background:#f7fafe!important}
.ant-layout-sider .ant-menu-dark.ant-menu-inline .ant-menu-item{color:#3e5d78!important;background:transparent!important}
.ant-layout-sider .ant-menu-dark.ant-menu-inline .ant-menu-item:hover{color:#0f57c7!important;background:#eaf2fc!important}
.ant-layout-sider .ant-menu-dark.ant-menu-inline .ant-menu-item-selected{color:#0f57c7!important;background:#dceaff!important;box-shadow:inset 3px 0 #1769dc!important}
.ant-layout-sider .ant-menu-dark.ant-menu-inline .ant-menu-item-selected .anticon,.ant-layout-sider .ant-menu-dark.ant-menu-inline .ant-menu-item-selected .ant-menu-title-content{color:#0f57c7!important}
.ant-layout-sider>div>div[style*="border-top"]{border-top-color:#d6e0ea!important}
.ant-layout-sider>div>div[style*="border-top"] div{color:#4c6680!important}
.ant-layout-sider>div>div[style*="border-top"] div[style*="rgba(0, 0, 0, 0.2)"]{color:#0f57c7!important;background:#eaf2fc!important}
.ant-layout-sider>div>div[style*="border-top"] span[style*="width: 3px"]{background:#1769dc!important}
.ant-layout-sider input{color:#29445e!important;border-color:#b8c9d9!important;background:#fff!important}
.ant-layout-sider input::placeholder{color:#8295a8!important}

/* The status header on device cards should signal, not tint the whole card. */
.ant-card>div:first-child[style*="border-bottom: 3px solid"]{background:#f7f9fc!important}
.ant-card>div:first-child[style*="border-bottom: 3px solid rgb(255, 77, 79)"]{background:#fff!important;border-bottom-color:#bd3346!important}
.ant-card>div:first-child[style*="border-bottom: 3px solid rgb(24, 144, 255)"]{background:#f3f8ff!important;border-bottom-color:#1769dc!important}
.ant-card .ant-card-body>div:nth-child(2){background:#fbfcfe!important}
.ant-card .ant-card-body>div:last-child{background:#f7f9fc!important}
.ant-card [style*="color: rgb(144, 147, 153)"]{color:#667d92!important}
.ant-card [style*="border-bottom: 1px solid rgb(232, 232, 232)"]{border-bottom-color:#e1e8ef!important}

/* Retain semantic colors without letting danger red dominate the workspace. */
.ant-card [style*="color: rgb(255, 77, 79)"]{color:#bd3346!important}
.ant-card [style*="color: rgb(82, 196, 26)"]{color:#087b69!important}
.ant-card [style*="color: rgb(24, 144, 255)"]{color:#1769dc!important}
.ant-layout-header [style*="color: rgb(148, 163, 184)"]{color:#526a82!important}
.ant-layout-header [style*="color: rgb(226, 232, 240)"]{color:#20364d!important}
.ant-layout-header [style*="color: rgb(100, 116, 139)"]{color:#71869a!important}
