/**
 * 学苑平台 - 页面专属样式
 */

/* ============================================================
   Login / Register Page (login.html)
   ============================================================ */
.auth-page-wrapper {
    min-height: calc(100vh - 80px);
    /* 减去 header 高度 */
    background: radial-gradient(circle at 0% 0%, rgba(79, 70, 229, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.6);
    padding: 6px;
    gap: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-light);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.auth-body {
    padding: 30px 40px;
}

.auth-pane {
    display: none;
}

.auth-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.full-width {
    grid-column: span 2;
}

.form-floating>.form-control,
.form-floating>.form-select {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    height: calc(3rem + 2px);
    line-height: 1.25;
}

.form-floating>label {
    padding: 0.75rem 0.75rem;
}

.form-floating>.form-control:focus {
    background-color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-auth {
    padding: 12px;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;
    /* 改为胶囊形 */
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }

    .auth-body {
        padding: 20px;
    }
}

/* ============================================================
   Instructors Page (instructors.html)
   ============================================================ */
.instructors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 1200px) {
    .instructors-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .instructors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .instructors-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.instructor-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.instructor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.instructor-avatar-wrapper {
    margin-bottom: 1.5rem;
}

.instructor-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0f0f0;
}

.instructor-info {
    text-align: center;
}

.instructor-name {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.instructor-title {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* 荣誉奖章样式 - 改为左上角角标 */
.instructor-honors {
    position: absolute;
    top: 0.8rem;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    z-index: 10;
}

.honor-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    /* 极致黑金配色：深色背景衬托亮金文字 */
    background: #1e293b;
    color: #fbbf24;
    /* 调整为长条形：增加右侧填充以容纳更深的燕尾切口 */
    padding: 0.15rem 1.4rem 0.15rem 0.6rem;
    /* 锐利燕尾（Deep V-cut）：将切口深度调至 88% 使角度更锐利 */
    clip-path: polygon(0% 0%, 100% 0%, 88% 50%, 100% 100%, 0% 100%);
    border-radius: 0;
    font-size: 0.7rem;
    /* 稍微缩小字号，增强长条比例感 */
    font-weight: 800;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: help;
    box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.2);
    border-left: 3px solid #fbbf24;
    position: relative;
    overflow: hidden;
    line-height: 1.2;
}

/* 动态流光特效，增加质感 */
.honor-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 30%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.3), transparent);
    transform: rotate(30deg);
    animation: honor-shine 6s infinite linear;
}

@keyframes honor-shine {
    0% {
        left: -100%;
    }

    15% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.honor-badge .honor-name {
    display: inline;
    font-weight: 700;
}

.honor-badge:hover {
    transform: scale(1.08) translateX(5px);
    box-shadow: 4px 8px 18px rgba(0, 0, 0, 0.4);
    filter: brightness(1.2);
}

.honor-badge .honor-icon {
    font-size: 0.85rem;
    color: #fbbf24;
    filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.2));
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.instructor-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.instructor-meta .meta-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

.instructor-meta .meta-item i {
    color: var(--primary);
}

.instructor-bio {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    /* 让简介填充剩余空间，使底部统计对齐 */
}

.instructor-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    background: transparent;
    /* Fix for potential conflict */
}

.stat-item i {
    color: var(--secondary);
}

/* ============================================================
   Profile Page (profile.html)
   ============================================================ */
/* Profile Layout */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .profile-container {
        padding: 16px 12px;
    }
}

.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-main {
    width: 100%;
}

/* Responsive */
@media (max-width: 991px) {
    .profile-main {
        width: 100%;
    }
}

/* Profile Nav */
.profile-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    /* 垂直居中对齐 */
    gap: 10px;
    margin-bottom: 25px;
    background: #fff;
    padding: 15px 20px;
    /* 增加左右内边距 */
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

/* 头像图标样式 */
.profile-avatar-icon {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.profile-avatar-icon img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-avatar-icon img:hover {
    border-color: var(--primary, #4f46e5);
    transform: scale(1.05);
}

.profile-nav a {
    padding: 10px 20px;
    border-radius: 50px;
    /* 确保胶囊圆角 */
    color: #4b5563;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.profile-nav a:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.profile-nav a.active {
    background-color: var(--primary, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

/* Profile Content - 深度标准化容器 */
.profile-content {
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 统一标签页包装器 */
.tab-pane-wrapper {
    width: 100% !important;
    min-width: 100%;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
    box-sizing: border-box;
}

/* 统一标签页头部 */
.tab-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    width: 100% !important;
    padding: 20px 20px 0 20px !important;
    /* 上方和左右都有内边距 */
    box-sizing: border-box;
}

.tab-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.2;
}

/* 统一操作按钮区 - 消除可能的宽度偏移 */
.tab-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

/* 统一标签页内容体 */
.tab-pane-body {
    width: 100% !important;
    min-width: 100%;
    box-sizing: border-box;
    flex-grow: 1;
    padding: 0 20px;
    /* 添加左右内边距，防止内容贴边 */
}

/* 账号设置容器特殊微调 (使其不再有额外的外部 card 边距干扰) */
.compact-settings {
    width: 100%;
}

.compact-settings .card {
    margin: 0 !important;
}

/* 强制考试列表容器不带有默认 Bootstrap 边距 */
.exam-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.exam-card {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

/* 修复 row 带来的负边距导致宽度溢出 */
.row.honor-grid {
    margin-left: 0;
    margin-right: 0;
}

/* 账号设置专属样式优化 */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
}

.settings-card {
    background: #fff;
    transition: all 0.3s ease;
}

.settings-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

/* 豪华输入框样式 */
.form-control-luxe {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: #2d3748;
    background-color: #f8fafc;
    background-clip: padding-box;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    transition: all 0.2s ease-in-out;
}

.form-control-luxe:focus {
    color: #1a202c;
    background-color: #fff;
    border-color: var(--primary, #4f46e5);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* 带图标的输入框 */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
    pointer-events: none;
}

.input-with-icon .form-control-luxe {
    padding-left: 2.75rem;
}

/* 头像预览增强 */
.avatar-preview-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.avatar-preview-container:hover .avatar-overlay {
    opacity: 1;
    display: flex;
    /* Ensure it is displayed on hover */
}

.btn-save {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 0.625rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* 极致紧凑账号设置 */
.compact-settings {
    width: 100%;
    /* 继承父级宽度 */
}

.luxe-sm {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    font-size: 0.875rem !important;
    padding: 0.4rem 0.75rem !important;
}

.luxe-sm:focus {
    background-color: #fff !important;
    border-color: var(--primary, #4f46e5) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

.avatar-preview-container.sm {
    width: 100px;
    height: 100px;
    border: 3px solid #fff;
}

.op-1 {
    opacity: 0.1;
}

@media (max-width: 768px) {
    .col-md-3.border-right {
        border-right: none !important;
        border-bottom: 1px solid #eee;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
}

/* Cropper 样式覆盖 */
.img-container {
    max-height: 500px;
    background-color: #f8f9fa;
    text-align: center;
}

.img-container img {
    max-width: 100%;
}

/* ============================================================
   Course List Page (course_list.html)
   ============================================================ */
.list-unstyled {
    list-style: none;
    padding: 0;
}

.hover\:text-primary:hover {
    color: var(--primary);
}

/* 必修课程样式 */
.mandatory-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mandatory-item {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--danger);
}

.mandatory-info {
    margin-bottom: 0.5rem;
}

.mandatory-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dark);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.mandatory-title:hover {
    color: var(--primary);
}

.mandatory-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mini-progress {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.mini-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.text-danger {
    color: #dc3545;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.mandatory-title-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    /* Ensure it spans */
}

.mandatory-title-link:hover {
    color: var(--primary);
}

/* 截止日期徽章样式 */
.c-badge-deadline-date.expired {
    background: #6c757d !important;
    opacity: 0.7;
}

/* ============================================================
   My Mandatory Courses Page (my_mandatory_courses.html)
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #ffc107, #ff9800);
}

.stat-icon.bg-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #666;
}

.mandatory-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.mandatory-course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid #dc3545;
}

.mandatory-course-card.completed {
    border-color: #28a745;
}

.mandatory-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.course-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
}

.course-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.badge-info {
    background: #17a2b8;
    color: white;
}

.course-content {
    padding: 1rem;
}

.course-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.4;
}

.course-title a {
    color: inherit;
    text-decoration: none;
}

.course-title a:hover {
    color: var(--primary);
}

.course-category,
.course-instructor {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
    background: transparent;
}

.progress-container {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.progress-label {
    color: #666;
}

.progress-percentage {
    font-weight: 600;
    color: var(--primary);
}

.progress-bar-wrapper {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.course-actions {
    display: flex;
    gap: 0.5rem;
}

.completion-time,
.learning-started-time {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.875rem;
    color: #666;
    background: transparent;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mandatory-courses-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Store Manager Users Page (store_manager_users.html)
   ============================================================ */
.store-manager-page {
    padding: 20px 0;
    background-color: #f8fafc;
    min-height: calc(100vh - 80px);
}

.page-header {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 0px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stats-icon.sm {
    width: 40px;
    height: 40px;
    font-size: 18px;
    border-radius: 8px;
}

.icon-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.icon-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.icon-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.content-card {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header-custom {
    background: #f8fafc;
    color: #334155;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: 1px solid #e2e8f0;
}

.filter-section {
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #f1f5f9;
}

/* 统一筛选组件高度并修复文字切除 */
.filter-section .form-control,
.filter-section .form-select,
.filter-section .input-group-text,
.filter-section .btn {
    height: 40px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    line-height: normal !important;
}

.filter-section .form-select {
    padding-right: 32px !important;
    /* 确保下拉箭头不遮挡文字 */
}

.filter-section .input-group-text {
    background-color: #f8fafc;
    border-color: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-container {
    padding: 0;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    color: #64748b;
    padding: 12px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 0.9rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}

.pending-badge {
    background-color: #fffbeb;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    border: 1px solid #fef3c7;
}

.active-badge {
    background-color: #ecfdf5;
    color: #065f46;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1fae5;
}

.pending-badge.sm,
.active-badge.sm {
    padding: 2px 8px;
    font-size: 0.7rem;
}

.btn-activate {
    background: #10b981;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-activate:hover {
    background: #059669;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-deactivate {
    background: #ef4444;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-deactivate:hover {
    background: #dc2626;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-xs {
    padding: 2px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .store-manager-page {
        padding: 20px 0;
    }

    .page-header {
        padding: 20px;
    }

    .stats-card {
        margin-bottom: 16px;
    }
}

/* ============================================================
   Contact Page (contact.html)
   ============================================================ */
.icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(142, 151, 117, 0.1);
    color: var(--primary);
}

.contact-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-light);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* ============================================================
   Add Student Page (add_student.html)
   ============================================================ */
.add-student-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Note: .page-header might conflict with store manager page header if not careful.
   However, they are scoped by container classes in HTML usually, or we can make this specific.
   For now, we'll keep it as is, but be aware.
*/
.add-student-container .page-header {
    text-align: center;
    margin-bottom: 32px;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.add-student-container .page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-main);
    margin-bottom: 8px;
}

.add-student-container .page-header p {
    color: #64748b;
    font-size: 1rem;
}

.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 32px;
    border: 1px solid #f1f5f9;
}

.add-student-container .form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.add-student-container .full-width {
    grid-column: span 3;
}

.form-group {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background-color: #f8fafc;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    background-color: #fef2f2 !important;
    /* Force override for specificity */
}

.alert i {
    font-size: 1.25rem;
}

@media (max-width: 991px) {
    .add-student-container .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .add-student-container .full-width {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .add-student-container .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .add-student-container .full-width {
        grid-column: span 1;
    }

    .form-card {
        padding: 24px;
    }

    .add-student-container {
        margin: 24px auto;
    }
}

/* ============================================================
   404 Page (404.html)
   ============================================================ */
.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.display-1 {
    font-size: 8rem;
    letter-spacing: -2px;
}

/* ============================================================
   Minimal Layout (minimal.html)
   ============================================================ */
/* Reset & Global - handled by base.css mostly, but minimal has overrides */
/* Minimal Layout */
.minimal-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Minimal Header */
.minimal-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.5rem 1rem;
    flex-shrink: 0;
}

.minimal-header-content {
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.back-btn:hover {
    background: #e0e0e0;
}

/* .course-title class is reused, ensuring context */
.minimal-header .course-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

/* Main Content */
.minimal-content {
    flex: 1;
    overflow: hidden;
}

/* Minimal Footer */
.minimal-footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 0.5rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    flex-shrink: 0;
}

/* ============================================================
   Exam Taking Page (exam_taking.html)
   ============================================================ */
/* Note: body background override should be handled carefully. Using class on body is better but for now: */
body.exam-taking-page {
    background-color: #f6f8fb !important;
}

/* To avoid conflict if body class isn't added, use scoped selectors or keep global if intended */
/* The original had global body style. We'll add a class .bg-exam-mode to body in HTML if possible, 
   otherwise rely on specificity or the fact that this CSS loads last */

.x-small {
    font-size: 0.75rem;
}

/* 答题卡网格 */
.answer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.answer-grid .btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    transition: all 0.2s;
    border: 1px solid #e6e8eb;
    background-color: #fcfdfe;
    color: #616876;
    padding: 0;
    font-size: 0.85rem;
}

.answer-grid .btn.answered {
    background-color: #e7f3ff;
    color: #206bc4;
    border-color: #206bc4;
}

.answer-grid .btn.active-btn {
    background-color: #206bc4 !important;
    color: #fff !important;
    border-color: #206bc4 !important;
    box-shadow: 0 4px 8px rgba(32, 107, 196, 0.25);
}

/* 选项样式 */
.option-item:hover {
    background-color: #fcfdfe !important;
    border-color: #206bc4 !important;
}

.option-item:has(input:checked) {
    background-color: #f1f7ff !important;
    border-color: #206bc4 !important;
}

.form-check-input:checked {
    background-color: #206bc4 !important;
    border-color: #206bc4 !important;
}

/* 辅助样式 */
.bg-red-lt {
    background-color: #fef5f5 !important;
    color: #d63939 !important;
}

.text-red {
    color: #d63939 !important;
}

.question-card {
    animation: fadeIn 0.3s ease-out;
}

/* ============================================================
   Exam Start Page (exam_start.html)
   ============================================================ */
.bg-blue-lt {
    background-color: #f1f7ff !important;
    color: #206bc4 !important;
}

.bg-green-lt {
    background-color: #f2faf5 !important;
    color: #2fb344 !important;
}

.bg-orange-lt {
    background-color: #fff9f2 !important;
    color: #f76707 !important;
}

.text-orange {
    color: #f76707 !important;
}

.transition-all {
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.badge-outline {
    padding: 5px 12px;
    border: 1px solid currentColor;
    background: transparent;
    font-weight: 700;
    border-radius: 50px;
}

/* ============================================================
   Exam Result Page (exam_result.html)
   ============================================================ */
.bg-white-10 {
    background-color: rgba(255, 255, 255, 0.15);
}

.bg-light-soft {
    background-color: #fafbfc;
}

.bg-secondary-lt {
    background-color: #f0f2f6 !important;
    color: #616876 !important;
}

.scale-up {
    animation: scale-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scale-up {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.border-blue-lt-20 {
    border-color: rgba(32, 107, 196, 0.1) !important;
}
