/* ========================================
   无限广播电视总台综合管理终端 - 主样式
   00年代渐变蓝风格
   ======================================== */

/* 基础重置 */
*, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
body { 
    font-family: 'SimSun', '宋体', 'Microsoft YaHei', sans-serif; 
    font-size: 14px; 
    background: linear-gradient(180deg, #e8f0fe 0%, #d0e0f8 50%, #c8d8f0 100%);
    color: #222;
    min-height: 100vh;
    position: relative;
}

a { color: #1a4a8a; text-decoration: none; }
a:hover { color: #2d6bb4; text-decoration: underline; }

/* 水印层 */
.watermark-layer {
    position: fixed; top:0; left:0; width:100%; height:100%;
    z-index: 99999; pointer-events: none; overflow: hidden;
}

/* 顶部导航栏 */
.top-bar {
    background: linear-gradient(180deg, #0d2b5e 0%, #1a3a6b 50%, #0d2b5e 100%);
    color: #fff;
    padding: 0;
    border-bottom: 3px solid #4a90d9;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.top-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
}
.top-logo a {
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.top-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
}
.top-time {
    color: #a0c8f0;
    font-family: 'Consolas', 'Courier New', monospace;
}
.top-msg-btn {
    color: #ffd700;
    text-decoration: none;
    position: relative;
}
.top-msg-btn .badge {
    background: #f33;
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    position: absolute;
    top: -8px;
    right: -14px;
}
.top-user { color: #c8e0ff; }
.top-role { color: #80b0e0; font-size: 11px; }
.top-logout { color: #ff9999; text-decoration: none; font-size: 12px; }
.top-logout:hover { color: #ff6666; }

/* 导航菜单栏 */
.nav-bar {
    background: linear-gradient(180deg, #2d6bb4 0%, #4a90d9 50%, #2d6bb4 100%);
    border-bottom: 2px solid #1a3a6b;
    position: sticky;
    top: 48px;
    z-index: 999;
}
.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    padding: 0 10px;
}
.nav-item {
    display: inline-block;
    padding: 10px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    border-right: 1px solid rgba(255,255,255,0.15);
    white-space: nowrap;
}
.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,0.2);
    text-decoration: none;
    color: #fff;
}

/* 下拉菜单 */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(180deg, #2d6bb4, #1a3a6b);
    min-width: 180px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    border: 1px solid #4a90d9;
    border-radius: 0 0 6px 6px;
    z-index: 1001;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.nav-dropdown .dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-dropdown .dropdown-menu a:hover {
    background: rgba(255,255,255,0.2);
    text-decoration: none;
}

/* 主内容区 */
.main-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

/* 页面头部 */
.page-header {
    background: linear-gradient(180deg, #f0f5fb 0%, #e0ecf8 100%);
    border: 1px solid #b0c8e0;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-header h2 {
    color: #1a3a6b;
    font-size: 20px;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.8);
}
.page-header span {
    color: #668;
    font-size: 13px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: linear-gradient(180deg, #fff 0%, #f0f5fb 100%);
    border: 1px solid #b0c8e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.stat-card .stat-num {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 4px;
}
.stat-card .stat-label { font-size: 14px; color: #668; }
.stat-card .stat-sub { font-size: 12px; color: #c44; margin-top: 4px; }
.stat-blue .stat-num { color: #2d6bb4; }
.stat-green .stat-num { color: #2a8a4a; }
.stat-orange .stat-num { color: #c87820; }
.stat-purple .stat-num { color: #7a3a9a; }

/* 面板 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.dash-panel {
    background: #fff;
    border: 1px solid #b0c8e0;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.dash-panel h3 {
    color: #1a3a6b;
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4a90d9;
}
.dash-full { grid-column: 1 / -1; }

/* 快捷操作 */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.qa-btn {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(180deg, #e8f0fe 0%, #c8d8f0 100%);
    border: 1px solid #8ab0d8;
    border-radius: 5px;
    color: #1a3a6b;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}
.qa-btn:hover {
    background: linear-gradient(180deg, #4a90d9 0%, #2d6bb4 100%);
    color: #fff;
    text-decoration: none;
    border-color: #1a3a6b;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    background: linear-gradient(180deg, #2d6bb4 0%, #1a3a6b 100%);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #1a4a8a;
}
.data-table td {
    padding: 8px 12px;
    border: 1px solid #c0d0e0;
    background: #f8fafe;
}
.data-table tr:nth-child(even) td {
    background: #eef3f9;
}
.data-table tr:hover td {
    background: #dce8f5;
}

/* 表单样式 */
.form-panel {
    background: #fff;
    border: 1px solid #b0c8e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.form-panel h3 {
    color: #1a3a6b;
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4a90d9;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: bold;
    font-size: 13px;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #b0c4de;
    border-radius: 4px;
    font-size: 14px;
    background: #f5f9fd;
    font-family: inherit;
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90d9;
    box-shadow: 0 0 6px rgba(74,144,217,0.3);
    background: #fff;
}
.form-group .hint {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 9px 24px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid;
    text-decoration: none;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(180deg, #4a90d9 0%, #2d6bb4 100%);
    color: #fff;
    border-color: #1a3a6b;
}
.btn-primary:hover {
    background: linear-gradient(180deg, #5aa0e9 0%, #3d7bc4 100%);
}
.btn-success {
    background: linear-gradient(180deg, #4aaf5a 0%, #2d8a3a 100%);
    color: #fff;
    border-color: #1a6a2a;
}
.btn-danger {
    background: linear-gradient(180deg, #e05050 0%, #c03030 100%);
    color: #fff;
    border-color: #8a1a1a;
}
.btn-warning {
    background: linear-gradient(180deg, #f0a030 0%, #d08020 100%);
    color: #fff;
    border-color: #8a5a10;
}
.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}
.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

/* 消息提示 */
.alert {
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 16px;
    font-size: 13px;
    border: 1px solid;
}
.alert-success { background: #e8f5e9; color: #2d6a2d; border-color: #a0d0a0; }
.alert-error { background: #fde8e8; color: #a02020; border-color: #f0a0a0; }
.alert-info { background: #e8f0fe; color: #1a4a8a; border-color: #a0c0e0; }
.alert-warning { background: #fef8e8; color: #8a6a10; border-color: #f0d080; }

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 30px;
    border-radius: 6px;
    z-index: 99999;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.toast-info { background: #2d6bb4; color: #fff; }
.toast-success { background: #2d8a3a; color: #fff; }
.toast-error { background: #c03030; color: #fff; }

/* 模态弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: #fff;
    border: 2px solid #4a90d9;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.modal-box h3 {
    color: #1a3a6b;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4a90d9;
}
.modal-close {
    float: right;
    background: #c03030;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 28px;
    text-align: center;
}

/* 底部栏 */
.footer-bar {
    background: linear-gradient(180deg, #0d2b5e 0%, #1a3a6b 100%);
    color: #80a0c0;
    text-align: center;
    padding: 12px;
    font-size: 12px;
    margin-top: 30px;
    border-top: 2px solid #4a90d9;
}
.footer-inner { max-width: 1400px; margin:0 auto; }
.footer-sep { margin: 0 10px; color: #4060a0; }

/* 证件预览页特殊样式 */
.cert-preview-page {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    border: 2px solid #1a3a6b;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.cert-preview-time {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #1a3a6b;
    margin-bottom: 20px;
    font-family: 'Consolas', monospace;
    background: linear-gradient(180deg, #e8f0fe, #f0f5fb);
    padding: 10px;
    border: 1px solid #b0c8e0;
    border-radius: 5px;
}
.cert-preview-image {
    text-align: center;
    margin: 20px 0;
}
.cert-preview-image img {
    max-width: 100%;
    max-height: 500px;
    border: 2px solid #b0c8e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.cert-preview-barcode {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #b0c8e0;
}
.cert-preview-code {
    text-align: center;
    font-size: 18px;
    font-family: 'Consolas', monospace;
    color: #1a3a6b;
    font-weight: bold;
    letter-spacing: 3px;
    margin-top: 10px;
}

/* 取证拍照 */
.camera-container {
    text-align: center;
    margin: 20px 0;
}
.camera-container video {
    max-width: 100%;
    border: 2px solid #1a3a6b;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.camera-container canvas {
    display: none;
}
.photo-preview {
    margin-top: 16px;
    text-align: center;
}
.photo-preview img {
    max-width: 100%;
    border: 2px solid #b0c8e0;
    border-radius: 4px;
}
.photo-meta {
    font-size: 12px;
    color: #668;
    margin-top: 8px;
    text-align: left;
    display: inline-block;
}

/* 富文本编辑器工具栏 */
.editor-toolbar {
    background: linear-gradient(180deg, #e8f0fe, #d0dff0);
    border: 1px solid #b0c8e0;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.editor-toolbar button,
.editor-toolbar select {
    padding: 5px 10px;
    font-size: 13px;
    border: 1px solid #8ab0d8;
    border-radius: 3px;
    background: linear-gradient(180deg, #fff, #e8f0fe);
    cursor: pointer;
    font-family: inherit;
}
.editor-toolbar button:hover {
    background: linear-gradient(180deg, #d0e0f8, #b0c8e0);
}
.editor-toolbar button.active {
    background: #4a90d9;
    color: #fff;
}
.editor-toolbar select {
    padding: 5px 8px;
}
.editor-content {
    border: 1px solid #b0c8e0;
    border-radius: 0 0 5px 5px;
    min-height: 300px;
    padding: 12px;
    background: #fff;
    font-family: 'SimSun', '宋体', serif;
    font-size: 15px;
    outline: none;
    overflow-y: auto;
}

/* 档案成员卡片 */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.archive-card {
    background: linear-gradient(180deg, #fff, #f0f5fb);
    border: 1px solid #b0c8e0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}
.archive-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #4a90d9;
}
.archive-card .member-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d6bb4, #4a90d9);
    color: #fff;
    font-size: 24px;
    line-height: 60px;
    margin: 0 auto 10px;
}
.archive-card .member-name {
    font-weight: bold;
    font-size: 14px;
    color: #1a3a6b;
}

/* 支付二维码 */
.qr-container {
    text-align: center;
    padding: 30px;
    background: #fff;
    border: 1px solid #b0c8e0;
    border-radius: 8px;
}
.qr-container img {
    max-width: 250px;
    border: 1px solid #ccc;
    padding: 10px;
    background: #fff;
}
.qr-container .qr-amount {
    font-size: 28px;
    font-weight: bold;
    color: #c03030;
    margin: 10px 0;
}

/* 响应式 */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dash-full { grid-column: 1; }
    .nav-inner { flex-direction: column; }
    .nav-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .top-bar-inner { flex-direction: column; gap: 5px; text-align: center; }
    .top-info { flex-wrap: wrap; justify-content: center; gap: 8px; }
    .page-header { flex-direction: column; gap: 8px; text-align: center; }
}
