/* ==========================================================================
   二级域名分发系统 · 界面样式基准
   配色 / 字体 / 圆角 / 阴影 / 间距 参考 pay.teft.us/style.css
   - 浅色主题：#f4f7f6 背景 + #4a90e2 主色 + 白色卡片
   - 胶囊按钮与输入框、大圆角卡片、悬停上浮光晕、等宽数字
   - 仅负责界面表现，不改变任何业务流程
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计变量
   -------------------------------------------------------------------------- */
:root {
    --bg-color: #f4f7f6;
    --bg-soft: #eef3f1;
    --text-color: #333333;
    --text-muted: #7c8a94;
    --text-faint: #9aa7b1;
    --card-bg: #ffffff;
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --primary-soft: rgba(74, 144, 226, 0.12);
    --primary-ring: rgba(74, 144, 226, 0.18);
    --border-color: #e1e8ed;
    --border-strong: #d3dde5;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f1a33c;
    --input-bg: #f9f9f9;

    --radius-pill: 9999px;
    --radius-lg: 32px;
    --radius-md: 24px;
    --radius-sm: 18px;
    --radius-xs: 12px;

    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.04);
    --shadow-pop: 0 20px 50px rgba(0, 0, 0, 0.14);
    --shadow-primary: 0 6px 20px rgba(74, 144, 226, 0.32);

    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --topbar-h: 68px;
    --sidebar-w: 264px;
    --page-max: 1400px;

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "PingFang SC", "PingFang HK", "Hiragino Sans GB", "Microsoft YaHei",
        "Microsoft JhengHei", "Noto Sans SC", "Noto Sans TC", Helvetica, Arial,
        sans-serif;
}

/* --------------------------------------------------------------------------
   2. 基础重置与排版
   -------------------------------------------------------------------------- */
[v-cloak] {
    display: none !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

body.is-locked {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5em;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

h1 { font-size: 1.85rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
    margin: 0 0 0.85em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

small,
.text-small {
    font-size: 0.82rem;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-faint {
    color: var(--text-faint) !important;
}

strong,
b {
    font-weight: 600;
}

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

code,
kbd,
pre {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.85em;
}

code {
    padding: 2px 7px;
    border-radius: 8px;
    background: var(--bg-soft);
    color: #3f6b96;
}

img {
    max-width: 100%;
}

/* 滚动条：细、透明轨道，移动端隐藏 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   3. 应用骨架：顶栏 + 侧栏 + 内容区
   -------------------------------------------------------------------------- */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--topbar-h);
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--text-color);
    font-weight: 700;
}

.brand:hover {
    color: var(--primary-color);
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--primary-soft);
}

.brand-name {
    max-width: 42vw;
    overflow: hidden;
    font-size: 1.02rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    min-width: 0;
    overflow: hidden;
}

.topnav a {
    display: inline-block;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    color: #55636d;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.topnav a:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.topnav a.is-active {
    background: var(--primary-color);
    color: #fff;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 15px;
    cursor: pointer;
}

.nav-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 用户下拉 */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}

.user-chip:hover,
.user-chip:focus {
    color: var(--text-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(74, 144, 226, 0.16);
    text-decoration: none;
}

.user-chip .avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 700;
}

.user-chip .caret {
    font-size: 0.65rem;
    color: var(--text-faint);
}

.dropdown-menu {
    min-width: 176px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-pop);
    background: var(--card-bg);
    font-size: 0.9rem;
}

.dropdown-item {
    padding: 9px 14px;
    border-radius: 12px;
    color: #4b5a64;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.dropdown-divider {
    border-top-color: var(--border-color);
    margin: 6px 4px;
}

/* 页面主体网格 */
.app-body {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 20px;
}

.content {
    min-width: 0;
    padding-bottom: 32px;
}

.content > *:last-child {
    margin-bottom: 0;
}

/* 侧栏 */
.sidebar {
    position: sticky;
    top: calc(var(--topbar-h) + 20px);
    align-self: start;
    max-height: calc(100vh - var(--topbar-h) - 40px);
    overflow-y: auto;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
}

.sidebar-section + .sidebar-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color);
}

.sidebar-label {
    display: block;
    padding: 4px 12px 8px;
    color: var(--text-faint);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.sidemenu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidemenu a,
.sidemenu .menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    color: #4d5b66;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidemenu a i,
.sidemenu .menu-link i {
    width: 18px;
    color: var(--text-faint);
    font-size: 0.9rem;
    text-align: center;
    transition: color 0.2s ease;
}

.sidemenu a:hover,
.sidemenu .menu-link:hover {
    background: var(--bg-soft);
    color: var(--primary-color);
    text-decoration: none;
}

.sidemenu a:hover i,
.sidemenu .menu-link:hover i {
    color: var(--primary-color);
}

.sidemenu > li.active > a,
.sidemenu a.is-active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.sidemenu > li.active > a i,
.sidemenu a.is-active i {
    color: #fff;
}

/* 含子菜单的分组：父级用浅色态，避免与子项的高亮冲突 */
.sidemenu > li.has-sub.active > a,
.sidemenu > li.has-sub > a[aria-expanded="true"] {
    background: var(--primary-soft);
    color: var(--primary-color);
    box-shadow: none;
}

.sidemenu > li.has-sub.active > a i,
.sidemenu > li.has-sub > a[aria-expanded="true"] i {
    color: var(--primary-color);
}

.sidemenu .submenu {
    display: none;
    margin: 4px 0 0;
    padding: 4px 0 4px 14px;
    list-style: none;
    border-left: 1px dashed var(--border-color);
    margin-left: 20px;
}

.sidemenu .submenu.show,
.sidemenu .submenu.is-open {
    display: block;
}

.sidemenu .submenu a {
    padding: 7px 12px;
    font-size: 0.87rem;
    color: #64717b;
}

.sidemenu .submenu a::before {
    content: "";
    width: 5px;
    height: 5px;
    margin-right: 2px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.45;
}

.sidemenu .submenu li.active > a {
    background: var(--primary-soft);
    color: var(--primary-color);
    font-weight: 600;
}

.menu-caret {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.55;
    transition: transform 0.25s var(--ease);
}

.menu-link[aria-expanded="true"] .menu-caret {
    transform: rotate(180deg);
}

.sidebar-foot {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-color);
    color: var(--text-faint);
    font-size: 0.75rem;
    line-height: 1.7;
}

.sidebar-mask {
    display: none;
}

/* --------------------------------------------------------------------------
   4. 卡片与面板
   -------------------------------------------------------------------------- */
.card {
    position: relative;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-bg);
    box-shadow: var(--shadow-card);
}

.card > .card-header:first-child {
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 20px 26px;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 700;
}

.card-header + .card-header {
    margin-top: -1px;
    border-top: 1px solid var(--border-color);
    background: #fbfcfc;
    padding-top: 16px;
    padding-bottom: 16px;
    font-weight: 500;
}

.card-header .float-right,
.card-header .ml-auto {
    margin-left: auto;
}

.card-body {
    padding: 22px 26px;
}

.card-body > .table-responsive:last-child,
.card-body > table:last-child {
    margin-bottom: 0;
}

.card-footer {
    padding: 16px 26px;
    border-top: 1px solid var(--border-color);
    background: transparent;
}

.card-footer.pb-0 {
    padding-bottom: 12px !important;
}

.panel-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
}

.panel-desc {
    width: 100%;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 400;
}

/* 页头 */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin: 4px 0 20px;
}

.page-head h1 {
    margin-bottom: 4px;
    font-size: 1.55rem;
    font-weight: 700;
}

.page-head .page-sub {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.page-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* --------------------------------------------------------------------------
   5. 按钮
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
        background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
    color: var(--text-color);
    text-decoration: none;
    transform: translateY(-1.5px);
}

.btn:active {
    transform: translateY(1px) scale(0.985);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.55;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
}

.btn-primary,
.btn-info {
    background: var(--primary-color);
    color: #fff;
    box-shadow: none;
}

.btn-primary:hover,
.btn-info:hover,
.btn-primary:focus,
.btn-info:focus {
    background: var(--primary-hover);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.btn-success {
    background: var(--success-color);
    color: #fff;
}

.btn-success:hover,
.btn-success:focus {
    background: #27ae60;
    color: #fff;
    box-shadow: 0 6px 18px rgba(46, 204, 113, 0.32);
}

.btn-danger {
    background: var(--error-color);
    color: #fff;
}

.btn-danger:hover,
.btn-danger:focus {
    background: #d0402f;
    color: #fff;
    box-shadow: 0 6px 18px rgba(231, 76, 60, 0.28);
}

.btn-warning {
    background: var(--warning-color);
    color: #fff;
}

.btn-warning:hover,
.btn-warning:focus {
    background: #dd9028;
    color: #fff;
    box-shadow: 0 6px 18px rgba(241, 163, 60, 0.3);
}

.btn-secondary,
.btn-default,
.btn-light {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: #4d5b66;
}

.btn-secondary:hover,
.btn-default:hover,
.btn-light:hover {
    background: #fff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary,
.btn-ghost {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-ghost:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.btn-link {
    height: auto;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--primary-color);
    font-weight: 500;
}

.btn-link:hover {
    transform: none;
    color: var(--primary-hover);
    background: transparent;
}

.btn-sm {
    height: 32px;
    padding: 0 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-pill);
}

.btn-lg {
    height: 48px;
    padding: 0 30px;
    font-size: 0.95rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 12px;
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-muted);
}

.btn-icon:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--primary-soft);
}

.btn-group {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* 表格内操作按钮更紧凑 */
.table .btn-sm,
table .btn-sm {
    height: 30px;
    padding: 0 13px;
    font-size: 0.78rem;
    font-weight: 600;
    box-shadow: none;
}

.table .btn-sm:hover,
table .btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.table td .btn + .btn,
table td .btn + .btn {
    margin-left: 4px;
}

/* --------------------------------------------------------------------------
   6. 表单
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

label,
.col-form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.col-form-label {
    padding-top: 10px;
    padding-bottom: 0;
    line-height: 1.5;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
    display: block;
    width: 100%;
    height: auto;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    background: var(--input-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:hover,
input:hover,
select:hover,
textarea:hover {
    border-color: var(--border-strong);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #a9b6bf;
}

.form-control:disabled,
.form-control[readonly],
input:disabled,
select:disabled,
textarea:disabled {
    background: var(--bg-soft);
    color: #8b98a2;
    cursor: not-allowed;
    opacity: 1;
}

textarea.form-control,
textarea {
    min-height: 112px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    line-height: 1.65;
    resize: vertical;
}

select.form-control,
select {
    padding-right: 42px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%237c8a94' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 12px 8px;
}

select.form-control[multiple],
select[multiple] {
    min-height: 140px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background-image: none;
}

select.form-control[multiple] option,
select[multiple] option {
    padding: 6px 10px;
    border-radius: 8px;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    position: relative;
    transition: background 0.18s ease, border-color 0.18s ease;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(42deg);
}

input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #fff;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 0;
    margin-bottom: 8px;
}

.form-check-input {
    margin: 0;
    position: static;
}

.form-check-label {
    margin-bottom: 0;
    color: #4d5b66;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
}

.form-check-inline {
    display: inline-flex;
    align-items: center;
    margin-right: 14px;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.form-inline .form-group {
    margin-bottom: 0;
    min-width: 132px;
}

.form-inline .form-control {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.form-inline .btn {
    height: 40px;
}

.input-group {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    width: 100%;
}

.input-group > .form-control {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .form-control + .form-control {
    border-radius: 0;
    margin-left: -1px;
}

.input-group > .input-group-append {
    display: flex;
    margin-left: -1px;
}

.input-group > .input-group-append .input-group-text,
.input-group > .input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    height: 100%;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
}

.input-group > .input-group-prepend .input-group-text {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border: 1px solid var(--border-color);
    border-right: 0;
    background: var(--input-bg);
    color: var(--text-muted);
    font-size: 0.86rem;
}

.input-group-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    background: var(--input-bg);
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.input-group-text:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

/* 表单提示块 */
.input_tips,
.form-tips {
    margin-top: 8px;
    padding: 10px 16px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-xs);
    background: #fbfcfc;
    color: var(--text-muted);
    font-size: 0.79rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.input_tips:empty {
    display: none;
}

/* 验证码图片 */
.captcha {
    display: inline-block;
    margin-top: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    cursor: pointer;
    height: 46px;
    width: 150px;
    object-fit: cover;
    background: #fff;
}

/* --------------------------------------------------------------------------
   7. 表格
   -------------------------------------------------------------------------- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
}

.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-color);
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    table-layout: auto;
}

.table th,
.table td {
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    text-align: left;
    white-space: nowrap;
}

.table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-soft);
    color: #6b7885;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

.table thead th:first-child {
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
}

.table thead th:last-child {
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

.table tbody tr {
    transition: background 0.18s ease;
}

.table tbody tr:hover {
    background: rgba(74, 144, 226, 0.045);
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table td {
    max-width: 420px;
    overflow-wrap: normal;
}

/* 说明类长文本允许换行，避免把表格撑得过宽 */
.table td .input_tips,
.table td .text-faint,
.table td .ad-desc,
.table .wrap {
    white-space: normal;
    word-break: break-word;
}

.table a {
    font-weight: 500;
}

.table .text-danger {
    color: var(--error-color) !important;
}

.table .text-success {
    color: var(--success-color) !important;
}

.table-bordered,
.table-bordered th,
.table-bordered td {
    border: 0;
    border-bottom: 1px solid var(--border-color);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: #fcfdfd;
}

.table-sm th,
.table-sm td {
    padding: 9px 12px;
}

/* 空数据 */
.table-empty {
    padding: 40px 20px;
    color: var(--text-faint);
    text-align: center;
    font-size: 0.86rem;
}

/* --------------------------------------------------------------------------
   8. 分页
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-item {
    list-style: none;
}

.page-item .page-link,
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    background: var(--input-bg);
    color: #55636d;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s var(--ease),
        box-shadow 0.2s ease;
}

.page-item .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-1.5px);
    box-shadow: 0 5px 14px rgba(74, 144, 226, 0.28);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-primary);
}

.page-item.disabled .page-link {
    opacity: 0.45;
    cursor: default;
}

/* --------------------------------------------------------------------------
   9. 徽章 / 提示条
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--bg-soft);
    color: #5c6a75;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.6;
}

.badge-primary { background: var(--primary-soft); color: var(--primary-color); }
.badge-info { background: rgba(74, 144, 226, 0.14); color: #2f78c4; }
.badge-success { background: rgba(46, 204, 113, 0.14); color: #1f9d55; }
.badge-warning { background: rgba(241, 163, 60, 0.16); color: #b9761a; }
.badge-danger { background: rgba(231, 76, 60, 0.14); color: #c93c2d; }
.badge-secondary { background: #eef1f3; color: #64717b; }

.alert {
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fbfcfc;
    color: #4d5b66;
    font-size: 0.88rem;
    line-height: 1.7;
}

.alert > :last-child {
    margin-bottom: 0;
}

.alert-primary {
    border-color: rgba(74, 144, 226, 0.28);
    background: rgba(74, 144, 226, 0.07);
    color: #33587c;
}

.alert-info {
    border-color: rgba(74, 144, 226, 0.28);
    background: rgba(74, 144, 226, 0.07);
    color: #33587c;
}

.alert-success {
    border-color: rgba(46, 204, 113, 0.3);
    background: rgba(46, 204, 113, 0.08);
    color: #1f7a4d;
}

.alert-warning {
    border-color: rgba(241, 163, 60, 0.32);
    background: rgba(241, 163, 60, 0.09);
    color: #96601a;
}

.alert-danger {
    border-color: rgba(231, 76, 60, 0.3);
    background: rgba(231, 76, 60, 0.07);
    color: #a83626;
}

/* 列表项 */
.list-group-item {
    padding: 12px 0;
    border: 0;
    border-bottom: 1px dashed var(--border-color);
    background: transparent;
    color: #4d5b66;
    font-size: 0.88rem;
    line-height: 1.7;
}

.list-group-item:last-child {
    border-bottom: 0;
}

.list-group-item-warning {
    color: #96601a;
}

/* 统计卡片 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
}

.stat-card .stat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.stat-card .stat-value {
    margin-top: 6px;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.stat-card .stat-hint {
    margin-top: 2px;
    color: var(--text-faint);
    font-size: 0.75rem;
}

.stat-card.is-primary {
    border-color: rgba(74, 144, 226, 0.28);
    background: linear-gradient(160deg, rgba(74, 144, 226, 0.1), rgba(74, 144, 226, 0.02));
}

.stat-card.is-primary .stat-value {
    color: var(--primary-color);
}

/* --------------------------------------------------------------------------
   10. 模态框
   -------------------------------------------------------------------------- */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    background: rgba(24, 34, 42, 0.45);
    backdrop-filter: blur(3px);
}

.modal-backdrop.show {
    opacity: 1;
}

.modal-dialog {
    display: flex;
    align-items: center;
    min-height: calc(100% - 60px);
    margin: 30px auto;
}

.modal.fade .modal-dialog {
    transform: translateY(16px) scale(0.99);
    transition: transform 0.32s var(--ease), opacity 0.32s var(--ease);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-content {
    width: 100%;
    border: 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop);
    background: var(--card-bg);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 20px 26px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
}

.modal-header .close {
    margin: -4px -6px -4px auto;
    padding: 6px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-faint);
    font-size: 1.4rem;
    line-height: 1;
    text-shadow: none;
    opacity: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.modal-header .close:hover {
    background: var(--bg-soft);
    color: var(--text-color);
}

.modal-body {
    padding: 22px 26px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 26px 22px;
    border-top: 0;
}

.modal-footer > * {
    margin: 0;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   11. 首页 / 认证页
   -------------------------------------------------------------------------- */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-main {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 34px 20px 56px;
}

.hero {
    position: relative;
    padding: 46px 40px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(1200px 320px at 8% -40%, rgba(74, 144, 226, 0.16), transparent 60%),
        radial-gradient(900px 280px at 95% 0%, rgba(46, 204, 113, 0.1), transparent 60%),
        var(--card-bg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.hero h1 {
    margin: 18px 0 10px;
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.hero .hero-sub {
    max-width: 700px;
    margin: 0 0 26px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

.hero .searchbar,
.hero .domain-chips {
    max-width: 780px;
}

.searchbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.searchbar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-ring), 0 8px 24px rgba(0, 0, 0, 0.05);
}

.searchbar input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.searchbar input[type="text"]:focus {
    box-shadow: none;
    background: transparent;
}

.searchbar select {
    flex: 0 0 auto;
    width: 170px;
    min-height: 46px;
    border: 0;
    border-left: 1px solid var(--border-color);
    border-radius: 0;
    background-color: transparent;
    background-position: right 12px center;
    padding-right: 34px;
    color: var(--text-muted);
    font-weight: 600;
}

.searchbar select:focus {
    box-shadow: none;
    background-color: transparent;
}

.searchbar .btn {
    flex: 0 0 auto;
    height: 46px;
    padding: 0 30px;
}

.domain-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.domain-chips .chip {
    padding: 5px 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.75);
    color: #55636d;
    font-size: 0.8rem;
    font-weight: 500;
}

.domain-chips .chip-label {
    padding: 5px 0;
    color: var(--text-faint);
    font-size: 0.78rem;
}

/* 使用步骤 */
.steps-wrap {
    margin-top: 24px;
    padding: 24px 26px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--card-bg);
}

.steps-wrap h2 {
    margin-bottom: 14px;
    font-size: 1rem;
    font-weight: 700;
}

.steps {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

.steps .step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    border-radius: 8px;
    background: var(--bg-soft);
    color: var(--primary-color);
    font-size: 0.76rem;
    font-weight: 700;
}

.steps strong {
    color: var(--text-color);
    font-weight: 600;
}

/* 公告区 */
.notice {
    margin-bottom: 20px;
    padding: 14px 22px;
    border: 1px solid rgba(74, 144, 226, 0.22);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-sm);
    background: rgba(74, 144, 226, 0.06);
    color: #3d5a74;
    font-size: 0.87rem;
    line-height: 1.75;
}

.notice > :last-child {
    margin-bottom: 0;
}

.notice .alert {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
}

/* 认证页 */
.auth-wrap {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 56px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 34px 34px 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-card);
}

.auth-head {
    margin-bottom: 22px;
    text-align: center;
}

.auth-head .auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 1.3rem;
}

.auth-head h1 {
    margin-bottom: 6px;
    font-size: 1.28rem;
    font-weight: 700;
}

.auth-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.auth-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 22px;
    padding: 5px;
    border-radius: var(--radius-pill);
    background: var(--bg-soft);
}

.auth-tabs button {
    flex: 1;
    height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: #64717b;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.auth-tabs button.is-active {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.auth-card .form-group {
    margin-bottom: 14px;
}

.auth-card .form-group.row {
    display: block;
}

.auth-card .col-form-label {
    padding-top: 0;
}

.auth-card .btn-block {
    margin-top: 6px;
    height: 46px;
}

.auth-foot {
    margin-top: 18px;
    color: var(--text-muted);
    font-size: 0.84rem;
    text-align: center;
}

.auth-foot a {
    font-weight: 600;
}

.auth-aside {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-color);
    color: var(--text-faint);
    font-size: 0.78rem;
    text-align: center;
}

.form-row-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.form-row-inline .form-check {
    margin-bottom: 0;
}

/* 页脚 */
.site-foot {
    padding: 18px 20px 30px;
    color: var(--text-faint);
    font-size: 0.78rem;
    text-align: center;
}

.site-foot a {
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   11.5 充值
   -------------------------------------------------------------------------- */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.amount-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 72px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-color);
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease),
        box-shadow 0.2s ease;
}

.amount-chip strong {
    font-size: 1.22rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.amount-chip span {
    color: var(--text-muted);
    font-size: 0.74rem;
}

.amount-chip:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.amount-chip.is-active {
    border-color: var(--primary-color);
    background: var(--primary-soft);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.amount-chip.is-active strong {
    color: var(--primary-color);
}

.pay-summary {
    margin: 2px 0 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pay-summary strong {
    color: var(--primary-color);
    font-size: 1.05rem;
}

.pay-pending {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px dashed rgba(241, 163, 60, 0.55);
    border-radius: var(--radius-sm);
    background: rgba(241, 163, 60, 0.08);
}

.pay-pending p {
    margin: 8px 0 12px;
    color: #8a6420;
    font-size: 0.85rem;
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   12. 广告位（自然融入，不遮挡操作）
   -------------------------------------------------------------------------- */
.ad-slot {
    margin: 18px 0;
}

.ad-slot[data-position="sidebar"] {
    margin: 16px 0 0;
}

.ad-slot[data-position="bottom"] {
    margin: 4px 0 0;
}

.ad-list {
    display: grid;
    gap: 12px;
}

.ad-item {
    position: relative;
    display: block;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.22s ease, transform 0.22s var(--ease),
        box-shadow 0.22s var(--ease);
}

a.ad-item:hover {
    color: inherit;
    text-decoration: none;
    border-color: rgba(74, 144, 226, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.07);
}

.ad-media {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    border-radius: 14px;
    background: var(--bg-soft);
    overflow: hidden;
    aspect-ratio: 16 / 5;
}

.ad-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-body {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ad-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 0.85rem;
}

.ad-text {
    min-width: 0;
}

.ad-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ad-desc {
    display: -webkit-box;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.79rem;
    line-height: 1.6;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ad-cta {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: var(--primary-soft);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.ad-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 1;
    padding: 2px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.92);
    color: #9aa7b1;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

/* 文字/HTML 广告把标识放进内容流，避免遮挡标题或操作按钮 */
.ad-badge--inline {
    position: static;
    display: inline-block;
    margin-right: 7px;
    padding: 1px 7px;
    border-color: transparent;
    background: var(--bg-soft);
    color: #93a1ac;
    font-size: 0.62rem;
    line-height: 1.6;
    vertical-align: 1px;
}

.ad-html .ad-badge--inline {
    margin-bottom: 4px;
}

.ad-html {
    font-size: 0.86rem;
    line-height: 1.7;
    color: #4d5b66;
}

.ad-html img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.ad-slot[data-position="sidebar"] .ad-item {
    padding: 12px;
}

.ad-slot[data-position="sidebar"] .ad-media {
    aspect-ratio: 16 / 9;
    margin-bottom: 8px;
}

.ad-slot[data-position="sidebar"] .ad-title {
    white-space: normal;
    font-size: 0.86rem;
}

.ad-slot[data-position="sidebar"] .ad-cta {
    display: none;
}

/* 关闭按钮（可选，避免干扰） */
.ad-dismiss {
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 2;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #9aa7b1;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.ad-item:hover .ad-dismiss {
    opacity: 1;
}

.ad-dismiss:hover {
    color: var(--error-color);
}

/* --------------------------------------------------------------------------
   13. layer.js 弹层对齐设计系统
   -------------------------------------------------------------------------- */
.layui-layer {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-pop) !important;
    font-family: var(--font-sans) !important;
    overflow: hidden;
}

.layui-layer-title {
    height: auto !important;
    padding: 16px 24px !important;
    border-bottom: 1px solid var(--border-color) !important;
    background: #fff !important;
    color: var(--text-color) !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
}

.layui-layer-content {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.7;
    padding: 20px 24px;
}

.layui-layer-btn {
    padding: 8px 20px 18px !important;
    border-top: 0 !important;
    text-align: right;
}

.layui-layer-btn a {
    height: 38px !important;
    padding: 0 22px !important;
    margin: 0 0 0 8px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-pill) !important;
    background: var(--input-bg) !important;
    color: #4d5b66 !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    line-height: 36px !important;
    transition: background 0.2s ease, color 0.2s ease;
}

.layui-layer-btn .layui-layer-btn0 {
    border-color: var(--primary-color) !important;
    background: var(--primary-color) !important;
    color: #fff !important;
}

.layui-layer-btn .layui-layer-btn0:hover {
    background: var(--primary-hover) !important;
}

.layui-layer-setwin .layui-layer-close {
    color: var(--text-faint);
}

.layui-layer-shade {
    background: rgba(24, 34, 42, 0.45) !important;
}

/* --------------------------------------------------------------------------
   14. 工具类
   -------------------------------------------------------------------------- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

[class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 576px) {
    .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
    .col-sm-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
}

@media (min-width: 768px) {
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .offset-md-3 { margin-left: 25%; }
}

.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-block { display: inline-block !important; }

.float-right { float: right !important; }
.float-left { float: left !important; }

.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.ml-1 { margin-left: 8px !important; }
.mr-1 { margin-right: 8px !important; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: 12px !important; }
.mt-3 { margin-top: 18px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 18px !important; }
.p-2 { padding: 8px !important; }
.py-md-3 { padding-top: 0; padding-bottom: 0; }
.pl-md-5 { padding-left: 10px; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-white { color: #fff !important; }
.w-100 { width: 100% !important; }
.flex-row { flex-direction: row !important; }

.bg-info,
.bg-primary {
    background: var(--primary-color) !important;
    color: #fff;
}

.text-info { color: var(--primary-color) !important; }
.text-primary { color: var(--primary-color) !important; }

[class*="col-"] > .card:last-child {
    margin-bottom: 0;
}

/* 内容区直接使用栅格时，去掉行负边距，避免横向溢出 */
.content > .row {
    margin-left: 0;
    margin-right: 0;
}

.content > .row > [class*="col-"]:first-child {
    padding-left: 0;
}

.content > .row > [class*="col-"]:last-child {
    padding-right: 0;
}

/* --------------------------------------------------------------------------
   15. 响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    :root {
        --sidebar-w: 240px;
    }
}

@media (max-width: 991.98px) {
    body {
        font-size: 14.5px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topnav {
        display: none;
    }

    .app-body {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
        gap: 14px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1000;
        width: 280px;
        max-height: none;
        padding: 20px 16px;
        border: 0;
        border-radius: 0 26px 26px 0;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
        transform: translateX(-104%);
        transition: transform 0.34s var(--ease);
        overscroll-behavior: contain;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-mask {
        position: fixed;
        inset: 0;
        z-index: 999;
        display: block;
        background: rgba(24, 34, 42, 0.45);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .sidebar-mask.is-visible {
        opacity: 1;
        visibility: visible;
    }

    .content {
        padding-bottom: 24px;
    }

    .hero {
        padding: 32px 22px 26px;
        border-radius: var(--radius-md);
    }

    .auth-card {
        padding: 26px 22px 24px;
        border-radius: var(--radius-md);
    }

    .auth-wrap {
        padding: 20px 14px 40px;
    }
}

@media (max-width: 767.98px) {
    .topbar {
        height: 60px;
        padding: 0 12px;
        gap: 8px;
    }

    :root {
        --topbar-h: 60px;
    }

    .brand-logo {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }

    .brand-name {
        max-width: 34vw;
        font-size: 0.94rem;
    }

    .user-chip {
        height: 36px;
        padding: 0 12px;
        font-size: 0.82rem;
    }

    .user-chip .username {
        max-width: 84px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .card {
        border-radius: var(--radius-sm);
        margin-bottom: 14px;
    }

    .card-header {
        padding: 16px 18px;
        gap: 8px;
    }

    .card-body {
        padding: 16px 18px;
    }

    .card-footer {
        padding: 12px 18px;
    }

    .form-group.row {
        display: block;
        margin-left: 0;
        margin-right: 0;
    }

    .form-group.row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .form-group.row > .col-form-label {
        margin-bottom: 5px;
    }

    .modal-dialog {
        margin: 14px;
        min-height: calc(100% - 28px);
    }

    .modal-header,
    .modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .modal-footer {
        padding: 12px 18px 18px;
    }

    .page-head h1 {
        font-size: 1.3rem;
    }

    .stat-card {
        padding: 14px 16px;
    }

    .stat-card .stat-value {
        font-size: 1.4rem;
    }

    .table th,
    .table td {
        padding: 11px 12px;
    }

    /* 数据表在窄屏改为横向滚动，避免列被挤压换行 */
    .table-responsive > .table {
        min-width: 760px;
    }

    .table th,
    .table td {
        white-space: nowrap;
    }

    .table td .text-faint,
    .table td .input_tips {
        white-space: normal;
        word-break: break-all;
    }

    .table td {
        max-width: none;
    }

    .card-header > .form-inline {
        width: 100%;
    }

    .form-inline {
        display: block;
    }

    .form-inline .form-group,
    .form-inline .form-group.ml-1 {
        margin: 0 0 10px !important;
        min-width: 0;
    }

    .form-inline .btn {
        width: 100%;
    }

    .ad-cta {
        display: none;
    }

    .landing-main {
        padding: 18px 14px 40px;
    }

    /* 窄屏搜索栏改为两行：输入占一行，后缀与按钮占一行 */
    .searchbar {
        flex-wrap: wrap;
        padding: 10px;
        border-radius: 22px;
    }

    .searchbar input[type="text"] {
        flex: 1 1 100%;
        order: 1;
    }

    .searchbar select {
        flex: 1 1 auto;
        width: auto;
        order: 2;
        border-left: 0;
        border-top: 1px solid var(--border-color);
        border-radius: 0;
        margin-top: 2px;
    }

    .searchbar .btn {
        order: 3;
        margin-top: 2px;
    }

    .hero h1 {
        margin-top: 14px;
    }

    .ad-media {
        aspect-ratio: 16 / 7;
    }
}

@media (max-width: 420px) {
    .brand-name {
        display: none;
    }

    .auth-card {
        padding: 22px 16px 20px;
    }

    .card-header {
        padding: 14px 16px;
    }

    .card-body {
        padding: 14px 16px;
    }
}

/* 触摸设备不做悬浮位移，避免误触 */
@media (hover: none) {
    .btn:hover,
    a.ad-item:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
