/*
 * 大模型服务平台 · 视觉体系
 * 主色取自 1.png（武汉大学青绿 #00787B），点缀色取自校标波浪 #0FC6DB。
 * 结构不变，只重排视觉层级：深青侧栏 + 浅灰青底 + 白色圆角卡片。
 */

:root {
    --color-primary: #00787b;
    --color-primary-light: #0e9195;
    --color-primary-dark: #005a5d;
    --color-primary-deep: #00474a;
    --color-primary-soft: #e6f3f3;
    --color-primary-tint: #f2f9f9;
    --color-accent-cyan: #0fc6db;
    --color-bg: #f2f6f6;
    --color-card: #ffffff;
    --color-text: #10292b;
    --color-text-secondary: #4c6163;
    --color-text-muted: #839a9b;
    --color-border: #e1ebeb;
    --color-border-strong: #d3e2e2;
    --color-danger: #e34d59;
    --color-success: #00b42a;
    --color-warning: #ff7d00;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --shadow-card: 0 1px 2px rgba(0, 71, 74, 0.04), 0 10px 24px -16px rgba(0, 71, 74, 0.16);
    --shadow-hover: 0 2px 4px rgba(0, 71, 74, 0.05), 0 20px 40px -20px rgba(0, 71, 74, 0.28);
    --sidebar-width: 240px;
    --header-height: 64px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cfdede;
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: #b3c9c9;
    background-clip: content-box;
}

::-webkit-scrollbar-track {
    background: transparent;
}

.text-muted {
    color: var(--color-text-muted);
    font-size: 13px;
}

/* ── 未登录页 / 通用容器 ── */

.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
}

.dashboard-header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    background: var(--color-card);
    flex-shrink: 0;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    z-index: 5;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent-cyan) 32%, rgba(15, 198, 219, 0) 78%);
    opacity: 0.55;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo .logo-icon {
    width: auto;
    height: 34px;
    max-width: 170px;
    display: block;
    object-fit: contain;
    background: none;
    border-radius: 0;
}

.header-divider {
    width: 1px;
    height: 22px;
    background: var(--color-border-strong);
    margin: 0 6px;
}

.header-sys-name {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--color-primary-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    height: 36px;
    padding: 0 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -10px rgba(0, 120, 123, 0.7);
}

.scroll-content {
    flex: 1;
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    overflow-y: auto;
    padding: 26px 28px 44px;
}

/* ── 欢迎横幅：只留图片本身，不叠任何颜色层 ── */

.welcome-banner {
    background: url("headerbg.jpg") center center / cover no-repeat;
    border-radius: var(--radius-lg);
    padding: 38px 42px;
    margin-bottom: 22px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 40px -26px rgba(0, 90, 93, 0.9);
}

.welcome-text h2 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 12px rgba(0, 60, 62, 0.35);
}

.welcome-text p {
    font-size: 14px;
    letter-spacing: 0.3px;
    opacity: 0.92;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 8px rgba(0, 60, 62, 0.35);
}

.banner-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.34);
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.6px;
    position: relative;
    z-index: 1;
}

.banner-chip .icon {
    width: 14px;
    height: 14px;
    opacity: 1;
}

.welcome-icon {
    height: 70px;
    width: auto;
    max-width: 38%;
    object-fit: contain;
    opacity: 0.98;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 8px 20px rgba(0, 50, 52, 0.25));
}

/* ── 栅格与卡片 ── */

.grid-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.grid-layout-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.stat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0 0 auto auto;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 100% 0%, rgba(15, 198, 219, 0.12), transparent 70%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 120, 123, 0.24);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-primary);
    background: linear-gradient(145deg, var(--color-primary-soft) 0%, #f7fcfc 100%);
    border: 1px solid rgba(0, 120, 123, 0.12);
}

.stat-icon .icon {
    width: 22px;
    height: 22px;
}

.stat-body {
    min-width: 0;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary-dark);
    line-height: 1.15;
    letter-spacing: -0.4px;
    font-variant-numeric: tabular-nums;
}

.stat-card .stat-suffix {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-left: 4px;
    font-weight: 400;
}

.chart-card,
.table-card {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.chart-card:hover,
.table-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 120, 123, 0.18);
}

.chart-card-title,
.table-card-title {
    position: relative;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 14px;
    padding-left: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-card-title::before,
.table-card-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 15px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--color-accent-cyan) 0%, var(--color-primary) 100%);
}

.chart-card-title .chart-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 400;
}

.chart-body {
    height: 240px;
    width: 100%;
}

.full-width {
    grid-column: 1 / -1;
}

/* ── 表格 ── */

.recent-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.recent-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: var(--color-text-muted);
    padding: 10px 14px;
    background: var(--color-primary-tint);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.recent-table th:first-child {
    border-left: 1px solid var(--color-border);
    border-top-left-radius: var(--radius-sm);
}

.recent-table th:last-child {
    border-right: 1px solid var(--color-border);
    border-top-right-radius: var(--radius-sm);
}

.recent-table td {
    font-size: 13.5px;
    color: var(--color-text-secondary);
    padding: 12px 14px;
    border-bottom: 1px solid #eef4f4;
}

.recent-table tr:last-child td {
    border-bottom: none;
}

.recent-table tbody tr {
    transition: background 0.15s ease;
}

.recent-table tbody tr:hover {
    background: var(--color-primary-tint);
}

.model-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-tag.gpt {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
}

.model-tag.claude {
    background: #fdf4e6;
    color: #a3702c;
}

.model-tag.other {
    background: #eaf5f1;
    color: #0c5b4a;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.online {
    background: var(--color-accent-cyan);
    box-shadow: 0 0 0 3px rgba(15, 198, 219, 0.18);
}

.status-dot.offline {
    background: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(227, 77, 89, 0.15);
}

.dashboard-footer {
    text-align: center;
    padding: 20px 0 4px;
    color: var(--color-text-muted);
    font-size: 12.5px;
    line-height: 1.9;
    letter-spacing: 0.3px;
}

.dashboard-footer p {
    margin: 0;
}

/* ── 登录弹窗 ── */

.login-modal-content {
    padding: 0 0 26px;
}

/* 带 hero 的登录弹窗：把 Mantine 自带 header 压成右上角悬浮的关闭按钮，
   避免 hero 上方多出一条白边（:has 不被支持时只是退回默认外观） */
.mantine-Modal-content:has(.login-hero) .mantine-Modal-header {
    position: absolute;
    top: 10px;
    right: 10px;
    min-height: 0;
    padding: 0;
    background: transparent;
    z-index: 6;
}

.mantine-Modal-content:has(.login-hero) .mantine-Modal-close {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 8px;
}

.mantine-Modal-content:has(.login-hero) .mantine-Modal-close:hover {
    background: rgba(255, 255, 255, 0.32);
}

.login-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 32px 22px;
    margin-bottom: 22px;
    border-radius: 12px 12px 0 0;
    background: radial-gradient(120% 140% at 0% 0%, rgba(15, 198, 219, 0.28) 0%, transparent 55%),
        linear-gradient(135deg, #00696c 0%, #00787b 55%, #005a5d 100%);
    color: #fff;
}

.login-hero .logo-icon {
    width: auto;
    height: 40px;
    max-width: 120px;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 5px 8px;
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
}

.login-hero-title {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.login-hero-sub {
    font-size: 12.5px;
    opacity: 0.82;
    margin-top: 3px;
    letter-spacing: 0.3px;
}

.login-modal-content .login-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 32px;
    text-align: center;
}

.login-form-body {
    padding: 0 32px;
}

.login-error {
    color: var(--color-danger);
    font-size: 13px;
    margin-top: 4px;
    min-height: 20px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 12.5px;
    color: var(--color-text-muted);
}

.cas-login-info {
    font-size: 13.5px;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.7;
    padding: 12px 4px;
    background: var(--color-primary-tint);
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius-sm);
}

.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-img {
    height: 50px;
    width: 160px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    user-select: none;
    background: #fff;
}

/* ── 主框架 ── */

.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--color-bg);
}

.sidebar {
    width: var(--sidebar-width);
    background:
        radial-gradient(140% 42% at 0% 0%, rgba(15, 198, 219, 0.22) 0%, rgba(15, 198, 219, 0) 62%),
        linear-gradient(180deg, #00696c 0%, #005a5d 48%, #003f43 100%);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 6px 0 24px -18px rgba(0, 63, 67, 0.9);
}

.sidebar-logo {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    flex-shrink: 0;
}

.sidebar-logo .logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 12px;
    padding: 4px;
    flex-shrink: 0;
    box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.65);
}

.sidebar-brand-text {
    min-width: 0;
}

.sidebar-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.sidebar-brand-sub {
    display: block;
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.62);
    letter-spacing: 1.1px;
    margin-top: 3px;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 6px 10px 18px;
}

.nav-group-label {
    font-size: 10.5px;
    letter-spacing: 1.6px;
    color: rgba(255, 255, 255, 0.42);
    padding: 12px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.74);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 500;
    border-left-color: var(--color-accent-cyan);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    opacity: 0.72;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-item.active .nav-icon {
    color: var(--color-accent-cyan);
}

.sidebar-footer {
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    flex-shrink: 0;
}

.proxy-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #d8fbf9;
    margin-bottom: 6px;
    padding: 7px 10px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
}

.proxy-url {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.48);
    word-break: break-all;
    line-height: 1.5;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 36px;
}

/* ── 顶栏用户区 ── */

.header-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    background: var(--color-primary-tint);
    border: 1px solid var(--color-border);
}

.header-user .user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent-cyan) 130%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.user-name {
    font-size: 13.5px;
    color: var(--color-text);
    font-weight: 500;
}

.user-role-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary);
    border: 1px solid rgba(0, 120, 123, 0.22);
}

.btn-logout {
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 13.5px;
    border: 1px solid var(--color-border-strong);
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-logout:hover {
    background: #fff6f6;
    color: var(--color-danger);
    border-color: rgba(227, 77, 89, 0.55);
}

/* ── 页面骨架 ── */

.page-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.page-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 2px;
}

.page-title {
    position: relative;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    padding-left: 14px;
    letter-spacing: 0.3px;
}

.page-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--color-accent-cyan) 0%, var(--color-primary) 100%);
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* ── 模型广场 ── */

.model-square-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
}

/* 分类筛选：全部 / 按厂家 / 按部署方式 */
.model-square-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.model-square-filter-label {
    font-size: 13px;
    color: var(--color-text-muted);
}

.model-square-filter-items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.model-square-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-card);
    font-size: 13px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.model-square-filter-item:hover {
    border-color: rgba(0, 120, 123, 0.3);
    color: var(--color-primary);
}

.model-square-filter-radio {
    accent-color: var(--color-primary);
    margin: 0;
}

/* 标签筛选 chip：选中后高亮 */
.model-square-tag-item {
    font-size: 12px;
    padding: 4px 12px;
}

.model-square-tag-item:has(input:checked) {
    border-color: var(--color-primary);
    background: rgba(0, 120, 123, 0.08);
    color: var(--color-primary);
    font-weight: 500;
}

/* 分组展示 */
.model-square-groups {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.model-square-group-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}

.model-square-group-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
}

.model-square-group-count {
    font-size: 12px;
    color: var(--color-text-muted);
}

.model-square-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.model-square-badge-vendor {
    color: #186cc0;
    background: #eef4ff;
    border-color: rgba(24, 108, 192, 0.18);
}

.model-square-card {
    position: relative;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.model-square-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent-cyan) 100%);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.model-square-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    border-color: rgba(0, 120, 123, 0.26);
}

.model-square-card:hover::before {
    opacity: 1;
}

.model-square-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.model-square-name {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--color-text);
    word-break: break-all;
    line-height: 1.4;
}

.model-square-badge {
    flex-shrink: 0;
    font-size: 11.5px;
    color: var(--color-primary);
    background: var(--color-primary-soft);
    border: 1px solid rgba(0, 120, 123, 0.14);
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}

.model-square-prices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-tint);
    border: 1px solid #eaf3f3;
}

.model-square-desc {
    font-size: 13px;
    line-height: 1.65;
    color: var(--color-text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.model-square-price-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.model-square-price-row span:last-child {
    color: var(--color-primary-dark);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.model-square-price-note {
    font-size: 11.5px;
    color: var(--color-text-muted);
}

.model-square-empty {
    padding: 56px 16px;
    text-align: center;
    color: var(--color-text-muted);
    background: var(--color-card);
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius);
}

/* ── 表单 ── */

.form-error {
    color: var(--color-danger);
    font-size: 13px;
    min-height: 18px;
}

/* ── 设置 ── */

.settings-card {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
}

.settings-card h4 {
    position: relative;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    padding-left: 12px;
    color: var(--color-text);
}

.settings-card h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--color-accent-cyan) 0%, var(--color-primary) 100%);
}

.date-range-picker {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

/* ── AI 对话 ── */

.chat-page {
    height: calc(100vh - 112px);
}

.chat-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.chat-header-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(90% 60% at 100% 0%, rgba(15, 198, 219, 0.06) 0%, transparent 60%),
        var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    min-height: 400px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 24px 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    gap: 12px;
    max-width: 82%;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.assistant-avatar {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    box-shadow: 0 8px 16px -10px rgba(0, 120, 123, 0.9);
}

.chat-avatar.user-avatar {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    border: 1px solid rgba(0, 120, 123, 0.16);
}

.chat-bubble {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.7;
    word-break: break-word;
}

.assistant-bubble {
    background: #f5f9f9;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-top-left-radius: 4px;
}

.user-bubble {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    border-top-right-radius: 4px;
    box-shadow: 0 10px 22px -16px rgba(0, 90, 93, 0.9);
}

.chat-markdown p {
    margin: 0 0 8px 0;
}
.chat-markdown p:last-child {
    margin-bottom: 0;
}
.chat-markdown pre {
    background: #0d2b2c;
    color: #d8e9e9;
    padding: 12px 14px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 13px;
    margin: 8px 0;
}
.chat-markdown code {
    font-size: 13px;
}
.chat-markdown ul, .chat-markdown ol {
    padding-left: 20px;
    margin: 8px 0;
}
.chat-markdown h1, .chat-markdown h2, .chat-markdown h3 {
    margin: 8px 0 4px 0;
    font-size: 15px;
}

.chat-reasoning {
    margin-bottom: 8px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-primary-tint);
    overflow: hidden;
}
.chat-reasoning-summary {
    cursor: pointer;
    padding: 7px 11px;
    font-size: 13px;
    color: var(--color-text-muted);
    user-select: none;
}
.chat-reasoning-summary:hover {
    background: #e9f4f4;
}
.chat-reasoning-content {
    padding: 8px 12px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text-secondary);
    max-height: 300px;
    overflow-y: auto;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 16px 20px 18px;
    border-top: 1px solid var(--color-border);
    align-items: flex-end;
    background: #fbfdfd;
}

/* ── 提示与公告 ── */

.sync-status-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px 12px 18px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 18px 40px -22px rgba(0, 71, 74, 0.6);
    z-index: 1000;
    font-size: 13.5px;
    color: var(--color-text);
    max-width: 400px;
}

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.announcement-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    background: #fbfdfd;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.announcement-item:hover {
    border-color: rgba(0, 120, 123, 0.28);
    background: #f7fcfc;
}

.announcement-item.pinned {
    border-color: rgba(0, 120, 123, 0.34);
    background: var(--color-primary-soft);
}

.announcement-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.announcement-item-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}

.announcement-item-time {
    font-size: 11.5px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.announcement-item-content {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.announcement-item-content p {
    margin: 4px 0;
}

.announcement-item-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* 平台公告：每条统一字体、字号、行高（含 Markdown 渲染出的标题/列表/引用/代码） */
.announcement-item,
.announcement-item-title,
.announcement-item-time,
.announcement-item-content,
.announcement-item-content p,
.announcement-item-content li,
.announcement-item-content h1,
.announcement-item-content h2,
.announcement-item-content h3,
.announcement-item-content h4,
.announcement-item-content h5,
.announcement-item-content h6,
.announcement-item-content blockquote,
.announcement-item-content code,
.announcement-item-content strong,
.announcement-item-content em {
    font-family: var(--font-sans);
}

.announcement-item-content h1,
.announcement-item-content h2,
.announcement-item-content h3,
.announcement-item-content h4,
.announcement-item-content h5,
.announcement-item-content h6 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
    margin: 6px 0 4px;
    color: var(--color-text-secondary);
}

.announcement-item-content p,
.announcement-item-content li,
.announcement-item-content blockquote {
    font-size: 13px;
    line-height: 1.7;
    margin: 4px 0;
}

.announcement-item-content ul,
.announcement-item-content ol {
    font-size: 13px;
    line-height: 1.7;
    margin: 4px 0;
    padding-left: 20px;
}

.announcement-item-content code {
    font-size: 12px;
}

/* ── 动画 ── */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.38s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.06s;
    opacity: 0;
}

.fade-in-delay-2 {
    animation-delay: 0.12s;
    opacity: 0;
}

.fade-in-delay-3 {
    animation-delay: 0.18s;
    opacity: 0;
}

.fade-in-delay-4 {
    animation-delay: 0.24s;
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .fade-in-delay-1,
    .fade-in-delay-2,
    .fade-in-delay-3,
    .fade-in-delay-4 {
        animation: none;
        opacity: 1;
    }
}

/* ── 内联图标（颜色随 currentColor，无外部依赖） ── */

.icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    vertical-align: middle;
}

.icon-gauge {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.6'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.6'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.6'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.6'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.6'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.6'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.6'/%3E%3C/svg%3E");
}

.icon-shopping-bag {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
}

.icon-users {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.icon-box {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpath d='M3.27 6.96 12 12.01l8.73-5.05'/%3E%3Cpath d='M12 22.08V12'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpath d='M3.27 6.96 12 12.01l8.73-5.05'/%3E%3Cpath d='M12 22.08V12'/%3E%3C/svg%3E");
}

.icon-upload-cloud {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 16l-4-4-4 4'/%3E%3Cpath d='M12 12v9'/%3E%3Cpath d='M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 16l-4-4-4 4'/%3E%3Cpath d='M12 12v9'/%3E%3Cpath d='M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3'/%3E%3C/svg%3E");
}

.icon-key {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='M21 2l-9.6 9.6'/%3E%3Cpath d='M15.5 7.5l3 3L22 7l-3-3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3Cpath d='M21 2l-9.6 9.6'/%3E%3Cpath d='M15.5 7.5l3 3L22 7l-3-3'/%3E%3C/svg%3E");
}

.icon-git-branch {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3v12'/%3E%3Ccircle cx='18' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M18 9a9 9 0 0 1-9 9'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3v12'/%3E%3Ccircle cx='18' cy='6' r='3'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Cpath d='M18 9a9 9 0 0 1-9 9'/%3E%3C/svg%3E");
}

.icon-message-square {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

.icon-trending-up {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 6l-9.5 9.5-5-5L1 18'/%3E%3Cpath d='M17 6h6v6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 6l-9.5 9.5-5-5L1 18'/%3E%3Cpath d='M17 6h6v6'/%3E%3C/svg%3E");
}

.icon-megaphone {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E");
}

.icon-settings {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6 1.65 1.65 0 0 0 10 3.09V3a2 2 0 0 1 4 0v.09A1.65 1.65 0 0 0 15 4.6a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9c.14.4.44.75.84.98.4.22.85.32 1.3.28H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6 1.65 1.65 0 0 0 10 3.09V3a2 2 0 0 1 4 0v.09A1.65 1.65 0 0 0 15 4.6a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9c.14.4.44.75.84.98.4.22.85.32 1.3.28H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");
}

.icon-zap {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E");
}

.icon-cpu {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Crect x='9' y='9' width='6' height='6'/%3E%3Cpath d='M9 2v2M15 2v2M9 20v2M15 20v2M2 9h2M2 15h2M20 9h2M20 15h2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Crect x='9' y='9' width='6' height='6'/%3E%3Cpath d='M9 2v2M15 2v2M9 20v2M15 20v2M2 9h2M2 15h2M20 9h2M20 15h2'/%3E%3C/svg%3E");
}

.icon-database {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='9' ry='3'/%3E%3Cpath d='M21 12c0 1.66-4 3-9 3s-9-1.34-9-3'/%3E%3Cpath d='M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='9' ry='3'/%3E%3Cpath d='M21 12c0 1.66-4 3-9 3s-9-1.34-9-3'/%3E%3Cpath d='M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5'/%3E%3C/svg%3E");
}

.icon-wallet {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12V7H5a2 2 0 0 1 0-4h14v4'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h16v-5'/%3E%3Cpath d='M18 12a2 2 0 0 0 0 4h4v-4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12V7H5a2 2 0 0 1 0-4h14v4'/%3E%3Cpath d='M3 5v14a2 2 0 0 0 2 2h16v-5'/%3E%3Cpath d='M18 12a2 2 0 0 0 0 4h4v-4z'/%3E%3C/svg%3E");
}

.icon-target {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E");
}

.icon-shield {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}

/* 旧的 feather 占位保留（外部 CDN 若可用仍能渲染），无内容时不占位 */
.feather {
    width: 18px;
    height: 18px;
    display: inline-block;
}

.feather:empty {
    display: none;
}

/* ── 响应式 ── */

@media (max-width: 1280px) {
    .grid-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-layout-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .full-width {
        grid-column: 1 / -1;
    }
    .welcome-icon {
        height: 56px;
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 76px;
    }
    .sidebar-logo {
        justify-content: center;
        padding: 0;
    }
    .sidebar-brand-text,
    .sidebar-title,
    .sidebar-brand-sub,
    .nav-group-label,
    .nav-item span:not(.nav-icon),
    .sidebar-footer {
        display: none;
    }
    .nav-item {
        justify-content: center;
        padding: 12px 8px;
        border-left-width: 0;
        border-radius: 12px;
    }
    .header-sys-name,
    .header-divider {
        display: none;
    }
    .page-content {
        padding: 18px 16px 28px;
    }
}

@media (max-width: 768px) {
    .grid-layout,
    .grid-layout-4 {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: span 1;
    }
    .welcome-banner {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
    }
    .welcome-text h2 {
        font-size: 20px;
    }
    .welcome-icon {
        display: none;
    }
    .scroll-content {
        padding: 18px 16px 32px;
    }
    .header-user .user-name,
    .header-user .user-role-badge {
        display: none;
    }
    .chat-message {
        max-width: 94%;
    }
}

/* ── AG Grid：跟随青绿主色 ── */

.ag-theme-quartz {
    --ag-accent-color: #00787b;
    --ag-selected-row-background-color: #e6f3f3;
    --ag-row-hover-color: #f2f9f9;
    --ag-header-background-color: #f5fafa;
    --ag-border-color: #e1ebeb;
    --ag-foreground-color: #10292b;
    --ag-secondary-foreground-color: #4c6163;
    --ag-checkbox-checked-color: #00787b;
    --ag-font-size: 13px;
    --ag-row-border-color: #eef4f4;
    --ag-font-family: var(--font-sans);
}
