/* ============================================
 * 京审协·公文审校平台 样式表
 * 设计语言：仿微信小程序 + 京审协品牌色
 * ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
    font-size: 14px;
    color: #333;
    background: #ededed;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* ============================================
 * 启动屏
 * ============================================ */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c00000 0%, #8b0000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}

.splash-logo {
    width: 100px;
    height: 100px;
    background: white;
    color: #c00000;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    font-weight: bold;
    font-family: "STKaiti", "KaiTi", serif;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    margin-bottom: 24px;
    animation: splashLogoIn 0.8s ease-out;
}

@keyframes splashLogoIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.splash-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.splash-subtitle {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 40px;
}

.splash-loader {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
 * 主应用框架
 * ============================================ */
.app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ededed;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.05);
}

/* 模拟状态栏 */
.status-bar {
    height: 24px;
    background: #c00000;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 12px;
    font-weight: 600;
}

.status-time {
    font-variant-numeric: tabular-nums;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.status-signal, .status-wifi, .status-battery {
    font-family: monospace;
}

/* 顶部导航栏 */
.nav-bar {
    height: 44px;
    background: #c00000;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    position: relative;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.nav-back {
    position: absolute;
    left: 8px;
    font-size: 32px;
    line-height: 44px;
    padding: 0 12px;
    cursor: pointer;
    color: white;
    font-weight: 300;
}

.nav-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-action {
    min-width: 50px;
    text-align: right;
    font-size: 14px;
    cursor: pointer;
}

/* 页面容器 */
.page-container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f5f5f5;
}

.page {
    min-height: 100%;
    padding-bottom: 20px;
}

/* 底部Tab栏 */
.tab-bar {
    height: 56px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.tab-item.active {
    color: #c00000;
}

.tab-icon {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 2px;
}

.tab-label {
    font-size: 11px;
    line-height: 1;
}

.tab-badge {
    position: absolute;
    top: 4px;
    right: 30%;
    background: #ff3b30;
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
    font-weight: 600;
}

/* ============================================
 * 通用组件
 * ============================================ */

/* 卡片 */
.card {
    background: white;
    border-radius: 8px;
    margin: 10px 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.card-footer {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

/* 列表项 */
.list-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: white;
    cursor: pointer;
    transition: background 0.15s;
}

.list-item:hover {
    background: #f8f8f8;
}

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

.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-item-desc {
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-item-extra {
    margin-left: 8px;
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    user-select: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #c00000;
    color: white;
}

.btn-primary:hover {
    background: #a00000;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: #07c160;
    color: white;
}

.btn-warning {
    background: #ff9500;
    color: white;
}

.btn-danger {
    background: #ff3b30;
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 表单 */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-label .required {
    color: #ff3b30;
    margin-right: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: white;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #c00000;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    padding-right: 32px;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
}

.tag-primary { background: #ffeaea; color: #c00000; }
.tag-success { background: #e8f7ed; color: #07c160; }
.tag-warning { background: #fff4e5; color: #ff9500; }
.tag-info    { background: #e5f3ff; color: #1890ff; }
.tag-default { background: #f0f0f0; color: #666; }
.tag-danger  { background: #ffeaea; color: #ff3b30; }

/* ============================================
 * 首页
 * ============================================ */
.home-banner {
    background: linear-gradient(135deg, #c00000 0%, #8b0000 100%);
    color: white;
    padding: 24px 16px 32px;
    margin-bottom: 16px;
}

.home-user-info {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.home-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 12px;
    overflow: hidden;
}

.home-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-user-detail {
    flex: 1;
}

.home-user-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.home-user-role {
    font-size: 13px;
    opacity: 0.85;
}

.home-switch-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
}

.home-banner-title {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 4px;
}

.home-banner-tip {
    font-size: 12px;
    opacity: 0.7;
}

/* 数据看板 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 0 12px;
    margin-top: -16px;
    position: relative;
    z-index: 2;
}

.stat-card {
    background: white;
    padding: 14px 8px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #c00000;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* 快捷入口 */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #f0f0f0;
    padding: 1px;
    margin: 16px 12px;
    border-radius: 8px;
    overflow: hidden;
}

.quick-item {
    background: white;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
}

.quick-item:hover {
    background: #f8f8f8;
}

.quick-icon {
    font-size: 26px;
    margin-bottom: 6px;
}

.quick-label {
    font-size: 12px;
    color: #666;
}

/* 最近动态 */
.recent-list {
    margin: 0 12px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.recent-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}

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

.recent-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffeaea;
    color: #c00000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

.recent-content {
    flex: 1;
    min-width: 0;
}

.recent-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-meta {
    font-size: 12px;
    color: #999;
}

/* 浮动新建按钮 */
.fab {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #c00000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(192,0,0,0.4);
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s;
}

.fab:active {
    transform: scale(0.92);
}

/* ============================================
 * 登录页
 * ============================================ */
.login-page {
    background: linear-gradient(135deg, #c00000 0%, #8b0000 100%);
    min-height: 100vh;
    padding: 60px 24px;
    color: white;
}

.login-logo {
    width: 90px;
    height: 90px;
    background: white;
    color: #c00000;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 54px;
    font-weight: bold;
    font-family: "STKaiti", "KaiTi", serif;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.login-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 48px;
}

.login-user-list {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(10px);
}

.login-user-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.login-user-item:last-child {
    margin-bottom: 0;
}

.login-user-item:hover {
    background: rgba(255,255,255,0.25);
}

.login-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
    overflow: hidden;
}

.login-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-user-info {
    flex: 1;
}

.login-user-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
}

.login-user-role {
    font-size: 12px;
    opacity: 0.85;
}

.login-arrow {
    font-size: 20px;
    opacity: 0.6;
}

.login-tip {
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 24px;
}

/* 正式版登录表单 */
.login-form {
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 20px 16px;
    backdrop-filter: blur(10px);
}

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

.login-form .form-control {
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 8px;
    padding: 13px 14px;
    font-size: 15px;
    color: #333;
    width: 100%;
}

.login-form .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
}

.login-form .btn {
    width: 100%;
    padding: 13px;
    font-size: 16px;
    border-radius: 8px;
    background: #8b0000;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 2px;
}

.login-form .btn:hover {
    background: #700;
}

.login-form .btn:active {
    transform: scale(0.98);
}

.login-form .login-error {
    background: rgba(255,0,0,0.25);
    color: #ffd6d6;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: none;
}

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

.login-quick-hint {
    text-align: center;
    font-size: 12px;
    opacity: 0.75;
    margin-top: 16px;
    line-height: 1.8;
}

.login-quick-hint code {
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.login-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.85;
    margin-top: 10px;
}

.login-remember label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.login-remember input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: white;
}

/* ============================================
 * 任务列表
 * ============================================ */
.filter-bar {
    display: flex;
    background: white;
    padding: 8px 12px;
    gap: 8px;
    overflow-x: auto;
    border-bottom: 1px solid #f0f0f0;
}

.filter-chip {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid transparent;
}

.filter-chip.active {
    background: #c00000;
    color: white;
}

.task-list {
    padding: 0 12px;
}

.task-card {
    background: white;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    cursor: pointer;
}

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

.task-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.task-card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.task-card-attachments {
    display: flex;
    gap: 4px;
    align-items: center;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-text {
    font-size: 14px;
}

/* ============================================
 * 详情页
 * ============================================ */
.detail-section {
    background: white;
    margin: 10px 12px;
    border-radius: 8px;
    overflow: hidden;
}

.detail-header {
    padding: 16px;
    background: linear-gradient(135deg, #c00000 0%, #a00000 100%);
    color: white;
}

.detail-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.detail-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    opacity: 0.9;
}

.detail-section-title {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-section-title::before {
    content: "";
    width: 3px;
    height: 14px;
    background: #c00000;
    border-radius: 2px;
}

.detail-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: flex-start;
}

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

.detail-item-label {
    width: 90px;
    color: #999;
    font-size: 13px;
    flex-shrink: 0;
    padding-top: 1px;
}

.detail-item-value {
    flex: 1;
    color: #333;
    font-size: 14px;
    word-break: break-word;
}

.detail-content {
    padding: 14px 16px;
    color: #333;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    background: #fafafa;
    border-radius: 4px;
    margin: 8px 12px;
    border: 1px solid #f0f0f0;
}

/* 附件预览 */
.attachment-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 16px;
}

.attachment-item {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.attachment-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-item-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: white;
}

.attachment-item-file .file-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.attachment-item-file .file-name {
    font-size: 11px;
    color: #666;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.attachment-item-video {
    position: relative;
}

.attachment-item-video::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding-left: 3px;
}

/* 流程时间线 */
.timeline {
    padding: 12px 16px;
}

.timeline-item {
    display: flex;
    position: relative;
    padding-bottom: 16px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e0e0e0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.timeline-dot.active {
    background: #c00000;
}

.timeline-dot.success {
    background: #07c160;
}

.timeline-dot.warning {
    background: #ff9500;
}

.timeline-dot.danger {
    background: #ff3b30;
}

.timeline-content {
    margin-left: 12px;
    flex: 1;
}

.timeline-action {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.timeline-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.timeline-opinion {
    background: #fafafa;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    margin-top: 6px;
    border-left: 2px solid #c00000;
    line-height: 1.6;
}

.timeline-signature {
    margin-top: 6px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 8px;
    display: inline-block;
}

.timeline-signature img {
    max-width: 180px;
    max-height: 80px;
    display: block;
}

/* 操作按钮区 */
.action-bar {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
    z-index: 10;
}

.action-bar .btn {
    flex: 1;
}

/* 步骤进度条 */
.step-progress {
    display: flex;
    padding: 14px 12px;
    background: white;
    margin-bottom: 10px;
    overflow-x: auto;
}

.step-progress-item {
    flex: 1;
    min-width: 70px;
    text-align: center;
    position: relative;
    padding: 0 4px;
}

.step-progress-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 60%;
    right: -40%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.step-progress-item.completed:not(:last-child)::after {
    background: #07c160;
}

.step-progress-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e0e0e0;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.step-progress-item.active .step-progress-circle {
    background: #c00000;
    box-shadow: 0 0 0 4px rgba(192,0,0,0.15);
}

.step-progress-item.completed .step-progress-circle {
    background: #07c160;
}

.step-progress-label {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
    line-height: 1.3;
}

.step-progress-item.active .step-progress-label,
.step-progress-item.completed .step-progress-label {
    color: #333;
    font-weight: 500;
}

/* ============================================
 * Modal 弹层
 * ============================================ */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

.modal-container {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
}

.modal-footer .btn {
    flex: 1;
}

/* ============================================
 * 签字弹层
 * ============================================ */
.signature-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.signature-container {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.signature-header {
    background: #c00000;
    color: white;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
}

.signature-close {
    font-size: 18px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signature-tip {
    padding: 10px 16px;
    font-size: 12px;
    color: #999;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.signature-canvas {
    width: 100%;
    height: 200px;
    background: #fffbe6;
    cursor: crosshair;
    display: block;
    touch-action: none;
}

.signature-actions {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid #f0f0f0;
}

.signature-actions .btn {
    flex: 1;
}

/* ============================================
 * Toast & Loading
 * ============================================ */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    max-width: 280px;
    text-align: center;
    line-height: 1.5;
}

.toast.show {
    opacity: 1;
}

.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #f0f0f0;
    border-top-color: #c00000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

.loading-text {
    color: #666;
    font-size: 13px;
}

/* ============================================
 * 管理页面 - 角色/用户管理
 * ============================================ */
.management-page .role-card,
.management-page .user-card {
    background: white;
    border-radius: 8px;
    margin: 10px 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.management-page .role-card-header,
.management-page .user-card-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #fff5f5 0%, transparent 100%);
}

.management-page .role-name,
.management-page .user-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.management-page .role-desc {
    padding: 0 16px 8px;
    font-size: 12px;
    color: #999;
}

.management-page .permission-list {
    padding: 8px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.management-page .user-info-row {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #666;
    padding: 0 16px 12px;
    align-items: center;
}

.management-page .user-actions,
.management-page .role-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px;
}

.management-page .user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #c00000;
    overflow: hidden;
}

.management-page .user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 权限编辑 */
.permission-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.permission-item {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}

.permission-item.checked {
    background: #ffeaea;
    border-color: #c00000;
    color: #c00000;
}

.permission-checkbox {
    width: 18px;
    height: 18px;
    border: 1.5px solid #ccc;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.permission-item.checked .permission-checkbox {
    background: #c00000;
    border-color: #c00000;
    color: white;
}

.permission-name {
    font-size: 13px;
}

/* 个人中心 */
.profile-header {
    background: linear-gradient(135deg, #c00000 0%, #8b0000 100%);
    color: white;
    padding: 32px 20px;
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 3px solid white;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    overflow: hidden;
    cursor: pointer;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.profile-role {
    font-size: 13px;
    opacity: 0.85;
}

.profile-menu {
    background: white;
    margin: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
}

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

.profile-menu-item:hover {
    background: #fafafa;
}

.profile-menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #ffeaea;
    color: #c00000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 12px;
}

.profile-menu-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.profile-menu-arrow {
    color: #ccc;
    font-size: 16px;
}

.profile-signature-preview {
    margin-top: 12px;
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-left: 12px;
    margin-right: 12px;
}

.profile-signature-preview-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.profile-signature-preview img {
    max-width: 200px;
    max-height: 80px;
    background: #fffbe6;
    border: 1px dashed #ddd;
    padding: 8px;
    border-radius: 4px;
}

/* 文件预览 */
.preview-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    display: flex;
    flex-direction: column;
}

.preview-header {
    height: 44px;
    padding: 0 16px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.preview-close {
    font-size: 22px;
    cursor: pointer;
    padding: 6px;
}

.preview-content {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.preview-content img,
.preview-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    border-radius: 6px;
}

.preview-file-info {
    color: white;
    text-align: center;
    padding: 24px;
}

.preview-file-icon {
    font-size: 72px;
    margin-bottom: 16px;
}

.preview-file-name {
    font-size: 16px;
    margin-bottom: 8px;
    word-break: break-all;
}

.preview-file-size {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 24px;
}

/* 上传组件 */
.upload-area {
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #c00000;
}

.upload-area:active {
    background: #f0f0f0;
}

.upload-icon {
    font-size: 36px;
    color: #ccc;
    margin-bottom: 8px;
}

.upload-text {
    font-size: 13px;
    color: #999;
}

/* 顶部Tab栏(子页面) */
.sub-tab-bar {
    display: flex;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 0 12px;
}

.sub-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    position: relative;
}

.sub-tab.active {
    color: #c00000;
    font-weight: 600;
}

.sub-tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #c00000;
    border-radius: 2px;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

/* 适配小屏 */
@media (max-width: 360px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-grid { grid-template-columns: repeat(4, 1fr); }
    .quick-item { padding: 12px 4px; }
    .quick-icon { font-size: 22px; }
}
/* 发布媒介多选 */
.target-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.target-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    background: #fff;
    user-select: none;
    transition: all 0.15s;
}

.target-checkbox input {
    width: 15px;
    height: 15px;
    accent-color: #c00000;
}

.target-checkbox:has(input:checked) {
    border-color: #c00000;
    background: #fff5f5;
    color: #c00000;
    font-weight: 600;
}

/* ============================================
 * 2026-09-01 优化：扫码登录/PWA/下一环节负责人/意见附件/撤消
 * ============================================ */
/* 登录页：扫码登录/安装入口 */
.login-scan-link {
    color: #ffe9e9;
    text-decoration: underline;
    cursor: pointer;
    display: inline-block;
    margin: 4px 0;
}
.login-scan-link:hover { color: #fff; }

/* 详情页：下一环节负责人条（需求1） */
.next-owner-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #fff8e6;
    border: 1px solid #ffe1a8;
    border-radius: 8px;
    margin: 0 16px 12px;
    padding: 8px 12px;
    font-size: 13px;
    flex-wrap: wrap;
}
.next-owner-label { color: #8a6d1a; font-weight: 600; }
.next-owner-names { color: #c00000; font-weight: 600; }

/* 详情页：次级操作栏（返回首页/上一步，需求2） */
.action-bar-secondary {
    justify-content: center;
    gap: 10px;
    margin-top: 0;
    padding-bottom: 20px;
}
.action-bar-secondary .btn { flex: 0 0 auto; min-width: 120px; }

/* 操作弹窗：意见附件上传（需求5/7） */
.upload-area-sm { padding: 14px 12px; }
.upload-area-sm .upload-icon { font-size: 20px; }
.upload-area-sm .upload-text { font-size: 12px; }
.action-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f7f8fa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 6px;
    font-size: 12px;
}
.action-file-item span:first-child {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.action-file-remove {
    color: #ff3b30;
    cursor: pointer;
    margin-left: auto;
    font-size: 14px;
    font-weight: bold;
}

/* 流程记录：各环节意见附件（需求5） */
.timeline-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.timeline-attachment {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f2f6ff;
    color: #0a58ca;
    border: 1px solid #d6e4ff;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 12px;
    cursor: pointer;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
