/* ============================================================
   site-v2.css — 智学智教云平台 统一样式系统
   基于 Bootstrap 4 + 设计规范，替代散落的 EasyUI/内联样式
   兼容：IE11+ / Chrome / Firefox / Safari / 移动端
   日期：2026-06-24  更新：2026-06-26 全局字体加大
   ============================================================ */

/* ── CSS 变量（设计系统色彩） ── */
:root {
    /* 主色调 — 教育蓝 */
    --primary: #2c6fce;
    --primary-dark: #1a1a2e;
    --primary-light: #e8f0fe;

    /* 渐变色卡片（Admin/Index 风格推广） */
    --gradient-blue: linear-gradient(135deg, #2193b0, #6dd5ed);
    --gradient-green: linear-gradient(135deg, #11998e, #38ef7d);
    --gradient-orange: linear-gradient(135deg, #f46b45, #eea849);
    --gradient-purple: linear-gradient(135deg, #834d9b, #d04ed6);
    --gradient-teal: linear-gradient(135deg, #0ba360, #3cba92);
    --gradient-navy: linear-gradient(135deg, #373b44, #4286f4);

    /* 语义色 */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;

    /* 中性色 */
    --bg-body: #f4f6f9;
    --bg-card: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #eef2f5;
}

/* ── 全局重置 ── */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei",
                 "PingFang SC", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
}

h4 { font-size: 1.5rem; font-weight: 600; }
h5 { font-size: 1.25rem; font-weight: 600; }
small, .text-muted { font-size: 0.875rem; }

a { color: var(--primary); }
a:hover { color: #1a5ab8; }

/* ── 导航栏 ── */
.navbar-brand {
    font-weight: bold;
    color: #fff !important;
}
.top-navbar {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-height: 56px;
    padding: 0 20px;
}
.top-navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-size: 1rem;
}
.top-navbar .nav-link:hover {
    color: #fff !important;
}

/* ── 卡片系统 ── */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--bg-card);
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.card-header {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #fff;
}
.card-body {
    padding: 1.5rem;
}

/* 可点击卡片（左侧色条） */
.card.action-card { cursor: pointer; }
.card.action-card.blue   { border-left: 4px solid var(--primary); }
.card.action-card.green  { border-left: 4px solid #28a745; }
.card.action-card.orange { border-left: 4px solid #fd7e14; }
.card.action-card.purple { border-left: 4px solid #6f42c1; }

/* ── 统计卡片（渐变色） ── */
.stat-card {
    border: none;
    border-radius: 12px;
    color: #fff;
    padding: 20px 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}
.stat-card .stat-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    opacity: 0.25;
}
.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 4px;
}
.stat-card .stat-link {
    color: #fff;
    font-size: 0.875rem;
    margin-top: 8px;
    display: inline-block;
    opacity: 0.85;
}
.stat-card .stat-link:hover { opacity: 1; }

.stat-card.blue   { background: var(--gradient-blue); }
.stat-card.green  { background: var(--gradient-green); }
.stat-card.orange { background: var(--gradient-orange); }
.stat-card.purple { background: var(--gradient-purple); }
.stat-card.teal   { background: var(--gradient-teal); }
.stat-card.navy   { background: var(--gradient-navy); }

/* ── 按钮 ── */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: #1a5ab8;
    border-color: #1a5ab8;
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

/* ── Hero 区（公开首页大标题区） ── */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(44,111,206,0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(33,147,176,0.1) 0%, transparent 50%);
}
.hero-section .hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}
.hero-section .hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.85;
    margin-bottom: 32px;
    position: relative;
}
.hero-section .hero-buttons {
    position: relative;
}
.hero-section .btn-hero-primary {
    padding: 12px 32px;
    font-size: 1.1rem;
    margin: 0 8px;
}
.hero-section .btn-hero-outline {
    padding: 12px 32px;
    font-size: 1.1rem;
    margin: 0 8px;
}

/* ── 页脚 ── */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 16px 0;
    font-size: 0.9rem;
    text-align: center;
}
.site-footer span { margin: 0 12px; }

/* ── 底部 TabBar（移动端） ── */
.mobile-tabbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    z-index: 1000;
    padding: 6px 0 env(safe-area-inset-bottom);
}
.mobile-tabbar .tab-item {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 4px 0;
    display: block;
    text-decoration: none;
}
.mobile-tabbar .tab-item i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 2px;
}
.mobile-tabbar .tab-item.active {
    color: var(--primary);
}

/* ── 教师主内容区（全宽） ── */
.teacher-main {
    margin: 0;
    padding: 24px;
    width: 100%;
}

/* ── 导航栏下拉菜单增强 ── */
.navbar .dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 200px;
    font-size: 0.95rem;
}
.navbar .dropdown-menu .dropdown-item {
    padding: 10px 20px;
    color: var(--text-primary);
    transition: all 0.12s;
}
.navbar .dropdown-menu .dropdown-item i {
    width: 22px;
    text-align: center;
    margin-right: 8px;
    color: var(--primary);
}
.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item.active {
    background: var(--primary-light);
    color: var(--primary);
}
.navbar .dropdown-menu .dropdown-divider {
    margin: 6px 0;
}
.navbar .nav-link.active {
    color: #fff !important;
    font-weight: 600;
}

/* ── 页面容器 ── */
.page-content {
    padding: 24px 0;
}

/* ── 表单 ── */
.form-control {
    border-radius: 8px;
    border-color: var(--border);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(44,111,206,0.15);
}

/* ── 表格 ── */
.table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.table thead th {
    border-top: none;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ── 模态框 ── */
.modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}
.modal-header {
    background: var(--primary);
    color: #fff;
    border-bottom: none;
}
.modal-header .close { color: #fff; }

/* ── 徽章 ── */
.badge-outline {
    background: transparent;
    border: 1px solid currentColor;
}

/* ── ECharts 容器 ── */
.chart-container {
    width: 100%;
    min-height: 300px;
}

/* ── 响应式断点 ── */
@media (max-width: 992px) {
    .teacher-main {
        padding: 16px;
    }
    .navbar .dropdown-menu {
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .page-content { padding: 12px 0; }
    .card { margin-bottom: 14px; }
    .card-body { padding: 15px; }
    .stat-number { font-size: 1.8rem; }
    .hero-section { padding: 40px 0; }
    .hero-section .hero-title { font-size: 2rem; }

    .teacher-main {
        padding: 12px;
    }

    /* 移动端 TabBar */
    .mobile-tabbar { display: flex; justify-content: space-around; }
    body { padding-bottom: 60px; }

    /* 统计卡片全宽 */
    .stat-card { margin-bottom: 12px; }
}

@media (max-width: 576px) {
    .hero-section .hero-title { font-size: 1.7rem; }
    .hero-section .hero-subtitle { font-size: 1rem; }
    .stat-card .stat-number { font-size: 1.6rem; }
}
