/**
 * UI Pro Max 统一增强样式
 * 作用：在不破坏原 style.css 的基础上，补齐设计令牌、动画、响应式与移动端适配。
 */

/* ==================== 设计令牌 ==================== */
:root {
    /* 继承 style.css 主色调，不重复定义 --primary */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-600: #4f46e5;
    --success: #10b981;
    --success-50: #ecfdf5;
    --danger: #ef4444;
    --danger-50: #fef2f2;
    --warning: #f59e0b;
    --warning-50: #fffbeb;
    --wx: #07C160;
    --wx-50: #e6f7ed;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==================== 关键帧动画 ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in { animation: fadeIn 0.3s ease-out both; }
.animate-slide-up { animation: slideUp 0.35s ease-out both; }
.animate-scale-in { animation: scaleIn 0.25s ease-out both; }
.animate-pulse-soft { animation: pulse-soft 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

.reveal,
.animate-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal.visible,
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 骨架屏 ==================== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
    color: transparent !important;
    pointer-events: none;
}

/* ==================== 通用工具类 ==================== */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-stretch { align-items: stretch; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; min-width: 0; }
.flex-auto { flex: 1 1 auto; min-width: 0; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

/* Inline layout replacements */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-between-wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.flex-center { display: flex; align-items: center; }
.flex-center-wrap { display: flex; align-items: center; flex-wrap: wrap; }
.flex-wrap-gap { display: flex; gap: 12px; flex-wrap: wrap; }
.flex-wrap-gap-sm { display: flex; gap: 8px; flex-wrap: wrap; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.text-meta { font-size: 12px; color: #64748b; }
.text-meta-block { display: block; font-size: 12px; color: #64748b; margin: 4px 0 0; }
.form-switch-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-w-0 { min-width: 0; }

.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }

.text-gray { color: var(--gray-500); }
.text-muted { color: var(--gray-400); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== 按钮深度统一 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    padding: 8px 14px;
    min-height: 36px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: normal;
    word-break: break-word;
    position: relative;
    overflow: hidden;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-600));
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), #4338ca);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-gray {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-200);
}
.btn-gray:hover { background: var(--gray-200); }

.btn-text {
    background: transparent;
    color: var(--gray-500);
    border-color: transparent;
}
.btn-text:hover { background: var(--gray-100); color: var(--gray-700); }

.btn-danger {
    background: var(--danger-50);
    color: var(--danger);
    border-color: var(--danger-50);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-success {
    background: var(--success-50);
    color: #047857;
    border-color: var(--success-50);
}
.btn-success:hover { background: var(--success); color: #fff; }

.btn-sm { padding: 5px 10px; min-height: 28px; font-size: 13px; }
.btn-lg { padding: 10px 18px; min-height: 44px; font-size: 15px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-sm.btn-icon { width: 28px; height: 28px; }

.btn-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}
.btn-group .btn { flex: 1 1 auto; }

/* ==================== 卡片 ==================== */
.card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
}
.card-header h2,
.card-header h3 {
    margin: 0;
    font-weight: 600;
    color: var(--gray-800);
}
.card-body { padding: 20px; }
.card.collapsed .card-body { display: none; }
.collapse-toggle { font-size: 12px; }

/* ==================== 表单统一 ==================== */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-800);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
    box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray-400); }

.form-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin: 4px 0 0;
    line-height: 1.5;
}

.form-switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 8px 0;
}


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

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

/* ==================== 开关 ==================== */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.switch-toggle input { opacity: 0; width: 0; height: 0; }
.switch-toggle .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--gray-300);
    border-radius: 24px;
    transition: background var(--transition);
}
.switch-toggle .slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition-bounce);
    box-shadow: var(--shadow-sm);
}
.switch-toggle input:checked + .slider { background: var(--primary); }
.switch-toggle input:checked + .slider:before { transform: translateX(20px); }

/* ==================== 标签与徽章 ==================== */
.tag,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
}
.badge-wxpay {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
    padding: 1px 6px;
    background: var(--wx);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
}

/* ==================== 列表与表格 ==================== */
.list-container { border-top: 1px solid var(--gray-100); }
.list-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition);
}
.list-item:hover { background: var(--gray-50); }
.list-item-main { flex: 1 1 auto; min-width: 0; }
.list-item-title {
    font-weight: 500;
    color: var(--gray-800);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.list-item-sub {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}
.list-item-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    position: static;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}
.edu-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 14px;
}
.edu-table th,
.edu-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    text-align: left;
    vertical-align: middle;
}
.edu-table th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.edu-table tr:last-child td { border-bottom: none; }
.edu-table tr:hover td { background: var(--gray-50); }

/* ==================== 空状态 ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
    color: var(--gray-500);
    animation: fadeIn 0.4s ease-out;
}
.empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-400);
    margin-bottom: 16px;
}
.empty-icon svg { width: 32px; height: 32px; }

/* ==================== 模态框 ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 10000;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-out;
}
.modal-overlay[style*="flex"] { display: flex; }
.modal-content {
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    animation: scaleIn 0.25s ease-out;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
}
.modal-body { padding: 20px; }
.modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--gray-100);
}
.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--gray-500);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-800); }

/* ==================== 微信支付区块 ==================== */
.wxpay-section { border-left: 4px solid var(--wx); }
.wxpay-callback-box {
    margin-top: 16px;
    padding: 16px;
    background: var(--wx-50);
    border: 1px solid #d1f4e0;
    border-radius: var(--radius);
    font-size: 13px;
    color: #065f46;
    line-height: 1.6;
}
.wxpay-callback-box code {
    display: inline-block;
    word-break: break-all;
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #d1f4e0;
    margin-top: 4px;
    color: var(--gray-700);
}
.callback-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
}

/* ==================== 移动端深度适配 ==================== */
@media (max-width: 768px) {
    .container { padding: 12px; }

    .stats-grid,
    .stats-grid.three-col,

    .stat-card { padding: 16px; }
    .stat-number { font-size: 24px; }

    .quick-card { padding: 14px 8px; font-size: 13px; }

    .card-header {
        padding: 14px 16px;
        gap: 10px;
    }
    .card-header h2 { font-size: 16px; }
    .card-body { padding: 16px; }

    .list-item { padding: 12px 16px; }
    .list-item-right {justify-content: flex-start; }

    .edu-table { min-width: 560px; }

    .modal-overlay { padding: 16px; }
    .modal-content {
        max-width: 100%;
        width: calc(100vw - 32px);
        max-height: calc(100vh - 32px);
        border-radius: var(--radius-lg);
    }
    .modal-footer { justify-content: stretch; }
    .modal-footer .btn { flex: 1; }

    .action-bar,
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .action-bar .btn,
    .filter-bar .btn,
    .action-bar input,
    .filter-bar input,
    .action-bar select,
    .filter-bar select { width: 100%; }
}

@media (max-width: 480px) {

    .btn-group .btn { width: 100%; }

    .edu-table td,
    .edu-table th { padding: 10px 12px; font-size: 13px; }

    .role-tabs { flex-wrap: wrap; gap: 6px; }
    .role-tab { flex: 1 1 auto; padding: 8px 10px; font-size: 13px; }

    .list-item-title { font-size: 14px; }
    .list-item-sub { font-size: 11px; }

    .feature-card { padding: 18px; }
    .feature-icon { width: 44px; height: 44px; }
    .feature-icon svg { width: 22px; height: 22px; }
}

/* ==================== 顶部导航与菜单 ==================== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--gray-200);
}
.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-600);
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-item:hover,
.nav-item.active {
    background: var(--primary-50);
    color: var(--primary);
}

/* ==================== Toast 与弹窗 ==================== */
.edu-toast {
    animation: slideUp 0.25s ease-out, fadeIn 0.25s ease-out;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ==================== Org page 公开页 ==================== */
.org-page-hero {
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.org-page-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
}
.org-page-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ==================== 新建排课弹窗 UI 优化 ==================== */
.date-type-cards {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.date-type-card {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
    color: var(--gray-700);
}
.date-type-card:hover {
    border-color: var(--primary);
    background: var(--primary-50);
}
.date-type-card input {
    margin: 0;
    flex-shrink: 0;
}
.date-type-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-50);
    color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
}
.date-type-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.date-type-text {
    font-weight: 500;
}

.weekday-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.weekday-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-700);
    transition: all 0.15s ease;
}
.weekday-chip:hover {
    border-color: var(--primary);
    background: var(--primary-50);
}
.weekday-chip input {
    margin: 0;
}
.weekday-chip:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.student-search-box {
    position: relative;
    margin-bottom: 10px;
}
.student-search-box input {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    box-sizing: border-box;
}
.student-search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
}
.student-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: none;
}
.student-search-box input:not(:placeholder-shown) ~ .student-search-clear {
    display: block;
}
.student-select-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 6px;
    background: #fff;
}
.student-select-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 4px;
}
.student-select-item:last-child {
    margin-bottom: 0;
}
.student-select-item:hover {
    background: var(--gray-50);
}
.student-select-item:has(input:checked) {
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
}
.student-select-item input {
    margin: 0;
    flex-shrink: 0;
}
.student-select-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.student-select-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
}
.student-select-meta {
    font-size: 12px;
    color: var(--gray-500);
}

/* ==================== 临时学员弹窗时间选择优化 ==================== */
.temp-schedule-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 6px;
    background: #fff;
}
.temp-schedule-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--gray-800);
}
.temp-schedule-item:last-child {
    margin-bottom: 0;
}
.temp-schedule-item:hover {
    background: var(--gray-50);
}
.temp-schedule-item:has(input:checked) {
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
}
.temp-schedule-item input {
    margin: 0;
    flex-shrink: 0;
}
.temp-schedule-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.temp-schedule-time {
    font-weight: 500;
    color: var(--gray-800);
}
.temp-schedule-course {
    font-size: 12px;
    color: var(--gray-500);
}

/* ==================== Radio & Checkbox 统一修复 ==================== */
/* 修复 .form-group input { width: 100%; } 对 radio/checkbox 的拉伸问题 */
input[type="radio"],
input[type="checkbox"] {
    width: auto;
    min-width: auto;
    height: auto;
    min-height: auto;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    accent-color: var(--primary);
    vertical-align: middle;
    cursor: pointer;
}

.form-group input[type="radio"],
.form-group input[type="checkbox"] {
    width: auto;
    min-width: auto;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

/* 统一新建排课、日期类型、临时学员弹窗中的 radio 尺寸与对齐 */
.student-select-item input[type="radio"],
.date-type-card input[type="radio"],
.temp-schedule-item input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
}

/* 统一星期选择 checkbox 尺寸 */
.weekday-chip input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin: 0;
}

/* ==================== 公告发布：接收对象选项 ==================== */
.notice-target-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.notice-target-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--gray-200);
    background: var(--gray-50);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}
.notice-target-chip:hover {
    border-color: var(--primary-100);
    background: var(--primary-50);
    color: var(--primary-600);
}
.notice-target-chip input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-600);
    margin: 0;
    cursor: pointer;
}
.notice-target-chip:has(input:checked) {
    border-color: var(--primary-600);
    background: var(--primary-50);
    color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

/* ==================== 学员端：低课时预警高级卡片 ==================== */
.low-hours-section {
    margin-bottom: var(--space-4);
    animation: slideUpFade 0.5s ease both;
}
.low-hours-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 10px;
}
.low-hours-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
}
.low-hours-section-icon .svg-icon {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}
.low-hours-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.low-hours-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 16px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.35), 0 4px 6px -4px rgba(249, 115, 22, 0.2);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    isolation: isolate;
    transition: transform var(--transition), box-shadow var(--transition);
}
.low-hours-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px -6px rgba(249, 115, 22, 0.4), 0 6px 10px -4px rgba(249, 115, 22, 0.25);
}
.low-hours-card.high {
    background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.35), 0 4px 6px -4px rgba(239, 68, 68, 0.2);
}
.low-hours-card.high:hover {
    box-shadow: 0 16px 35px -6px rgba(239, 68, 68, 0.4), 0 6px 10px -4px rgba(239, 68, 68, 0.25);
}
.low-hours-card.critical {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.4), 0 4px 6px -4px rgba(220, 38, 38, 0.25);
    animation: pulseWarning 2s ease-in-out infinite;
}
.low-hours-card.critical:hover {
    box-shadow: 0 16px 35px -6px rgba(220, 38, 38, 0.5), 0 6px 10px -4px rgba(220, 38, 38, 0.3);
}
.low-hours-glow {
    position: absolute;
    top: -40%;
    right: -10%;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    filter: blur(30px);
    z-index: -1;
}
.low-hours-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 180px;
}
.low-hours-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    flex-shrink: 0;
}
.low-hours-icon .svg-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}
.low-hours-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.low-hours-course {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}
.low-hours-meta {
    font-size: 12px;
    opacity: 0.92;
}
.low-hours-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
    min-width: 60px;
}
.low-hours-number {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.low-hours-unit {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}
.low-hours-progress {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 4px;
}
.low-hours-progress-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseWarning {
    0%, 100% { box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.4), 0 4px 6px -4px rgba(220, 38, 38, 0.25); }
    50% { box-shadow: 0 14px 30px -5px rgba(220, 38, 38, 0.55), 0 6px 10px -4px rgba(220, 38, 38, 0.35); }
}

@media (min-width: 640px) {
    .low-hours-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* ==================== 课时余额：低课时数字高亮 ==================== */
.balance-remaining.low {
    position: relative;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    font-size: var(--font-xl);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    animation: slideUpFade 0.4s ease both;
}
.balance-remaining.low .unit {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}
