/* ============================================================
   医院新媒体宣传任务管理平台 - 全局样式（高端商务版）
   医疗蓝 + 商务渐变 现代管理后台设计
   ============================================================ */

/* === 色彩变量 === */
:root {
    /* 品牌色 - 医疗蓝 */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-grad: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);

    /* 强调色 */
    --accent: #06b6d4;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #6366f1;
    --info-light: #e0e7ff;

    /* 中性色 */
    --bg: #f5f7fb;
    --bg-card: #ffffff;
    --bg-hover: #f8fafc;
    --bg-stripe: #fafbfc;

    --border: #e5e7eb;
    --border-light: #f1f5f9;

    --text: #1f2937;
    --text-2: #4b5563;
    --text-3: #9ca3af;

    --sidebar-bg: #1e293b;
    --sidebar-bg-hover: #334155;
    --sidebar-text: #cbd5e1;
    --sidebar-text-active: #ffffff;
    --sidebar-active-bg: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);

    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-card: 0 2px 8px rgba(37,99,235,0.06);

    --transition: 0.2s ease;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; vertical-align: middle; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* === Top Bar === */
.topbar {
    height: 60px;
    background: linear-gradient(90deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
    backdrop-filter: blur(10px);
}
.topbar-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 28px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.3px;
}
.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-grad);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 16px;
    font-weight: 700;
    -webkit-text-fill-color: white;
    box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-2);
}
.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--primary-50);
    border-radius: 20px;
    color: var(--primary);
    font-weight: 500;
}
.user-badge::before {
    content: '';
    display: inline-block;
    width: 24px; height: 24px;
    background: var(--primary-grad);
    border-radius: 50%;
    background-image: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
}
.user-badge .unread-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    margin-left: 4px;
}

/* === Layout === */
.main-wrap {
    padding-top: 60px;
    min-height: 100vh;
    display: flex;
}
.sidebar {
    width: 220px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 60px; left: 0; bottom: 0;
    overflow-y: auto;
    padding: 16px 0;
    z-index: 90;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.nav-group { padding: 10px 0; }
.nav-group-title {
    padding: 6px 20px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.nav-item {
    display: block;
    padding: 10px 20px;
    color: var(--sidebar-text);
    font-size: 14px;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    line-height: 1.4;
}
.nav-item:hover {
    background: var(--sidebar-bg-hover);
    color: var(--sidebar-text-active);
    text-decoration: none;
}
.nav-item.active {
    background: var(--sidebar-bg-hover);
    color: var(--sidebar-text-active);
    border-left-color: var(--accent);
    background-image: linear-gradient(90deg, rgba(37,99,235,0.15) 0%, transparent 100%);
    font-weight: 600;
}

.content {
    margin-left: 220px;
    flex: 1;
    padding: 24px 28px;
    min-width: 0;
}

.page-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.3px;
}
.page-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--primary-grad);
    border-radius: 2px;
    margin-right: 10px;
    vertical-align: -2px;
}
.page-subtitle {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 2px;
}

/* === 统计卡片 === */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    border: 1px solid var(--border-light);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary-grad);
}
.stat-card.warning::before { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); }
.stat-card.danger::before { background: linear-gradient(135deg, #ef4444 0%, #f87171 100%); }
.stat-card.success::before { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); }
.stat-card.info::before { background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%); }

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}
.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin: 6px 0 4px;
    line-height: 1.2;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-card.warning .stat-value { background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card.danger .stat-value { background: linear-gradient(135deg, #ef4444 0%, #f87171 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card.success .stat-value { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card.info .stat-value { background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.stat-card .stat-extra {
    font-size: 12px;
    color: var(--text-3);
}
.stat-icon {
    position: absolute;
    right: 18px;
    bottom: 14px;
    width: 40px;
    height: 40px;
    background: var(--primary-50);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    opacity: 0.85;
}

/* === Card 卡片 === */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border-light);
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-stripe);
}
.card-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--primary);
    border-radius: 2px;
}
.card-body { padding: 20px; }
.card-body-no-pad { padding: 0; }
.card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-stripe);
    font-size: 13px;
    color: var(--text-3);
}

/* === Filter Bar === */
.filter-bar {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--border-light);
}

/* === Form === */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 6px;
    font-weight: 500;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-hint {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    margin-top: 4px;
    line-height: 1.4;
}
.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: #fff;
    transition: all var(--transition);
    outline: none;
    color: var(--text);
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
}
textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.form-actions {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 10px;
}
input[type="file"] {
    padding: 7px 10px;
    font-size: 12px;
}

/* === Image Upload Preview === */
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.upload-preview-item {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    background: var(--bg-stripe);
}
.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.upload-preview-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.upload-add-btn {
    width: 100px;
    height: 100px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 12px;
    gap: 4px;
    background: var(--bg-stripe);
}
.upload-add-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}
.upload-add-btn .plus { font-size: 24px; font-weight: 300; line-height: 1; }

/* === Detail Info Table === */
.info-table { width: 100%; font-size: 13px; }
.info-table td { padding: 8px 12px; vertical-align: top; line-height: 1.6; }
.info-table td:first-child { width: 90px; color: var(--text-3); font-weight: 500; white-space: nowrap; }
.info-table tr:not(:last-child) td { border-bottom: 1px solid var(--border-light); }

/* === Task Content Display === */
.task-content-display {
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text);
}
.task-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.task-tag {
    display: inline-block;
    background: var(--primary-50);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}
.task-compliance {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fffbe6;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border-left: 3px solid var(--warning);
    line-height: 1.6;
}
.task-compliance strong { color: #b45309; }

/* === Task Detail Images === */
.task-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.task-images img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition);
}
.task-images img:hover { transform: scale(1.05); box-shadow: var(--shadow); }

/* === Receipt List === */
.receipt-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.receipt-item:last-child { border-bottom: none; }
.receipt-name { font-size: 13px; font-weight: 600; color: var(--text); }
.receipt-dept { font-size: 12px; color: var(--text-3); }
.receipt-meta { margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.receipt-time { font-size: 11px; color: var(--text-3); }

/* === Button === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text);
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    font-weight: 500;
    white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.btn-default {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-2);
}
.btn-default:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.btn-primary {
    background: var(--primary-grad);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(37,99,235,0.20);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #0891b2 100%);
    color: white;
    box-shadow: 0 6px 18px rgba(37,99,235,0.30);
    transform: translateY(-1px);
}
.btn-danger {
    background: var(--danger);
    color: white;
    border-color: transparent;
}
.btn-danger:hover {
    background: #dc2626;
    color: white;
    box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}
.btn-success {
    background: var(--success);
    color: white;
    border-color: transparent;
}
.btn-success:hover { background: #059669; color: white; }
.btn-warning {
    background: var(--warning);
    color: white;
    border-color: transparent;
}
.btn-copy-task {
    color: #6d28d9;
    border-color: #c4b5fd;
    background: linear-gradient(135deg,#f5f3ff,#ede9fe);
    box-shadow: 0 3px 9px rgba(109,40,217,.1);
}
.btn-copy-task:hover { color:#fff;background:linear-gradient(135deg,#7c3aed,#6d28d9);border-color:transparent;transform:translateY(-1px); }
.btn-publish-task {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg,#10b981,#059669);
    box-shadow: 0 4px 11px rgba(5,150,105,.22);
}
.btn-publish-task:hover { color:#fff;background:linear-gradient(135deg,#059669,#047857);transform:translateY(-1px);box-shadow:0 6px 15px rgba(5,150,105,.3); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 11px 24px; font-size: 14px; }
.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    padding: 0;
}
.btn-link:hover { color: var(--primary-dark); }
.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}
.btn-outline-danger:hover { background: var(--danger); color: #fff; }

/* === Table === */
.table-wrap,
.card .table-wrap,
.content .table-wrap {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid var(--border-light);
}
.table-wrap table,
.table,
.card table,
.content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.table th,
.table-wrap table thead th,
.card table thead th,
.content table thead th {
    text-align: left;
    padding: 14px 18px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
.table td,
.table-wrap table tbody td,
.card table tbody td,
.content table tbody td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
    vertical-align: middle;
}
.table tbody tr,
.table-wrap table tbody tr,
.card table tbody tr,
.content table tbody tr { transition: background var(--transition); }
.table tbody tr:hover,
.table-wrap table tbody tr:hover,
.card table tbody tr:hover,
.content table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td,
.table-wrap table tbody tr:last-child td,
.card table tbody tr:last-child td,
.content table tbody tr:last-child td { border-bottom: none; }

/* 紧凑表格 */
.table-compact th,
.table-compact td,
.table-wrap table.table-compact th,
.table-wrap table.table-compact td { padding: 11px 14px; font-size: 12px; }

.table-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
}
.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* 表格内图片缩略图 */
.table-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    background: var(--bg-stripe);
}
.table-thumb:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow);
}
.table-thumb-placeholder {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background: var(--bg-stripe);
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-size: 11px;
}

/* 表格内标题链接 */
.table-title-link {
    color: var(--text);
    font-weight: 500;
    transition: color var(--transition);
}
.table-title-link:hover { color: var(--primary); }

/* 表格响应式滚动 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive .table,
.table-responsive .table-wrap table { min-width: 720px; }

/* === Badge / Status === */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}
.badge-blue { background: var(--primary-100); color: var(--primary-dark); }
.badge-green { background: var(--success-light); color: #047857; }
.badge-orange { background: var(--warning-light); color: #b45309; }
.badge-red { background: var(--danger-light); color: #b91c1c; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-purple { background: var(--info-light); color: #4338ca; }
.badge-cyan { background: #cffafe; color: #0e7490; }

/* === Pagination === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-2);
    transition: all var(--transition);
    text-decoration: none;
}
.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
}
.pagination .current {
    background: var(--primary-grad);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(37,99,235,0.25);
}
.pagination .disabled { opacity: 0.5; cursor: not-allowed; }
.pagination .info { background: none; border: none; color: var(--text-3); font-size: 12px; }

/* === Alert === */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.5;
}
.alert-success { background: var(--success-light); color: #065f46; border-left: 3px solid var(--success); }
.alert-danger  { background: var(--danger-light);  color: #991b1b; border-left: 3px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: #92400e; border-left: 3px solid var(--warning); }
.alert-info    { background: var(--primary-50);    color: #1e40af; border-left: 3px solid var(--primary); }

/* === Empty === */
.empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-3);
    font-size: 13px;
}
.empty-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-50);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--primary);
    margin-bottom: 14px;
    opacity: 0.5;
}

/* === Auth / Login === */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(37,99,235,0.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(6,182,212,0.10) 0%, transparent 50%),
        linear-gradient(135deg, #f5f7fb 0%, #e0e7ff 100%);
    padding: 20px;
}
.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.10);
}
.auth-card h1 {
    font-size: 22px;
    margin-bottom: 6px;
    color: var(--text);
    text-align: center;
}
.auth-card .subtitle {
    color: var(--text-3);
    font-size: 13px;
    text-align: center;
    margin-bottom: 24px;
}
.auth-card .form-group { margin-bottom: 14px; }
.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* === Layout pages === */
.row-flex { display: flex; gap: 20px; flex-wrap: wrap; }
.col-2 { flex: 2; min-width: 300px; }
.col-1 { flex: 1; min-width: 280px; }

/* === Mobile === */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .content { margin-left: 0; padding: 16px; }
    .topbar { padding: 0; }
    .topbar-inner { padding: 0 14px; }
    .page-title { font-size: 18px; }
    .stat-card .stat-value { font-size: 22px; }
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px; height: 36px;
        background: var(--primary-50);
        border-radius: var(--radius-sm);
        color: var(--primary);
        margin-right: 10px;
        cursor: pointer;
        border: none;
    }
}

/* === 调整原有 .badge/.btn/.stat 等类名兼容 === */
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.cell { background: var(--bg-card); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.cell-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; }
.cell-value { font-size: 18px; font-weight: 700; color: var(--text); margin-top: 4px; }

/* === Utilities === */
.text-muted { color: var(--text-3); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.ml-auto { margin-left: auto; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.w-full { width: 100%; }

/* === Filter Label === */
.filter-label {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
    white-space: nowrap;
}

/* === Actions === */
.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* === Detail Grid === */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}
@media (max-width: 768px) {
    .detail-grid { grid-template-columns: 1fr; }
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-3);
}
.empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ============================================================
   2026-07 后台视觉与任务图片体验优化
   ============================================================ */
.content {
    width: calc(100% - 220px);
    max-width: none;
    padding: 28px 32px 48px;
}
.page-header {
    min-height: 52px;
    margin-bottom: 20px;
}
.page-header h1 {
    font-size: 24px;
    letter-spacing: -0.4px;
    color: #172033;
}
.card {
    border: 1px solid #e8edf5;
    box-shadow: 0 8px 28px rgba(31, 50, 81, 0.055);
    overflow: hidden;
}
.card-title {
    min-height: 58px;
    padding: 18px 22px;
    font-size: 16px;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    border-bottom: 1px solid #edf1f7;
}
.card > form {
    padding: 24px;
}
.form-row {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 600;
}
.form-control,
input[type="text"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    min-height: 44px;
    border-color: #dce3ed;
    border-radius: 9px;
    background: #fff;
}
textarea.form-control { min-height: 108px; resize: vertical; }
.form-control:hover,
input:hover,
select:hover,
textarea:hover { border-color: #a9b9d0; }
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}
.form-hint {
    display: block;
    margin-top: 7px;
    color: #94a3b8;
}
.btn {
    min-height: 40px;
    padding: 9px 17px;
    border-radius: 8px;
    font-weight: 600;
}
.btn-primary {
    border: 0;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}
.filter-bar {
    padding: 18px 22px;
    background: #fbfcfe;
    border-bottom: 1px solid #edf1f7;
}
.table-wrap { border-radius: 0 0 12px 12px; }
.table-wrap table thead th,
.card table thead th,
.content table thead th {
    height: 52px;
    background: #f7f9fc;
    color: #475569;
    font-size: 12px;
    letter-spacing: 0.2px;
}
.table-wrap table tbody td,
.card table tbody td,
.content table tbody td {
    padding-top: 15px;
    padding-bottom: 15px;
}
.table-thumb,
.table-thumb-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 10px;
}
.table-thumb { object-fit: cover; border: 1px solid #e4eaf2; }
.table-video-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 14px;
    background:
        radial-gradient(circle at 78% 20%, rgba(34,211,238,.42), transparent 35%),
        linear-gradient(145deg, #0f172a 4%, #1d4ed8 58%, #0891b2 100%);
    box-shadow: 0 9px 20px rgba(30,64,175,.24), inset 0 1px 0 rgba(255,255,255,.18);
    transition: transform .2s ease, box-shadow .2s ease;
}
.table-video-thumb:hover {
    transform: translateY(-2px) scale(1.035);
    box-shadow: 0 13px 25px rgba(30,64,175,.32), inset 0 1px 0 rgba(255,255,255,.2);
}
.video-thumb-glow {
    position: absolute;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    animation: videoThumbPulse 2.4s ease-in-out infinite;
}
.video-thumb-play {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: rgba(255,255,255,.96);
    box-shadow: 0 5px 13px rgba(15,23,42,.28);
}
.video-thumb-play svg { width: 17px; height: 17px; margin-left: 2px; fill: #2563eb; }
.video-thumb-label {
    position: absolute;
    z-index: 2;
    right: 5px;
    bottom: 4px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(15,23,42,.64);
    color: rgba(255,255,255,.9);
    font-size: 7px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .7px;
}
@keyframes videoThumbPulse {
    0%,100% { transform: scale(.82); opacity: .25; }
    50% { transform: scale(1.08); opacity: .72; }
}
.alert-error {
    background: var(--danger-light);
    color: #991b1b;
    border-left: 3px solid var(--danger);
}

/* 图片上传与封面选择 */
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
    min-height: 142px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}
.upload-preview-item,
.upload-add-btn {
    position: relative;
    width: 118px;
    height: 118px;
    border-radius: 11px;
    overflow: hidden;
    background: #fff;
}
.upload-preview-item {
    border: 2px solid transparent;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
}
.upload-preview-item.is-cover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.upload-preview-item .cover-btn {
    position: absolute;
    left: 7px;
    bottom: 7px;
    z-index: 2;
    padding: 4px 8px;
    border: 0;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 11px;
    backdrop-filter: blur(5px);
}
.upload-preview-item.is-cover .cover-btn {
    background: var(--primary);
}
.upload-preview-item .remove-btn {
    top: 6px;
    right: 6px;
    width: 25px;
    height: 25px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255,255,255,.65);
}
.upload-add-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px dashed #aebdd0;
    color: #64748b;
    cursor: pointer;
    transition: all .2s ease;
}
.upload-add-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}
.upload-add-btn .plus { font-size: 28px; line-height: 1; }

/* 任务详情图片墙 */
.task-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}
.task-images img {
    width: 100%;
    height: 118px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e5eaf1;
}
.task-images .task-image-cell:first-child img {
    outline: 3px solid rgba(37, 99, 235, 0.14);
}
.detail-section-label {
    margin-top: 20px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}
.task-image-cell { position: relative; }
.task-cover-mark {
    position: absolute;
    left: 7px;
    bottom: 7px;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    box-shadow: 0 3px 8px rgba(37,99,235,.28);
}
.detail-image-empty {
    margin-top: 16px;
    padding: 28px;
    border: 1px dashed #d5dde9;
    border-radius: 10px;
    background: #fafbfd;
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 1100px) {
    .content { padding: 22px 20px 40px; }
}
@media (max-width: 768px) {
    .content { width: 100%; padding: 16px 12px 32px; }
    .card > form { padding: 16px; }
    .page-header h1 { font-size: 20px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .upload-preview-item,
    .upload-add-btn { width: 96px; height: 96px; }
}
