/* ==========================================================================
   CHFP理财规划师订单管理系统 - 全局样式表
   支持响应式布局，兼容桌面端和移动端
   ========================================================================== */

:root {
    /* 品牌色 */
    --chfp-primary: #1a56db;
    --chfp-primary-light: #3b82f6;
    --chfp-primary-dark: #1e40af;
    --chfp-secondary: #64748b;
    --chfp-success: #16a34a;
    --chfp-danger: #dc2626;
    --chfp-warning: #f59e0b;
    --chfp-info: #0891b2;

    /* 中性色 */
    --chfp-bg: #f8fafc;
    --chfp-bg-card: #ffffff;
    --chfp-bg-hover: #f1f5f9;
    --chfp-border: #e2e8f0;
    --chfp-text: #1e293b;
    --chfp-text-muted: #64748b;
    --chfp-text-light: #94a3b8;

    /* 间距 */
    --chfp-radius: 8px;
    --chfp-radius-sm: 4px;
    --chfp-radius-lg: 12px;
    --chfp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --chfp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --chfp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

    /* 过渡 */
    --chfp-transition: all 0.2s ease;
}

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--chfp-bg);
    color: var(--chfp-text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ==================== 登录页 ==================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a56db 0%, #2563eb 50%, #3b82f6 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: login-bg-anim 20s linear infinite;
}

@keyframes login-bg-anim {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--chfp-radius-lg);
    box-shadow: var(--chfp-shadow-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--chfp-primary), var(--chfp-primary-light));
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 16px rgba(26, 86, 219, 0.3);
}

.login-logo .logo-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--chfp-text);
    margin-bottom: 4px;
}

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

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

.login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--chfp-text);
    margin-bottom: 8px;
}

.login-form .input-group {
    position: relative;
}

.login-form .input-group-text {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--chfp-text-light);
    pointer-events: none;
    z-index: 2;
}

.login-form .form-control {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 44px;
    border: 2px solid var(--chfp-border);
    border-radius: var(--chfp-radius);
    font-size: 14px;
    transition: var(--chfp-transition);
    background: #f8fafc;
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--chfp-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.login-form .btn-login {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, var(--chfp-primary), var(--chfp-primary-light));
    color: white;
    border: none;
    border-radius: var(--chfp-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--chfp-transition);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}

.login-form .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26, 86, 219, 0.4);
}

.login-form .btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--chfp-text-light);
}

.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: var(--chfp-radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.login-error.show {
    display: block;
}

/* ==================== 管理后台布局 ==================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #cbd5e1;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: var(--chfp-transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--chfp-primary), var(--chfp-primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand .brand-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.sidebar-brand .brand-text {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.sidebar-brand .brand-text small {
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.sidebar-nav .nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    color: #475569;
    padding: 12px 24px 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: #94a3b8;
    font-size: 14px;
    transition: var(--chfp-transition);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #e2e8f0;
}

.sidebar-nav .nav-item.active {
    background: rgba(26, 86, 219, 0.15);
    color: #60a5fa;
    border-left-color: var(--chfp-primary-light);
}

.sidebar-nav .nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.sidebar-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chfp-primary), var(--chfp-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user .user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user .user-name {
    font-size: 13px;
    color: #e2e8f0;
    font-weight: 500;
}

.sidebar-user .user-role {
    font-size: 11px;
    color: #64748b;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 240px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.topbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--chfp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--chfp-shadow-sm);
}

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

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--chfp-text);
}

.topbar h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--chfp-text);
    margin: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--chfp-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--chfp-text-muted);
    transition: var(--chfp-transition);
    position: relative;
}

.topbar-right .btn-icon:hover {
    background: var(--chfp-bg-hover);
    color: var(--chfp-text);
}

.topbar-right .btn-icon .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--chfp-danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

/* 内容容器 */
.content-area {
    flex: 1;
    padding: 24px;
}

/* ==================== 卡片组件 ==================== */
.card {
    background: var(--chfp-bg-card);
    border-radius: var(--chfp-radius);
    box-shadow: var(--chfp-shadow-sm);
    border: 1px solid var(--chfp-border);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--chfp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.card-header h3,
.card-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* ==================== 统计卡片 ==================== */
.stat-card {
    background: #fff;
    border-radius: var(--chfp-radius);
    padding: 20px;
    border: 1px solid var(--chfp-border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--chfp-transition);
}

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

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card .stat-icon svg {
    width: 26px;
    height: 26px;
}

.stat-card .stat-icon.bg-blue { background: #dbeafe; }
.stat-card .stat-icon.bg-blue svg { fill: #2563eb; }
.stat-card .stat-icon.bg-green { background: #dcfce7; }
.stat-card .stat-icon.bg-green svg { fill: #16a34a; }
.stat-card .stat-icon.bg-orange { background: #fef3c7; }
.stat-card .stat-icon.bg-orange svg { fill: #d97706; }
.stat-card .stat-icon.bg-purple { background: #f3e8ff; }
.stat-card .stat-icon.bg-purple svg { fill: #9333ea; }

.stat-card .stat-info {
    flex: 1;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--chfp-text-muted);
    margin-bottom: 4px;
}

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

.stat-card .stat-trend {
    font-size: 12px;
    margin-top: 4px;
}

.stat-card .stat-trend.up { color: var(--chfp-success); }
.stat-card .stat-trend.down { color: var(--chfp-danger); }

/* ==================== 表格 ==================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--chfp-radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: var(--chfp-bg);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--chfp-text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 2px solid var(--chfp-border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--chfp-border);
    color: var(--chfp-text);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: var(--chfp-transition);
    cursor: pointer;
}

.data-table tbody tr:hover {
    background: var(--chfp-bg-hover);
}

.data-table .text-primary { color: var(--chfp-primary); font-weight: 600; }
.data-table .text-success { color: var(--chfp-success); font-weight: 600; }
.data-table .text-danger { color: var(--chfp-danger); font-weight: 600; }
.data-table .text-muted { color: var(--chfp-text-muted); }

/* 状态标签 */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.active { background: #dcfce7; color: #15803d; }
.status-badge.active::before { background: #16a34a; }
.status-badge.pending { background: #fef3c7; color: #b45309; }
.status-badge.pending::before { background: #f59e0b; }
.status-badge.cancelled { background: #fee2e2; color: #b91c1c; }
.status-badge.cancelled::before { background: #dc2626; }
.status-badge.refunded { background: #e0e7ff; color: #4338ca; }
.status-badge.refunded::before { background: #6366f1; }

/* ==================== 搜索栏 ==================== */
.search-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-bar .search-input-group {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.search-bar .search-input-group svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--chfp-text-light);
}

.search-bar .search-input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 40px;
    border: 1px solid var(--chfp-border);
    border-radius: var(--chfp-radius);
    font-size: 14px;
    transition: var(--chfp-transition);
    background: #fff;
}

.search-bar .search-input:focus {
    outline: none;
    border-color: var(--chfp-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.search-bar .filter-select {
    height: 40px;
    padding: 0 32px 0 12px;
    border: 1px solid var(--chfp-border);
    border-radius: var(--chfp-radius);
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 140px;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: var(--chfp-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--chfp-transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn svg { width: 16px; height: 16px; }

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

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

.btn-secondary {
    background: var(--chfp-bg);
    color: var(--chfp-text);
    border: 1px solid var(--chfp-border);
}

.btn-secondary:hover {
    background: var(--chfp-bg-hover);
}

.btn-success { background: var(--chfp-success); color: white; }
.btn-danger { background: var(--chfp-danger); color: white; }
.btn-warning { background: var(--chfp-warning); color: white; }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 15px; }

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

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

/* ==================== 分页 ==================== */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 12px;
}

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

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-controls button {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--chfp-border);
    background: #fff;
    border-radius: var(--chfp-radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--chfp-text);
    transition: var(--chfp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.pagination-controls button:hover:not(:disabled) {
    border-color: var(--chfp-primary);
    color: var(--chfp-primary);
}

.pagination-controls button.active {
    background: var(--chfp-primary);
    color: white;
    border-color: var(--chfp-primary);
}

.pagination-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==================== 表单 ==================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--chfp-text);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--chfp-danger);
    margin-left: 2px;
}

.form-control,
.form-select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--chfp-border);
    border-radius: var(--chfp-radius);
    font-size: 14px;
    transition: var(--chfp-transition);
    background: #fff;
    color: var(--chfp-text);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--chfp-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-control[readonly] {
    background: var(--chfp-bg);
    color: var(--chfp-text-muted);
}

textarea.form-control {
    height: auto;
    min-height: 80px;
    padding: 10px 14px;
    resize: vertical;
}

.form-text {
    font-size: 12px;
    color: var(--chfp-text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--chfp-danger);
    margin-top: 4px;
    display: none;
}

.form-error.show { display: block; }

/* ==================== 详情页 ==================== */
.detail-section {
    margin-bottom: 24px;
}

.detail-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--chfp-text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--chfp-primary);
    display: inline-block;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.detail-item {
    padding: 12px 16px;
    background: var(--chfp-bg);
    border-radius: var(--chfp-radius-sm);
    border: 1px solid var(--chfp-border);
}

.detail-item .detail-label {
    font-size: 12px;
    color: var(--chfp-text-muted);
    margin-bottom: 4px;
}

.detail-item .detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--chfp-text);
    word-break: break-all;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
}

.modal-overlay.show {
    display: flex;
}

.modal-dialog {
    background: #fff;
    border-radius: var(--chfp-radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--chfp-shadow-lg);
    animation: modal-in 0.2s ease;
}

@keyframes modal-in {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--chfp-text-muted);
    transition: var(--chfp-transition);
}

.modal-close:hover { color: var(--chfp-text); }

.modal-body {
    padding: 0 24px 20px;
}

.modal-footer {
    padding: 16px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==================== 加载动画 ==================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--chfp-border);
    border-top-color: var(--chfp-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(2px);
}

.loading-overlay.show { display: flex; }

.loading-overlay .loading-content {
    text-align: center;
}

.loading-overlay .loading-spinner {
    width: 48px;
    height: 48px;
    border-width: 3px;
}

.loading-overlay p {
    margin-top: 16px;
    color: var(--chfp-text-muted);
    font-size: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--chfp-text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    fill: var(--chfp-border);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--chfp-text);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* ==================== Toast通知 ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #fff;
    border-radius: var(--chfp-radius);
    box-shadow: var(--chfp-shadow-lg);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 480px;
    animation: toast-in 0.3s ease;
    border-left: 4px solid var(--chfp-primary);
}

@keyframes toast-in {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left-color: var(--chfp-success); }
.toast.error { border-left-color: var(--chfp-danger); }
.toast.warning { border-left-color: var(--chfp-warning); }

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast.success .toast-icon { fill: var(--chfp-success); }
.toast.error .toast-icon { fill: var(--chfp-danger); }
.toast.warning .toast-icon { fill: var(--chfp-warning); }
.toast.info .toast-icon { fill: var(--chfp-primary); }

.toast-content {
    flex: 1;
    font-size: 14px;
    color: var(--chfp-text);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .topbar-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .content-area {
        padding: 16px;
    }

    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar .search-input-group {
        min-width: 100%;
    }

    .search-bar .filter-select,
    .search-bar .btn {
        width: 100%;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }

    .card-body {
        padding: 16px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

    .toast {
        min-width: 280px;
        max-width: calc(100vw - 40px);
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }

    .pagination-wrapper {
        justify-content: center;
    }
}

/* ==================== 工具类 ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--chfp-text-muted); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
