* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:"Microsoft YaHei", Arial, sans-serif; font-size:14px; color:#333; background:#f5f7fa; }
a { text-decoration:none; color:inherit; }

/* 登录页 */
.login-page {
    display:flex; align-items:center; justify-content:center;
    min-height:100vh; background:linear-gradient(135deg, #1e3c72, #2a5298);
}
.login-box {
    width:400px; background:#fff; border-radius:8px; padding:30px;
    box-shadow:0 4px 20px rgba(0,0,0,0.1);
}
.login-box h2 { text-align:center; margin-bottom:20px; color:#1e3c72; }
.form-item { margin-bottom:15px; }
.form-item label { display:block; margin-bottom:5px; color:#666; }
.form-item input {
    width:100%; height:40px; padding:0 12px;
    border:1px solid #ddd; border-radius:4px; font-size:14px;
}
.btn {
    display:inline-block; padding:8px 16px; border:none; border-radius:4px;
    cursor:pointer; font-size:14px; background:#e4e7ed; color:#333;
}
.btn-primary { background:#1e3c72; color:#fff; }
.btn-success { background:#2ecc71; color:#fff; }
.btn-block { width:100%; height:42px; font-size:15px; }
.btn-large { padding:12px 30px; font-size:15px; }
.btn-xs { padding:4px 10px; font-size:12px; }
.btn:disabled { background:#ccc; cursor:not-allowed; }
.error-msg {
    padding:10px; background:#fee; color:#c33; border-radius:4px; margin-bottom:15px; text-align:center;
}
.msg { padding:10px; background:#e8f5e9; color:#2e7d32; border-radius:4px; margin-bottom:15px; }

/* 布局 */
.layout { display:flex; min-height:100vh; }
.sidebar { width:200px; background:#1e3c72; color:#fff; }
.admin-sidebar { background:#2c3e50; }
.sidebar .logo {
    height:60px; line-height:60px; text-align:center; font-size:15px; font-weight:bold;
    border-bottom:1px solid rgba(255,255,255,0.1);
}
.sidebar .menu a {
    display:block; padding:14px 20px; color:#d0d7e3;
    border-left:3px solid transparent;
}
.sidebar .menu a.active {
    background:rgba(255,255,255,0.1); color:#fff; border-left-color:#fff;
}
.sidebar .menu a.logout { margin-top:30px; color:#ff999; }

.main { flex:1; display:flex; flex-direction:column; }
.top-bar {
    height:60px; background:#fff; border-bottom:1px solid #e4e7ed;
    display:flex; align-items:center; justify-content:space-between;
    padding:0 20px;
}
.top-right { display:flex; gap:20px; align-items:center; font-size:13px; color:#666; }
.user-name { font-weight:bold; color:#333; }

.stat-bar { display:flex; gap:20px; padding:20px; }
.stat-bar .stat-item {
    flex:1; background:#fff; border-radius:6px; padding:15px 20px;
    display:flex; align-items:center; justify-content:space-between;
    box-shadow:0 1px 3px rgba(0,0,0,0.05);
}
.stat-bar .label { color:#999; font-size:13px; }
.stat-bar .num { font-size:20px; font-weight:bold; color:#1e3c72; }
.admin-stat .stat-item .num { color:#2c3e50; }

.action-bar { padding:0 20px 15px; display:flex; align-items:center; gap:15px; }
.tip { font-size:13px; color:#666; }

.table-box { margin:0 20px; background:#fff; border-radius:6px; box-shadow:0 1px 3px rgba(0,0,0,0.05); overflow:auto; }
.data-table { width:100%; border-collapse:collapse; }
.data-table th, .data-table td {
    padding:10px 12px; border:1px solid #eee; text-align:left; font-size:13px;
}
.data-table th { background:#f8f9fa; font-weight:600; }
.data-table tr.unfinish { background:#fff7e6; }
.data-table tr.unfinish td { border-color:#ffd591; }
.data-table .empty { text-align:center; padding:40px; color:#999; }
.data-table textarea {
    width:100%; height:50px; padding:6px 8px; border:1px solid #ddd;
    border-radius:4px; font-size:13px; font-family:inherit; resize:vertical;
}

.save-bar { padding:20px; text-align:center; }

.search-bar {
    padding:15px 20px; background:#fff; border-bottom:1px solid #eee;
    display:flex; gap:10px; align-items:center;
}
.search-bar input {
    height:34px; padding:0 10px; border:1px solid #ddd; border-radius:4px;
}

.pagination {
    padding:20px; text-align:center; display:flex; gap:10px;
    justify-content:center; align-items:center; font-size:13px; color:#666;
}

.panel {
    margin:20px; padding:20px; background:#fff; border-radius:6px;
    box-shadow:0 1px 3px rgba(0,0,0,0.05);
}
.panel h4 { margin-bottom:15px; color:#333; }
.quick-links { display:grid; grid-template-columns:repeat(4,1fr); gap:15px; }
.quick-btn {
    display:block; padding:20px; text-align:center;
    background:#f8f9fa; border-radius:6px; color:#1e3c72;
}
.quick-btn:hover { background:#eef2f7; }

.tip-box { margin:15px 20px; padding:12px; background:#fff8e6; border-radius:4px; color:#996600; font-size:13px; }
/* 浮动提示 */
.toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 24px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all .3s;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.success { background: #2ecc71; }
.toast.error { background: #e67e22; }

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    align-items: center;
    justify-content: center;
}
.modal.show { display: flex; }
.modal-box {
    width: 420px;
    background: #fff;
    border-radius: 8px;
    padding: 25px;
}
.modal-box h3 { margin-bottom: 15px; color: #333; }

/* 宽记录表格 */
.wide-record textarea {
    width: 100%;
    height: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}
.wide-record table {
    min-width: 1400px;
}

/* 分类卡片 */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.tag-card {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}
.tag-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 8px;
}
.tag-num {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

/* 分类复选框列表 */
.tag-checklist {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
}
.check-item {
    display: block;
    padding: 6px 8px;
    cursor: pointer;
}
.check-item:hover { background: #f5f7fa; }

.badge {
    background: #e67e22;
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.msg.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}
.msg.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    padding: 10px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}
/* ========== 全屏水印 ========== */
.watermark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
    user-select: none;
}

.watermark-wrap {
    width: 200%;
    height: 200%;
    margin-left: -50%;
    margin-top: -50%;
    transform: rotate(-22deg);
    transform-origin: center center;
    display: flex;
    flex-wrap: wrap;
    gap: 100px 80px;
    padding: 150px;
    box-sizing: border-box;
}

.watermark-item {
    width: 300px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    opacity: 0.15;
    font-family: "Microsoft YaHei", sans-serif;
}
