/* 天合会议管理后台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #1e3a8a;
    --primary-light: #3b5bd0;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --green: #16a34a;
    --red: #dc2626;
    --warn: #d97706;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}
.hidden { display: none !important; }

/* ===== 登录 ===== */
.login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b5bd0 100%);
    padding: 16px;
}
.login-card {
    background: var(--card); border-radius: 12px; padding: 40px 36px;
    width: 100%; max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { color: var(--primary); font-size: 26px; letter-spacing: 2px; }
.login-logo p { color: var(--muted); margin-top: 6px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.form-group .input, .login-form input[type=text], .login-form input[type=password] {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; outline: none; background: #fff;
}
.login-form input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(59,91,208,.12); }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-img { cursor: pointer; border-radius: 6px; overflow: hidden; line-height: 0; border: 1px solid var(--border); }
.captcha-img svg { display: block; }
.error-text { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 10px; text-align: center; }

/* ===== 按钮 / 输入 ===== */
.btn {
    display: inline-block; padding: 8px 16px; border: none; border-radius: 8px;
    font-size: 14px; cursor: pointer; transition: opacity .15s; text-decoration: none;
    color: var(--text); background: #e2e8f0; line-height: 1.4; white-space: nowrap;
}
.btn:hover { opacity: .85; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-warn { background: var(--warn); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { display: block; width: 100%; padding: 12px; font-size: 15px; margin-top: 6px; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.input {
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; outline: none; background: #fff; min-width: 120px;
}
.input:focus { border-color: var(--primary-light); }

/* ===== 主布局 ===== */
.main-wrap { display: flex; min-height: 100vh; }
.sidebar {
    width: 200px; background: #16215c; color: #cbd5e1; flex-shrink: 0;
    display: flex; flex-direction: column; padding: 20px 12px;
}
.brand { color: #fff; font-size: 18px; font-weight: 600; padding: 4px 12px 20px; }
.brand span { font-size: 12px; font-weight: 400; color: #94a3b8; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
    padding: 11px 14px; border-radius: 8px; color: #cbd5e1; cursor: pointer;
    font-size: 14px; user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--primary-light); color: #fff; }
.nav-item.logout { color: #f87171; }
.content { flex: 1; padding: 24px 28px; max-width: calc(100vw - 200px); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel h2 { font-size: 18px; margin-bottom: 18px; }
.tab-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.tab-head h2 { margin-bottom: 0; }
.tab-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ===== 表格 ===== */
.table-wrap {
    background: var(--card); border-radius: 10px; overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.table { width: 100%; border-collapse: collapse; min-width: 700px; }
.table th, .table td {
    padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border);
    font-size: 13px; white-space: nowrap;
}
.table th { color: var(--muted); font-weight: 500; background: #f8fafc; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8fafc; }
.empty-row { text-align: center; color: var(--muted); padding: 30px 0 !important; }
.tag {
    display: inline-block; padding: 2px 10px; border-radius: 20px;
    font-size: 12px; background: #e2e8f0; color: var(--muted);
}
.tag-green { background: #dcfce7; color: var(--green); }
.tag-red { background: #fee2e2; color: var(--red); }
.tag-blue { background: #dbeafe; color: #1d4ed8; }
.tag-gray { background: #e2e8f0; color: var(--muted); }
.row-actions { display: flex; gap: 6px; }

/* ===== 概览卡片 ===== */
.stat-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.stat-card {
    background: var(--card); border-radius: 10px; padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.stat-card .stat-label { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 24px; font-weight: 600; }
.stat-card .stat-sub { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* ===== 分页 ===== */
.pager { display: flex; gap: 8px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 13px; }
.pager .btn { min-width: 32px; text-align: center; }

/* ===== 弹窗 ===== */
.modal-mask {
    position: fixed; inset: 0; background: rgba(15,23,42,.45);
    display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal {
    background: var(--card); border-radius: 12px; width: 100%; max-width: 460px;
    max-height: 86vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px;
}
.modal-head a { cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; }
.modal-body { padding: 20px; }
.modal-tip { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
.modal-tip.small { font-size: 12px; margin-top: 4px; }
.modal-btns { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ===== toast ===== */
.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-80px);
    background: #1e293b; color: #fff; padding: 10px 22px; border-radius: 8px;
    font-size: 14px; transition: transform .25s; z-index: 200; max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); }
.toast.ok { background: var(--green); }

/* ===== 移动端 ===== */
@media (max-width: 720px) {
    .main-wrap { flex-direction: column; }
    .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 10px; overflow-x: auto; }
    .brand { padding: 0 10px; white-space: nowrap; font-size: 15px; }
    .nav { flex-direction: row; }
    .nav-item { padding: 8px 10px; white-space: nowrap; }
    .content { padding: 16px; max-width: 100vw; }
}
