/* ============================================
   OKR项目管理系统 · 世界级UI设计系统
   品牌色: 深藏青 #0F2744 · CAT黄 #FFCD11 · 古铜金 #B68D4C
   ============================================ */

:root {
    /* 品牌主色 */
    --brand-navy: #0F2744;
    --brand-navy-dark: #081a2e;
    --brand-navy-light: #1a3a5c;
    --brand-gold: #FFCD11;
    --brand-gold-soft: #FFE07A;
    --brand-copper: #B68D4C;

    /* 语义色 */
    --primary: var(--brand-navy);
    --primary-dark: var(--brand-navy-dark);
    --accent: var(--brand-gold);
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;

    /* 文字 */
    --text: #0F2744;
    --text-2: #334155;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    /* 背景 */
    --bg: #f5f6f8;
    --bg-2: #eef0f4;
    --card: #ffffff;
    --border: #e5e7eb;
    --border-light: #f1f3f5;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(15,39,68,0.05);
    --shadow-md: 0 4px 12px rgba(15,39,68,0.07), 0 1px 3px rgba(15,39,68,0.05);
    --shadow-lg: 0 12px 32px rgba(15,39,68,0.1), 0 4px 12px rgba(15,39,68,0.06);

    /* 圆角 */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-mono: "SF Mono", "JetBrains Mono", "Menlo", "Consolas", monospace;

    /* 过渡 */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01";
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand-copper); text-decoration: none; }

/* ============ 布局 ============ */
.layout {
    display: flex;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

/* ============ 侧边栏 · 深藏青+金色 ============ */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #0F2744 0%, #081a2e 100%);
    color: #cbd5e1;
    padding: 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 2px 0 12px rgba(0,0,0,0.04);
}
.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-copper) 100%);
    z-index: 2;
}
.sidebar .brand {
    padding: 24px 22px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,205,17,0.25);
    padding: 4px;
}
.sidebar .brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.sidebar .brand-text { flex: 1; min-width: 0; }
.sidebar .brand-name {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.8px;
    white-space: nowrap;
}
.sidebar .brand-sub {
    color: var(--brand-gold);
    font-size: 9.5px;
    letter-spacing: 1.8px;
    margin-top: 4px;
    font-weight: 500;
    opacity: 0.85;
    white-space: nowrap;
}

.sidebar nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 10px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(203,213,225,0.32) transparent;
}
.sidebar nav::-webkit-scrollbar {
    width: 6px;
}
.sidebar nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar nav::-webkit-scrollbar-thumb {
    background: rgba(203,213,225,0.24);
    border-radius: 999px;
}
.sidebar nav::-webkit-scrollbar-thumb:hover {
    background: rgba(203,213,225,0.38);
}
.sidebar .nav-group-label {
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(203,213,225,0.42);
    padding: 14px 14px 6px;
    font-weight: 600;
    text-transform: uppercase;
}
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: rgba(203,213,225,0.82);
    font-size: 13.5px;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: all 0.2s var(--ease);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-decoration: none;
}
.sidebar nav a .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
    transition: stroke 0.2s;
}
.sidebar nav a:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
    text-decoration: none;
}
.sidebar nav a.active {
    background: linear-gradient(135deg, rgba(255,205,17,0.18) 0%, rgba(255,205,17,0.04) 100%);
    color: #fff;
    box-shadow: inset 2px 0 0 var(--brand-gold);
}
.sidebar nav a.active .nav-icon {
    stroke: var(--brand-gold);
    opacity: 1;
}

.sidebar .user-box {
    flex-shrink: 0;
    width: 100%;
    padding: 16px 22px 18px;
    background: rgba(0,0,0,0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,205,17,0.18);
    font-size: 13px;
}
.sidebar .user-box .name {
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.sidebar .user-box .role {
    color: rgba(255,205,17,0.72);
    font-size: 11px;
    margin-top: 4px;
    letter-spacing: 1.2px;
}
.sidebar .user-box a {
    color: rgba(203,213,225,0.68);
    font-size: 12px;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s;
    letter-spacing: 1px;
}
.sidebar .user-box a:hover { color: var(--brand-gold); text-decoration: none; }

/* ============ 主区域 ============ */
.main {
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-gutter: stable;
    background: var(--bg);
}
.topbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 18px 36px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    gap: 14px;
}
.topbar h1::before {
    content: '';
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, var(--brand-gold) 0%, var(--brand-copper) 100%);
    border-radius: 2px;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.notification-menu {
    position: relative;
}
.notification-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--brand-navy);
    font-size: 13px;
    font-weight: 600;
}
.notification-trigger:hover {
    border-color: var(--brand-gold);
    color: var(--brand-navy);
}
.notification-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
}
.notification-popover {
    display: none;
    position: absolute;
    right: 0;
    top: 42px;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 50;
}
.notification-menu:hover .notification-popover {
    display: block;
}
.notification-popover-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.notification-popover-head span,
.notification-time,
.notification-row-meta {
    color: var(--text-secondary);
    font-size: 12px;
}
.notification-item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
}
.notification-item.unread {
    background: #fff7ed;
}
.notification-title {
    color: var(--brand-navy);
    font-weight: 700;
    font-size: 13px;
}
.notification-body {
    margin-top: 4px;
    color: var(--text-2);
    font-size: 12px;
    line-height: 1.5;
}
.notification-time {
    margin-top: 6px;
}
.notification-empty,
.notification-all {
    display: block;
    padding: 12px 14px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
}
.notification-all {
    background: var(--bg);
    color: var(--brand-navy);
    font-weight: 700;
}
.content {
    padding: 28px 36px;
    max-width: 1400px;
}

/* ============ 卡片 ============ */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--brand-navy);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}
.card-header::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 36px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-copper) 100%);
    border-radius: 2px;
}

/* ============ 统计卡 ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--card);
    padding: 22px 24px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    transition: all 0.25s var(--ease);
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-copper) 100%);
    opacity: 0.9;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255,205,17,0.3);
}
.stat-card .stat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.stat-card .stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255,205,17,0.15) 0%, rgba(182,141,76,0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-copper);
}
.stat-card .stat-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.stat-card .label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 2px;
    font-weight: 500;
}
.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--brand-navy);
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* ============ 表单 ============ */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-navy);
    margin-bottom: 7px;
    letter-spacing: 1.5px;
}
.form-group label .required { color: var(--danger); margin-left: 2px; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: var(--text);
    transition: all 0.18s;
}
.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--brand-copper);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(255,205,17,0.18);
    background: #fff;
}
.form-group textarea { resize: vertical; min-height: 84px; line-height: 1.55; }
.form-group .help {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 1.5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s var(--ease);
    font-family: inherit;
    gap: 6px;
    position: relative;
    overflow: hidden;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(15,39,68,0.22);
}
.btn-primary:hover {
    box-shadow: 0 8px 18px rgba(15,39,68,0.32);
    background: linear-gradient(135deg, var(--brand-navy-light) 0%, var(--brand-navy) 100%);
}
.btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(5,150,105,0.25);
}
.btn-success:hover { box-shadow: 0 8px 18px rgba(5,150,105,0.35); }
.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220,38,38,0.25);
}
.btn-danger:hover { box-shadow: 0 8px 18px rgba(220,38,38,0.35); }
.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-2);
    box-shadow: none;
}
.btn-outline:hover {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #fff;
}
.btn-gold {
    background: linear-gradient(135deg, var(--brand-gold) 0%, var(--brand-copper) 100%);
    color: var(--brand-navy);
    box-shadow: 0 4px 12px rgba(255,205,17,0.3);
}
.btn-gold:hover { box-shadow: 0 8px 18px rgba(255,205,17,0.4); }
.btn-sm { padding: 6px 14px; font-size: 12.5px; letter-spacing: 1px; }

/* AI 辅导填写按钮（独立设计 —— 主界面内的增值功能入口） */
.btn-ai-coach {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: #fff;
    color: var(--brand-navy);
    border: 1px solid var(--brand-copper);
    border-radius: 8px;
    font-size: 12.5px; font-weight: 600; letter-spacing: 0.5px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    box-shadow: 0 1px 3px rgba(15,39,68,0.06);
}
.btn-ai-coach .ai-icon {
    width: 14px; height: 14px;
    color: var(--brand-copper);
    transition: color 0.2s var(--ease);
}
.btn-ai-coach:hover {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
    color: var(--brand-gold);
    border-color: var(--brand-navy);
    box-shadow: 0 4px 12px rgba(15,39,68,0.22);
    transform: translateY(-1px);
}
.btn-ai-coach:hover .ai-icon { color: var(--brand-gold); }
.btn-ai-coach:active { transform: translateY(0); }
.btn-block { width: 100%; }

/* ============ 消息提示 ============ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13.5px;
    border-left: 3px solid;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.3px;
}
.alert-success { background: #ecfdf5; color: #065f46; border-color: #059669; }
.alert-danger, .alert-error { background: #fef2f2; color: #991b1b; border-color: #dc2626; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #d97706; }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #0891b2; }

/* ============ 徽章 ============ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid transparent;
}
.badge-ongoing { background: #eff6ff; color: #1e3a8a; border-color: #bfdbfe; }
.badge-completed { background: #fffbeb; color: #78350f; border-color: #fcd34d; }
.badge-audited_pass { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.badge-audited_fail { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.badge-rewarded {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: var(--brand-copper);
    border-color: #fcd34d;
    font-weight: 700;
}
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 0 16px;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
}
.filter-chip.active {
    border-color: var(--brand-navy);
    background: var(--brand-navy);
    color: var(--brand-gold);
}
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.status-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.status-warning { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
.status-danger { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.status-muted { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }
.archive-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 2px 0 18px;
}
.archive-summary > div {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg);
    padding: 14px;
}
.archive-label {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 6px;
}
.archive-value {
    color: var(--brand-navy);
    font-size: 15px;
    font-weight: 800;
}
.archive-value.amount {
    color: #b91c1c;
}
.approval-timeline {
    display: grid;
    gap: 10px;
}
.approval-step {
    border: 1px solid var(--border-light);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    background: #fff;
}
.approval-step.pass { border-left-color: var(--success); }
.approval-step.reject { border-left-color: var(--danger); }
.approval-main {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
}
.approval-main time {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 12px;
}
.approval-comment {
    margin-top: 8px;
    color: var(--text-2);
    font-size: 13px;
}
.notification-list {
    display: grid;
}
.notification-row {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
}
.notification-row:last-child {
    border-bottom: none;
}
.notification-row-dot {
    width: 8px;
    height: 8px;
    margin-top: 8px;
    border-radius: 999px;
    background: #cbd5e1;
}
.notification-row.unread .notification-row-dot {
    background: var(--danger);
}
.notification-row-title {
    color: var(--brand-navy);
    font-weight: 800;
    font-size: 14px;
}
.notification-row-body {
    margin-top: 5px;
    color: var(--text-2);
    font-size: 13px;
}
.notification-row-meta {
    display: flex;
    gap: 14px;
    margin-top: 7px;
}

/* ============ 表格 ============ */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
table th {
    text-align: left;
    padding: 12px 14px;
    background: var(--bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-2);
}
table td:first-child { font-weight: 500; }
table tr { transition: background 0.15s; }
table tr:hover { background: #fafbfc; }
table tr:last-child td { border-bottom: none; }

/* ============ 收益审计列表 ============ */
.audit-workbench {
    display: grid;
    gap: 16px;
}
.audit-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.audit-summary-card {
    min-height: 112px;
    padding: 18px 20px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--shadow-sm);
}
.audit-summary-card-main {
    border-color: rgba(4, 120, 87, 0.22);
    background: linear-gradient(180deg, #ffffff 0%, #ecfdf5 100%);
}
.audit-summary-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}
.audit-summary-value {
    margin-top: 8px;
    color: var(--brand-navy);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
}
.audit-summary-value span {
    margin-left: 4px;
    font-size: 14px;
    font-weight: 700;
}
.audit-summary-sub {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}
.audit-panel {
    overflow: hidden;
}
.audit-panel-title {
    align-items: baseline;
}
.audit-panel-title small {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}
.audit-table {
    table-layout: fixed;
}
.audit-table th,
.audit-table td {
    vertical-align: middle;
}
.audit-table th:nth-child(1) { width: 10%; }
.audit-table th:nth-child(2) { width: 36%; }
.audit-table th:nth-child(3) { width: 14%; }
.audit-table th:nth-child(4) { width: 12%; }
.audit-table th:nth-child(5) { width: 18%; }
.audit-table th:nth-child(6) { width: 10%; }
.audit-history-table th:nth-child(1) { width: 10%; }
.audit-history-table th:nth-child(2) { width: 34%; }
.audit-history-table th:nth-child(3) { width: 12%; }
.audit-history-table th:nth-child(4) { width: 12%; }
.audit-history-table th:nth-child(5) { width: 20%; }
.audit-history-table th:nth-child(6) { width: 12%; }
.audit-code {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
}
.audit-name,
.audit-project-link strong {
    color: var(--brand-navy);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.55;
}
.audit-project-link {
    display: inline-flex;
    max-width: 100%;
}
.audit-project-link:hover strong {
    color: var(--brand-copper);
}
.audit-benefit {
    color: #047857;
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
}
.audit-status-cell {
    min-width: 180px;
}
.audit-state {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.audit-state-new {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}
.audit-state-review {
    background: #eef6ff;
    color: #1d4f8c;
    border-color: #bfdbfe;
}
.audit-state-done {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
.audit-state-hold {
    background: #fff7ed;
    color: #9a3412;
    border-color: #fed7aa;
}
.audit-opinion-body,
.audit-opinion-inline {
    display: grid;
    gap: 10px;
}
.audit-opinion-inline {
    margin: 4px 0 16px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.audit-opinion-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.audit-opinion-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
}
.audit-opinion-text {
    color: var(--brand-navy);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.7;
    white-space: pre-line;
}
@media (max-width: 1100px) {
    .audit-summary-grid {
        grid-template-columns: 1fr;
    }
    .audit-panel {
        overflow-x: auto;
    }
    .audit-table {
        min-width: 980px;
    }
}

/* ============ OKR样式 ============ */
.okr-block {
    background: white;
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.okr-block .obj {
    font-size: 15px;
    font-weight: 600;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
    color: white;
    border-radius: var(--radius);
    margin-bottom: 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(15,39,68,0.18);
}
.okr-block .obj .label {
    font-size: 11px;
    letter-spacing: 2px;
    margin-right: 10px;
    background: var(--brand-gold);
    color: var(--brand-navy);
    padding: 3px 9px;
    border-radius: 4px;
    font-weight: 700;
}
.okr-block .kr-list { padding-left: 0; list-style: none; }
.okr-block .kr-item {
    display: flex;
    align-items: start;
    padding: 11px 16px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 8px;
    font-size: 14px;
    border-left: 3px solid var(--brand-gold);
}
.okr-block .kr-item .kr-num {
    display: inline-block;
    background: var(--brand-navy);
    color: var(--brand-gold);
    padding: 2px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
    letter-spacing: 1px;
}

/* ============ 项目卡 ============ */
.project-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.2s var(--ease);
}
.project-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: rgba(255,205,17,0.5);
}
.project-card .title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.project-card .title h3 {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
    color: var(--brand-navy);
}
.project-card .code {
    font-family: var(--font-mono);
    background: var(--brand-navy);
    color: var(--brand-gold);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.project-card .meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* ============ 时间线 ============ */
.timeline {
    border-left: 2px solid var(--brand-gold);
    padding-left: 26px;
    margin-left: 8px;
}
.timeline-item {
    position: relative;
    margin-bottom: 22px;
    background: white;
    padding: 18px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 20px;
    width: 12px;
    height: 12px;
    background: var(--brand-gold);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--brand-gold);
}
.timeline-item .week-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}
.timeline-item .week-num {
    font-weight: 700;
    color: var(--brand-navy);
    letter-spacing: 0.5px;
}
.timeline-item .date {
    font-size: 13px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.timeline-item .section { margin-bottom: 10px; }
.timeline-item .section .label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    letter-spacing: 1.5px;
    font-weight: 600;
}
.timeline-item .photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}
.timeline-item .photos img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.timeline-item .photos .photo-box { position: relative; }
.timeline-item .photos .photo-box .label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(15,39,68,0.85);
    color: white;
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ============ 登录页 · 世界级 ============ */
.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: var(--font-sans);
}
.auth-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #0f2744;
    filter: brightness(0.7) saturate(1.05);
    transform: scale(1.05);
    animation: authZoom 30s ease-in-out infinite alternate;
    z-index: 0;
}
@keyframes authZoom {
    from { transform: scale(1.05) translateX(0); }
    to   { transform: scale(1.12) translateX(-1.5%); }
}
.auth-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(115deg, rgba(15,39,68,0.78) 0%, rgba(15,39,68,0.55) 42%, rgba(15,39,68,0.25) 70%, rgba(15,39,68,0.55) 100%),
        radial-gradient(circle at 85% 90%, rgba(255,205,17,0.12), transparent 55%);
    z-index: 1;
}
.auth-stage {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1180px;
    padding: 40px 48px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 72px;
    align-items: center;
}
.auth-brand { color: #fff; padding-right: 20px; }
.brand-kicker {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--brand-gold);
    padding: 6px 14px;
    border: 1px solid rgba(255,205,17,0.55);
    border-radius: 2px;
    margin-bottom: 28px;
    font-weight: 500;
}
.brand-title {
    font-size: 68px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0 0 18px;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.brand-title span {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 8px;
    color: rgba(255,255,255,0.92);
}
.brand-divider {
    width: 60px;
    height: 3px;
    background: var(--brand-gold);
    margin: 18px 0 22px;
    border-radius: 2px;
}
.brand-company {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.95);
    margin: 0 0 20px;
}
.brand-values {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.88);
    margin-bottom: 14px;
}
.brand-values .dot {
    width: 4px;
    height: 4px;
    background: var(--brand-gold);
    border-radius: 50%;
    display: inline-block;
}
.brand-slogan {
    font-size: 12px;
    letter-spacing: 5px;
    color: rgba(255,205,17,0.85);
    margin: 0;
    font-weight: 400;
}
.auth-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 18px;
    padding: 44px 42px 32px;
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    box-shadow:
        0 30px 80px rgba(0,0,0,0.35),
        0 12px 30px rgba(0,0,0,0.18),
        inset 0 1px 0 rgba(255,255,255,0.9);
}
.auth-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.auth-accent {
    width: 4px;
    height: 44px;
    background: linear-gradient(180deg, var(--brand-gold) 0%, var(--brand-copper) 100%);
    border-radius: 2px;
}
.auth-card-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--brand-navy);
    letter-spacing: 1px;
}
.auth-card-head .auth-sub {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6b7280;
    letter-spacing: 0.5px;
}
.auth-card .form-group { margin-bottom: 18px; }
.auth-card .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-navy);
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.auth-card .form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 16px;
    font-size: 15px;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(15,39,68,0.12);
    border-radius: 10px;
    color: var(--brand-navy);
    transition: all 0.2s ease;
    font-family: inherit;
}
.auth-card .form-group input::placeholder {
    color: #9ca3af;
    font-weight: 300;
}
.auth-card .form-group input:focus {
    outline: none;
    border-color: var(--brand-gold);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,205,17,0.18);
}
.auth-card .btn-primary {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    letter-spacing: 8px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 8px 20px rgba(15,39,68,0.35);
    transition: all 0.25s ease;
}
.auth-card .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15,39,68,0.45);
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-gold) 220%);
}
.auth-card .alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border-left: none;
}
.auth-foot {
    text-align: center;
    margin: 26px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(15,39,68,0.08);
    font-size: 11px;
    color: #9ca3af;
    letter-spacing: 1px;
}

@media (max-width: 900px) {
    .auth-stage {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 32px 20px;
        max-width: 480px;
    }
    .auth-brand { text-align: center; padding-right: 0; }
    .brand-title { font-size: 48px; }
    .brand-title span { font-size: 22px; letter-spacing: 4px; }
    .brand-divider { margin: 14px auto 18px; }
    .brand-values { justify-content: center; }
    .auth-card { margin: 0 auto; padding: 32px 26px 24px; }
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 56px 20px;
    color: var(--text-secondary);
}
.empty-state .icon {
    font-size: 48px;
    margin-bottom: 14px;
    opacity: 0.4;
}
.empty-state p {
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* ============ 动作栏 ============ */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}
.action-bar .filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.action-bar select {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: white;
    color: var(--text-2);
    transition: all 0.15s;
}
.action-bar select:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(255,205,17,0.15);
}

/* ============ 详情列表 ============ */
.detail-list {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 12px 24px;
    font-size: 14px;
}
.detail-list dt {
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
}
.detail-list dd { color: var(--text); }

/* ============ KR编辑 ============ */
.kr-edit-list .kr-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}
.kr-edit-list .kr-row .kr-idx {
    background: var(--brand-navy);
    color: var(--brand-gold);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 1px;
}
.kr-edit-list .kr-row input,
.kr-edit-list .kr-row textarea { flex: 1; }
.kr-edit-list .kr-row form {
    display: flex;
    gap: 8px;
    flex: 1;
}

/* ============ 签名预览 ============ */
.signature-preview {
    max-width: 400px;
    padding: 20px;
    background: white;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
}
.signature-preview img { max-width: 100%; max-height: 150px; }

/* ============ 响应式 ============ */
.mobile-appbar,
.mobile-sidebar-mask,
.approval-mobile-list { display: none; }

.approval-decision-form { padding: 20px; }
.approval-action-bar { display: flex; gap: 10px; }

/* 钉钉免登页：直接使用公司原始 Logo，不对图形做叠加或改造。 */
.dingtalk-auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    background: linear-gradient(155deg, #07182c 0%, #0f2744 55%, #183d64 100%);
}
.dingtalk-auth-card {
    width: min(100%, 410px);
    box-sizing: border-box;
    padding: 32px 26px 28px;
    border-radius: 20px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 24px 64px rgba(0,0,0,.28);
    text-align: center;
}
.dingtalk-company-logo { width: 92px; height: 92px; object-fit: contain; }
.dingtalk-auth-card h1 { margin: 16px 0 6px; color: var(--brand-navy); font-size: 24px; }
.dingtalk-auth-subtitle { margin: 0; color: #64748b; font-size: 14px; }
.dingtalk-auth-status {
    margin: 26px 0 22px;
    padding: 20px 16px;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--brand-navy);
}
.dingtalk-auth-status p { margin: 8px 0 0; color: #64748b; font-size: 13px; line-height: 1.6; }
.dingtalk-spinner {
    width: 30px; height: 30px; margin: 0 auto 14px; border-radius: 50%;
    border: 3px solid #dbe4ee; border-top-color: var(--brand-gold);
    animation: dingtalk-spin .85s linear infinite;
}
.dingtalk-auth-card .btn { min-height: 46px; justify-content: center; margin-top: 10px; }
@keyframes dingtalk-spin { to { transform: rotate(360deg); } }

.approval-type-team { color: #c2410c; }
.approval-type-cash { color: #0f2744; }
.status-warning { color: #b45309; }
.status-success { color: #15803d; }

@media (max-width: 768px) {
    body { background: #f3f6f9; }
    .mobile-appbar {
        position: sticky; top: 0; z-index: 1200;
        height: calc(52px + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 12px 0;
        box-sizing: border-box;
        display: flex; align-items: center; justify-content: space-between;
        color: white;
        background: linear-gradient(100deg, var(--brand-navy-dark) 0%, var(--brand-navy) 58%, var(--brand-navy-light) 100%);
        border-bottom: 2px solid transparent;
        border-image: linear-gradient(90deg, var(--brand-gold), var(--brand-copper)) 1;
        box-shadow: 0 3px 12px rgba(8,26,46,.24);
    }
    .mobile-menu-button {
        width: auto; height: 40px; padding: 0 10px; border: 0; border-radius: 8px;
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        background: transparent; color: white; font: inherit; cursor: pointer;
    }
    .mobile-menu-button:active,
    .mobile-message-link:active { background: rgba(255,255,255,.1); }
    .mobile-menu-button svg,
    .mobile-message-link svg {
        width: 21px; height: 21px; flex: 0 0 auto;
        fill: none; stroke: currentColor; stroke-width: 2;
        stroke-linecap: round; stroke-linejoin: round;
    }
    .mobile-menu-label { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 1px; }
    .mobile-message-link {
        position: relative; min-height: 40px; padding: 0 10px;
        display: inline-flex; align-items: center; gap: 7px;
        color: white; font-size: 14px; font-weight: 600; letter-spacing: 1px;
        text-decoration: none; border-radius: 8px;
    }
    .mobile-message-link b {
        position: absolute; top: 0; right: 0; min-width: 17px; height: 17px;
        padding: 0 4px; box-sizing: border-box; border-radius: 9px;
        background: #dc2626; color: white; font-size: 10px; line-height: 17px; text-align: center;
        box-shadow: 0 0 0 2px var(--brand-navy-light);
    }
    .mobile-sidebar-mask {
        position: fixed; inset: 0; z-index: 1250; border: 0;
        background: rgba(2,8,23,.56); backdrop-filter: blur(2px);
    }
    .mobile-nav-open .mobile-sidebar-mask { display: block; }
    .layout {
        display: block;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    .sidebar {
        position: fixed; z-index: 1300; top: 0; bottom: 0; left: 0;
        width: min(86vw, 330px); height: 100dvh;
        display: flex; overflow: hidden; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
        transform: translateX(-105%); transition: transform .22s ease;
        box-shadow: 18px 0 45px rgba(2,8,23,.28);
    }
    .mobile-nav-open { overflow: hidden; }
    .mobile-nav-open .sidebar { transform: translateX(0); }
    .sidebar .brand { flex-shrink: 0; }
    .sidebar .user-box { position: static; width: 100%; flex-shrink: 0; }
    .sidebar nav {
        display: block; overflow-x: hidden; overflow-y: auto; padding: 8px 12px 20px;
    }
    .sidebar .nav-group-label { display: block; }
    .sidebar nav a {
        min-height: 46px; box-sizing: border-box; white-space: normal; margin-bottom: 3px;
    }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .detail-list { grid-template-columns: 1fr; }
    .main {
        height: auto;
        overflow: visible;
    }
    .content { padding: 14px 12px calc(22px + env(safe-area-inset-bottom)); }
    .topbar { padding: 14px 14px 8px; align-items: flex-start; gap: 12px; background: transparent; box-shadow: none; }
    .topbar h1 { font-size: 20px; }
    .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
    .topbar .notification-menu { display: none; }
    .notification-popover { right: -8px; width: 300px; }
    .archive-summary { grid-template-columns: 1fr; }
    .approval-main time { margin-left: 0; width: 100%; }
    .card { border-radius: 12px; }
    .btn { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
    input, select, textarea { font-size: 16px !important; }
    .data-table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .approval-mobile-list { display: grid; gap: 12px; padding: 12px; }
    .approval-mobile-card {
        padding: 16px; border: 1px solid #e2e8f0; border-radius: 12px;
        background: white; box-shadow: 0 3px 12px rgba(15,39,68,.06);
    }
    .approval-mobile-head { display: flex; justify-content: space-between; gap: 12px; color: #64748b; font-size: 12px; }
    .approval-mobile-card h3 { margin: 10px 0 12px; color: #0f2744; font-size: 17px; line-height: 1.4; }
    .approval-mobile-card dl { margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
    .approval-mobile-card dl div { min-width: 0; }
    .approval-mobile-card dt { color: #94a3b8; font-size: 11px; }
    .approval-mobile-card dd { margin: 3px 0 0; color: #334155; font-size: 13px; overflow-wrap: anywhere; }
    .approval-page-card > .data-table { display: none; }
    .approval-decision-form { padding: 16px; }
    .approval-action-bar {
        position: sticky; bottom: 0; z-index: 20; margin: 14px -16px -16px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        display: grid; grid-template-columns: 1fr 1fr;
        background: rgba(255,255,255,.96); border-top: 1px solid #e2e8f0;
        box-shadow: 0 -8px 20px rgba(15,39,68,.08);
    }
    .approval-action-bar .btn { margin: 0 !important; }
    .approval-action-bar .btn:last-child { grid-column: 1 / -1; }

    .points-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .points-account { margin-bottom: 20px; }
    .points-account-value { font-size: 28px; }
    .pts-sheet-card { padding: 36px 24px 22px; }
    .pts-sheet-price { font-size: 52px; }
}

/* ============ 积分兑换 ============ */
.points-page { max-width: 1160px; }

.points-account {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 28px;
}
.points-account-main {
    display: flex;
    align-items: baseline;
    gap: 14px;
}
.points-account-label {
    font-size: 12px;
    letter-spacing: .14em;
    color: var(--text-muted);
}
.points-account-value {
    font-size: 34px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.02em;
    color: #1d1d1f;
    font-variant-numeric: tabular-nums;
}
.points-account-value.is-pulse { animation: points-pulse .5s var(--ease); }
@keyframes points-pulse {
    35% { transform: scale(1.1); }
}
.points-account-link {
    font-size: 13px;
    color: var(--brand-navy);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color .2s var(--ease);
}
.points-account-link:hover { border-bottom-color: currentColor; }
.points-note {
    margin: -16px 0 22px;
    color: #9a3412;
    font-size: 13px;
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.points-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.points-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 44px rgba(15, 23, 42, .12);
}
.points-card .visual {
    aspect-ratio: 1 / 1;
    background: #f5f5f7;
    overflow: hidden;
}
.points-card .visual img,
.points-form-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.points-card .visual img { transition: transform .5s var(--ease); }
.points-card:hover .visual img { transform: scale(1.04); }
.points-card .copy {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}
.points-card .brand {
    font-size: 11px;
    letter-spacing: .12em;
    color: var(--text-muted);
}
.points-card h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}
.points-card .subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.points-card .buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}
.points-card .buy strong {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: #1d1d1f;
    font-variant-numeric: tabular-nums;
}
.points-card .buy strong i {
    font-style: normal;
    font-size: 12px;
    font-weight: 400;
    margin-left: 3px;
    color: var(--text-muted);
}
.points-card .buy-form { margin: 0; }
.buy-go {
    height: 32px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-navy);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background .18s var(--ease), transform .18s var(--ease);
}
.buy-go:hover:not(:disabled) { background: var(--brand-navy-dark); }
.buy-go:active:not(:disabled) { transform: scale(.95); }
.buy-go:disabled {
    background: #e8e8ed;
    color: #86868b;
    cursor: default;
}
@media (max-width: 1100px) {
    .points-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .points-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* 订单/履约页筛选：分段控件 */
.points-mini-filter {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: #f1f3f5;
    border-radius: 999px;
}
.points-mini-filter a {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.points-mini-filter a.on {
    background: #fff;
    color: var(--brand-navy);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .1);
}

/* 状态小胶囊 */
.pts-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}
.pts-chip.is-pending { background: #fdf2e3; color: #b45309; }
.pts-chip.is-done { background: #e8f5ee; color: #047857; }
.pts-chip.is-off { background: #f1f3f5; color: #86868b; }

.points-help {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f5f5f7;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.points-form-preview {
    width: 160px;
    height: 160px;
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f7;
}

/* 确认弹层 */
.pts-sheet {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.pts-sheet[hidden] { display: none !important; }
.pts-sheet-mask {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(29, 29, 31, .32);
    backdrop-filter: blur(18px) saturate(1.5);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    opacity: 0;
    transition: opacity .24s var(--ease);
}
.pts-sheet-card {
    position: relative;
    width: min(340px, 100%);
    padding: 44px 32px 28px;
    background: #fff;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 32px 90px rgba(15, 23, 42, .22);
    transform: translateY(12px) scale(.97);
    opacity: 0;
    transition: transform .26s var(--ease), opacity .26s var(--ease);
}
.pts-sheet.is-open .pts-sheet-mask { opacity: 1; }
.pts-sheet.is-open .pts-sheet-card {
    transform: none;
    opacity: 1;
}
.pts-sheet-name {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #6e6e73;
}
.pts-sheet-price {
    margin: 20px 0 0;
    font-size: 60px;
    font-weight: 600;
    line-height: .95;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    color: #1d1d1f;
}
.pts-sheet-unit {
    margin: 10px 0 0;
    font-size: 13px;
    color: #86868b;
}
.pts-sheet-hint {
    margin: 18px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #86868b;
}
.pts-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 32px;
}
.pts-sheet-cancel,
.pts-sheet-ok {
    height: 46px;
    border: 0;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background .18s var(--ease), transform .18s var(--ease);
}
.pts-sheet-cancel {
    background: #f5f5f7;
    color: #1d1d1f;
}
.pts-sheet-cancel:hover { background: #e8e8ed; }
.pts-sheet-ok {
    background: var(--brand-navy);
    color: #fff;
}
.pts-sheet-ok:hover { background: var(--brand-navy-dark); }
.pts-sheet-cancel:active,
.pts-sheet-ok:active { transform: scale(.97); }
.pts-sheet-ok:disabled { opacity: .45; cursor: wait; }

/* 轻提示 */
.pts-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    z-index: 1500;
    transform: translate(-50%, 12px);
    padding: 12px 24px;
    border-radius: 999px;
    background: rgba(29, 29, 31, .92);
    color: #fff;
    font-size: 14px;
    letter-spacing: .02em;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.pts-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.pts-toast.is-error { background: rgba(190, 18, 60, .94); }

/* ============ 移动端（钉钉端）列表页优化 ============ */
/* 操作单元格内的表单默认内联，桌面端按钮保持横向排列 */
td.m-actions form { display: inline; }
/* 项目列表筛选条：允许换行，搜索框自适应，避免把页面撑出横向滚动 */
.project-filter-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.project-search {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    min-width: 200px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    /* 顶栏：标题独占一行，动作按钮整行排列，避免标题被挤成竖行 */
    .topbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .topbar h1 { white-space: nowrap; }
    .topbar-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
    .topbar-actions > a,
    .topbar-actions > .btn { flex: 1 1 140px; text-align: center; justify-content: center; }

    /* 卡片头：标题独占一行，筛选胶囊整行均分排列 */
    .card-header { flex-wrap: wrap; gap: 10px; }
    .card-header .points-mini-filter { width: 100%; display: flex; }
    .card-header .points-mini-filter a { flex: 1; text-align: center; padding: 7px 4px; }

    /* 项目列表：搜索框独占一行 */
    .project-search { flex: 1 1 100%; min-width: 0; }

    /* 表格卡片化：每个 <tr> 变一张小卡片，杜绝列被压成竖行 */
    table.m-card-table { display: block; }
    table.m-card-table thead { display: none; }
    table.m-card-table tbody { display: block; }
    table.m-card-table tbody tr {
        display: flex;
        flex-direction: column;
        padding: 13px 2px;
        border-bottom: 1px solid var(--border-light);
    }
    table.m-card-table tbody tr:last-child { border-bottom: none; }
    table.m-card-table tbody tr:hover { background: transparent; }
    table.m-card-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 14px;
        padding: 4px 0;
        border: 0;
        font-size: 13.5px;
        line-height: 1.5;
        text-align: right;
    }
    table.m-card-table tbody td::before {
        content: attr(data-label);
        flex-shrink: 0;
        color: var(--text-muted);
        font-size: 12px;
        letter-spacing: 1px;
    }
    /* 主标题单元格（项目名/礼品名/姓名）：整行加粗，排在卡片最前 */
    table.m-card-table tbody td.m-title {
        order: -1;
        display: block;
        text-align: left;
        font-size: 15px;
        font-weight: 600;
        color: var(--brand-navy);
        line-height: 1.5;
        padding: 0 0 8px;
        overflow-wrap: anywhere;
    }
    table.m-card-table tbody td.m-title::before { content: none; }
    table.m-card-table tbody td.m-title a { color: inherit; text-decoration: none; }
    /* 操作单元格：按钮整行排列，排在卡片最后 */
    table.m-card-table tbody td.m-actions {
        order: 99;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        text-align: left;
        padding: 8px 0 0;
    }
    table.m-card-table tbody td.m-actions::before { content: none; }
    table.m-card-table tbody td.m-actions:empty { display: none; }
    table.m-card-table tbody td.m-actions form { flex: 1 1 120px; display: flex; }
    table.m-card-table tbody td.m-actions .btn {
        flex: 1 1 120px;
        width: 100%;
        min-height: 40px;
        margin: 0;
        box-sizing: border-box;
    }
}
