/* ========================================
   设计系统：Slate 柔和色系 + 现代质感
   配色：Slate 色系，主色 slate-900/800，背景 #f8fafc
   Accent：Indigo-500，仅用于 CTA 按钮
   间距：8px 网格。卡片 padding 24px，板块间距 32-48px
   字体：标题 font-bold + tracking-tight，正文 text-slate-600，行高 1.6
   质感：统一 rounded-xl，卡片用极淡边框 border-slate-200/60 代替深阴影
   ======================================== */

/* ── 触控规则（保留，44px 最小触控面积）── */
.btn, .nav-link, .list-group-item, a, button,
input[type="submit"], .dropdown-item, .page-link {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── 基础 ── */
body {
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
    font-size: 15px;
    background: #f8fafc;
    color: #334155;
    padding-top: 72px;
    line-height: 1.6;
}

/* ── 导航栏 ── */
.navbar {
    padding: 0 1rem;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.navbar-brand {
    color: #1e293b !important;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}
.navbar .navbar-nav .nav-link {
    color: #64748b !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}
.navbar .navbar-nav .nav-link:hover {
    color: #1e293b !important;
    background: #f1f5f9;
}
.navbar .navbar-toggler {
    border-color: #e2e8f0;
    color: #64748b;
}
.navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23475569' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── 卡片 ── */
.card {
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: #e2e8f0;
}
.card-body { padding: 1.5rem; }

/* ── 按钮 ── */
.btn {
    border-radius: 10px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.btn-primary {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}
.btn-primary:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.25);
}
.btn-outline-primary {
    border: 1.5px solid #e2e8f0;
    color: #475569;
    background: transparent;
}
.btn-outline-primary:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f8fafc;
    transform: translateY(-1px);
}
.btn-outline-secondary {
    border: 1.5px solid #e2e8f0;
    color: #64748b;
    background: transparent;
}
.btn-outline-secondary:hover {
    border-color: #cbd5e1;
    color: #334155;
    background: #f8fafc;
    transform: translateY(-1px);
}
.btn-outline-success {
    border: 1.5px solid #e2e8f0;
    color: #10b981;
}
.btn-outline-success:hover {
    border-color: #10b981;
    color: #059669;
    background: #f0fdf4;
    transform: translateY(-1px);
}
.btn-outline-warning {
    border: 1.5px solid #e2e8f0;
    color: #d97706;
}
.btn-outline-warning:hover {
    border-color: #d97706;
    color: #b45309;
    background: #fffbeb;
    transform: translateY(-1px);
}
.btn-outline-info {
    border: 1.5px solid #e2e8f0;
    color: #0891b2;
}
.btn-outline-info:hover {
    border-color: #0891b2;
    color: #0e7490;
    background: #ecfeff;
    transform: translateY(-1px);
}
.btn-success {
    background: #10b981;
    border-color: #10b981;
    color: white;
}
.btn-success:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.25);
}
.btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}
.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-1px);
}
.btn-lg { padding: 0.625rem 1.5rem; border-radius: 12px; }
.btn-sm { padding: 0.375rem 0.75rem; border-radius: 8px; font-size: 0.8rem; }

/* ── 列表组 ── */
.list-group-item {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    padding: 1rem 1.25rem;
    transition: all 0.15s;
}
.list-group-item:hover {
    background: #f8fafc;
    padding-left: 1.5rem;
}
.list-group-item:first-child { border-radius: 12px 12px 0 0; }
.list-group-item:last-child { border-radius: 0 0 12px 12px; }

/* ── 面包屑 ── */
.breadcrumb { background: transparent; padding: 0.5rem 0; margin: 0; }
.breadcrumb-item { font-size: 0.9rem; }
.breadcrumb-item a { color: #64748b; text-decoration: none; min-height: 36px; }
.breadcrumb-item.active { color: #1e293b; }

/* ── 表单 ── */
.form-control, .form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s;
    font-size: 0.9rem;
    padding: 0.625rem 0.875rem;
}
.form-control:focus, .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.form-label { font-size: 0.9rem; font-weight: 500; color: #475569; margin-bottom: 0.375rem; }
.form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

/* ── 徽章 ── */
.badge {
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}
.badge.bg-light { background: #f1f5f9 !important; color: #475569 !important; }
.badge.bg-warning { background: #fbbf24 !important; color: #92400e !important; }
.badge.bg-success { background: #a7f3d0 !important; color: #065f46 !important; }
.badge.bg-danger { background: #fca5a5 !important; color: #991b1b !important; }
.badge.bg-info { background: #bae6fd !important; color: #075985 !important; }
.badge.bg-primary { background: #c7d2fe !important; color: #3730a3 !important; }

/* ── 分页 ── */
.page-link {
    border-radius: 10px !important;
    margin: 0 2px;
    border: 1px solid #f1f5f9;
    color: #475569;
    font-size: 0.9rem;
}
.page-item.active .page-link { background: #6366f1; border-color: #6366f1; color: white; }
.page-item.disabled .page-link { border-color: #f1f5f9; color: #cbd5e1; }

/* ── 笔记内容 ── */
.note-content { line-height: 1.9; color: #334155; }
.note-content h3 { font-size: 1.25rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.note-content p { margin-bottom: 0.75rem; }
.note-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.note-content th, .note-content td { padding: 0.5rem 0.75rem; border: 1px solid #e2e8f0; }
.note-content th { background: #f8fafc; font-weight: 600; }

/* ── 提示/警告 ── */
.alert {
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
}

/* ── 空状态 ── */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }

/* ── 科目入口图标 ── */
.subject-icon { font-size: 2.5rem !important; line-height: 1.2; }

/* ── 倒计时卡片 ── */
.countdown-card { border-radius: 16px; border: 1px solid #f1f5f9; }

/* ── 科目配色（极淡底色）── */
.subject-yuwen .card { background: #f8fafc; }
.subject-shuxue .card { background: #f8fafc; }
.subject-wuli .card { background: #f8fafc; }

/* ── DashBoard 统计卡 ── */
.dashboard-stat {
    border-radius: 12px;
    padding: 1.25rem;
    height: 100%;
}
.dashboard-stat .number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

/* ── 按钮组 ── */
.btn-group .btn {
    border-radius: 10px !important;
    margin: 0 2px;
}

/* ── 平板响应 ── */
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (max-width: 767.98px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
    .subject-icon { font-size: 2rem !important; }
}

/* ── 打印优化 ── */
@media print {
    .navbar, .btn, .breadcrumb { display: none !important; }
    body { padding-top: 0 !important; }
}
