:root {
    /* 对齐 manage.glxs168.com（yudao / Element Plus） */
    --yx-font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    --yx-font-size-base: 14px;
    --yx-font-size-small: 13px;
    --yx-font-size-extra-small: 12px;
    --yx-line-height: 1.5;
    --yx-bg: #f5f7f9;
    --yx-card: #ffffff;
    --yx-ink: #303133;
    --yx-muted: #909399;
    --yx-accent: #409eff;
    --yx-accent-deep: #337ecc;
    --yx-accent-soft: #ecf5ff;
    --yx-sidebar-bg: #001529;
    --yx-sidebar-bg-light: #0f2438;
    --yx-sidebar-start: #001529;
    --yx-sidebar-mid: #001529;
    --yx-sidebar-end: #001529;
    --yx-sidebar-text: #bfcbd9;
    --yx-sidebar-text-soft: #bfcbd9;
    --yx-sidebar-hover: rgba(255, 255, 255, 0.06);
    --yx-sidebar-active: #409eff;
    --yx-sidebar-active-edge: transparent;
    --yx-header-bg: #ffffff;
    --yx-header-text: #303133;
    --yx-header-height: 50px;
    --yx-shell-border: #eee;
    --yx-shell-shadow: none;
    --yx-blue-card: #ecf5ff;
    --yx-green-card: #f0f9eb;
    --yx-purple-card: #f4f4f5;
    --yx-neutral-card: #f5f7fa;
    --yx-shadow: 0 1px 4px rgba(0, 21, 41, 0.06);
    --yx-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
    --yx-shell-pad: 0;
    --yx-shell-gap: 0;
    --yx-sidebar-width: 200px;
    --yx-shell-radius: 0;
}

html {
    font-family: var(--yx-font-family);
    /* 保持 16px 根字号：Django Admin 大量用 rem（0.875rem≈14px），勿改成 14px */
    font-size: 100%;
    line-height: var(--yx-line-height);
    --font-family-primary: var(--yx-font-family);
}

body {
    font-family: var(--yx-font-family);
    background: var(--yx-bg);
    color: var(--yx-ink);
    font-size: var(--yx-font-size-base);
    line-height: var(--yx-line-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 白顶栏：覆盖 Django 默认白字链接色 */
body:not(.login) {
    --body-fg: var(--yx-ink);
    --header-color: var(--yx-header-text);
    --header-link-color: var(--yx-header-text);
    --header-bg: var(--yx-header-bg);
}

body:not(.login) #container {
    min-height: 100vh;
    padding: 0;
    box-sizing: border-box;
}

body:not(.login) #header {
    position: fixed;
    top: 0;
    left: var(--yx-sidebar-width);
    right: 0;
    z-index: 200;
    height: var(--yx-header-height);
    background: var(--yx-header-bg);
    color: var(--yx-header-text);
    box-shadow: none;
    padding: 0 16px;
    border: 0;
    border-bottom: 1px solid var(--yx-shell-border);
    border-radius: 0;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

body:not(.login) #header #branding {
    display: flex;
    align-items: center;
    margin-right: auto;
}

#site-name {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.2;
}

.yx-brand-lockup {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 0;
}

.yx-brand-logo {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.yx-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--yx-header-height);
    padding: 0 14px;
    margin: 0 0 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    box-sizing: border-box;
    flex-shrink: 0;
}

.yx-sidebar-brand .yx-brand-logo {
    width: 28px;
    height: 28px;
}

.yx-sidebar-brand .yx-site-brand {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body:not(.login) #site-name a,
body:not(.login) #site-name .yx-site-brand {
    color: var(--yx-header-text);
    font-weight: 600;
    letter-spacing: 0;
    font-size: 15px;
    text-shadow: none;
}

/* 顶栏右侧：覆盖 Django 默认白字（--header-link-color: #fff） */
body:not(.login) #header #user-tools,
body:not(.login) #header #user-tools a,
body:not(.login) #header #user-tools a:link,
body:not(.login) #header #user-tools a:visited,
body:not(.login) #header #logout-form button {
    color: var(--yx-header-text);
    text-shadow: none;
    font-family: var(--yx-font-family);
    font-size: var(--yx-font-size-base);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    border-bottom: 0;
    opacity: 1;
}

body:not(.login) #header #user-tools a:hover,
body:not(.login) #header #user-tools a:focus,
body:not(.login) #header #logout-form button:hover,
body:not(.login) #header #logout-form button:focus,
body:not(.login) #header #logout-form button:active {
    color: var(--yx-accent);
    opacity: 1;
    border-bottom: 0;
    margin-bottom: 0;
    text-decoration: none;
}

body:not(.login) #container > nav[aria-label] {
    margin-top: var(--yx-shell-gap);
}

div.breadcrumbs {
    position: relative;
    z-index: 1;
    background: #fff;
    color: var(--yx-muted);
    border-bottom: 1px solid var(--yx-shell-border);
    border-radius: 0;
    padding: 10px 16px;
    margin: var(--yx-header-height) 0 0 var(--yx-sidebar-width);
    font-size: 13px;
}

div.breadcrumbs a {
    color: var(--yx-muted);
}

div.breadcrumbs a:hover {
    color: var(--yx-accent);
}

#content {
    padding: 24px;
}

/* 内容区铺满右侧，取消 Django 默认 colMS / nav_sidebar 造成的空白 */
body:not(.login) .main > #nav-sidebar + .content,
body:not(.login) #content-start {
    background: var(--yx-bg);
    min-width: 0;
    width: 100%;
    max-width: none !important;
    float: none;
    box-sizing: border-box;
    border-radius: 0;
    margin-left: 0;
}

body:not(.login) #content {
    padding: 12px 16px 20px;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    float: none;
}

body:not(.login) #content.colM,
body:not(.login) #content.colMS,
body:not(.login) #content.colSM {
    margin-right: 0 !important;
    margin-left: 0 !important;
    width: 100%;
    max-width: none;
}

body:not(.login) #content-main {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

body:not(.login) #changelist,
body:not(.login) #changelist .changelist-form-container {
    width: 100%;
}

body:not(.login) #changelist .changelist-form-container > div {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none !important;
    width: auto;
}

body:not(.login) #changelist.filtered .changelist-form-container {
    gap: 12px;
}

body:not(.login) #changelist-filter {
    flex: 0 0 240px;
}

body:not(.login) #changelist .results,
body:not(.login) #changelist-form,
body:not(.login) #changelist table {
    width: 100%;
}

body:not(.login) #main {
    display: block;
    min-height: calc(100vh - var(--yx-header-height));
    margin: 0 0 0 var(--yx-sidebar-width);
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    background: var(--yx-bg);
}

body:not(.login) #container:not(:has(div.breadcrumbs)) #main {
    margin-top: var(--yx-header-height);
}

body:not(.login) #toggle-nav-sidebar {
    display: none;
}

#nav-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 210;
    width: var(--yx-sidebar-width);
    max-height: 100vh;
    height: 100vh;
    margin-left: 0;
    visibility: visible;
    overflow: auto;
    background: var(--yx-sidebar-bg);
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 20px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

#nav-sidebar:hover {
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

#nav-sidebar::-webkit-scrollbar {
    width: 5px;
}

#nav-sidebar::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 0;
}

#nav-sidebar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
}

#nav-sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.32);
}

#nav-sidebar:hover::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.48);
}

#nav-sidebar::-webkit-scrollbar-corner {
    background: transparent;
}

#nav-sidebar .module {
    background: transparent;
    margin: 0 8px 4px;
    padding-bottom: 4px;
    border: 0;
    border-bottom: 0;
}

#nav-sidebar tbody {
    display: block;
    background: var(--yx-sidebar-bg-light) !important;
    border-radius: 2px;
    margin: 0 0 6px;
    padding: 4px 0;
}

#nav-sidebar .module:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

#nav-sidebar table,
#nav-sidebar tbody,
#nav-sidebar tr,
#nav-sidebar th,
#nav-sidebar td {
    background: transparent !important;
    border: 0 !important;
    border-color: transparent !important;
}

#nav-sidebar .module caption,
#nav-sidebar .module th,
#nav-sidebar .module td,
#nav-sidebar .section {
    color: var(--yx-sidebar-text-soft);
}

#nav-sidebar .module caption,
#nav-sidebar .section {
    background: transparent;
    border-radius: 2px;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 12px;
    letter-spacing: 0;
    color: #fff;
    transition: background 0.2s var(--yx-ease-soft), color 0.2s var(--yx-ease-soft);
}

/* 应用分组折叠：默认收起子菜单（对齐 manage） */
#nav-sidebar .module.is-collapsed .yx-nav-submenu,
#nav-sidebar .module.is-collapsed thead {
    display: none !important;
}

#nav-sidebar .module:not(.is-collapsed) .yx-nav-submenu {
    display: block !important;
}

#nav-sidebar .yx-nav-toggle {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

#nav-sidebar .yx-nav-chevron {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    margin-left: auto;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    /* 与 manage 一致：箭头朝下 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024' fill='%23bfcbd9'%3E%3Cpath d='M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z'/%3E%3C/svg%3E");
    opacity: 0.85;
    transform: none;
}

#nav-sidebar .module.is-collapsed .yx-nav-chevron,
#nav-sidebar .module:not(.is-collapsed) .yx-nav-chevron {
    transform: none;
}

/* 去掉侧栏菜单下划线（Django a.section:hover 会加 underline） */
#nav-sidebar a,
#nav-sidebar a:link,
#nav-sidebar a:visited,
#nav-sidebar a:hover,
#nav-sidebar a:focus,
#nav-sidebar a:active,
#nav-sidebar a.section,
#nav-sidebar a.section:link,
#nav-sidebar a.section:visited,
#nav-sidebar a.section:hover,
#nav-sidebar a.section:focus,
#nav-sidebar .yx-nav-link,
#nav-sidebar .yx-nav-toggle {
    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none;
}

#nav-sidebar .module,
#nav-sidebar .module caption,
#nav-sidebar table,
#nav-sidebar tbody,
#nav-sidebar tr,
#nav-sidebar th,
#nav-sidebar td {
    border-bottom: 0 !important;
    border-top: 0 !important;
}

#nav-sidebar .module caption:hover,
#nav-sidebar .section:hover {
    background: var(--yx-sidebar-bg);
    color: #fff;
}

#nav-sidebar .module.is-leaf.current-app .section,
#nav-sidebar .module.is-leaf.current-app caption {
    background: var(--yx-sidebar-active) !important;
    border-radius: 2px;
}

#nav-sidebar .module.is-leaf.current-app .section,
#nav-sidebar .module.is-leaf.current-app .yx-nav-label,
#nav-sidebar .module.is-leaf.current-app a {
    color: #fff !important;
}


#nav-sidebar tbody tr {
    transition: background 0.2s var(--yx-ease-soft);
}

#nav-sidebar tbody tr th {
    border-radius: 2px;
}

#nav-sidebar .current-model,
#nav-sidebar .current-app .current-model {
    background: var(--yx-sidebar-active) !important;
    border-left: none;
    border-radius: 2px;
    box-shadow: none;
}

#nav-sidebar .current-model th {
    position: relative;
}

#nav-sidebar .current-model th::before {
    display: none;
}

#nav-sidebar tbody tr:hover,
#nav-sidebar tbody tr:hover th,
#nav-sidebar tbody tr:hover td {
    background: var(--yx-sidebar-hover) !important;
}

#nav-sidebar .current-model:hover,
#nav-sidebar .current-model:hover th,
#nav-sidebar .current-model:hover td {
    background: var(--yx-sidebar-active) !important;
}

#nav-sidebar a,
#nav-sidebar th,
#nav-sidebar td,
#nav-sidebar caption {
    color: var(--yx-sidebar-text) !important;
    font-size: 14px;
}

#nav-sidebar td a,
#nav-sidebar th a,
#nav-sidebar .section a {
    color: var(--yx-sidebar-text) !important;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.2s var(--yx-ease-soft), opacity 0.2s var(--yx-ease-soft);
    text-shadow: none;
}

#nav-sidebar .section a {
    color: #fff !important;
    font-weight: 600;
}

#nav-sidebar .addlink,
#nav-sidebar .addlink:link,
#nav-sidebar .addlink:visited,
#nav-sidebar .viewlink,
#nav-sidebar .viewlink:link,
#nav-sidebar .viewlink:visited,
#nav-sidebar .changelink,
#nav-sidebar .changelink:link,
#nav-sidebar .changelink:visited {
    color: var(--yx-sidebar-text) !important;
    font-weight: 400;
    opacity: 0.92;
}

#nav-sidebar td a:hover,
#nav-sidebar th a:hover,
#nav-sidebar .section a:hover {
    color: #fff !important;
}

#nav-sidebar .current-model a,
#nav-sidebar .current-app .section a {
    color: #fff !important;
    font-weight: 500;
    opacity: 1 !important;
    text-shadow: none;
}

#nav-sidebar .current-model th,
#nav-sidebar .current-model td,
#nav-sidebar .current-model th a,
#nav-sidebar .current-model td a {
    color: #fff !important;
    opacity: 1 !important;
}

#nav-sidebar .current-model *,
#nav-sidebar .current-app .current-model * {
    color: #fff !important;
    opacity: 1 !important;
}

#nav-sidebar .current-model .addlink,
#nav-sidebar .current-model .viewlink,
#nav-sidebar .current-model .changelink {
    color: #fff !important;
}

#nav-sidebar .model-name,
#nav-sidebar tr {
    border-bottom: 0;
}

#nav-sidebar tr th,
#nav-sidebar tr td {
    padding: 8px 12px;
}

/* 子菜单从主菜单图标右侧起排，与 manage 缩进一致 */
#nav-sidebar .yx-nav-submenu tr th,
#nav-sidebar .yx-nav-submenu tr td {
    padding: 8px 12px 8px 38px !important; /* 12 内边距 + 18 图标 + 8 间距 */
}

#nav-sidebar .yx-nav-submenu .yx-nav-link,
#nav-sidebar .yx-nav-submenu .yx-nav-link-static {
    padding-left: 0;
}

#nav-sidebar .section:after,
#nav-sidebar .section + table caption:after {
    color: var(--yx-sidebar-text);
    opacity: 0.85;
}

#nav-sidebar .current-app .section:after,
#nav-sidebar .current-model .section:after {
    color: #ffffff;
    opacity: 1;
}

body:not(.login) #content-main,
body:not(.login) #content-related {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 8px 12px;
}

body:not(.login) #content-related {
    margin-top: 0;
}

.yx-title-wrap {
    margin-bottom: 12px;
}

.yx-page-title {
    font-size: 30px;
    margin: 0;
    color: var(--yx-ink);
}

.yx-page-subtitle {
    margin: 4px 0 0;
    color: var(--yx-muted);
    font-size: 15px;
}

.yx-admin-home {
    display: grid;
    gap: 18px;
}

.yx-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.yx-stat-card {
    border-radius: 20px;
    background: var(--yx-card);
    box-shadow: var(--yx-shadow);
    padding: 16px 18px;
    min-height: 118px;
}

.yx-stat-card h2 {
    margin: 0;
    font-size: 18px;
    color: var(--yx-ink);
}

.yx-stat-card p {
    margin: 10px 0 0;
    color: #3f4f67;
    font-size: 16px;
}

.yx-stat-number {
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
    color: var(--yx-accent);
}

.yx-stat-breakdown {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 14px;
    color: #3f4f67;
}

.yx-stat-breakdown strong {
    color: var(--yx-accent-deep);
    font-weight: 700;
}

.yx-device-pie-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.yx-device-pie {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    flex: 0 0 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(15, 79, 152, 0.08);
}

.yx-device-pie-hole {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(26, 45, 79, 0.08);
}

.yx-device-pie-total {
    font-size: 22px;
    font-weight: 800;
    color: var(--yx-accent-deep);
    line-height: 1;
}

.yx-device-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 8px;
}

.yx-device-legend-compact {
    gap: 4px;
}

.yx-device-legend-compact .yx-device-legend-item {
    font-size: 12px;
}

.yx-device-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #3f4f67;
}

.yx-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 10px;
}

.yx-legend-label {
    flex: 1;
}

.yx-device-legend-item strong {
    font-weight: 700;
    color: var(--yx-ink);
}

.yx-device-legend-self .yx-legend-dot {
    background: var(--yx-accent);
}

.yx-device-legend-phone .yx-legend-dot {
    background: #36a06d;
}

.yx-device-legend-other .yx-legend-dot {
    background: #7e57c2;
}

.yx-device-legend-myopia .yx-legend-dot {
    background: var(--yx-accent);
}

.yx-device-legend-amblyopia .yx-legend-dot {
    background: #e67e22;
}

.yx-device-legend-colorweak .yx-legend-dot {
    background: #7e57c2;
}

.yx-device-legend-normal .yx-legend-dot {
    background: #94a3b8;
}

.yx-stat-neutral {
    background: var(--yx-neutral-card);
}

.yx-stat-blue {
    background: var(--yx-blue-card);
}

.yx-stat-purple {
    background: var(--yx-purple-card);
}

.yx-panel {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--yx-shadow);
    overflow: hidden;
}

.yx-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 16px 20px 0;
}

.yx-panel-header h2 {
    margin: 0;
    color: var(--yx-ink);
    font-size: 22px;
}

.yx-panel-header span {
    color: var(--yx-muted);
    font-size: 14px;
}

.yx-panel-header a {
    color: var(--yx-accent);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.yx-panel-header a:hover {
    text-decoration: underline;
}

.yx-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
}

.yx-admin-home > .yx-overview-grid {
    padding: 0;
}

.yx-overview-card .yx-panel-header {
    padding-top: 0;
}

.yx-overview-body {
    padding: 0 20px 20px;
}

.yx-metric-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.yx-metric-row--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.yx-makeup-home-overview {
    grid-template-columns: 1fr;
}

a.yx-makeup-home-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 20px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.yx-makeup-home-link:hover {
    box-shadow: 0 16px 32px rgba(26, 45, 79, 0.14);
    transform: translateY(-1px);
}

a.yx-makeup-home-link--alert {
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.4), var(--yx-shadow);
}

a.yx-makeup-home-link--alert:hover {
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.55), 0 16px 32px rgba(220, 38, 38, 0.12);
}

.yx-makeup-home-card {
    cursor: pointer;
}

.yx-makeup-home-alert-text {
    color: #dc2626;
    font-weight: 700;
}

.yx-metric-tile--alert {
    background: #fef2f2;
}

.yx-metric-tile--alert .yx-metric-value {
    color: #dc2626;
}

.yx-metric-tile--alert .yx-metric-label {
    color: #b91c1c;
}

.yx-metric-tile {
    background: #f6f9fd;
    border-radius: 14px;
    padding: 12px 14px;
}

.yx-metric-value {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: var(--yx-accent-deep);
    line-height: 1.1;
}

.yx-metric-label {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--yx-muted);
}

.yx-overview-block {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e8eef6;
}

.yx-overview-block-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.yx-overview-block-head h3 {
    margin: 0;
    font-size: 15px;
    color: var(--yx-ink);
}

.yx-overview-block-head span {
    font-size: 12px;
    color: var(--yx-muted);
}

.yx-week-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
    min-height: 120px;
}

.yx-week-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.yx-week-bar-track {
    width: 100%;
    max-width: 28px;
    height: 72px;
    border-radius: 8px;
    background: #e8eef6;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.yx-week-bar-fill {
    width: 100%;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--yx-accent) 0%, var(--yx-accent) 100%);
    min-height: 0;
}

.yx-week-bar-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--yx-accent-deep);
}

.yx-week-bar-label {
    font-size: 11px;
    color: var(--yx-muted);
}

.yx-progress-track {
    display: flex;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #e8eef6;
}

.yx-progress-segment {
    height: 100%;
    min-width: 0;
}

.yx-progress-legend {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 13px;
    color: #3f4f67;
}

.yx-progress-legend strong {
    color: var(--yx-ink);
}

.yx-overview-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--yx-muted);
}

.yx-device-pie-sm {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
}

.yx-device-pie-sm .yx-device-pie-hole {
    width: 50px;
    height: 50px;
}

.yx-device-pie-sm .yx-device-pie-total {
    font-size: 18px;
}

.yx-device-usage-chart .yx-device-pie-wrap {
    margin-top: 0;
}

.yx-student-search-panel {
    margin-top: 14px;
}

.yx-student-name-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.yx-student-name-cell > a {
    font-weight: 600;
}

.yx-vision-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    line-height: 1.2;
    padding: 2px 7px 2px 5px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}

.yx-vision-icon {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    background-color: currentColor;
    opacity: 0.92;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

/* 近视：眼镜（国际通用视力矫正符号） */
.yx-vision-icon-myopia {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 10.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0Zm9.5 0a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0ZM11.25 10.5h1.5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 10.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0Zm9.5 0a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0ZM11.25 10.5h1.5'/%3E%3C/svg%3E");
}

/* 弱视：眼罩眼（lazy eye 常见医疗示意） */
.yx-vision-icon-amblyopia {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5.5c4.2 0 7.8 2.9 9.2 7-1.4 4.1-5 7-9.2 7S4.2 16.6 2.8 12.5C4.2 8.4 7.8 5.5 12 5.5Zm0 2.2a4.8 4.8 0 1 0 4.8 4.8A4.8 4.8 0 0 0 12 7.7Z'/%3E%3Crect fill='%23000' x='14.5' y='4' width='7.5' height='6.5' rx='1.2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5.5c4.2 0 7.8 2.9 9.2 7-1.4 4.1-5 7-9.2 7S4.2 16.6 2.8 12.5C4.2 8.4 7.8 5.5 12 5.5Zm0 2.2a4.8 4.8 0 1 0 4.8 4.8A4.8 4.8 0 0 0 12 7.7Z'/%3E%3Crect fill='%23000' x='14.5' y='4' width='7.5' height='6.5' rx='1.2'/%3E%3C/svg%3E");
}

/* 色弱：三色圆环（色觉障碍常见示意） */
.yx-vision-icon-color-weak {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle fill='%23000' cx='9' cy='10' r='4.2'/%3E%3Ccircle fill='%23000' cx='15' cy='10' r='4.2'/%3E%3Ccircle fill='%23000' cx='12' cy='14.8' r='4.2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle fill='%23000' cx='9' cy='10' r='4.2'/%3E%3Ccircle fill='%23000' cx='15' cy='10' r='4.2'/%3E%3Ccircle fill='%23000' cx='12' cy='14.8' r='4.2'/%3E%3C/svg%3E");
}

/* 正常：睁眼 */
.yx-vision-icon-normal {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5.5C7.1 5.5 3.1 8.6 1 12.5c2.1 3.9 6.1 7 11 7s8.9-3.1 11-7c-2.1-3.9-6.1-7-11-7Zm0 2.4a5.1 5.1 0 1 1-5.1 5.1A5.1 5.1 0 0 1 12 7.9Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5.5C7.1 5.5 3.1 8.6 1 12.5c2.1 3.9 6.1 7 11 7s8.9-3.1 11-7c-2.1-3.9-6.1-7-11-7Zm0 2.4a5.1 5.1 0 1 1-5.1 5.1A5.1 5.1 0 0 1 12 7.9Z'/%3E%3C/svg%3E");
}

.yx-vision-myopia {
    background: rgba(15, 79, 152, 0.12);
    color: var(--yx-accent);
}

.yx-vision-amblyopia {
    background: rgba(230, 126, 34, 0.14);
    color: #c8650a;
}

.yx-vision-color-weak {
    background: rgba(126, 87, 194, 0.14);
    color: #6a42b8;
}

.yx-vision-normal {
    background: rgba(54, 160, 109, 0.12);
    color: #2d8a5f;
}

.yx-course-track-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    padding: 3px 9px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}

.yx-course-track-link:hover {
    text-decoration: none;
    filter: brightness(0.95);
}

.yx-course-track-link.yx-track-a {
    background: rgba(15, 79, 152, 0.12);
    color: var(--yx-accent);
}

.yx-course-track-link.yx-track-b {
    background: rgba(54, 160, 109, 0.12);
    color: #2d8a5f;
}

.yx-course-track-link.yx-track-c {
    background: rgba(230, 126, 34, 0.14);
    color: #c8650a;
}

.yx-search-sub {
    font-size: 12px;
    color: var(--yx-muted);
    font-weight: 400;
}

.yx-search-form {
    margin-bottom: 4px;
}

.yx-search-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 14px;
}

.yx-search-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--yx-muted);
}

.yx-search-field-wide {
    grid-column: span 2;
}

.yx-search-field input,
.yx-search-field select {
    height: 38px;
    border: 1px solid #cfdaea;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
    color: var(--yx-ink);
    background: #fff;
    box-sizing: border-box;
}

.yx-search-field input:focus,
.yx-search-field select:focus {
    outline: 0;
    border-color: #6ea9f7;
    box-shadow: 0 0 0 3px rgba(110, 169, 247, 0.18);
}

.yx-search-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.yx-search-submit {
    height: 38px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--yx-accent) 0%, var(--yx-accent-deep) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.yx-search-submit:hover {
    background: linear-gradient(180deg, #79bbff 0%, var(--yx-accent-deep) 100%);
}

.change-list.model-student .yx-search-create {
    margin-left: auto;
}

.change-list.model-partner .yx-search-create {
    margin-left: auto;
}

.change-list.model-trainingitem #toolbar,
.change-list.model-trainingitem #changelist-filter {
    display: none;
}

.change-list.model-trainingitem .yx-trainingitem-search-panel {
    margin: 0 0 16px;
}

.change-list.model-trainingitem .yx-panel-header h2 {
    font-size: 16px;
    font-weight: 500;
    color: #303133;
}

.change-list.model-trainingitem .yx-panel-header span {
    font-size: 13px;
    color: #909399;
}

.change-list.model-trainingitem .yx-search-field {
    font-size: 14px;
    color: #606266;
}

.change-list.model-trainingitem .yx-search-field input,
.change-list.model-trainingitem .yx-search-field select {
    height: 32px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    color: #606266;
    font-family: var(--yx-font-family);
}

.change-list.model-trainingitem .yx-search-field input:focus,
.change-list.model-trainingitem .yx-search-field select:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 1px #409eff inset;
}

.change-list.model-trainingitem .yx-search-submit {
    height: 32px;
    padding: 0 16px;
    border-radius: 4px;
    background: #409eff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
}

.change-list.model-trainingitem .yx-search-submit:hover {
    background: #79bbff;
}

.change-list.model-trainingitem .yx-search-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 16px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    color: #606266;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.change-list.model-trainingitem .yx-search-reset:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background: #ecf5ff;
    text-decoration: none;
}

.change-list.model-trainingitem .yx-search-create {
    margin-left: auto;
}

.change-list.model-trainingitem a.yx-search-create,
.change-list.model-trainingitem a.yx-search-create:link,
.change-list.model-trainingitem a.yx-search-create:visited {
    height: 32px;
    padding: 0 16px;
    border-radius: 4px;
    background: #409eff;
    color: #fff !important;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
}

.change-list.model-trainingitem a.yx-search-create:hover,
.change-list.model-trainingitem a.yx-search-create:focus {
    background: #79bbff;
    color: #fff !important;
}

a.yx-search-create,
a.yx-search-create:link,
a.yx-search-create:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 20px;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffa040 0%, #ff8a3d 100%);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 138, 61, 0.35);
}

a.yx-search-create:hover,
a.yx-search-create:focus {
    color: #fff !important;
    text-decoration: none;
    background: linear-gradient(180deg, #ff9535 0%, #f2722b 100%);
}

.yx-search-reset {
    color: var(--yx-accent);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.yx-search-reset:hover {
    text-decoration: underline;
}

.yx-search-results {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e8eef6;
}

.yx-search-table-wrap {
    overflow: auto;
    margin-top: 10px;
    border: 1px solid #e2e9f3;
    border-radius: 12px;
}

.yx-search-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.yx-search-table th,
.yx-search-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eef2f8;
    white-space: nowrap;
}

.yx-search-table th {
    background: #f6f9fd;
    color: var(--yx-muted);
    font-weight: 700;
}

.yx-search-table tbody tr:hover {
    background: #f8fbff;
}

.yx-search-table a {
    color: var(--yx-accent);
    font-weight: 700;
    text-decoration: none;
}

.yx-search-table a:hover {
    text-decoration: underline;
}

.yx-org-tree-panel {
    margin-top: 14px;
}

.yx-org-distribution {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.yx-org-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.yx-org-tree-children {
    list-style: none;
    margin: 0 0 0 22px;
    padding: 0 0 0 18px;
    border-left: 2px solid #dbe6f4;
}

.yx-org-tree-node {
    margin: 0;
    padding: 0;
}

.yx-org-tree-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
}

.yx-org-tree-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex: 0 0 28px;
    background: #eef3fa center/16px 16px no-repeat;
}

.yx-org-tree-district > .yx-org-tree-row .yx-org-tree-icon {
    background-color: #e8f0fb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230f4f98'%3E%3Cpath d='M12 3 2 9l10 6 10-6-10-6Zm0 8.2L4.74 9 12 4.8 19.26 9 12 11.2Zm0 2.3 10-6v8l-10 6-10-6v-8l10 6Z'/%3E%3C/svg%3E");
}

.yx-org-tree-school > .yx-org-tree-row .yx-org-tree-icon {
    background-color: #eaf6ef;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2336a06d'%3E%3Cpath d='M12 3 1 9l4 2.18V17h14V11.18L23 9 12 3Zm6 12H6v-4.73L12 12l6 2.27V15Z'/%3E%3C/svg%3E");
}

.yx-org-tree-class > .yx-org-tree-row .yx-org-tree-icon {
    background-color: #f2ebfb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237e57c2'%3E%3Cpath d='M16 11c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3Zm-8 0c1.66 0 3-1.34 3-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3Zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5C15 14.17 10.33 13 8 13Zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5Z'/%3E%3C/svg%3E");
}

.yx-org-tree-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
}

.yx-org-tree-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--yx-ink);
    text-decoration: none;
}

a.yx-org-tree-name {
    color: var(--yx-accent);
}

a.yx-org-tree-name:hover {
    text-decoration: underline;
}

.yx-org-tree-meta {
    font-size: 12px;
    color: var(--yx-muted);
}

.yx-course-matrix-panel {
    margin-top: 14px;
}

.yx-course-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.yx-course-links a {
    color: var(--yx-accent);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.yx-course-links a:hover {
    text-decoration: underline;
}

.yx-course-matrix-block + .yx-course-matrix-block {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 2px solid #dbe6f4;
}

.yx-course-matrix-block-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 18px;
}

.yx-course-matrix-block-head h3 {
    margin: 0;
    font-size: 18px;
    color: var(--yx-ink);
}

.yx-course-matrix-block-head h3 a {
    color: var(--yx-accent);
    text-decoration: none;
}

.yx-course-matrix-block-head h3 a:hover {
    text-decoration: underline;
}

.yx-course-matrix-block-head span {
    font-size: 13px;
    color: var(--yx-muted);
}

.yx-course-matrix-stage + .yx-course-matrix-stage {
    margin-top: 22px;
}

.yx-course-matrix-stage-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    margin-bottom: 8px;
}

.yx-course-matrix-stage-head h4 {
    margin: 0;
    font-size: 16px;
    color: var(--yx-ink);
}

.yx-course-matrix-stage-head h4 a {
    color: var(--yx-accent);
    text-decoration: none;
}

.yx-course-matrix-stage-head h4 a:hover {
    text-decoration: underline;
}

.yx-course-matrix-stage-head span {
    font-size: 12px;
    color: var(--yx-muted);
}

.yx-course-matrix-stage-desc {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--yx-muted);
    line-height: 1.5;
}

.yx-course-matrix-wrap {
    overflow-x: auto;
    border: 1px solid #c5d3e3;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.yx-course-matrix {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 13px;
    line-height: 1.45;
}

.yx-course-matrix th,
.yx-course-matrix td {
    border: 1px solid #c5d3e3;
    padding: 8px 10px;
    vertical-align: top;
    text-align: left;
}

.yx-course-matrix thead th {
    background: linear-gradient(180deg, #f4f8fd 0%, #e8f0fa 100%);
    font-weight: 700;
    color: var(--yx-ink);
    position: sticky;
    top: 0;
    z-index: 1;
}

.yx-course-matrix thead th span {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--yx-muted);
    line-height: 1.35;
}

.yx-course-matrix tbody tr:nth-child(even) td {
    background: #fbfdff;
}

.yx-course-matrix tbody tr:hover td {
    background: #f3f8ff;
}

.yx-course-matrix-col-lesson {
    width: 110px;
}

.yx-course-matrix-col-section {
    width: 24%;
}

.yx-course-matrix-col-goal {
    width: 18%;
}

.yx-course-matrix-lesson {
    background: #f8fbff;
    font-weight: 700;
}

.yx-course-matrix-lesson-label {
    display: block;
    color: var(--yx-accent);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.yx-course-matrix-lesson-label:hover {
    text-decoration: underline;
}

.yx-course-matrix-lesson-title {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--yx-muted);
    line-height: 1.35;
}

.yx-course-matrix-missing-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 14px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #f3c4c4;
    background: #fff5f5;
    color: #a94442;
    font-size: 13px;
}

.yx-course-matrix-missing-banner strong {
    color: #c0392b;
}

.yx-course-matrix-cell {
    min-height: 0;
}

.yx-course-matrix-cell-missing {
    background: #fff9f9;
}

.yx-course-matrix-cell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.yx-course-matrix-section-link {
    font-size: 11px;
    font-weight: 700;
    color: var(--yx-accent);
    text-decoration: none;
}

.yx-course-matrix-section-link:hover {
    text-decoration: underline;
}

.yx-course-matrix-cell-missing-flag {
    padding: 2px 8px;
    border-radius: 999px;
    background: #fdeaea;
    color: #c0392b;
    font-size: 11px;
    font-weight: 700;
}

.yx-matrix-resource-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.yx-matrix-resource-thumb {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 78px;
    padding: 0;
    border: 1px solid #dbe6f4;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    text-align: left;
}

.yx-matrix-resource-thumb:hover {
    border-color: var(--yx-accent);
    box-shadow: 0 4px 12px rgba(15, 79, 152, 0.12);
}

.yx-matrix-resource-thumb.is-missing {
    border-color: #e57373;
    background: #fff5f5;
    box-shadow: 0 0 0 1px rgba(229, 115, 115, 0.35);
}

.yx-matrix-resource-thumb.is-playable:hover .yx-matrix-resource-play-dot {
    transform: translate(-50%, -50%) scale(1.05);
}

.yx-matrix-resource-missing-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
    padding: 1px 5px;
    border-radius: 4px;
    background: #e53935;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.3;
}

.yx-matrix-resource-thumb-media-wrap,
.yx-matrix-resource-thumb-placeholder {
    position: relative;
    display: block;
    width: 100%;
    height: 44px;
    background: #0f1f35;
    overflow: hidden;
}

.yx-matrix-resource-thumb-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.yx-matrix-resource-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.yx-matrix-resource-thumb-missing {
    background: linear-gradient(135deg, #ffcdd2 0%, #ef9a9a 100%);
}

.yx-matrix-resource-thumb-game {
    background: linear-gradient(135deg, #7e57c2 0%, #512da8 100%);
}

.yx-matrix-resource-thumb-video {
    background: linear-gradient(135deg, var(--yx-accent) 0%, var(--yx-accent-deep) 100%);
}

.yx-matrix-resource-thumb-image {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
}

.yx-matrix-resource-thumb-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.yx-matrix-resource-play-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(15, 31, 53, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.88);
}

.yx-matrix-resource-play-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 4px 0 4px 6px;
    border-color: transparent transparent transparent #fff;
}

.yx-matrix-resource-thumb-label {
    display: block;
    padding: 4px 5px 0;
    font-size: 10px;
    font-weight: 700;
    color: var(--yx-ink);
    line-height: 1.25;
    max-height: 2.5em;
    overflow: hidden;
}

.yx-matrix-resource-thumb-time,
.yx-matrix-resource-thumb-play {
    padding: 0 5px 4px;
    font-size: 9px;
    color: var(--yx-muted);
    line-height: 1.2;
}

.yx-course-matrix-goal {
    font-size: 12px;
    color: #444;
    line-height: 1.5;
}

.yx-course-matrix-empty {
    color: #b0bec9;
    font-size: 12px;
}

.yx-device-usage-panel {
    margin-top: 14px;
}

.yx-upgrade-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.yx-upgrade-links a {
    color: var(--yx-accent);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.yx-upgrade-links a:hover {
    text-decoration: underline;
}

.yx-upgrade-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.yx-upgrade-list a {
    color: var(--yx-accent);
    font-weight: 700;
    text-decoration: none;
}

.yx-upgrade-list a:hover {
    text-decoration: underline;
}

.yx-upgrade-task-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.yx-upgrade-list-meta {
    font-size: 12px;
    color: var(--yx-muted);
}

.yx-os-bars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.yx-os-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 13px;
}

.yx-os-bar-label {
    font-weight: 700;
    color: var(--yx-ink);
}

.yx-os-bar-value {
    color: var(--yx-muted);
    font-size: 12px;
}

.yx-os-bar-track {
    height: 10px;
    border-radius: 999px;
    background: #e8eef6;
    overflow: hidden;
}

.yx-os-bar-fill {
    height: 100%;
    border-radius: 999px;
    min-width: 0;
}

.yx-usage-metrics {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.yx-usage-metric-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.yx-usage-metric-head strong {
    display: block;
    font-size: 15px;
    color: var(--yx-ink);
}

.yx-usage-metric-note {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--yx-muted);
    font-weight: 400;
}

.yx-usage-metric-rate {
    font-size: 24px;
    font-weight: 800;
    color: var(--yx-accent-deep);
    line-height: 1;
}

.yx-usage-metric-track {
    height: 12px;
    border-radius: 999px;
    background: #e8eef6;
    overflow: hidden;
}

.yx-usage-metric-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--yx-accent) 0%, var(--yx-accent) 100%);
    min-width: 0;
}

.yx-usage-metric-foot {
    margin-top: 6px;
    font-size: 12px;
    color: var(--yx-muted);
}

.yx-ecosystem-panel {
    margin-top: 14px;
}

.yx-ecosystem-graph {
    width: 100%;
    height: 520px;
    border: 1px solid #dbe6f4;
    border-radius: 14px;
    background:
        radial-gradient(circle at top left, rgba(15, 79, 152, 0.06), transparent 42%),
        linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
    margin-bottom: 18px;
}

.yx-ecosystem-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.yx-ecosystem-card {
    position: relative;
    border: 1px solid #dbe6f4;
    border-radius: 14px;
    background: #fff;
    padding: 16px 16px 14px;
    overflow: hidden;
}

.yx-ecosystem-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.yx-ecosystem-card-head h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: var(--yx-ink);
}

.yx-ecosystem-card-headline {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.yx-ecosystem-card-headline strong {
    font-size: 28px;
    line-height: 1;
    color: var(--yx-accent-deep);
}

.yx-ecosystem-card-headline span {
    font-size: 12px;
    color: var(--yx-muted);
}

.yx-ecosystem-metrics {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 8px;
}

.yx-ecosystem-metrics li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--yx-muted);
}

.yx-ecosystem-metrics strong {
    color: var(--yx-ink);
    font-size: 14px;
}

.yx-ecosystem-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.yx-ecosystem-card-links a {
    color: var(--yx-accent);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.yx-ecosystem-card-links a:hover {
    text-decoration: underline;
}

@media (max-width: 1280px) {
    .yx-ecosystem-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .yx-ecosystem-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .yx-ecosystem-graph {
        height: 420px;
    }
}

@media (max-width: 640px) {
    .yx-ecosystem-cards {
        grid-template-columns: 1fr;
    }
}

#content-main .module {
    border: 0;
    border-radius: 18px;
    box-shadow: none;
    margin: 8px 0 12px;
    overflow: hidden;
    background: #fff;
}

#changelist {
    background: transparent;
}

#changelist .changelist-form-container,
#changelist .results,
#changelist-filter,
.change-form #content-main .module {
    border: 1px solid #e2e9f3;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

#changelist-filter {
    padding-bottom: 8px;
}

#changelist-filter h2 {
    background: linear-gradient(90deg, #e9f2ff 0%, #eef4ff 100%);
    color: #2b4775;
    font-weight: 700;
}

#changelist .actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    line-height: normal;
}

#changelist .actions label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #606266;
}

#changelist .actions select {
    height: 32px;
    padding: 0 12px;
    margin: 0;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    color: #606266;
    font-size: 14px;
    font-family: var(--yx-font-family);
}

#changelist .actions select:focus {
    border-color: var(--yx-accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

#changelist .actions .button,
#changelist .actions button.button {
    background: var(--yx-accent) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    height: 32px !important;
    line-height: 32px !important;
    padding: 0 16px !important;
    margin: 0 !important;
    min-width: 56px;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: var(--yx-font-family) !important;
    cursor: pointer;
}

#changelist .actions .button:hover,
#changelist .actions .button:focus,
#changelist .actions button.button:hover,
#changelist .actions button.button:focus {
    background: #79bbff !important;
    border-color: transparent !important;
}

#changelist .actions span.action-counter,
#changelist .actions span.all,
#changelist .actions span.clear,
#changelist .actions span.question {
    font-size: 13px;
    color: #909399;
    margin: 0;
}

/* Model 列表：对齐 manage.glxs168.com Element Table（default） */
#changelist table,
#changelist #result_list {
    width: 100%;
    font-size: 14px;
    color: #606266;
    border-collapse: collapse;
    background: #fff;
}

#changelist table thead th {
    background: #fff;
    color: #909399;
    font-weight: 500;
    font-size: 14px;
    line-height: 23px;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: 1px solid #ebeef5;
    padding: 8px 12px;
    vertical-align: middle;
}

#changelist table thead th a:link,
#changelist table thead th a:visited {
    color: #909399;
    font-weight: 500;
}

#changelist table thead th a:focus,
#changelist table thead th a:hover,
#changelist table thead th.sorted a:link,
#changelist table thead th.sorted a:visited {
    color: #409eff;
    background: transparent;
}

#changelist table thead th.sorted {
    background: #fff;
}

#changelist table thead th .text span,
#changelist table thead th .text a {
    padding: 0;
    display: inline;
}

#changelist table tbody td,
#changelist table tbody th {
    font-size: 14px;
    line-height: 23px;
    color: #606266;
    padding: 8px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #ebeef5;
    border-top: 0;
    background: #fff;
}

#changelist table tbody tr:nth-child(odd),
#changelist table tbody tr:nth-child(even) {
    background: #fff;
}

#changelist table tbody tr:nth-child(odd) td,
#changelist table tbody tr:nth-child(odd) th,
#changelist table tbody tr:nth-child(even) td,
#changelist table tbody tr:nth-child(even) th {
    background: #fff;
}

#changelist table tbody tr:hover td,
#changelist table tbody tr:hover th {
    background: #f5f7fa;
}

#changelist table tbody tr.selected td,
#changelist table tbody tr.selected th,
#changelist table tbody tr:has(.action-select:checked) td,
#changelist table tbody tr:has(.action-select:checked) th {
    background: #ecf5ff;
}

#changelist table tbody a:link,
#changelist table tbody a:visited {
    color: #606266;
    text-decoration: none;
}

#changelist table tbody a:hover,
#changelist table tbody a:focus {
    color: #409eff;
    text-decoration: none;
}

#changelist table tfoot td,
#changelist table tfoot th {
    font-size: 14px;
    color: #606266;
    padding: 8px 12px;
    border-top: 1px solid #ebeef5;
    background: #fff;
}

#changelist .paginator {
    font-size: 14px;
    color: #606266;
    padding: 12px 14px;
    border-top: 1px solid #ebeef5;
    background: #fff;
}

#changelist .paginator a:link,
#changelist .paginator a:visited {
    color: #606266;
}

#changelist .paginator a:hover,
#changelist .paginator .this-page {
    color: #409eff;
}

#changelist-search {
    margin-bottom: 12px;
    border: 1px solid #e4e7ed;
    border-radius: 10px;
    background: #f8fbff;
}

#changelist-search input[type="text"] {
    border-radius: 8px;
    border: 1px solid #ccd8e8;
    background: #fff;
}

.object-tools {
    margin-bottom: 12px;
}

.object-tools a,
.object-tools a:link,
.object-tools a:visited,
.button,
input[type="submit"],
input[type="button"],
.submit-row input,
a.button {
    background: var(--yx-accent);
    color: #fff !important;
    border: 0;
    border-radius: 4px;
    box-shadow: none;
}

.object-tools a:hover,
.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.submit-row input:hover,
a.button:hover {
    background: var(--yx-accent-deep);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select,
.vTextField {
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #ffffff;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus,
.vTextField:focus {
    outline: 0;
    border-color: var(--yx-accent);
    box-shadow: 0 0 0 1px var(--yx-accent);
}

.messagelist .success,
.messagelist .warning,
.messagelist .error,
ul.messagelist li {
    border-radius: 4px;
    border: 1px solid #e4e7ed;
}

#content-main .module caption,
#content-main .module h2 {
    background: #fff;
    color: var(--yx-ink);
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 1px solid #ebeef5;
}

#content-main .module table th,
#content-main .module table td {
    border-bottom: 1px solid #eef1f6;
    padding: 10px 12px;
}

#content-main .module table tr:last-child th,
#content-main .module table tr:last-child td {
    border-bottom: 0;
}

#content-main .module a {
    color: var(--yx-accent);
}

#content-main .module .addlink,
#content-main .module .changelink,
#content-main .module .viewlink {
    color: var(--yx-accent);
    font-weight: 700;
}

a:link,
a:visited {
    color: var(--yx-accent);
}

a:hover,
a:focus {
    color: var(--yx-accent-deep);
}

@media (max-width: 980px) {
    body:not(.login) #container {
        padding: 0;
    }

    body:not(.login) #header {
        left: 0;
    }

    body:not(.login) #main {
        margin-left: 0;
        margin-top: var(--yx-header-height);
    }

    div.breadcrumbs {
        margin-left: 0;
    }

    #nav-sidebar {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        max-height: 280px;
        z-index: 1;
        overflow: auto;
    }

    .yx-stat-grid {
        grid-template-columns: 1fr;
    }

    .yx-overview-grid {
        grid-template-columns: 1fr;
    }

    .yx-metric-row {
        grid-template-columns: 1fr 1fr;
    }

    .yx-metric-row--four {
        grid-template-columns: 1fr 1fr;
    }

    .yx-search-grid {
        grid-template-columns: 1fr;
    }

    .yx-search-field-wide {
        grid-column: span 1;
    }

    .yx-org-distribution {
        grid-template-columns: 1fr;
    }

    body:not(.login) #content {
        padding: 8px;
    }
}

/* 学校详情页：班级列表 inline 班级名称列加宽 */
#schoolclass_set-group table {
    table-layout: fixed;
    width: 100%;
}
#schoolclass_set-group table th.column-name,
#schoolclass_set-group table td.field-name {
    width: 35% !important;
    min-width: 200px !important;
    white-space: normal !important;
    word-break: break-all;
}

/* 隐藏左侧导航栏中每个模型旁的“+增加”链接 */
#nav-sidebar .addlink,
#nav-sidebar td.addlink,
#nav-sidebar a.addlink,
#nav-sidebar tr > td:last-child,
#nav-sidebar th[scope="row"] + td {
    display: none !important;
}

.change-list.model-student #toolbar {
    display: none;
}

.change-list.model-student .yx-student-changelist-search {
    margin: 0 0 14px;
}

.change-list.model-device .yx-device-changelist-search,
.change-list.model-sncode .yx-sn-changelist-search,
.change-list.model-apppackage .yx-package-changelist-search,
.change-list.model-upgradetask .yx-task-changelist-search {
    margin: 0 0 14px;
}

.change-list.model-device #toolbar,
.change-list.model-sncode #toolbar,
.change-list.model-apppackage #toolbar,
.change-list.model-upgradetask #toolbar {
    display: none;
}

.change-list.model-device #changelist.filtered .changelist-form-container,
.change-list.model-sncode #changelist.filtered .changelist-form-container,
.change-list.model-apppackage #changelist.filtered .changelist-form-container,
.change-list.model-upgradetask #changelist.filtered .changelist-form-container {
    grid-template-columns: 1fr;
}

.change-list.model-device #changelist-filter,
.change-list.model-sncode #changelist-filter,
.change-list.model-apppackage #changelist-filter,
.change-list.model-upgradetask #changelist-filter {
    display: none;
}

.yx-resource-search-panel {
    margin: 0 0 16px;
}

.change-list.model-courseresource #changelist.filtered .changelist-form-container {
    grid-template-columns: 1fr;
}

.change-list.model-courseresource #changelist-filter {
    display: none;
}

.change-list.model-courseresource #changelist-form > div > .yx-resource-search-panel {
    margin-bottom: 16px;
}

.change-list.model-courseresource #changelist-form .results,
.change-list.model-courseresource #changelist-form table#result_list {
    display: none;
}

.change-list.model-courseresource #toolbar {
    display: none;
}

.change-list.model-lesson #changelist-filter,
.change-list.model-lesson #toolbar {
    display: none;
}

.yx-lesson-track-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #dbe6f4;
    border-radius: 12px;
    background: #f8fbff;
}

.yx-lesson-track-filter-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--yx-ink);
}

.yx-lesson-track-filter a {
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid #cfe0f4;
    background: #fff;
    color: var(--yx-accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.yx-lesson-track-filter a:hover {
    border-color: var(--yx-accent);
}

.yx-lesson-track-filter a.is-active {
    background: var(--yx-accent);
    border-color: var(--yx-accent);
    color: #fff;
}

.change-list.model-lesson .yx-overview-grid {
    margin-bottom: 14px;
}

.change-list.model-studentcheckin .yx-checkin-overview-grid {
    grid-template-columns: 1fr;
    margin-bottom: 14px;
}

.change-list.model-studentcheckin .yx-checkin-search-panel {
    margin-bottom: 14px;
}

.change-list.model-studentcheckin .yx-checkin-search-row + .yx-checkin-search-row {
    margin-top: 12px;
}

.change-list.model-studentcheckin .yx-checkin-search-row-actions {
    align-items: end;
}

.change-list.model-studentcheckin .yx-checkin-search-row-actions .yx-search-actions {
    margin-top: 0;
    justify-content: flex-end;
    align-self: end;
}

.change-list.model-schoolclass .yx-schoolclass-search-panel {
    margin-bottom: 14px;
}

.change-list.model-schoolclass .yx-schoolclass-search-row + .yx-schoolclass-search-row {
    margin-top: 12px;
}

.change-list.model-schoolclass .yx-schoolclass-search-row-actions {
    align-items: end;
}

.change-list.model-schoolclass .yx-schoolclass-search-row-actions .yx-search-actions {
    margin-top: 0;
    justify-content: flex-end;
    align-self: end;
}

.change-list.model-studentcourseschedule .yx-schedule-search-panel {
    margin-bottom: 14px;
}

.change-list.model-studentcourseschedule .yx-schedule-search-row + .yx-schedule-search-row {
    margin-top: 12px;
}

.change-list.model-studentcourseschedule .yx-schedule-search-row-actions {
    align-items: end;
}

.change-list.model-studentcourseschedule .yx-schedule-search-row-actions .yx-search-actions {
    margin-top: 0;
    justify-content: flex-end;
    align-self: end;
}

.change-list.model-studentlessonmakeup .yx-makeup-overview-grid {
    grid-template-columns: 1fr;
    margin-bottom: 14px;
}

.change-list.model-studentlessonmakeup .yx-makeup-search-panel {
    margin-bottom: 14px;
}

.change-list.model-studentlessonmakeup .yx-makeup-search-row + .yx-makeup-search-row {
    margin-top: 12px;
}

.yx-makeup-list-hint {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-size: 13px;
    line-height: 1.5;
}

.change-list.model-studentlessonmakeup #result_list th,
.change-list.model-studentlessonmakeup #result_list td {
    vertical-align: middle;
}

.change-list.model-studentlessonmakeup #result_list td.field-status_badge,
.change-list.model-studentlessonmakeup #result_list th.column-status_badge {
    white-space: nowrap;
    width: 1%;
}

.change-list.model-studentlessonmakeup #result_list td.field-makeup_schedule_display,
.change-list.model-studentlessonmakeup #result_list th.column-makeup_schedule_display {
    vertical-align: top;
    min-width: 300px;
}

.yx-makeup-schedule-card {
    display: grid;
    grid-template-columns: 5.8em minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 8px;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-width: 300px;
    box-sizing: border-box;
}

.yx-makeup-schedule-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.yx-makeup-schedule-value {
    min-width: 0;
    line-height: 1.4;
}

.yx-makeup-schedule-row--top {
    align-self: start;
    padding-top: 1px;
}

.yx-makeup-request-info {
    min-width: 160px;
    max-width: 260px;
    line-height: 1.45;
}

.yx-makeup-schedule-cell {
    min-width: 180px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    line-height: 1.45;
}

.yx-makeup-schedule-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.yx-makeup-schedule-section--approved {
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.yx-makeup-approved-date-value {
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
}

.yx-makeup-request-date {
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    flex: 0 0 auto;
}

.yx-makeup-date-weekday {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.yx-makeup-approved-date-value .yx-makeup-date-weekday {
    color: #3b82f6;
}

.yx-makeup-date-picker-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.yx-makeup-request-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.yx-makeup-request-remark-sep {
    color: #cbd5e1;
    flex: 0 0 auto;
}

.yx-makeup-request-remark-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    flex: 0 0 auto;
}

.yx-makeup-request-remark {
    color: #9a3412;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    white-space: normal;
    word-break: break-word;
    flex: 1 1 auto;
    min-width: 0;
}

.yx-makeup-request-remark--empty {
    color: #94a3b8;
    font-weight: 500;
}

.yx-makeup-remark-empty {
    color: #94a3b8;
}

.yx-makeup-approved-editor {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.yx-makeup-pending-remark {
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    line-height: 1.45;
}

.yx-makeup-pending-remark .yx-makeup-request-remark-label {
    margin-top: 0;
    margin-bottom: 2px;
}

.yx-makeup-pending-remark .yx-makeup-request-remark {
    margin-top: 0;
    color: #9a3412;
}

.yx-makeup-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
}

.yx-makeup-status--pending {
    background: #fef3c7;
    color: #b45309;
}

.yx-makeup-status--approved {
    background: #dbeafe;
    color: #1d4ed8;
}

.yx-makeup-status--rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.yx-makeup-status--completed {
    background: #dcfce7;
    color: #15803d;
}

.change-list.model-studentlessonmakeup .yx-makeup-date-input {
    width: 132px;
    box-sizing: border-box;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: #1e293b;
    flex: 0 0 auto;
}

.change-list.model-studentlessonmakeup .yx-makeup-date-input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.change-list.model-studentlessonmakeup .yx-makeup-approved-cell,
.change-list.model-studentlessonmakeup .yx-makeup-schedule-section--approved {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

.change-list.model-studentlessonmakeup .yx-makeup-row-actions {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.change-list.model-studentlessonmakeup .yx-makeup-approve-btn,
.change-list.model-studentlessonmakeup .yx-makeup-reject-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: none !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.change-list.model-studentlessonmakeup .yx-makeup-approve-btn {
    background: #2563eb !important;
    color: #fff !important;
    border: 0 !important;
}

.change-list.model-studentlessonmakeup .yx-makeup-approve-btn:hover,
.change-list.model-studentlessonmakeup .yx-makeup-approve-btn:focus {
    background: #1d4ed8 !important;
}

.change-list.model-studentlessonmakeup .yx-makeup-reject-btn {
    background: #fff !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

.change-list.model-studentlessonmakeup .yx-makeup-reject-btn:hover,
.change-list.model-studentlessonmakeup .yx-makeup-reject-btn:focus {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
}

.change-list.model-studentlessonmakeup .submit-row input.default {
    background: linear-gradient(180deg, var(--yx-accent) 0%, var(--yx-accent-deep) 100%);
}

.change-list.model-studentlessonitem .yx-lesson-item-search-panel {
    margin-bottom: 14px;
}

.change-list.model-studentlessonitem .yx-lesson-item-search-row + .yx-lesson-item-search-row {
    margin-top: 12px;
}

.change-list.model-lesson .yx-course-matrix-panel {
    margin-top: 0;
}

.yx-resource-gallery-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--yx-muted);
}

.yx-resource-gallery {
    display: grid;
    gap: 28px;
}

.yx-resource-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.yx-resource-section-head h2 {
    margin: 0;
    font-size: 20px;
    color: var(--yx-ink);
}

.yx-resource-section-head p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--yx-muted);
}

.yx-resource-section-count {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef3fa;
    color: var(--yx-accent);
    font-size: 13px;
    font-weight: 700;
}

.yx-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.yx-resource-card {
    border: 1px solid #dbe6f4;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.yx-resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 79, 152, 0.12);
}

.yx-resource-card-inactive {
    opacity: 0.72;
}

.yx-resource-thumb-btn {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #0f1f35;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.yx-resource-thumb-video,
.yx-resource-thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.yx-resource-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
}

.yx-resource-thumb-video {
    background: #000;
}

.yx-resource-thumb-game,
.yx-resource-section-game .yx-resource-thumb-placeholder {
    background: linear-gradient(135deg, #7e57c2 0%, #512da8 100%);
}

.yx-resource-section-video .yx-resource-thumb-placeholder {
    background: linear-gradient(135deg, var(--yx-accent) 0%, var(--yx-accent-deep) 100%);
}

.yx-resource-thumb-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18) center/20px 20px no-repeat;
}

.yx-resource-section-video .yx-resource-thumb-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7L8 5Z'/%3E%3C/svg%3E");
}

.yx-resource-section-game .yx-resource-thumb-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M21 6H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1Zm-9 8H8v2H6v-2H4v-2h2V10h2v2h4v2Z'/%3E%3C/svg%3E");
}

.yx-resource-thumb-kind {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.92;
}

.yx-resource-play-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(15, 31, 53, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.yx-resource-play-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
}

.yx-resource-duration-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(15, 31, 53, 0.82);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.yx-resource-timeline {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(15, 31, 53, 0.72);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.yx-resource-timeline-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
}

.yx-resource-timeline-track i {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--yx-accent) 0%, #36a06d 100%);
}

.yx-resource-card-body {
    padding: 12px 14px 14px;
}

.yx-resource-card-body h3 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.35;
}

.yx-resource-card-body h3 a {
    color: var(--yx-ink);
    text-decoration: none;
}

.yx-resource-card-body h3 a:hover {
    color: var(--yx-accent);
}

.yx-resource-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 6px;
    font-size: 12px;
    color: var(--yx-muted);
}

.yx-resource-status {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f3f6;
    color: #7a8794;
}

.yx-resource-status.is-active {
    background: #eaf6ef;
    color: #2e7d52;
}

.yx-resource-card-meta {
    margin: 0;
    font-size: 12px;
    color: var(--yx-muted);
}

.yx-resource-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.yx-resource-modal[hidden] {
    display: none !important;
}

.yx-resource-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 31, 53, 0.72);
}

.yx-resource-modal-dialog {
    position: relative;
    width: min(960px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 24px 64px rgba(15, 31, 53, 0.28);
    display: flex;
    flex-direction: column;
}

.yx-resource-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e8eef6;
}

.yx-resource-modal-head h3 {
    margin: 0;
    font-size: 18px;
    color: var(--yx-ink);
}

.yx-resource-modal-head p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--yx-muted);
}

.yx-resource-modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #eef3fa;
    color: var(--yx-ink);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.yx-resource-modal-body {
    padding: 16px 18px 18px;
    overflow: auto;
}

.yx-resource-modal-player {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.yx-resource-modal-video {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
}

.yx-resource-modal-game {
    display: block;
    width: 100%;
    min-height: 520px;
    height: 70vh;
    border: 0;
    background: #000;
}

.yx-resource-modal-loading {
    margin: 0;
    padding: 24px;
    text-align: center;
    color: var(--yx-muted);
    font-size: 14px;
}

.yx-resource-modal-image {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #111;
}

.yx-resource-modal-fallback {
    padding: 28px 18px;
    text-align: center;
    border-radius: 12px;
    background: #f4f8fd;
}

.yx-resource-modal-fallback p {
    margin: 0 0 16px;
    color: var(--yx-muted);
    line-height: 1.6;
}

.yx-resource-modal-edit,
.yx-resource-modal-download {
    display: inline-block;
    margin: 0 8px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.yx-resource-modal-edit {
    background: var(--yx-accent);
    color: #fff;
}

.yx-resource-modal-download {
    background: #eef3fa;
    color: var(--yx-accent);
}

body.yx-resource-modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .yx-resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* Django Admin 日历：矩阵 sticky 表头会盖住弹出层顶部的上月/下月按钮 */
.calendarbox {
    z-index: 1100;
}

.calendarbox .calendarnav-previous,
.calendarbox .calendarnav-next {
    z-index: 5;
    width: 20px;
    height: 20px;
    text-indent: 0;
    overflow: visible;
    font-size: 18px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    color: #1b2a45;
    text-decoration: none;
    background: transparent;
}

.calendarbox .calendarnav-previous:hover,
.calendarbox .calendarnav-next:hover {
    color: var(--yx-accent);
}

.yx-partner-trial-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0;
    margin-right: auto;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #e6a23c;
    background: #fdf6ec;
    border: 1px solid #f5dab1;
    vertical-align: middle;
}

.yx-partner-trial-watermark {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(48px, 12vw, 120px);
    font-weight: 800;
    letter-spacing: 0.2em;
    color: rgba(64, 158, 255, 0.06);
    transform: rotate(-24deg);
    user-select: none;
}

/* 必填字段：红色 *（学生 / 老师 / 经销商等后台表单通用） */
:root {
    --yx-required-asterisk: #f56c6c;
}

form .aligned label.required::before,
form .aligned legend.required::before,
.form-row label.required::before,
.inline-related label.required::before,
.inline-group label.required::before {
    content: "*";
    color: var(--yx-required-asterisk);
    font-weight: 700;
    margin-right: 4px;
    font-family: inherit;
    line-height: 1;
}

/* 避免 Django 默认仅加粗、无星号时不够醒目 */
form .aligned label.required,
form .aligned legend.required,
.form-row label.required {
    font-weight: 600;
    color: var(--yx-ink);
}
