/* 丰凯云物联多主题系统：主题令牌 + Element UI / 仪表盘覆盖 */

:root,
html[data-fk-theme="industrial"] {
  color-scheme: light;
  --fk-primary: #4f6ef7;
  --fk-primary-rgb: 79, 110, 247;
  --fk-primary-strong: #3f59df;
  --fk-accent: #20b8b2;
  --fk-accent-rgb: 32, 184, 178;
  --fk-page: #eef1f8;
  --fk-surface: #ffffff;
  --fk-surface-soft: #f7f9fd;
  --fk-surface-raised: #ffffff;
  --fk-sidebar: #ffffff;
  --fk-navbar: #ffffff;
  --fk-text: #202a44;
  --fk-text-soft: #46506b;
  --fk-muted: #78859b;
  --fk-border: #e3e9f4;
  --fk-divider: #edf0f6;
  --fk-hover: #f1f4ff;
  --fk-active: #e9eeff;
  --fk-success: #22a875;
  --fk-warning: #e9a11c;
  --fk-danger: #ef5964;
  --fk-info: #4c8fe8;
  --fk-shadow: 0 6px 24px rgba(31, 45, 80, .08);
  --fk-shadow-hover: 0 14px 36px rgba(31, 45, 80, .14);
  --fk-overlay: rgba(16, 26, 48, .46);
  --fk-gradient: linear-gradient(135deg, #5b7cfa 0%, #4460f1 62%, #25b8c0 100%);
  --fk-chart-1: #4f7cf7;
  --fk-chart-2: #24b8bd;
  --fk-chart-3: #8a6ff0;
  --fk-chart-4: #22a875;
  --fk-chart-5: #e7a23b;
  --fk-radius: 14px;
}

html[data-fk-theme="night"] {
  color-scheme: dark;
  --fk-primary: #388fff;
  --fk-primary-rgb: 56, 143, 255;
  --fk-primary-strong: #62a6ff;
  --fk-accent: #2dd4bf;
  --fk-accent-rgb: 45, 212, 191;
  --fk-page: #07111f;
  --fk-surface: #0d1b2d;
  --fk-surface-soft: #12243a;
  --fk-surface-raised: #13263c;
  --fk-sidebar: #091726;
  --fk-navbar: #0c1a2b;
  --fk-text: #e9f1fb;
  --fk-text-soft: #c1d0e2;
  --fk-muted: #8fa4bd;
  --fk-border: #253a53;
  --fk-divider: #1e324a;
  --fk-hover: #152b44;
  --fk-active: #193754;
  --fk-success: #3dd6a0;
  --fk-warning: #f3b84b;
  --fk-danger: #ff6f7c;
  --fk-info: #63a8ff;
  --fk-shadow: 0 10px 30px rgba(0, 5, 14, .3);
  --fk-shadow-hover: 0 18px 44px rgba(0, 5, 14, .46);
  --fk-overlay: rgba(1, 7, 16, .74);
  --fk-gradient: linear-gradient(135deg, #397fff 0%, #2767d8 58%, #21b9ad 100%);
  --fk-chart-1: #55a0ff;
  --fk-chart-2: #35d5c3;
  --fk-chart-3: #a88cff;
  --fk-chart-4: #44d49c;
  --fk-chart-5: #f4bd56;
  --fk-radius: 14px;
}

html[data-fk-theme="light"] {
  color-scheme: light;
  --fk-primary: #2563eb;
  --fk-primary-rgb: 37, 99, 235;
  --fk-primary-strong: #1d4ed8;
  --fk-accent: #089fb4;
  --fk-accent-rgb: 8, 159, 180;
  --fk-page: #f6f8fb;
  --fk-surface: #ffffff;
  --fk-surface-soft: #f9fafc;
  --fk-surface-raised: #ffffff;
  --fk-sidebar: #ffffff;
  --fk-navbar: #ffffff;
  --fk-text: #172033;
  --fk-text-soft: #374151;
  --fk-muted: #6b7280;
  --fk-border: #dfe5ec;
  --fk-divider: #edf1f5;
  --fk-hover: #f2f6fb;
  --fk-active: #e8f0ff;
  --fk-success: #16845c;
  --fk-warning: #c77b08;
  --fk-danger: #df4652;
  --fk-info: #2876dc;
  --fk-shadow: 0 4px 18px rgba(30, 45, 70, .06);
  --fk-shadow-hover: 0 10px 28px rgba(30, 45, 70, .11);
  --fk-overlay: rgba(16, 24, 40, .42);
  --fk-gradient: linear-gradient(135deg, #2563eb 0%, #2e75e8 62%, #0ca6b8 100%);
  --fk-chart-1: #2563eb;
  --fk-chart-2: #089fb4;
  --fk-chart-3: #7c5ce6;
  --fk-chart-4: #16845c;
  --fk-chart-5: #d38b19;
  --fk-radius: 10px;
}

html[data-fk-theme="energy"] {
  color-scheme: light;
  --fk-primary: #14966f;
  --fk-primary-rgb: 20, 150, 111;
  --fk-primary-strong: #0b7658;
  --fk-accent: #55b569;
  --fk-accent-rgb: 85, 181, 105;
  --fk-page: #edf5ef;
  --fk-surface: #ffffff;
  --fk-surface-soft: #f4faf5;
  --fk-surface-raised: #ffffff;
  --fk-sidebar: #f8fcf8;
  --fk-navbar: #ffffff;
  --fk-text: #17362b;
  --fk-text-soft: #365c4e;
  --fk-muted: #718a80;
  --fk-border: #d8e8dc;
  --fk-divider: #e7f0e9;
  --fk-hover: #eaf6ed;
  --fk-active: #dcf1e3;
  --fk-success: #159567;
  --fk-warning: #d69a1f;
  --fk-danger: #df5c5c;
  --fk-info: #398aa6;
  --fk-shadow: 0 6px 24px rgba(30, 83, 59, .08);
  --fk-shadow-hover: 0 14px 34px rgba(30, 83, 59, .14);
  --fk-overlay: rgba(8, 40, 26, .45);
  --fk-gradient: linear-gradient(135deg, #0f8b66 0%, #1aa177 58%, #69b95e 100%);
  --fk-chart-1: #14966f;
  --fk-chart-2: #55b569;
  --fk-chart-3: #2f8b9d;
  --fk-chart-4: #8bbd45;
  --fk-chart-5: #d8a62e;
  --fk-radius: 14px;
}

html[data-fk-theme="manufacturing"] {
  color-scheme: light;
  --fk-primary: #e56f24;
  --fk-primary-rgb: 229, 111, 36;
  --fk-primary-strong: #c95714;
  --fk-accent: #f0a332;
  --fk-accent-rgb: 240, 163, 50;
  --fk-page: #f2f0ec;
  --fk-surface: #fffdfa;
  --fk-surface-soft: #f8f5f0;
  --fk-surface-raised: #ffffff;
  --fk-sidebar: #2c3138;
  --fk-navbar: #fffdfa;
  --fk-text: #2a2f36;
  --fk-text-soft: #555c65;
  --fk-muted: #7c838a;
  --fk-border: #e6ded4;
  --fk-divider: #eee7df;
  --fk-hover: #fff1e6;
  --fk-active: #ffe5d2;
  --fk-success: #328b63;
  --fk-warning: #d78915;
  --fk-danger: #d95050;
  --fk-info: #547da5;
  --fk-shadow: 0 7px 24px rgba(71, 51, 36, .09);
  --fk-shadow-hover: 0 15px 36px rgba(71, 51, 36, .16);
  --fk-overlay: rgba(29, 27, 25, .48);
  --fk-gradient: linear-gradient(135deg, #dd641e 0%, #ea7d26 58%, #f0a332 100%);
  --fk-chart-1: #e56f24;
  --fk-chart-2: #f0a332;
  --fk-chart-3: #657b91;
  --fk-chart-4: #39906b;
  --fk-chart-5: #b95b45;
  --fk-radius: 10px;
}

html[data-fk-theme] {
  --brand: var(--fk-primary);
  --brand-grad: var(--fk-gradient);
  --page-bg: var(--fk-page);
  --soft-shadow: var(--fk-shadow);
  --soft-shadow-hover: var(--fk-shadow-hover);
  --card-radius: var(--fk-radius);
}

html[data-fk-theme] body,
html[data-fk-theme] .app-wrapper,
html[data-fk-theme] .main-container,
html[data-fk-theme] .app-main,
html[data-fk-theme] .app-container {
  background-color: var(--fk-page) !important;
  color: var(--fk-text) !important;
}

html[data-fk-theme] .navbar,
html[data-fk-theme] .navbar.fixed-header {
  border-bottom: 1px solid var(--fk-divider) !important;
  background: var(--fk-navbar) !important;
  box-shadow: var(--fk-shadow) !important;
}

html[data-fk-theme] .navbar::before {
  background: var(--fk-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

html[data-fk-theme] .navbar .hamburger-container,
html[data-fk-theme] .navbar .breadcrumb-container,
html[data-fk-theme] .navbar .navbar-right,
html[data-fk-theme] .navbar .navbar-right span,
html[data-fk-theme] .navbar .navbar-right-menu-wrapper,
html[data-fk-theme] .navbar .navbar-right .el-dropdown,
html[data-fk-theme] .navbar .navbar-right-menu-wrapper:last-child .navbar-right-menu::before {
  color: var(--fk-text) !important;
}

html[data-fk-theme] .navbar .navbar-right-menu-wrapper {
  border-color: var(--fk-border) !important;
  background: var(--fk-surface-soft) !important;
}

html[data-fk-theme] .navbar .navbar-right-menu-wrapper:hover,
html[data-fk-theme] .navbar .hamburger-container:hover {
  border-color: rgba(var(--fk-primary-rgb), .3) !important;
  color: var(--fk-primary) !important;
  background: var(--fk-hover) !important;
}

html[data-fk-theme] .sidebar-container,
html[data-fk-theme] .sidebar-container .el-scrollbar__wrap,
html[data-fk-theme] .sidebar-container .el-menu {
  border-color: var(--fk-divider) !important;
  background: var(--fk-sidebar) !important;
  box-shadow: 1px 0 0 var(--fk-divider), 4px 0 18px rgba(var(--fk-primary-rgb), .03) !important;
}

html[data-fk-theme] .sidebar-container .el-menu-item,
html[data-fk-theme] .sidebar-container .el-submenu__title {
  color: var(--fk-text-soft) !important;
  background: transparent !important;
}

html[data-fk-theme] .sidebar-container .el-menu-item:hover,
html[data-fk-theme] .sidebar-container .el-submenu__title:hover {
  color: var(--fk-primary) !important;
  background: var(--fk-hover) !important;
}

html[data-fk-theme] .sidebar-container .el-menu-item.is-active,
html[data-fk-theme] .sidebar-container .el-submenu.is-active > .el-submenu__title {
  color: var(--fk-primary) !important;
  background: var(--fk-active) !important;
  box-shadow: inset 3px 0 0 var(--fk-primary) !important;
}

html[data-fk-theme] .sidebar-container .el-submenu .el-menu {
  background: var(--fk-surface-soft) !important;
}

html[data-fk-theme="manufacturing"] .sidebar-container .el-menu-item,
html[data-fk-theme="manufacturing"] .sidebar-container .el-submenu__title {
  color: #d8dde4 !important;
}

html[data-fk-theme="manufacturing"] .sidebar-container .el-menu-item:hover,
html[data-fk-theme="manufacturing"] .sidebar-container .el-submenu__title:hover,
html[data-fk-theme="manufacturing"] .sidebar-container .el-menu-item.is-active,
html[data-fk-theme="manufacturing"] .sidebar-container .el-submenu.is-active > .el-submenu__title {
  color: #ffd2b2 !important;
  background: rgba(229, 111, 36, .18) !important;
}

html[data-fk-theme="manufacturing"] .sidebar-container .el-submenu .el-menu {
  background: #252a30 !important;
}

html[data-fk-theme] .el-card,
html[data-fk-theme] .el-dialog,
html[data-fk-theme] .el-drawer,
html[data-fk-theme] .el-message-box,
html[data-fk-theme] .el-popover,
html[data-fk-theme] .el-dropdown-menu,
html[data-fk-theme] .el-select-dropdown,
html[data-fk-theme] .el-picker-panel,
html[data-fk-theme] .el-menu--popup {
  border-color: var(--fk-border) !important;
  border-radius: var(--fk-radius) !important;
  color: var(--fk-text) !important;
  background: var(--fk-surface-raised) !important;
  box-shadow: var(--fk-shadow) !important;
}

html[data-fk-theme] .el-card:hover {
  box-shadow: var(--fk-shadow-hover) !important;
}

html[data-fk-theme] .el-card__header,
html[data-fk-theme] .el-dialog__header,
html[data-fk-theme] .el-drawer__header,
html[data-fk-theme] .el-message-box__header {
  border-color: var(--fk-divider) !important;
  color: var(--fk-text) !important;
  background: var(--fk-surface) !important;
}

html[data-fk-theme] .el-card__body,
html[data-fk-theme] .el-dialog__body,
html[data-fk-theme] .el-drawer__body,
html[data-fk-theme] .el-message-box__content {
  color: var(--fk-text-soft) !important;
  background: var(--fk-surface) !important;
}

html[data-fk-theme] .el-table,
html[data-fk-theme] .el-table__expanded-cell,
html[data-fk-theme] .el-table th,
html[data-fk-theme] .el-table tr,
html[data-fk-theme] .el-table td {
  border-color: var(--fk-divider) !important;
  color: var(--fk-text-soft) !important;
  background: var(--fk-surface) !important;
}

html[data-fk-theme] .el-table th,
html[data-fk-theme] .el-table__header-wrapper th {
  color: var(--fk-text) !important;
  background: var(--fk-surface-soft) !important;
}

html[data-fk-theme] .el-table--enable-row-hover .el-table__body tr:hover > td,
html[data-fk-theme] .el-table__body tr.current-row > td {
  background: var(--fk-hover) !important;
}

html[data-fk-theme] .el-table::before,
html[data-fk-theme] .el-table--border::after,
html[data-fk-theme] .el-table--group::after {
  background: var(--fk-border) !important;
}

html[data-fk-theme] .el-form-item__label,
html[data-fk-theme] .el-dialog__title,
html[data-fk-theme] .el-drawer__header,
html[data-fk-theme] .el-checkbox__label,
html[data-fk-theme] .el-radio__label {
  color: var(--fk-text-soft) !important;
}

html[data-fk-theme] .el-input__inner,
html[data-fk-theme] .el-textarea__inner,
html[data-fk-theme] .el-range-input,
html[data-fk-theme] .el-input-number,
html[data-fk-theme] .el-select .el-input__inner {
  border-color: var(--fk-border) !important;
  color: var(--fk-text) !important;
  background: var(--fk-surface-soft) !important;
}

html[data-fk-theme] .el-input__inner:hover,
html[data-fk-theme] .el-textarea__inner:hover,
html[data-fk-theme] .el-select .el-input__inner:hover {
  border-color: rgba(var(--fk-primary-rgb), .52) !important;
}

html[data-fk-theme] .el-input__inner:focus,
html[data-fk-theme] .el-textarea__inner:focus,
html[data-fk-theme] .el-select .el-input.is-focus .el-input__inner {
  border-color: var(--fk-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--fk-primary-rgb), .12) !important;
}

html[data-fk-theme] .el-input__inner::placeholder,
html[data-fk-theme] .el-textarea__inner::placeholder {
  color: var(--fk-muted) !important;
}

html[data-fk-theme] .el-button--primary,
html[data-fk-theme] .el-button.is-plain:hover,
html[data-fk-theme] .el-button.is-plain:focus {
  border-color: var(--fk-primary) !important;
  color: #fff !important;
  background: var(--fk-gradient) !important;
  box-shadow: 0 7px 18px rgba(var(--fk-primary-rgb), .2) !important;
}

html[data-fk-theme] .el-button--default,
html[data-fk-theme] .el-button:not(.el-button--primary):not(.el-button--danger):not(.el-button--success):not(.el-button--warning) {
  border-color: var(--fk-border) !important;
  color: var(--fk-text-soft) !important;
  background: var(--fk-surface) !important;
}

html[data-fk-theme] .el-button--default:hover,
html[data-fk-theme] .el-button:not(.el-button--primary):not(.el-button--danger):not(.el-button--success):not(.el-button--warning):hover {
  border-color: rgba(var(--fk-primary-rgb), .42) !important;
  color: var(--fk-primary) !important;
  background: var(--fk-hover) !important;
}

html[data-fk-theme] .el-checkbox__input.is-checked .el-checkbox__inner,
html[data-fk-theme] .el-radio__input.is-checked .el-radio__inner,
html[data-fk-theme] .el-switch.is-checked .el-switch__core {
  border-color: var(--fk-primary) !important;
  background: var(--fk-primary) !important;
}

html[data-fk-theme] .el-checkbox__input.is-checked + .el-checkbox__label,
html[data-fk-theme] .el-radio__input.is-checked + .el-radio__label,
html[data-fk-theme] .el-tabs__item.is-active,
html[data-fk-theme] .el-tabs__item:hover,
html[data-fk-theme] .el-pagination.is-background .el-pager li:not(.disabled).active {
  color: var(--fk-primary) !important;
}

html[data-fk-theme] .el-tabs__active-bar,
html[data-fk-theme] .el-slider__bar,
html[data-fk-theme] .el-progress-bar__inner {
  background: var(--fk-gradient) !important;
}

html[data-fk-theme] .el-tabs__nav-wrap::after,
html[data-fk-theme] .el-collapse-item__wrap,
html[data-fk-theme] .el-collapse-item__header {
  border-color: var(--fk-divider) !important;
  color: var(--fk-text-soft) !important;
  background: var(--fk-surface) !important;
}

html[data-fk-theme] .el-dropdown-menu__item,
html[data-fk-theme] .el-select-dropdown__item,
html[data-fk-theme] .el-menu--popup .el-menu-item {
  color: var(--fk-text-soft) !important;
}

html[data-fk-theme] .el-dropdown-menu__item:hover,
html[data-fk-theme] .el-select-dropdown__item.hover,
html[data-fk-theme] .el-select-dropdown__item:hover,
html[data-fk-theme] .el-menu--popup .el-menu-item:hover {
  color: var(--fk-primary) !important;
  background: var(--fk-hover) !important;
}

html[data-fk-theme] .el-tag:not(.el-tag--success):not(.el-tag--danger):not(.el-tag--warning) {
  border-color: rgba(var(--fk-primary-rgb), .24) !important;
  color: var(--fk-primary) !important;
  background: rgba(var(--fk-primary-rgb), .08) !important;
}

html[data-fk-theme] .el-pagination button,
html[data-fk-theme] .el-pagination .el-pager li {
  color: var(--fk-text-soft) !important;
  background: var(--fk-surface) !important;
}

html[data-fk-theme] .el-loading-mask {
  background: rgba(var(--fk-primary-rgb), .05) !important;
}

html[data-fk-theme] .el-loading-spinner .path,
html[data-fk-theme] .el-loading-spinner .el-loading-text {
  stroke: var(--fk-primary) !important;
  color: var(--fk-primary) !important;
}

html[data-fk-theme] #nprogress .bar {
  background: var(--fk-gradient) !important;
}

html[data-fk-theme] body.xc-dashboard-active .app-main,
html[data-fk-theme] .xc-dashboard {
  color: var(--fk-text) !important;
  background: var(--fk-page) !important;
}

html[data-fk-theme] .xc-dashboard::before {
  opacity: .7 !important;
  background-image:
    radial-gradient(circle at 16% 5%, rgba(var(--fk-primary-rgb), .14), transparent 30%),
    radial-gradient(circle at 87% 18%, rgba(var(--fk-accent-rgb), .1), transparent 26%) !important;
}

html[data-fk-theme] .xc-dashboard-heading,
html[data-fk-theme] .xc-dashboard .xc-resource-card,
html[data-fk-theme] .xc-dashboard .overview-wrapper .overview-item,
html[data-fk-theme] .xc-dashboard .bd-row .el-card {
  border-color: var(--fk-border) !important;
  color: var(--fk-text) !important;
  background: var(--fk-surface) !important;
  box-shadow: var(--fk-shadow) !important;
}

html[data-fk-theme] .xc-dashboard .bd-row > .bd-col,
html[data-fk-theme] .xc-dashboard .bd-row > .bd-col:last-child,
html[data-fk-theme] .xc-dashboard .bd-row.mt10,
html[data-fk-theme] .xc-dashboard .bd-row.mb10,
html[data-fk-theme] .xc-dashboard .bd-row .mt10,
html[data-fk-theme] .xc-dashboard .bd-row .mb10 {
  border-color: transparent !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-fk-theme="night"] .xc-dashboard .xc-panel-project > .el-card__body::before {
  background:
    radial-gradient(circle at 88% 16%, rgba(var(--fk-accent-rgb), .1), transparent 24%),
    linear-gradient(180deg, rgba(45, 67, 90, .5), transparent 31%) !important;
}

html[data-fk-theme] .xc-dashboard-heading::before,
html[data-fk-theme] .xc-dashboard .bd-row .el-card__header::before {
  background: var(--fk-gradient) !important;
}

html[data-fk-theme] .xc-dashboard-eyebrow,
html[data-fk-theme] .xc-dashboard-refresh,
html[data-fk-theme] .xc-dashboard .overview-wrapper .overview-item .overview-item__content .number,
html[data-fk-theme] .xc-dashboard .device-status .data .data-item .number {
  color: var(--fk-primary) !important;
}

html[data-fk-theme] .xc-dashboard-heading h1,
html[data-fk-theme] .xc-dashboard .bd-row .el-card__header,
html[data-fk-theme] .xc-dashboard .overview-wrapper .overview-item .overview-item__content > div {
  color: var(--fk-text) !important;
}

html[data-fk-theme] .xc-dashboard-heading p,
html[data-fk-theme] .xc-dashboard-updated,
html[data-fk-theme] .xc-dashboard .device-status .data .data-item .label {
  color: var(--fk-muted) !important;
}

html[data-fk-theme] .xc-dashboard-refresh {
  border-color: rgba(var(--fk-primary-rgb), .24) !important;
  background: rgba(var(--fk-primary-rgb), .08) !important;
}

html[data-fk-theme] .xc-dashboard-refresh:hover,
html[data-fk-theme] .xc-dashboard .overview-wrapper .overview-item:hover {
  border-color: rgba(var(--fk-primary-rgb), .4) !important;
  box-shadow: var(--fk-shadow-hover) !important;
}

html[data-fk-theme] .xc-dashboard-live {
  border-color: rgba(var(--fk-accent-rgb), .26) !important;
  color: var(--fk-success) !important;
  background: rgba(var(--fk-accent-rgb), .08) !important;
}

html[data-fk-theme] .xc-dashboard-live > i,
html[data-fk-theme] .xc-dashboard-flow,
html[data-fk-theme] .xc-dashboard-flow::after {
  background: var(--fk-accent) !important;
  box-shadow: 0 0 10px rgba(var(--fk-accent-rgb), .45) !important;
}

html[data-fk-theme] .xc-dashboard .overview-wrapper .overview-item::after {
  background: linear-gradient(90deg, var(--fk-primary), var(--fk-accent)) !important;
}

html[data-fk-theme] .xc-dashboard .bd-row .el-card__header {
  border-color: var(--fk-divider) !important;
  background: var(--fk-surface-soft) !important;
}

html[data-fk-theme] .xc-dashboard .device-status .data .data-item + .data-item {
  border-color: var(--fk-divider) !important;
}

/* 主题选择器 */
.fk-theme-switcher {
  position: relative;
  z-index: 2600;
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
}

.fk-theme-trigger {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--fk-border);
  border-radius: 10px;
  color: var(--fk-text-soft);
  background: var(--fk-surface-soft);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .2s ease;
}

.fk-theme-trigger:hover,
.fk-theme-trigger[aria-expanded="true"] {
  border-color: rgba(var(--fk-primary-rgb), .38);
  color: var(--fk-primary);
  background: var(--fk-hover);
}

.fk-theme-trigger:focus-visible,
.fk-theme-option:focus-visible,
.fk-theme-close:focus-visible {
  outline: 3px solid rgba(var(--fk-primary-rgb), .24);
  outline-offset: 2px;
}

.fk-theme-trigger svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fk-theme-panel {
  box-sizing: border-box;
  position: fixed;
  top: 62px;
  right: 16px;
  z-index: 3900;
  width: 330px;
  padding: 15px;
  border: 1px solid var(--fk-border);
  border-radius: 16px;
  color: var(--fk-text);
  background: var(--fk-surface-raised);
  box-shadow: 0 22px 60px rgba(12, 23, 42, .22);
  transform-origin: top right;
  animation: fk-theme-panel-in .2s ease both;
}

.fk-theme-panel[hidden] {
  display: none !important;
}

.fk-theme-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 12px;
}

.fk-theme-panel-head b,
.fk-theme-panel-head small {
  display: block;
}

.fk-theme-panel-head b {
  color: var(--fk-text);
  font-size: 14px;
}

.fk-theme-panel-head small {
  margin-top: 4px;
  color: var(--fk-muted);
  font-size: 10px;
}

.fk-theme-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  color: var(--fk-muted);
  background: transparent;
  cursor: pointer;
  font-size: 19px;
}

.fk-theme-close:hover {
  color: var(--fk-primary);
  background: var(--fk-hover);
}

.fk-theme-options {
  display: grid;
  gap: 8px;
}

.fk-theme-option {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 48px 1fr 22px;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--fk-border);
  border-radius: 11px;
  color: var(--fk-text-soft);
  background: var(--fk-surface);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.fk-theme-option:hover {
  border-color: rgba(var(--fk-primary-rgb), .35);
  background: var(--fk-hover);
  transform: translateX(2px);
}

.fk-theme-option.is-active {
  border-color: rgba(var(--fk-primary-rgb), .48);
  background: var(--fk-active);
  box-shadow: inset 3px 0 0 var(--fk-primary);
}

.fk-theme-swatches {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 34px;
  overflow: hidden;
  border: 1px solid rgba(127, 142, 164, .2);
  border-radius: 9px;
  background: var(--sample-bg);
}

.fk-theme-swatches i {
  width: 11px;
  height: 23px;
  margin-left: -2px;
  border: 2px solid var(--sample-surface);
  border-radius: 6px;
  background: var(--sample-color);
  transform: rotate(12deg);
}

.fk-theme-swatches i:nth-child(2) { opacity: .64; transform: rotate(12deg) translateY(3px); }
.fk-theme-swatches i:nth-child(3) { opacity: .32; transform: rotate(12deg) translateY(6px); }

.fk-theme-option-copy b,
.fk-theme-option-copy small {
  display: block;
}

.fk-theme-option-copy b {
  color: var(--fk-text);
  font-size: 12px;
}

.fk-theme-option-copy small {
  margin-top: 3px;
  color: var(--fk-muted);
  font-size: 9px;
}

.fk-theme-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--fk-border);
  border-radius: 50%;
  color: transparent;
  font-size: 0;
  opacity: 0;
  font-weight: 900;
}

.fk-theme-option.is-active .fk-theme-check {
  border-color: var(--fk-primary);
  color: #fff;
  background: var(--fk-primary);
  font-size: 11px;
  opacity: 1;
}

.fk-theme-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.fk-theme-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 4000;
  padding: 10px 15px;
  border: 1px solid var(--fk-border);
  border-radius: 999px;
  color: var(--fk-text);
  background: var(--fk-surface-raised);
  box-shadow: var(--fk-shadow-hover);
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  font-size: 12px;
  transition: opacity .22s ease, transform .22s ease;
}

.fk-theme-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes fk-theme-panel-in {
  from { opacity: 0; transform: translateY(-5px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .fk-theme-trigger {
    min-width: 40px;
    width: 40px;
    padding: 0;
  }
  .fk-theme-trigger span { display: none; }
  .fk-theme-panel {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100vh - 82px);
    overflow: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fk-theme-panel,
  .fk-theme-trigger,
  .fk-theme-option,
  .fk-theme-toast {
    animation: none !important;
    transition: none !important;
  }
}
