* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; color: #333; }
a { color: inherit; text-decoration: none; }
body.login-page {
    min-height: 100vh;
    background: #2f77e7;
}
.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 60px;
    position: relative;
}
.login-card {
    width: 770px;
    height: 485px;
    display: flex;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}
.login-visual {
    width: 54%;
    background: linear-gradient(180deg, #76c7ef 0%, #49a7ea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-visual img { width: 100%; height: 100%; object-fit: cover; }
.login-form-panel {
    width: 46%;
    background: #fff;
    padding: 48px 44px 36px;
}
.login-form-panel .logo {
    width: 132px;
    height: 72px;
    margin: 0 auto 46px;
    object-fit: cover;
    display: block;
}
.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 26px;
}
.form-line { margin-bottom: 22px; }
.input-underline {
    width: 100%;
    border: none;
    outline: none;
    border-bottom: 1px solid #e5e5e5;
    font-size: 14px;
    padding: 10px 0 14px;
    color: #888;
}
.input-underline::placeholder { color: #bdbdbd; }
.btn-login {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 22px;
    background: #2f8ae9;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    margin-top: 26px;
}
.btn-login:hover { background: #2478d8; }
.login-footer {
    position: absolute;
    bottom: 18px;
    text-align: center;
    color: #fff;
    font-size: 13px;
    line-height: 1.8;
}
.alert {
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 4px;
    font-size: 13px;
}
.alert-error { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }
.alert-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }

/* admin layout */
body.admin-page { background: #edf0f5; overflow-x: hidden; }
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 196px;
    background: #2f4057;
    color: #d8e2ef;
    flex-shrink: 0;
}
.sidebar-brand {
    height: 49px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: #283141;
    display: flex;
    align-items: center;
    padding: 0 10px;
}
.sidebar-brand img { width: 155px; height: 36px; object-fit: contain; }
.sidebar-menu { padding: 8px 0; }
.sidebar-section {
    display: block;
}
.sidebar-link,
.sidebar-toggle {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #d8e2ef;
    padding: 0 18px;
    font-size: 14px;
}
.sidebar-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.sidebar-icon {
    width: 16px;
    text-align: center;
    opacity: .9;
}
.sidebar-link:hover,
.sidebar-toggle:hover,
.sidebar-link.active,
.sidebar-toggle.active,
.submenu a.active {
    background: #1f2b3d;
    color: #39f;
}
.sidebar-section.open > .sidebar-toggle { background: #2b374a; }
.submenu { display: none; background: #243246; }
.sidebar-section.open .submenu { display: block; }
.submenu a {
    height: 46px;
    display: flex;
    align-items: center;
    padding-left: 32px;
    color: #e4edf9;
    font-size: 14px;
}
.submenu a span { padding-left: 14px; }
.sidebar-arrow { font-size: 12px; color: #97a6ba; }
.main-wrap { flex: 1; min-width: 0; }
.topbar {
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px 0 14px;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #777;
    font-size: 14px;
}
.hamburger { font-size: 18px; color: #333; }
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #444;
}
.topbar-right .mini-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.page-body { padding: 0; }
.tags-bar {
    height: 32px;
    background: #fff;
    border-top: 1px solid #f1f1f1;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
}
.tag {
    height: 24px;
    line-height: 22px;
    padding: 0 12px;
    border: 1px solid #dcdfe6;
    background: #fff;
    color: #666;
    font-size: 12px;
}
.tag.active {
    background: #1ab978;
    border-color: #18a86b;
    color: #fff;
}
.page-container { padding: 18px 18px 30px; }
.content-card {
    background: #fff;
    border: 1px solid #e6e6e6;
}
.section-title {
    background: #f5f5f5;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    color: #232323;
    border-bottom: 1px solid #ededed;
}
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 18px 12px 12px;
}
.mini-card {
    border: 1px solid #efefef;
    background: #fff;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.mini-card-title { font-size: 14px; color: #666; }
.mini-card-value { margin-top: 8px; font-size: 18px; font-weight: 700; color: #333; }
.dashboard-placeholder {
    min-height: 420px;
    background: #fff;
    position: relative;
    padding: 12px;
}
.dashboard-image-placeholder {
    position: absolute;
    right: 14px;
    bottom: 18px;
    width: 172px;
    height: 220px;
    border: 1px solid #d9d9d9;
    background: #fafafa;
}
.breadcrumb {
    font-size: 14px;
    color: #888;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 2px 0 16px;
}
.filter-bar {
    background: #fff;
    border: 1px solid #e7e7e7;
    padding: 16px;
    margin-bottom: 12px;
}
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 26px;
    align-items: center;
}
.filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.filter-item label {
    width: 84px;
    min-width: 84px;
    white-space: nowrap;
    font-size: 14px;
    color: #303133;
    font-weight: 700;
    text-align: right;
    line-height: 30px;
    flex-shrink: 0;
}
.filter-item .text-input,
.filter-item .select-input,
.filter-item .small-input {
    flex: 1 1 auto;
    min-width: 0;
}
.text-input,
.select-input,
.small-input,
input[type="datetime-local"],
input[type="date"],
input[type="time"] {
    width: 100%;
    height: 30px;
    line-height: 28px;
    box-sizing: border-box;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #dcdfe6 !important;
    border-left: 1px solid #dcdfe6 !important;
    border-right: 1px solid #dcdfe6 !important;
    padding: 0 10px;
    outline: none;
    color: #606266;
    background-color: #fff !important;
    background-clip: padding-box;
    border-radius: 2px;
    font-size: 12px;
    box-shadow: none !important;
    transition: border-color .18s ease;
}
.text-input::placeholder,
.small-input::placeholder,
input[type="datetime-local"]::placeholder,
input[type="date"]::placeholder,
input[type="time"]::placeholder {
    color: #c0c4cc;
}
.select-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 0 30px 0 10px;
    color: #606266;
    background-color: #fff !important;
    background-image: linear-gradient(45deg, transparent 50%, #c0c4cc 50%), linear-gradient(135deg, #c0c4cc 50%, transparent 50%);
    background-position: calc(100% - 16px) 12px, calc(100% - 11px) 12px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    background-origin: border-box;
}
.select-input:invalid,
.select-input option[value=""] {
    color: #c0c4cc;
}
.text-input:focus,
.select-input:focus,
.small-input:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="time"]:focus {
    border-color: #c0c4cc !important;
    border-left-color: #c0c4cc !important;
    border-right-color: #c0c4cc !important;
    box-shadow: none !important;
}
.text-input:disabled,
.select-input:disabled,
.small-input:disabled,
input[type="datetime-local"]:disabled,
input[type="date"]:disabled,
input[type="time"]:disabled {
    background: #f5f7fa;
    border-color: #e4e7ed;
    color: #c0c4cc;
    cursor: not-allowed;
}
.time-range {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.btn-row { margin-top: 18px; display: flex; gap: 10px; }
.btn {
    min-width: 54px;
    height: 30px;
    padding: 0 18px;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #555;
    cursor: pointer;
    border-radius: 2px;
    font-size: 13px;
    line-height: 28px;
    transition: all .2s ease;
}
.btn:hover { opacity: .96; }
.btn-primary { background: #3b97ff; border-color: #3b97ff; color: #fff; }
.btn-success { background: #7bc043; border-color: #7bc043; color: #fff; }
.btn-warning {
    background: #ff6d63;
    border-color: #ff6d63;
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255,109,99,0.04) inset;
}
.btn-light { background: #f6f6f6; }
.btn-outline {
    background: #409eff;
    color: #fff;
    border-color: #409eff;
    box-shadow: 0 0 0 1px rgba(64,158,255,0.04) inset;
}
.btn-outline:hover,
.btn-primary:hover { background: #2f8cf0; border-color: #2f8cf0; }
.btn-warning:hover { background: #ff5a4f; border-color: #ff5a4f; }
.btn-success:hover { background: #6db33a; border-color: #6db33a; }
.data-card {
    background: #fff;
    border: 1px solid #e7e7e7;
}
.table-wrap { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}
.table th,
.table td {
    border: 1px solid #e8e8e8;
    padding: 12px 10px;
    text-align: left;
    vertical-align: middle;
    color: #555;
}
.table th { background: #fafafa; font-weight: 700; color: #666; }
.table td.center,
.table th.center { text-align: center; }
.status-switch {
    width: 38px;
    height: 20px;
    background: #22cf73;
    border-radius: 12px;
    position: relative;
    display: inline-block;
}
.status-switch::after {
    content: "";
    position: absolute;
    right: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
}
.page-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 14px;
    color: #666;
    font-size: 14px;
}
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pagination .page-num {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dcdfe6;
    background: #fff;
}
.pagination .page-num.active { background: #3b97ff; color: #fff; border-color: #3b97ff; }
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 18px;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 18px;
}
.form-box {
    background: #fff;
    border: 1px solid #e7e7e7;
    padding: 16px;
    margin-bottom: 14px;
}
.form-box h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #333;
}
.checkbox-list {
    max-height: 280px;
    overflow: auto;
    border: 1px solid #ececec;
    padding: 10px;
    background: #fafafa;
}
.checkbox-group-title {
    font-size: 14px;
    font-weight: 700;
    color: #444;
    padding: 8px 0 4px;
}
.checkbox-item { display: inline-flex; align-items: center; gap: 6px; margin: 6px 14px 6px 0; }
.form-item { display: flex; flex-direction: column; gap: 8px; }
.form-item label { font-size: 13px; color: #555; font-weight: 600; }
.badge-normal {
    display: inline-block;
    min-width: 52px;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 12px;
    text-align: center;
    color: #fff;
    background: #52c41a;
}
.badge-disabled { background: #bfbfbf; }
.logo-thumb { width: 88px; height: 40px; object-fit: contain; }
.level-thumb { width: 58px; height: 58px; object-fit: contain; }
.placeholder-card {
    background: #fff;
    border: 1px solid #e7e7e7;
    padding: 24px;
    min-height: 360px;
    color: #666;
    line-height: 1.9;
}
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-tree td { background: #fff; }
.menu-indent-1 { padding-left: 28px !important; }
.menu-indent-2 { padding-left: 52px !important; }
.row-muted { color: #999; }
@media (max-width: 1400px) {
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .filter-grid { grid-template-columns: 1fr; }
    .filter-item label { width: 76px; min-width: 76px; }
}
@media (max-width: 1200px) {
    .stats-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .filter-grid { grid-template-columns: 1fr; }
    .filter-item label { min-width: 88px; }
}

.section-title-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dialog-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
    box-sizing: border-box;
}
.dialog-mask.show { display: flex; }
.dialog-card {
    width: 760px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.dialog-card > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}
.dialog-header {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid #ececec;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}
.dialog-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
}
.dialog-body {
    padding: 22px 28px 18px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}
.dialog-body .form-grid-2 { grid-template-columns: 1fr; gap: 14px 0; }
.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px 18px;
    border-top: 1px solid #ececec;
    background: #fff;
    flex: 0 0 auto;
}
.btn[disabled] {
    cursor: not-allowed;
    color: #999;
    background: #f5f5f5;
    border-color: #e2e2e2;
}
.dialog-large {
    width: 860px;
    max-width: calc(100vw - 40px);
}
.permission-panel {
    border: 1px solid #e5e9f2;
    background: #fafbfd;
    padding: 14px 16px;
    max-height: 360px;
    overflow-y: auto;
}
.permission-group + .permission-group {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e6e6e6;
}
.permission-group-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}
.permission-group-title label,
.permission-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.permission-children {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 12px;
    padding-left: 28px;
}
.permission-item {
    min-width: 140px;
    color: #555;
    font-size: 13px;
}

/* v6 fixed sidebar + right panel scroll */
html, body { height: 100%; }
body.admin-page { height: 100vh; overflow: hidden; }
.admin-layout { height: 100vh; overflow: hidden; }
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
}
.main-wrap {
    margin-left: 196px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.topbar,
.tags-bar {
    flex-shrink: 0;
}
.page-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.menu-action-grid {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid #e5e9f2;
    background: #fafbfd;
}
.menu-action-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 13px;
}
.form-help {
    margin-top: 8px;
    font-size: 12px;
    color: #8c8c8c;
}
.permission-table {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}
.permission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid #edf1f6;
    background: #fff;
    border-radius: 4px;
}
.permission-row-active {
    background: #f7fbff;
    border-color: #d4e8ff;
}
.permission-item-main {
    min-width: 180px;
    font-weight: 600;
    color: #333;
}
.permission-ops {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.permission-op {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #555;
    font-size: 13px;
}
.badge-plain {
    display: inline-block;
    min-width: 44px;
    padding: 2px 8px;
    text-align: center;
    border-radius: 2px;
    font-size: 12px;
    color: #52c41a;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
}
.badge-off {
    color: #999;
    background: #fafafa;
    border: 1px solid #e8e8e8;
}

.login-brand-text {
    width: 132px;
    margin: 0 auto 22px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #c63b2d;
    letter-spacing: 1px;
}
.login-title {
    text-align: left;
}

html, body.admin-page { height: 100%; }
body.admin-page {
    overflow: hidden;
}
.admin-layout {
    height: 100vh;
    overflow: hidden;
}
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 50;
    transition: width .2s ease;
}
.sidebar-brand {
    justify-content: center;
    padding: 0 16px;
}
.sidebar-brand-text {
    display: block;
    width: 100%;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.main-wrap {
    margin-left: 196px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: margin-left .2s ease;
}
.page-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-collapsed .sidebar {
    width: 0;
    overflow: hidden;
}
.sidebar-collapsed .main-wrap {
    margin-left: 0;
}
.hamburger-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #d6d6d6;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}
.user-dropdown {
    position: relative;
}
.user-dropdown-toggle {
    height: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #444;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}
.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: 34px;
    min-width: 110px;
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    display: none;
    z-index: 30;
}
.user-dropdown.open .user-dropdown-menu { display: block; }
.user-dropdown-menu a {
    display: block;
    padding: 10px 14px;
    color: #333;
}
.user-dropdown-menu a:hover {
    background: #f5f7fb;
}
.tags-bar {
    min-height: 32px;
    height: auto;
    flex-wrap: wrap;
    padding: 4px 14px;
}
.tags-bar .tag {
    display: inline-flex;
    align-items: center;
    margin: 2px 0;
}
.menu-tree-panel {
    padding: 16px;
    background: #fff;
}
.menu-tree-group {
    border: 1px solid #e8e8e8;
    margin-bottom: 14px;
    background: #fff;
}
.menu-tree-parent-row,
.menu-tree-child-row {
    display: grid;
    align-items: center;
    gap: 12px;
}
.menu-tree-parent-row {
    grid-template-columns: 1.2fr 1fr auto;
    padding: 14px 16px;
    background: #f7f9fc;
    border-bottom: 1px solid #edf1f5;
}
.menu-tree-parent-main,
.menu-tree-child-name {
    display: flex;
    align-items: center;
    gap: 10px;
}
.menu-tree-parent-title {
    font-weight: 700;
    color: #243447;
}
.menu-tree-folder,
.menu-tree-branch {
    color: #7b8a9a;
}
.menu-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    color: #14a44d;
    background: #ebfbf1;
}
.menu-tag-off {
    color: #999;
    background: #f1f1f1;
}
.menu-tree-parent-meta {
    color: #7a8595;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.menu-tree-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.menu-tree-actions form { margin: 0; }
.menu-tree-children { padding: 0 16px 10px 46px; }
.menu-tree-child-row {
    grid-template-columns: 1.1fr 1.2fr 1fr 70px auto;
    padding: 12px 0;
    border-bottom: 1px dashed #ececec;
}
.menu-tree-child-row:last-child { border-bottom: none; }
.menu-op-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    background: #eef5ff;
    color: #3b97ff;
}
.menu-op-empty,
.menu-tree-empty,
.menu-tree-empty-page {
    color: #999;
    font-size: 13px;
}
.menu-tree-empty { padding: 12px 0 6px; }
.menu-tree-empty-page { padding: 20px 0; text-align: center; }
.menu-tree-child-path,
.menu-tree-child-status,
.menu-tree-child-perms {
    color: #555;
    font-size: 13px;
}
@media (max-width: 1280px) {
    .menu-tree-parent-row {
        grid-template-columns: 1fr;
    }
    .menu-tree-child-row {
        grid-template-columns: 1fr;
    }
    .menu-tree-actions {
        justify-content: flex-start;
    }
}


/* v10 closable tabs + admin dialog */
.tags-bar {
    height: 36px;
    min-height: 36px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    padding: 4px 10px;
    white-space: nowrap;
}
.tags-bar .tag {
    height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 1px solid #dcdfe6;
    background: #fff;
    color: #666;
    flex: 0 0 auto;
    text-decoration: none;
}
.tags-bar .tag.active {
    background: #20b26b;
    border-color: #1ca360;
    color: #fff;
}
.tag-title {
    display: inline-block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tag-close {
    width: 14px;
    height: 14px;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}
.tag-close:hover { opacity: .8; }
.dialog-admin { width: 820px; }
.dialog-body-compact { padding-top: 18px; }
.dialog-admin .form-item label { min-width: 0; }

.inline-actions .btn,
.inline-actions form { display: inline-flex; }
.inline-actions form { margin: 0; }
.inline-actions .btn-outline,
.inline-actions .btn-warning,
.inline-actions .btn-light {
    min-width: 58px;
    justify-content: center;
    text-align: center;
}
.dialog-body .text-input,
.dialog-body .select-input,
.dialog-body .small-input,
.dialog-body input[type="datetime-local"] {
    height: 36px;
}
.tags-bar .tag {
    height: 28px;
    border-radius: 0;
}

.textarea-input {
    min-height: 78px;
    resize: vertical;
    padding-top: 10px;
    line-height: 1.5;
}
.room-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 8px;
    align-items: center;
}
.filter-grid-guest {
    grid-template-columns: repeat(3, minmax(180px, 260px));
}
.dialog-large .table-wrap {
    max-height: 360px;
    overflow: auto;
}
.single-form-page {
    padding: 12px 0;
}
.single-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 520px;
}
.single-form-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.single-form-item label {
    width: 120px;
    min-width: 120px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: #303133;
}
.single-form-item .text-input,
.single-form-item .select-input {
    flex: 1;
}
.radio-row {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    color: #555;
}
.toggle-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #fff;
}
.toggle-pill.on { background: #21c16b; }
.toggle-pill.off { background: #bfbfbf; }

.dialog-admin-tall {
    width: 820px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}
.dialog-body-scroll {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}


.page-toast {
    position: fixed;
    top: 72px;
    right: 24px;
    z-index: 4000;
    min-width: 280px;
    max-width: 520px;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    font-size: 13px;
    line-height: 1.6;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .22s ease, transform .22s ease;
}
.page-toast.hide {
    opacity: 0;
    transform: translateY(-10px);
}
.page-toast-success {
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}
.page-toast-error {
    background: #fff2f0;
    color: #cf1322;
    border: 1px solid #ffccc7;
}
.form-item.hidden {
    display: none !important;
}

.org-page-card { padding: 0; }
.org-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: 680px; }
.org-tree-pane { border-right: 1px solid #ececec; background: #fff; }
.org-users-pane { background: #fff; }
.org-tree-scroll { max-height: calc(100vh - 220px); overflow: auto; padding: 8px 10px 16px; }
.org-tree-root { border: 1px solid #ededed; background: #fff; }
.org-tree-children { position: relative; }
.org-tree-room-children { padding-left: 18px; }
.org-director-list, .org-team-list, .org-manager-list { padding-left: 18px; }
.org-tree-line {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 4px;
  color: #4b4b4b;
  white-space: nowrap;
}
.org-tree-line::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #e6e6e6;
}
.org-tree-line::after {
  content: "";
  position: absolute;
  left: -10px;
  top: 17px;
  width: 10px;
  height: 1px;
  background: #e6e6e6;
}
.org-tree-line-room::before,
.org-tree-line-room::after,
.org-tree-room-children > .org-tree-item > .org-tree-line::before,
.org-tree-room-children > .org-tree-item > .org-tree-line::after { display: none; }
.org-node {
  border-radius: 4px;
  color: #4b4b4b;
}
.org-node:hover { background: #f5f7fa; }
.org-node.active { background: #eef6ff; color: #1f73d8; }
.org-caret {
  width: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b7b7b7;
  font-size: 12px;
  flex: 0 0 14px;
}
.org-caret-leaf { font-size: 18px; line-height: 1; transform: translateY(-1px); }

.org-caret-toggle { cursor: pointer; user-select: none; }
.org-collapsible.collapsed > .org-tree-children,
.org-tree-root.collapsed > .org-tree-room-children { display: none; }
.org-collapsible.collapsed > .org-tree-line .org-caret-toggle { color: #b7b7b7; }
.org-collapsible.expanded > .org-tree-line .org-caret-toggle { color: #b7b7b7; }
.org-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  line-height: 24px;
  flex: 0 0 auto;
}
.org-badge-room { background: #ff6b6b; }
.org-badge-dept { background: #f0ad4e; }
.org-badge-director { background: #8c8c8c; }
.org-badge-team { background: #409eff; }
.org-badge-manager { background: #409eff; }
.org-node-name { font-size: 14px; color: inherit; word-break: break-all; }
@media (max-width: 1200px) {
  .org-layout { grid-template-columns: 1fr; }
  .org-tree-pane { border-right: none; border-bottom: 1px solid #ececec; }
  .org-tree-scroll { max-height: none; }
}

.user-list-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    cursor: grab;
}
.user-list-table-wrap.dragging {
    cursor: grabbing;
    user-select: none;
}
.user-list-table {
    min-width: 1750px;
}
.sticky-right {
    position: sticky;
    right: 0;
    z-index: 3;
    background: #fff;
}
.table thead .sticky-right {
    z-index: 4;
    background: #fafafa;
}
.table tbody .sticky-right {
    box-shadow: -8px 0 8px -8px rgba(0,0,0,0.12);
}
.sticky-op-col {
    min-width: 300px;
}
.no-wrap-actions {
    flex-wrap: nowrap;
    white-space: nowrap;
}
.no-wrap-actions form {
    flex: 0 0 auto;
}
.no-wrap-actions .btn {
    flex: 0 0 auto;
}

.online-stat-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 18px;
}
.summary-card {
  background: #fff;
  border: 1px solid #edf1f6;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 6px 18px rgba(31, 45, 61, 0.04);
}
.summary-title {
  color: #8793a3;
  font-size: 13px;
  margin-bottom: 10px;
}
.summary-value {
  color: #1f2d3d;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.online-chart-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.online-chart-layout-wide {
  grid-template-columns: 470px 1fr;
}
.online-chart-card,
.online-legend-card {
  background: #fff;
  border: 1px solid #edf1f6;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 6px 18px rgba(31, 45, 61, 0.04);
}
.online-chart-title {
  color: #2d3a4b;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}
.online-chart-body {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto;
}
.online-chart-body-wide {
  width: 500px;
  height: 340px;
}
.online-chart-center {
  position: absolute;
  left: 190px;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.online-chart-center-value {
  font-size: 34px;
  font-weight: 700;
  color: #1f2d3d;
  line-height: 1;
}
.online-chart-center-label {
  margin-top: 8px;
  color: #8793a3;
  font-size: 13px;
}
.online-dist-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.online-dist-item {
  padding: 10px 0 12px;
  border-bottom: 1px solid #f2f5f8;
}
.online-dist-item:last-child {
  border-bottom: none;
}
.online-dist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.online-dist-name-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  flex: 1 1 auto;
}
.online-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.online-dist-name-text {
  min-width: 0;
  flex: 1 1 auto;
}
.online-dist-name {
  color: #2d3a4b;
  font-size: 14px;
  font-weight: 600;
}
.online-dist-meta {
  margin-top: 4px;
  color: #8793a3;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.online-dist-value {
  color: #2d3a4b;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}
.online-dist-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #edf1f6;
  overflow: hidden;
  margin-top: 10px;
}
.online-dist-fill {
  height: 100%;
  border-radius: 999px;
}

.online-trend-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.online-trend-canvas-wrap {
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
  padding: 8px 10px 0;
}
.online-trend-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 340px;
}
.online-trend-legend-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.online-trend-legend-item {
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fafcff;
}
.online-trend-legend-left {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  flex: 1 1 auto;
}
.online-trend-legend-right {
  white-space: nowrap;
  color: #2d3a4b;
  font-size: 13px;
  font-weight: 600;
}
@media (max-width: 1200px) {
  .online-chart-layout,
  .online-chart-layout-wide {
    grid-template-columns: 1fr;
  }
  .online-chart-body,
  .online-chart-body-wide {
    margin-left: auto;
    margin-right: auto;
  }
  .online-trend-legend-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .online-stat-summary-grid {
    grid-template-columns: 1fr;
  }
}
.guest-login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.guest-login-row { width: 100%; }
.login-input { height: 30px !important; width: 100%; }
.login-submit { min-width: 64px; align-self: flex-start; margin-top: 2px; }
.guest-shell { display: flex; min-height: 100vh; }
.guest-sidebar { width: 180px; background: #2f4057; color: #d8e2ef; flex-shrink: 0; }
.guest-menu { padding-top: 2px; }
.guest-menu-link { display: flex; align-items: center; height: 46px; padding: 0 18px; color: #d8e2ef; border-bottom: 1px solid rgba(255,255,255,0.04); }
.guest-menu-link.active, .guest-menu-link:hover { background: #1f2b3d; color: #39f; }
.guest-main { flex: 1; min-width: 0; background: #edf0f5; }
.guest-topbar { background: #fff; }


@keyframes autoHideAlertFade {
  0%, 92% { opacity: 1; max-height: 80px; margin-bottom: 16px; padding-top: 12px; padding-bottom: 12px; }
  100% { opacity: 0; max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
}
[data-auto-hide-alert] {
  overflow: hidden;
  animation: autoHideAlertFade 3.2s ease forwards;
}

/* Academy admin login */
.academy-login {
    min-height: 100svh;
    padding: 0;
    overflow: hidden;
    align-items: stretch;
    justify-content: stretch;
    background:
        radial-gradient(circle at 86% 6%, rgba(166, 139, 255, .32), transparent 28%),
        radial-gradient(circle at 7% 12%, rgba(113, 182, 255, .25), transparent 26%),
        linear-gradient(135deg, #f5faff 0%, #f4f7ff 48%, #fbf8ff 100%);
    color: #16223a;
}
.academy-login-shell {
    width: 100%;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(460px, 1fr) minmax(520px, 720px);
    align-items: center;
    gap: clamp(32px, 5vw, 82px);
    padding: clamp(42px, 7vh, 80px) clamp(58px, 7vw, 116px);
    position: relative;
}
.academy-hero {
    min-height: min(760px, calc(100svh - 110px));
    position: relative;
    overflow: hidden;
    padding: 62px 0 0;
}
.academy-brand {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #1738be;
    position: relative;
    z-index: 2;
}
.academy-logo {
    width: 86px;
    height: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.academy-logo svg {
    width: 100%;
    height: 100%;
    display: block;
}
.academy-brand-name {
    font-family: Georgia, "Songti SC", "SimSun", serif;
    font-size: clamp(34px, 3.6vw, 52px);
    line-height: 1.05;
    font-weight: 800;
    color: #183bc0;
}
.academy-brand-sub {
    margin-top: 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(14px, 1.25vw, 19px);
    line-height: 1;
    font-weight: 700;
    color: #1738be;
}
.academy-welcome {
    position: relative;
    z-index: 2;
    margin-top: clamp(70px, 13vh, 134px);
}
.academy-welcome h1 {
    margin: 0;
    color: #17233d;
    font-size: clamp(38px, 4.4vw, 64px);
    line-height: 1.1;
    font-weight: 800;
}
.academy-welcome p {
    margin: 26px 0 0;
    color: rgba(43, 55, 76, .72);
    font-size: clamp(19px, 1.9vw, 28px);
    line-height: 1.5;
    font-weight: 500;
}
.academy-orb {
    position: absolute;
    right: -90px;
    top: 250px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 54px solid rgba(123, 105, 255, .18);
    filter: blur(.1px);
    box-shadow: inset 20px 18px 44px rgba(255,255,255,.52), 0 18px 58px rgba(113,105,255,.18);
}
.academy-cube {
    position: absolute;
    right: 92px;
    top: 304px;
    width: 180px;
    height: 180px;
    border-radius: 32px;
    transform: rotate(-38deg) skew(4deg);
    background:
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(245,250,255,.55) 38%, rgba(158,119,255,.46) 100%);
    box-shadow:
        inset 16px 18px 26px rgba(255,255,255,.75),
        inset -22px -26px 38px rgba(93, 124, 255, .28),
        0 28px 60px rgba(118, 104, 255, .22);
    z-index: 1;
}
.academy-cube span {
    position: absolute;
    inset: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.86);
    box-shadow: inset 0 0 24px rgba(255,255,255,.72);
}
.academy-campus {
    position: absolute;
    left: -58px;
    right: -120px;
    bottom: 2px;
    height: 230px;
    opacity: .58;
    background:
        linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.78) 72%, rgba(255,255,255,.96) 100%),
        linear-gradient(180deg, rgba(148, 194, 255, .12), rgba(148, 194, 255, .34));
}
.campus-building {
    position: absolute;
    left: 155px;
    right: 95px;
    bottom: 38px;
    height: 118px;
    border-radius: 8px 8px 2px 2px;
    background:
        linear-gradient(90deg, rgba(228,239,255,.82), rgba(255,255,255,.74) 48%, rgba(217,232,255,.84)),
        repeating-linear-gradient(90deg, transparent 0 42px, rgba(95,132,179,.28) 43px 47px),
        repeating-linear-gradient(180deg, transparent 0 28px, rgba(95,132,179,.18) 29px 32px);
    border: 1px solid rgba(121, 155, 203, .22);
    box-shadow: 0 14px 44px rgba(100, 139, 198, .18);
}
.campus-building::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 118px;
    height: 146px;
    transform: translateX(-50%);
    border-radius: 6px 6px 0 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,.72), rgba(212,229,255,.86)),
        repeating-linear-gradient(90deg, transparent 0 30px, rgba(74, 111, 165, .27) 31px 35px),
        repeating-linear-gradient(180deg, transparent 0 28px, rgba(74, 111, 165, .18) 29px 32px);
    border: 1px solid rgba(121, 155, 203, .24);
}
.campus-building::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -25px;
    width: 420px;
    height: 36px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(124, 166, 220, .18);
    filter: blur(10px);
}
.campus-tree {
    position: absolute;
    bottom: 36px;
    width: 128px;
    height: 106px;
    border-radius: 50% 50% 46% 46%;
    background:
        radial-gradient(circle at 34% 42%, rgba(255,184,212,.72), transparent 36%),
        radial-gradient(circle at 62% 30%, rgba(255,255,255,.66), transparent 37%),
        radial-gradient(circle at 55% 62%, rgba(141, 194, 119, .52), transparent 42%);
    filter: blur(.2px);
}
.campus-tree::after {
    content: "";
    position: absolute;
    left: 58px;
    bottom: -38px;
    width: 8px;
    height: 56px;
    border-radius: 999px;
    background: rgba(148, 119, 93, .36);
}
.campus-tree-left { left: 36px; }
.campus-tree-right { right: 0; }
.academy-form-card {
    width: min(100%, 720px);
    min-height: min(820px, calc(100svh - 120px));
    border-radius: 20px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 28px 82px rgba(101, 113, 153, .18);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(72px, 8vh, 108px) 66px 66px;
    position: relative;
    z-index: 3;
}
.academy-form-inner {
    width: min(100%, 590px);
}
.academy-form-inner h2 {
    margin: 0;
    font-size: clamp(30px, 2.5vw, 40px);
    line-height: 1.2;
    color: #151f33;
    font-weight: 800;
}
.academy-title-line {
    width: 42px;
    height: 4px;
    border-radius: 999px;
    margin: 24px 0 82px;
    background: linear-gradient(90deg, #2c63ff, #9a58ff);
}
.academy-login-form {
    display: flex;
    flex-direction: column;
    gap: 46px;
}
.academy-field {
    height: 78px;
    border: 1px solid #dde3ef;
    border-radius: 10px;
    background: rgba(255,255,255,.74);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 24px;
    color: #111;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.academy-field:focus-within {
    border-color: #6789ff;
    box-shadow: 0 0 0 4px rgba(72, 99, 255, .08);
}
.academy-field-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.academy-field svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.academy-field input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1b2437;
    font-size: 20px;
}
.academy-field input::placeholder {
    color: #b6bac4;
}
.academy-password-toggle {
    width: 40px;
    height: 40px;
    border: 0;
    padding: 6px;
    background: transparent;
    color: #111;
    cursor: pointer;
    flex: 0 0 auto;
}
.academy-submit {
    width: 100%;
    height: 76px;
    border: 0;
    border-radius: 12px;
    margin-top: 8px;
    background: linear-gradient(100deg, #2e62ff 0%, #4066ff 44%, #9757ee 100%);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 18px 32px rgba(63, 91, 255, .22);
}
.academy-submit:hover {
    filter: brightness(1.03);
}
.academy-form-inner .alert {
    margin: -54px 0 28px;
    border-radius: 10px;
    font-size: 14px;
}

@media (max-width: 920px) {
    .academy-login {
        min-height: 100svh;
        overflow: auto;
        background:
            radial-gradient(circle at 88px 42px, rgba(137, 200, 255, .34), transparent 34%),
            radial-gradient(circle at 86% 2%, rgba(166, 139, 255, .46), transparent 28%),
            linear-gradient(180deg, #f5faff 0%, #f6f8ff 52%, #fbfdff 100%);
    }
    .academy-login-shell {
        display: block;
        min-height: 100svh;
        padding: 48px 20px 58px;
    }
    .academy-hero {
        min-height: 610px;
        padding: 118px 30px 0;
        overflow: visible;
    }
    .academy-brand {
        gap: 18px;
    }
    .academy-logo {
        width: 88px;
        height: 98px;
    }
    .academy-brand-name {
        font-size: 40px;
    }
    .academy-brand-sub {
        font-size: 16px;
        margin-top: 10px;
    }
    .academy-welcome {
        margin-top: 44px;
    }
    .academy-welcome h1 {
        font-size: 48px;
    }
    .academy-welcome p {
        margin-top: 18px;
        font-size: 26px;
        color: rgba(42, 52, 69, .58);
    }
    .academy-orb {
        right: -136px;
        top: 32px;
        width: 286px;
        height: 286px;
        border-width: 44px;
    }
    .academy-cube {
        right: 18px;
        top: 132px;
        width: 188px;
        height: 188px;
        border-radius: 34px;
    }
    .academy-campus {
        display: none;
    }
    .academy-form-card {
        width: 100%;
        min-height: 0;
        margin-top: -10px;
        border-radius: 28px;
        padding: 76px 48px 64px;
        background: rgba(255,255,255,.94);
        box-shadow: 0 26px 70px rgba(111, 126, 160, .14);
    }
    .academy-form-inner {
        width: 100%;
    }
    .academy-form-inner h2,
    .academy-title-line {
        display: none;
    }
    .academy-login-form {
        gap: 0;
    }
    .academy-field {
        height: 116px;
        border: 0;
        border-bottom: 1px solid #e2e5ec;
        border-radius: 0;
        background: transparent;
        padding: 0 6px;
        gap: 30px;
        box-shadow: none;
    }
    .academy-field:focus-within {
        border-color: #d5d9e3;
        box-shadow: none;
    }
    .academy-field-icon {
        width: 42px;
        height: 42px;
    }
    .academy-field input {
        font-size: 28px;
    }
    .academy-password-toggle {
        width: 48px;
        height: 48px;
    }
    .academy-submit {
        height: 86px;
        margin-top: 72px;
        border-radius: 18px;
        font-size: 30px;
    }
    .academy-form-inner .alert {
        margin: 0 0 22px;
        font-size: 15px;
    }
}

@media (max-width: 520px) {
    .academy-login-shell {
        padding: 22px 20px 42px;
    }
    .academy-hero {
        min-height: 368px;
        padding: 56px 14px 0;
    }
    .academy-logo {
        width: 50px;
        height: 58px;
    }
    .academy-brand {
        gap: 12px;
    }
    .academy-brand-name {
        font-size: 27px;
    }
    .academy-brand-sub {
        font-size: 10px;
        margin-top: 6px;
    }
    .academy-welcome {
        margin-top: 28px;
    }
    .academy-welcome h1 {
        font-size: 34px;
    }
    .academy-welcome p {
        margin-top: 14px;
        font-size: 19px;
    }
    .academy-orb {
        right: -92px;
        top: 20px;
        width: 180px;
        height: 180px;
        border-width: 30px;
    }
    .academy-cube {
        right: 8px;
        top: 96px;
        width: 120px;
        height: 120px;
        border-radius: 24px;
    }
    .academy-form-card {
        border-radius: 24px;
        padding: 44px 34px 46px;
        margin-top: -4px;
    }
    .academy-field {
        height: 78px;
        gap: 22px;
    }
    .academy-field-icon {
        width: 34px;
        height: 34px;
    }
    .academy-field input {
        font-size: 19px;
    }
    .academy-password-toggle {
        width: 38px;
        height: 38px;
    }
    .academy-submit {
        height: 58px;
        border-radius: 14px;
        margin-top: 48px;
        font-size: 22px;
    }
}

/* Blue admin login */
.admin-academy-login {
    min-height: 100svh;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(420px, 42.7vw) minmax(620px, 1fr);
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
    background:
        radial-gradient(circle at 96% -8%, rgba(39, 93, 219, .10), transparent 26%),
        radial-gradient(circle at 48% 98%, rgba(38, 102, 224, .10), transparent 28%),
        linear-gradient(120deg, #f8fbff 0%, #eef5ff 48%, #f8fbff 100%);
    color: #101a2e;
}
.admin-login-visual {
    min-height: 100svh;
    position: relative;
    overflow: hidden;
    padding: clamp(118px, 13vh, 164px) clamp(64px, 7vw, 110px) 56px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 6%, rgba(255,255,255,.13) 0 1.5px, transparent 2px) 0 0 / 18px 18px,
        linear-gradient(160deg, rgba(6, 47, 143, .96), rgba(31, 102, 224, .92)),
        linear-gradient(180deg, #073ca7, #1e64dc);
}
.admin-login-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 28% 22%, rgba(97, 161, 255, .36), transparent 30%),
        linear-gradient(180deg, rgba(7, 38, 119, .06), rgba(6, 28, 90, .38));
    pointer-events: none;
}
.admin-login-brand {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 22px;
}
.admin-login-logo {
    width: 92px;
    height: 104px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.admin-login-logo svg {
    width: 100%;
    height: 100%;
    display: block;
}
.admin-login-brand-name {
    font-size: clamp(34px, 3.3vw, 48px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: .04em;
}
.admin-login-brand-sub {
    margin-top: 9px;
    font-size: clamp(13px, 1.05vw, 17px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: .06em;
}
.admin-login-copy {
    position: relative;
    z-index: 2;
    margin-top: clamp(72px, 10vh, 116px);
}
.admin-login-copy h1 {
    margin: 0;
    font-size: clamp(54px, 5vw, 78px);
    line-height: 1.1;
    color: #fff;
    font-weight: 800;
    letter-spacing: .02em;
}
.admin-login-copy p {
    margin: 30px 0 0;
    font-size: clamp(22px, 1.9vw, 29px);
    line-height: 1.5;
    color: rgba(255,255,255,.9);
    letter-spacing: .04em;
}
.admin-login-building {
    position: absolute;
    left: -28px;
    right: -28px;
    bottom: 0;
    height: 34vh;
    min-height: 280px;
    opacity: .6;
}
.admin-login-building::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0%, rgba(7, 31, 95, .14) 12%, rgba(5, 23, 76, .66) 100%),
        linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,0));
}
.admin-building-main {
    position: absolute;
    left: 18%;
    right: 8%;
    bottom: 40px;
    height: 210px;
    transform: skewY(-3deg);
    background:
        linear-gradient(90deg, rgba(215,233,255,.28), rgba(255,255,255,.16) 42%, rgba(132,180,255,.16)),
        repeating-linear-gradient(90deg, transparent 0 38px, rgba(255,255,255,.26) 39px 43px),
        repeating-linear-gradient(180deg, transparent 0 38px, rgba(255,255,255,.18) 39px 43px);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: 0 32px 80px rgba(0, 25, 92, .34);
}
.admin-building-main::before {
    content: "";
    position: absolute;
    left: 42px;
    bottom: -26px;
    width: 130px;
    height: 242px;
    transform: skewY(4deg);
    background:
        linear-gradient(135deg, rgba(255,255,255,.28), rgba(84,143,234,.16)),
        repeating-linear-gradient(90deg, transparent 0 32px, rgba(255,255,255,.22) 33px 37px),
        repeating-linear-gradient(180deg, transparent 0 42px, rgba(255,255,255,.17) 43px 47px);
    border: 1px solid rgba(255,255,255,.15);
}
.admin-building-wing {
    position: absolute;
    bottom: 34px;
    width: 220px;
    height: 145px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.22), rgba(66,123,214,.12)),
        repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,255,255,.2) 35px 39px),
        repeating-linear-gradient(180deg, transparent 0 34px, rgba(255,255,255,.15) 35px 39px);
    border: 1px solid rgba(255,255,255,.12);
}
.admin-building-wing-left {
    left: 4%;
    transform: skewY(6deg);
}
.admin-building-wing-right {
    right: -3%;
    height: 118px;
    transform: skewY(-5deg);
}
.admin-login-footer {
    position: absolute;
    z-index: 2;
    left: clamp(64px, 7vw, 110px);
    bottom: 68px;
    color: rgba(255,255,255,.86);
    font-size: 15px;
    letter-spacing: .02em;
}
.admin-login-form-area {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(52px, 7vh, 88px) clamp(70px, 8vw, 118px);
    position: relative;
    overflow: hidden;
}
.admin-login-form-area::before,
.admin-login-form-area::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(43, 101, 222, .06);
    pointer-events: none;
}
.admin-login-form-area::before {
    width: 520px;
    height: 520px;
    right: -230px;
    top: -260px;
}
.admin-login-form-area::after {
    width: 420px;
    height: 420px;
    left: -170px;
    bottom: -210px;
}
.admin-login-card {
    width: min(100%, 620px);
    min-height: 640px;
    border-radius: 18px;
    background: rgba(255,255,255,.93);
    box-shadow: 0 28px 84px rgba(31, 54, 106, .14);
    backdrop-filter: blur(18px);
    padding: 76px 72px 70px;
    position: relative;
    z-index: 2;
}
.admin-login-card h2 {
    margin: 0;
    color: #101a2e;
    text-align: center;
    font-size: 38px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .04em;
}
.admin-login-subtitle {
    margin: 18px 0 0;
    color: #758096;
    text-align: center;
    font-size: 17px;
    line-height: 1.5;
}
.admin-login-rule {
    width: 112px;
    height: 4px;
    margin: 26px auto 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.admin-login-rule::before,
.admin-login-rule::after {
    content: "";
    width: 30px;
    height: 3px;
    border-radius: 999px;
    background: #e6edf8;
}
.admin-login-rule span {
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: #1559e7;
}
.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.admin-login-field {
    height: 68px;
    border: 1px solid #dce4f0;
    border-radius: 8px;
    background: rgba(255,255,255,.76);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 22px;
    color: #111c35;
}
.admin-login-field:focus-within {
    border-color: #2b63db;
    box-shadow: 0 0 0 4px rgba(31, 96, 224, .08);
}
.admin-field-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.admin-field-icon svg,
.admin-password-toggle svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.admin-login-field input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1c263d;
    font-size: 18px;
}
.admin-login-field input::placeholder {
    color: #b5bdca;
}
.admin-password-toggle {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #99a4b7;
    padding: 5px;
    cursor: pointer;
    flex: 0 0 auto;
}
.admin-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 4px;
    color: #16213a;
    font-size: 17px;
}
.admin-login-options label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.admin-login-options input {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: #1559e7;
}
.admin-login-options a {
    color: #1559e7;
    font-weight: 600;
}
.admin-login-submit {
    width: 100%;
    height: 70px;
    border: 0;
    border-radius: 8px;
    margin-top: 32px;
    background: linear-gradient(180deg, #1e67e8 0%, #1456d3 100%);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(25, 88, 215, .24);
}
.admin-login-submit:hover {
    filter: brightness(1.03);
}
.admin-login-card .alert {
    border-radius: 8px;
    margin: -20px 0 22px;
}

@media (max-width: 980px) {
    .admin-academy-login {
        display: block;
        overflow: auto;
        background:
            radial-gradient(circle at 100% 0%, rgba(24, 93, 224, .12), transparent 30%),
            linear-gradient(180deg, #f8fbff, #eef5ff);
    }
    .admin-login-visual {
        min-height: 360px;
        padding: 54px 28px 140px;
    }
    .admin-login-brand {
        gap: 14px;
    }
    .admin-login-logo {
        width: 58px;
        height: 66px;
    }
    .admin-login-brand-name {
        font-size: 28px;
    }
    .admin-login-brand-sub {
        font-size: 11px;
        margin-top: 6px;
    }
    .admin-login-copy {
        margin-top: 48px;
    }
    .admin-login-copy h1 {
        font-size: 40px;
    }
    .admin-login-copy p {
        margin-top: 16px;
        font-size: 18px;
    }
    .admin-login-building {
        height: 170px;
        min-height: 170px;
    }
    .admin-login-footer {
        left: 28px;
        bottom: 28px;
        font-size: 12px;
    }
    .admin-login-form-area {
        min-height: 0;
        padding: 34px 20px 46px;
        overflow: visible;
    }
    .admin-login-form-area::before,
    .admin-login-form-area::after {
        display: none;
    }
    .admin-login-card {
        width: 100%;
        min-height: 0;
        margin-top: -86px;
        padding: 42px 28px 34px;
        border-radius: 16px;
    }
    .admin-login-card h2 {
        font-size: 30px;
    }
    .admin-login-subtitle {
        font-size: 15px;
    }
    .admin-login-rule {
        margin-bottom: 34px;
    }
    .admin-login-field {
        height: 58px;
        padding: 0 18px;
    }
    .admin-login-options {
        font-size: 14px;
    }
    .admin-login-submit {
        height: 58px;
        font-size: 20px;
        margin-top: 18px;
    }
}

/* Fix long admin dialogs: keep action buttons visible and scroll only the body */
@media (max-height: 760px) {
    .dialog-mask { align-items: flex-start; }
    .dialog-card { max-height: calc(100vh - 24px); }
}

/* system settings */
.settings-card{padding:22px 26px;max-width:860px;}
.settings-form{width:100%;}
.settings-title{font-size:18px;font-weight:700;color:#303133;margin-bottom:18px;padding-bottom:12px;border-bottom:1px solid #ebeef5;}
.settings-row{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 0;border-bottom:1px solid #f0f2f5;}
.settings-name{font-size:15px;font-weight:700;color:#303133;margin-bottom:8px;}
.settings-desc{font-size:13px;color:#909399;line-height:1.6;}
.settings-actions{margin-top:22px;}
.switch-toggle{position:relative;display:inline-block;width:52px;height:28px;flex:0 0 auto;}
.switch-toggle input{display:none;}
.switch-toggle span{position:absolute;cursor:pointer;inset:0;background:#dcdfe6;border-radius:999px;transition:.2s;}
.switch-toggle span:before{content:'';position:absolute;width:24px;height:24px;left:2px;top:2px;background:#fff;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.18);transition:.2s;}
.switch-toggle input:checked+span{background:#3b97ff;}
.switch-toggle input:checked+span:before{transform:translateX(24px);}

/* System settings clean layout */
.settings-card{max-width:980px;margin:0 auto;}
.settings-form{display:block;}
.settings-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:6px 2px 20px;border-bottom:1px solid #edf0f5;margin-bottom:4px;}
.settings-title{font-size:20px;font-weight:700;color:#101828;line-height:1.3;}
.settings-subtitle{font-size:13px;color:#667085;margin-top:6px;}
.settings-list{display:flex;flex-direction:column;}
.settings-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 2px;border-bottom:1px solid #f1f3f6;}
.settings-row:last-child{border-bottom:0;}
.settings-main{min-width:0;}
.settings-name{font-size:15px;font-weight:700;color:#1d2939;margin-bottom:7px;}
.settings-desc{font-size:13px;line-height:1.7;color:#667085;}
.switch-toggle{position:relative;display:inline-flex;align-items:center;flex:0 0 auto;cursor:pointer;}
.switch-toggle input{display:none;}
.switch-toggle span{width:52px;height:30px;border-radius:999px;background:#d0d5dd;position:relative;transition:.2s;box-shadow:inset 0 0 0 1px rgba(0,0,0,.04);}
.switch-toggle span:before{content:"";position:absolute;width:24px;height:24px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(16,24,40,.18);transition:.2s;}
.switch-toggle input:checked+span{background:#2563eb;}
.switch-toggle input:checked+span:before{transform:translateX(22px);}
@media(max-width:640px){.settings-head{align-items:flex-start;flex-direction:column}.settings-row{align-items:flex-start;flex-direction:column}.switch-toggle{align-self:flex-start}}
