/* ========== 全局重置与基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-light: #dbeafe;
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    --color-warning: #f59e0b;
    --color-warning-light: #fef3c7;
    --color-danger: #ef4444;
    --color-danger-light: #fee2e2;
    --color-info: #3b82f6;
    --color-info-light: #dbeafe;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-text-lighter: #94a3b8;
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 14px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary-dark);
}

/* ========== 导航栏 ========== */
.navbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    color: var(--color-text-light);
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}

.nav-links a.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* ========== 容器 ========== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 32px;
    line-height: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-light);
    margin-top: 2px;
}

.stat-total .stat-value { color: var(--color-primary); }
.stat-updated .stat-value { color: var(--color-warning); }
.stat-ok .stat-value { color: var(--color-success); }
.stat-alert .stat-value { color: var(--color-danger); }

/* ========== 操作栏 ========== */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.action-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-left h2 {
    font-size: 18px;
    font-weight: 600;
}

.next-run-badge {
    background: var(--color-info-light);
    color: var(--color-info);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-family);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}

.btn-delete {
    color: var(--color-danger);
    border-color: var(--color-border);
    margin-left: auto;
}

.btn-delete:hover {
    color: white;
    background: var(--color-danger);
    border-color: var(--color-danger);
}

.btn-icon {
    font-size: 16px;
}

/* ========== 协议卡片网格 ========== */
.agreement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.agreement-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.agreement-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-updated {
    border-color: var(--color-warning);
    border-width: 1px;
}

.card-error {
    border-color: var(--color-danger);
    border-width: 1px;
}

.card-pending {
    opacity: 0.85;
}

.card-header {
    padding: 12px 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-platform {
    font-size: 12px;
    color: var(--color-text-lighter);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 8px 16px 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-title a {
    color: var(--color-text);
}

.card-title a:hover {
    color: var(--color-primary);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-light);
}

.meta-item {
    display: inline-flex;
    align-items: center;
}

.meta-highlight {
    color: var(--color-warning);
    font-weight: 500;
}

.card-footer {
    padding: 0 16px 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========== 状态徽章 ========== */
.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-updated {
    background: var(--color-warning-light);
    color: #92400e;
}

.badge-ok {
    background: var(--color-success-light);
    color: #065f46;
}

.badge-error {
    background: var(--color-danger-light);
    color: #991b1b;
}

.badge-pending {
    background: var(--color-border-light);
    color: var(--color-text-light);
}

/* ========== 区块 ========== */
.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border-light);
}

/* ========== 变更记录列表 ========== */
.change-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.change-item {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    border-left: 3px solid var(--color-border);
}

.change-commercial {
    border-left-color: var(--color-danger);
    background: #fff5f5;
}

.change-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.change-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.change-platform {
    font-size: 12px;
    color: var(--color-text-lighter);
    font-weight: 600;
}

.change-name {
    font-weight: 600;
    color: var(--color-text);
}

.change-name:hover {
    color: var(--color-primary);
}

.change-time {
    font-size: 12px;
    color: var(--color-text-lighter);
}

.change-time-inline {
    font-size: 12px;
    color: var(--color-text-lighter);
    margin-left: 8px;
}

.change-summary {
    font-size: 13px;
    color: var(--color-text-light);
}

/* ========== 商用条款提醒 ========== */
.commercial-alert {
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--color-danger-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: #991b1b;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.alert-icon {
    font-size: 14px;
}

.keyword-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.kw-tag {
    display: inline-block;
    padding: 2px 8px;
    background: white;
    border: 1px solid var(--color-danger);
    border-radius: 12px;
    font-size: 12px;
    color: var(--color-danger);
}

.kw-highlight {
    background: var(--color-danger);
    color: white;
}

/* ========== 数据表格 ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th,
.data-table td {
    padding: 10px 16px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--color-border-light);
}

.data-table th {
    background: var(--color-border-light);
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.data-table tbody tr:hover {
    background: var(--color-border-light);
}

.hash-cell {
    font-family: "Courier New", monospace;
    font-size: 12px;
    color: var(--color-text-lighter);
}

/* ========== 面包屑 ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.breadcrumb .sep {
    color: var(--color-text-lighter);
}

/* ========== 详情页头部 ========== */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    background: var(--color-surface);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border-light);
}

.detail-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--color-text-light);
}

.detail-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ========== 提示框 ========== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.alert-success {
    background: var(--color-success-light);
    color: #065f46;
}

.alert-warning {
    background: var(--color-warning-light);
    color: #92400e;
}

.alert-error {
    background: var(--color-danger-light);
    color: #991b1b;
}

.alert-info {
    background: var(--color-info-light);
    color: #1e40af;
}

/* ========== 商用条款横幅 ========== */
.commercial-banner {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fee2e2, #fef2f2);
    border: 2px solid var(--color-danger);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.banner-icon {
    font-size: 40px;
    line-height: 1;
}

.banner-content h3 {
    color: var(--color-danger);
    font-size: 18px;
    margin-bottom: 8px;
}

.banner-content p {
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 12px;
}

/* ========== 商用条款详情 ========== */
.commercial-details {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border-light);
    margin-bottom: 24px;
}

.commercial-details h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--color-danger);
}

.detail-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-kw {
    flex-shrink: 0;
    padding: 2px 10px;
    background: var(--color-danger);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    height: fit-content;
}

.detail-context {
    font-size: 13px;
    color: var(--color-text);
    line-height: 1.6;
}

/* ========== 差异对比 ========== */
.diff-section {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border-light);
}

.diff-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.diff-container {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.diff-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: "Courier New", monospace;
}

.diff-container td {
    padding: 4px 8px;
    border: none;
    vertical-align: top;
    white-space: pre-wrap;
    word-break: break-all;
}

.diff_container .diff_add {
    background: #d1fae5;
    color: #065f46;
}

.diff_container .diff_sub {
    background: #fee2e2;
    color: #991b1b;
}

.diff-container table.diff td.diff_header {
    background: var(--color-border-light);
    color: var(--color-text-lighter);
    font-weight: 600;
    width: 40px;
    text-align: right;
    padding-right: 8px;
    user-select: none;
}

.diff-container table.diff td.diff_next {
    background: var(--color-bg);
    width: 20px;
}

.diff-container .diff_add {
    background: #d1fae5;
    color: #065f46;
}

.diff-container .diff_sub {
    background: #fee2e2;
    color: #991b1b;
}

.diff-container .diff_chg {
    background: #fef3c7;
    color: #92400e;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-text-lighter);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-state p {
    margin-bottom: 4px;
}

.empty-hint {
    font-size: 13px;
    color: var(--color-text-lighter);
}

/* ========== 时间线 ========== */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-dot {
    position: absolute;
    left: -22px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--color-surface);
}

.dot-normal {
    background: var(--color-primary);
}

.dot-commercial {
    background: var(--color-danger);
}

.timeline-content {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
}

.timeline-commercial .timeline-content {
    border-left: 3px solid var(--color-danger);
}

.timeline-date {
    font-size: 12px;
    color: var(--color-text-lighter);
    margin-bottom: 4px;
}

.timeline-title {
    font-weight: 500;
    color: var(--color-text);
}

.timeline-title:hover {
    color: var(--color-primary);
}

/* ========== 设置页 ========== */
h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.settings-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border-light);
    margin-bottom: 24px;
    overflow: hidden;
}

.settings-title {
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    background: var(--color-border-light);
    border-bottom: 1px solid var(--color-border);
}

.settings-body {
    padding: 24px;
}

.settings-desc {
    color: var(--color-text-light);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-control-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.form-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-family);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-hint {
    font-size: 13px;
    color: var(--color-text-light);
}

.form-help {
    margin-top: 8px;
    font-size: 13px;
    color: var(--color-text-light);
}

.form-help code {
    background: var(--color-border-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: "Courier New", monospace;
}

.help-steps {
    padding-left: 20px;
    margin-top: 8px;
    line-height: 1.8;
    font-size: 13px;
    color: var(--color-text-light);
}

/* ========== 开关 ========== */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-border);
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--color-primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ========== 关键词管理 ========== */
.keyword-add-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.kw-default {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

.kw-custom {
    background: var(--color-success-light);
    border-color: var(--color-success);
}

.kw-badge {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
}

.kw-badge-default {
    background: var(--color-primary);
    color: white;
}

.kw-badge-custom {
    background: var(--color-success);
    color: white;
}

.kw-remove {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-text-lighter);
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin-left: 2px;
}

.kw-remove:hover {
    color: var(--color-danger);
}

/* ========== 信息行 ========== */
.info-row {
    display: flex;
    padding: 6px 0;
    font-size: 14px;
}

.info-label {
    width: 120px;
    color: var(--color-text-light);
    flex-shrink: 0;
}

.info-value {
    color: var(--color-text);
    font-weight: 500;
}

/* ========== 弹窗 ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-light);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.snapshot-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.snapshot-text {
    font-size: 13px;
    line-height: 1.8;
    color: var(--color-text);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ========== 部署指南 ========== */
.deploy-guide h3 {
    font-size: 15px;
    margin: 16px 0 8px;
    color: var(--color-text);
}

.deploy-guide code {
    background: var(--color-border-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: "Courier New", monospace;
}

/* ========== 页脚 ========== */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--color-text-lighter);
    font-size: 13px;
    border-top: 1px solid var(--color-border-light);
    margin-top: 32px;
}

/* ========== Toast 提示 ========== */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    font-size: 14px;
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.toast-success {
    background: var(--color-success);
    color: white;
}

.toast-error {
    background: var(--color-danger);
    color: white;
}

.toast-info {
    background: var(--color-primary);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .agreement-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .agreement-grid {
        grid-template-columns: 1fr;
    }
    .detail-header {
        flex-direction: column;
        gap: 16px;
    }
    .detail-actions {
        flex-wrap: wrap;
    }
    .nav-title {
        display: none;
    }
    .nav-links {
        flex-wrap: wrap;
    }
}

/* ========== 认证页面 ========== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 24px;
}

.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-light);
    max-width: 440px;
    width: 100%;
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    font-weight: 700;
    font-size: 22px;
    border-radius: 14px;
    margin-bottom: 16px;
}

.auth-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-header p {
    color: var(--color-text-light);
    font-size: 14px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    font-size: 14px;
}

.auth-sep {
    color: var(--color-text-lighter);
}

.auth-hint {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-light);
    font-size: 12px;
    color: var(--color-text-lighter);
}

/* ========== 用户菜单下拉 ========== */
.nav-user-menu {
    position: relative;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.nav-user-menu:hover {
    background: var(--color-border-light);
}

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

.nav-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 4px;
    display: none;
    z-index: 200;
}

.nav-user-menu:hover .nav-dropdown {
    display: block;
}

.nav-dropdown a {
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    color: var(--color-text);
    font-size: 14px;
}

.nav-dropdown a:hover {
    background: var(--color-border-light);
    color: var(--color-primary);
}

/* ========== 通知徽章 ========== */
.nav-notif-link {
    position: relative;
}

.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--color-danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    margin-left: 4px;
}

/* ========== 站内消息列表 ========== */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notif-item {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    transition: border-color 0.2s;
}

.notif-unread {
    border-left: 3px solid var(--color-primary);
    background: #eff6ff;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notif-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--color-text);
}

.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.notif-time {
    font-size: 12px;
    color: var(--color-text-lighter);
}

.notif-content {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
}
