/* ============================================================
   卡塞尔学院 EVA 系统 - 全局主题
   暗色 + 金纹 + 哥特学院风
   ============================================================ */

:root {
    --bg:        #0a0f1c;
    --bg-2:      #0e1626;
    --bg-3:      #142038;
    --bg-4:      #1b2a48;
    --gold:      #c8a45c;
    --gold-bri:  #e6c378;
    --gold-dim:  #8a7340;
    --ivory:     #ece6d6;
    --text:      #d8d2c4;
    --muted:     #8b94a8;
    --border:    rgba(200, 164, 92, 0.22);
    --border-2:  rgba(200, 164, 92, 0.4);
    --danger:    #c8564c;
    --success:   #6fae6f;
    --info:      #6f93c8;
    --shadow:    0 8px 32px rgba(0, 0, 0, 0.45);

    --serif: 'Cinzel', 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
    --sans:  'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    color: var(--text);
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse at top, rgba(200, 164, 92, 0.08), transparent 55%),
        radial-gradient(ellipse at bottom, rgba(40, 60, 110, 0.25), transparent 60%),
        linear-gradient(180deg, #0a0f1c 0%, #070b15 100%);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-bri); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ivory); font-weight: 600; letter-spacing: 0.04em; }

::selection { background: var(--gold); color: var(--bg); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ============ 通用容器 ============ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; }

.section { padding: 72px 0; }
.section-title { text-align: center; margin-bottom: 12px; font-size: 30px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 48px; font-size: 14px; letter-spacing: .15em; text-transform: uppercase; }

/* 金色分隔线带菱形 */
.divider {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin: 18px auto 36px; color: var(--gold);
}
.divider::before, .divider::after {
    content: ''; height: 1px; width: 120px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.divider .diamond { width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); }

/* ============ 按钮 ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 26px; border: 1px solid var(--gold); border-radius: 2px;
    background: transparent; color: var(--gold-bri);
    font-family: var(--serif); font-size: 14px; letter-spacing: .12em;
    cursor: pointer; transition: all .25s; text-transform: uppercase;
}
.btn:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-dim)); color: var(--bg); border-color: var(--gold); }
.btn-primary:hover { background: linear-gradient(135deg, var(--gold-bri), var(--gold)); color: var(--bg); box-shadow: 0 6px 20px rgba(200,164,92,.3); }
.btn-ghost { border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bri); background: rgba(200,164,92,.06); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============ 表单 ============ */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12px; color: var(--muted); letter-spacing: .1em; margin-bottom: 7px; text-transform: uppercase; }
.field label .req { color: var(--danger); }
.input, .select, .textarea {
    width: 100%; padding: 11px 14px;
    background: rgba(0,0,0,0.25); border: 1px solid var(--border);
    border-radius: 2px; color: var(--ivory); font-family: var(--sans); font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200,164,92,.12);
}
.textarea { resize: vertical; min-height: 120px; }
.select option { background: var(--bg-3); color: var(--ivory); }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 6px; }

/* ============ 卡片 ============ */
.card {
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--border); border-radius: 3px; padding: 26px;
    box-shadow: var(--shadow);
}
.card-glow { position: relative; }
.card-glow::before {
    content: ''; position: absolute; inset: 0; border-radius: 3px; pointer-events: none;
    background: linear-gradient(135deg, rgba(200,164,92,.12), transparent 40%);
}

/* ============ 徽章 ============ */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 10px; font-size: 11px; letter-spacing: .1em;
    border: 1px solid var(--border-2); border-radius: 2px; color: var(--gold-bri);
    font-family: var(--serif); text-transform: uppercase;
}
.badge-grade-S { background: rgba(200,164,92,.18); border-color: var(--gold); color: var(--gold-bri); }
.badge-grade-A { background: rgba(200,164,92,.1); color: var(--gold-bri); }
.badge-grade-B { background: rgba(140,160,200,.12); border-color: rgba(140,160,200,.4); color: #aebdd8; }
.badge-grade-C { background: rgba(140,140,140,.1); border-color: rgba(140,140,140,.3); color: #b0b0b0; }

/* ============ 导航 ============ */
.navbar {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(10, 15, 28, 0.82);
    border-bottom: 1px solid var(--border);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.navbar-brand { display: flex; align-items: center; gap: 12px; }
.navbar-brand .brand-text { line-height: 1.1; }
.navbar-brand .brand-cn { font-family: var(--serif); color: var(--ivory); font-size: 18px; letter-spacing: .15em; }
.navbar-brand .brand-en { font-size: 10px; color: var(--gold); letter-spacing: .3em; }
.navbar-links { display: flex; align-items: center; gap: 30px; }
.navbar-links a { color: var(--text); font-size: 14px; letter-spacing: .08em; position: relative; }
.navbar-links a:hover, .navbar-links a.router-link-active { color: var(--gold-bri); }
.navbar-links a.router-link-active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: var(--gold);
}

/* ============ 官网首页 ============ */
.hero {
    position: relative; text-align: center; padding: 90px 24px 80px; overflow: hidden;
}
.hero-crest { display: flex; justify-content: center; margin-bottom: 30px; filter: drop-shadow(0 0 30px rgba(200,164,92,.35)); }
.hero-title { font-size: 56px; letter-spacing: .2em; color: var(--ivory); margin-bottom: 8px; }
.hero-en { font-family: var(--serif); color: var(--gold); letter-spacing: .5em; font-size: 14px; margin-bottom: 26px; }
.hero-tagline { color: var(--muted); font-size: 15px; letter-spacing: .1em; margin-bottom: 38px; }
.hero-motto {
    display: inline-block; padding: 10px 36px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    font-family: var(--serif); color: var(--gold-bri); letter-spacing: .3em; font-size: 15px; margin-bottom: 38px;
}
.hero-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* 统计 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 28px 16px; border: 1px solid var(--border); border-radius: 3px; background: rgba(20,32,56,.4); }
.stat-num { font-family: var(--serif); font-size: 38px; color: var(--gold-bri); }
.stat-label { font-size: 12px; color: var(--muted); letter-spacing: .15em; text-transform: uppercase; margin-top: 6px; }

/* 院系卡片 */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.dept-card {
    padding: 30px 24px; border: 1px solid var(--border); border-radius: 3px;
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); transition: transform .25s, border-color .25s;
}
.dept-card:hover { transform: translateY(-4px); border-color: var(--gold-dim); }
.dept-icon { font-size: 28px; color: var(--gold); margin-bottom: 14px; font-family: var(--serif); }
.dept-name { font-family: var(--serif); color: var(--ivory); font-size: 18px; margin-bottom: 6px; }
.dept-en { font-size: 11px; color: var(--gold); letter-spacing: .2em; margin-bottom: 12px; }
.dept-desc { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* 新闻 */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.news-card {
    border: 1px solid var(--border); border-radius: 3px; overflow: hidden;
    background: var(--bg-3); transition: border-color .25s, transform .25s;
}
.news-card:hover { border-color: var(--gold-dim); transform: translateY(-3px); }
.news-tag { display: inline-block; padding: 2px 10px; font-size: 11px; background: rgba(200,164,92,.15); color: var(--gold-bri); border-radius: 2px; }
.news-body { padding: 22px; }
.news-date { font-size: 12px; color: var(--muted); margin: 10px 0; }
.news-title { font-family: var(--serif); color: var(--ivory); font-size: 17px; margin-bottom: 8px; }
.news-excerpt { font-size: 13px; color: var(--muted); }

/* CTA */
.cta {
    text-align: center; padding: 70px 24px; border: 1px solid var(--border); border-radius: 3px;
    background:
        radial-gradient(ellipse at center, rgba(200,164,92,.1), transparent 70%),
        linear-gradient(180deg, var(--bg-3), var(--bg-2));
}
.cta h2 { font-size: 30px; margin-bottom: 14px; }
.cta p { color: var(--muted); margin-bottom: 30px; }

/* 页脚 */
.footer { border-top: 1px solid var(--border); padding: 40px 0 28px; margin-top: 60px; background: rgba(7,11,21,.6); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; }
.footer-brand { color: var(--gold); font-family: var(--serif); letter-spacing: .2em; }

/* ============ 登录/注册 ============ */
.auth-wrap { min-height: calc(100vh - 66px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 460px; padding: 42px 38px; }
.auth-card.wide { max-width: 620px; }
.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head .crest { display: flex; justify-content: center; margin-bottom: 16px; }
.auth-head h2 { font-size: 24px; letter-spacing: .15em; }
.auth-head p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.auth-foot { text-align: center; margin-top: 22px; color: var(--muted); font-size: 13px; }

/* ============ 控制台布局 ============ */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 230px; flex-shrink: 0; border-right: 1px solid var(--border);
    background: rgba(10,15,28,.6); padding: 24px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 24px 22px; border-bottom: 1px solid var(--border); }
.sidebar-brand .cn { font-family: var(--serif); color: var(--ivory); font-size: 15px; letter-spacing: .12em; }
.sidebar-nav { padding: 18px 0; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px; padding: 12px 24px;
    color: var(--muted); font-size: 14px; letter-spacing: .06em; border-left: 3px solid transparent;
}
.sidebar-nav a:hover { color: var(--ivory); background: rgba(200,164,92,.05); }
.sidebar-nav a.router-link-exact-active { color: var(--gold-bri); border-left-color: var(--gold); background: rgba(200,164,92,.07); }
.sidebar-nav .ico { width: 18px; text-align: center; font-size: 16px; }
.sidebar-user { margin-top: auto; padding: 16px 24px; border-top: 1px solid var(--border); }

.app-main { flex: 1; min-width: 0; }
.topbar {
    height: 62px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
    background: rgba(14,22,38,.6); backdrop-filter: blur(8px);
}
.topbar-title { font-family: var(--serif); color: var(--ivory); letter-spacing: .12em; font-size: 16px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.app-content { padding: 28px; }

/* 控制台首页卡片 */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 20px; }
.dash-card {
    padding: 26px; border: 1px solid var(--border); border-radius: 3px;
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); transition: all .25s; cursor: pointer;
}
.dash-card:hover { border-color: var(--gold-dim); transform: translateY(-3px); box-shadow: var(--shadow); }
.dash-card .ico { font-size: 26px; color: var(--gold); margin-bottom: 14px; }
.dash-card .t { font-family: var(--serif); color: var(--ivory); font-size: 17px; margin-bottom: 4px; }
.dash-card .d { font-size: 12px; color: var(--muted); }
.dash-card .badge-count { float: right; background: var(--danger); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 8px; }

/* 学员档案卡 */
.profile-card { display: flex; gap: 28px; align-items: center; padding: 32px; flex-wrap: wrap; }
.profile-avatar {
    width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--gold);
    background: var(--bg-4); display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-size: 36px; color: var(--gold-bri); overflow: hidden;
}
.profile-info .name { font-family: var(--serif); font-size: 24px; color: var(--ivory); }
.profile-info .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.profile-info .sig { color: var(--text); font-size: 14px; margin-top: 10px; font-style: italic; }

/* ============ 邮件 ============ */
.mail-wrap { display: grid; grid-template-columns: 160px 360px 1fr; height: calc(100vh - 62px); }
.mail-folders { border-right: 1px solid var(--border); padding: 18px 0; background: rgba(10,15,28,.4); }
.mail-folder { display: flex; align-items: center; gap: 10px; padding: 11px 22px; cursor: pointer; color: var(--muted); font-size: 14px; }
.mail-folder:hover { color: var(--ivory); background: rgba(200,164,92,.05); }
.mail-folder.active { color: var(--gold-bri); border-left: 3px solid var(--gold); }
.mail-list { border-right: 1px solid var(--border); overflow-y: auto; }
.mail-item { padding: 16px 20px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .2s; }
.mail-item:hover { background: rgba(200,164,92,.05); }
.mail-item.active { background: rgba(200,164,92,.09); border-left: 3px solid var(--gold); }
.mail-item .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.mail-item .from { color: var(--ivory); font-size: 14px; }
.mail-item .date { color: var(--muted); font-size: 11px; }
.mail-item .subj { color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item.unread .from, .mail-item.unread .subj { color: var(--gold-bri); font-weight: 600; }
.mail-item .dot { width: 7px; height: 7px; background: var(--gold); border-radius: 50%; display: inline-block; margin-right: 6px; }
.mail-detail { overflow-y: auto; padding: 28px; }
.mail-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); flex-direction: column; gap: 14px; }
.mail-head { border-bottom: 1px solid var(--border); padding-bottom: 18px; margin-bottom: 22px; }
.mail-head h3 { font-size: 22px; margin-bottom: 10px; }
.mail-head .row { display: flex; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.mail-body { color: var(--text); line-height: 1.9; white-space: pre-wrap; font-size: 14px; }

/* ============ 联系人 ============ */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 18px; }
.contact-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.contact-card .avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-4); border: 1px solid var(--gold-dim); display: flex; align-items: center; justify-content: center; color: var(--gold-bri); font-family: var(--serif); font-size: 18px; }
.contact-card .info { flex: 1; min-width: 0; }
.contact-card .name { color: var(--ivory); font-size: 15px; }
.contact-card .sub { color: var(--muted); font-size: 12px; }
.contact-card .actions { display: flex; gap: 8px; }

/* ============ EVA 对话 ============ */
.eva-wrap { display: grid; grid-template-columns: 260px 1fr; height: calc(100vh - 62px); }
.eva-side { border-right: 1px solid var(--border); background: rgba(10,15,28,.4); display: flex; flex-direction: column; }
.eva-side-head { padding: 18px; border-bottom: 1px solid var(--border); }
.eva-conv-list { flex: 1; overflow-y: auto; }
.eva-conv { padding: 14px 18px; border-bottom: 1px solid var(--border); cursor: pointer; }
.eva-conv:hover { background: rgba(200,164,92,.05); }
.eva-conv.active { background: rgba(200,164,92,.09); border-left: 3px solid var(--gold); }
.eva-conv .t { color: var(--ivory); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eva-conv .d { color: var(--muted); font-size: 11px; margin-top: 3px; }
.eva-main { display: flex; flex-direction: column; min-width: 0; }
.eva-messages { flex: 1; overflow-y: auto; padding: 28px; }
.eva-msg { display: flex; gap: 14px; margin-bottom: 24px; max-width: 820px; }
.eva-msg .avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.eva-msg.user .avatar { background: var(--bg-4); color: var(--text); border: 1px solid var(--border-2); }
.eva-msg.assistant .avatar { background: linear-gradient(135deg, var(--gold), var(--gold-dim)); color: var(--bg); }
.eva-msg .bubble { background: var(--bg-3); border: 1px solid var(--border); border-radius: 4px; padding: 14px 18px; color: var(--text); line-height: 1.8; font-size: 14px; }
.eva-msg.user .bubble { background: rgba(200,164,92,.1); border-color: var(--border-2); }
.eva-msg .role { font-family: var(--serif); font-size: 12px; color: var(--gold); letter-spacing: .15em; margin-bottom: 6px; }
.eva-msg .bubble p { margin: 0 0 10px; }
.eva-msg .bubble p:last-child { margin-bottom: 0; }
.eva-cursor { display: inline-block; width: 8px; height: 15px; background: var(--gold); margin-left: 2px; animation: blink 1s steps(2) infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: 0; } }
.eva-input { border-top: 1px solid var(--border); padding: 16px 20px; background: rgba(14,22,38,.6); }
.eva-input-row { display: flex; gap: 12px; align-items: flex-end; }
.eva-input .textarea { min-height: 52px; max-height: 160px; }
.eva-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--muted); gap: 18px; text-align: center; }
.eva-empty .hint { font-size: 13px; max-width: 380px; line-height: 1.8; }

/* ============ 提示 ============ */
.toast-wrap { position: fixed; top: 80px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 12px 20px; border-radius: 3px; border: 1px solid var(--border-2); background: var(--bg-3); color: var(--ivory); font-size: 13px; box-shadow: var(--shadow); animation: slideIn .25s; min-width: 220px; }
.toast.error { border-color: var(--danger); color: #f0b8b3; }
.toast.success { border-color: var(--success); color: #c3e0c3; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* 加载 */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border-2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; justify-content: center; padding: 40px; color: var(--muted); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .ico { font-size: 40px; color: var(--gold-dim); margin-bottom: 16px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { color: var(--gold); font-family: var(--serif); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* 模态框 */
.modal-mask { position: fixed; inset: 0; background: rgba(5,8,16,.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { width: 100%; max-width: 560px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 4px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }
.modal-close { cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; }
.modal-close:hover { color: var(--ivory); }

/* 响应式 */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .mail-wrap { grid-template-columns: 1fr; }
    .mail-folders { display: flex; }
    .mail-folder { padding: 10px 16px; }
    .eva-wrap { grid-template-columns: 1fr; }
    .eva-side { display: none; }
    .sidebar { position: fixed; left: -230px; z-index: 60; transition: left .25s; }
    .sidebar.open { left: 0; }
    .hero-title { font-size: 38px; }
    .navbar-links { display: none; }
}
