/* 智采问卷 · 全局样式 */
:root {
    --wj-primary: #4f46e5;
    --wj-primary-2: #6366f1;
    --wj-primary-dark: #4338ca;
    --wj-grad: linear-gradient(135deg, #1e3a8a 0%, #4f46e5 60%, #7c3aed 100%);
    --wj-radius: 12px;
    --wj-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 16px rgba(15, 23, 42, .05);
    --wj-shadow-hover: 0 6px 20px rgba(79, 70, 229, .14);
}

body {
    min-height: 100vh;
    background: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1e293b;
}

/* ===== 导航 ===== */
.navbar-brand { font-weight: 700; letter-spacing: .5px; }
.navbar.bg-primary { background: var(--wj-grad) !important; box-shadow: 0 2px 12px rgba(30, 58, 138, .25); }
.navbar .btn { border-radius: 8px; }

.navbar-light.bg-white { background: #fff !important; }
.navbar-light .nav-link { color: #475569; font-size: .92rem; border-radius: 8px; padding: .45rem .8rem; transition: all .2s; }
.navbar-light .nav-link:hover { color: var(--wj-primary); background: #eef2ff; }

/* ===== 卡片 ===== */
.card {
    border: 1px solid #e2e8f0;
    border-radius: var(--wj-radius);
    box-shadow: var(--wj-shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { box-shadow: var(--wj-shadow-hover); }
.card-header {
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    font-weight: 600;
    font-size: .95rem;
    border-radius: var(--wj-radius) var(--wj-radius) 0 0 !important;
}

/* ===== 按钮 ===== */
.btn { border-radius: 8px; }
.btn-primary { background: var(--wj-primary); border-color: var(--wj-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--wj-primary-dark); border-color: var(--wj-primary-dark); }
.btn-outline-primary { color: var(--wj-primary); border-color: #c7d2fe; }
.btn-outline-primary:hover { background: var(--wj-primary); border-color: var(--wj-primary); }
.btn-success { background: #059669; border-color: #059669; }
.btn-info { background: #0891b2; border-color: #0891b2; }

/* ===== 表单 ===== */
.form-control, .form-select {
    border-radius: 8px;
    border-color: #e2e8f0;
}
.form-control:focus, .form-select:focus {
    border-color: var(--wj-primary-2);
    box-shadow: 0 0 0 .2rem rgba(99, 102, 241, .15);
}
.form-check-input:checked { background-color: var(--wj-primary); border-color: var(--wj-primary); }

/* ===== 表格 ===== */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; max-width: 100%; }
.table td, .table th { word-break: break-word; }
.table > :not(caption) > * > * { vertical-align: middle; }
.table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: .78rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: .3px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #f5f6ff; }

/* ===== 徽章 ===== */
.badge { border-radius: 999px; padding: .35em .65em; font-weight: 500; }

/* ===== 登录/注册页 ===== */
.auth-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wj-grad);
    padding: 2rem 1rem;
}
.auth-card { width: 100%; max-width: 420px; border-radius: 16px; box-shadow: 0 20px 60px rgba(15, 23, 42, .35); }
.auth-card .card-body { padding: 2.2rem; }
.auth-logo {
    width: 56px; height: 56px; border-radius: 14px;
    background: var(--wj-grad); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700; margin: 0 auto 1rem;
}

/* ===== 首页 Hero ===== */
.hero {
    background: var(--wj-grad);
    border-radius: 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute; right: -80px; top: -80px;
    width: 260px; height: 260px; border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.hero .lead { color: rgba(255, 255, 255, .85) !important; }
.hero .btn-light { border-radius: 10px; font-weight: 600; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; color: #94a3b8; padding: 3rem 1rem; }
.empty-state .empty-icon { font-size: 2.6rem; margin-bottom: .6rem; opacity: .6; }

/* ===== Toast ===== */
#toast-box .alert { border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .18); animation: toast-in .3s ease; }
@keyframes toast-in {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== 成功指示动画（0.6s）===== */
@keyframes pop-in {
    0% { transform: scale(.4); opacity: 0; }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}
.pop-in { animation: pop-in .6s ease; }

/* ===== 加载动画（0.5-0.9s）===== */
@keyframes fade-up {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.fade-up { animation: fade-up .5s ease; }

/* ===== 卡片网格 hover ===== */
.card-link-card { text-decoration: none; color: inherit; display: block; }
.card-link-card:hover .card { transform: translateY(-4px); box-shadow: var(--wj-shadow-hover); }

/* ===== 统计指标卡 ===== */
.stat-card .stat-num { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { color: #94a3b8; font-size: .8rem; }

/* ===== Vue 渲染前隐藏 ===== */
[v-cloak] { display: none !important; }

/* ===== 问卷编辑器 ===== */
.q-card { cursor: grab; }
.q-card:active { cursor: grabbing; }

/* ===== 代码块 ===== */
pre.code-block {
    background: #0f172a; color: #e2e8f0; border-radius: 10px;
    font-size: 12.5px; line-height: 1.6; overflow: auto;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
