/* ── 巧思管理系统 ── 简约风CSS ── */

:root {
    --primary: #4f6ef7;
    --primary-light: #eef1ff;
    --primary-dark: #3b55d9;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #6366f1;
    --bg: #f5f6fa;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --sidebar-bg: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #4f6ef7;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 220px; background: var(--sidebar-bg); color: var(--sidebar-text);
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; z-index: 100;
    transition: width .25s;
}
.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 16px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-header h2 { font-size: 16px; color: #fff; font-weight: 600; }
.sidebar-toggle { background: none; border: none; color: var(--sidebar-text); font-size: 14px; cursor: pointer; transition: transform .25s; }
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }
.sidebar.collapsed { width: 60px; }
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-group-title,
.sidebar.collapsed .sidebar-header h2 { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 16px 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 9px 0; }
.sidebar.collapsed .nav-item.sub { padding-left: 0; }
.sidebar.collapsed .nav-group-header { justify-content: center; padding: 10px 0; cursor: pointer; }
.sidebar.collapsed .nav-group-header.group-active { background: var(--sidebar-active); }
.sidebar.collapsed .nav-group-header.group-active .nav-icon { color: #fff; }
.sidebar.collapsed .nav-group-arrow { display: none; }
.sidebar.collapsed .nav-icon { font-size: 18px; width: auto; }
.sidebar.collapsed .nav-group-body { display: none; }
/* 数据看板等顶级 nav-item 在折叠模式下保持可见 */
.sidebar.collapsed a.nav-item { display: flex; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 0; }

/* ── 侧边栏 Flyout 弹出菜单（折叠模式） ── */
.sidebar-flyout {
    display: none; position: fixed; min-width: 160px;
    background: #1e293b; border-radius: 0 8px 8px 0;
    padding: 6px 0; box-shadow: 4px 4px 16px rgba(0,0,0,.3);
    z-index: 300;
}
.sidebar-flyout.show { display: block; }
.sf-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px; color: #cbd5e1;
    font-size: 13px; white-space: nowrap; text-decoration: none;
}
.sf-item:hover { color: #fff; background: rgba(255,255,255,.06); text-decoration: none; }
.sf-item.active { background: var(--sidebar-active); color: #fff; }
.sf-icon { width: 18px; text-align: center; font-size: 14px; }

/* ── 可折叠导航分组 ── */
.nav-group { }
.nav-group-header {
    display: flex; align-items: center; gap: 8px; padding: 10px 16px; cursor: pointer;
    color: var(--text-muted); font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; user-select: none;
    transition: color .15s;
}
.nav-group-header .nav-icon { font-size: 15px; }
.nav-group-header:hover { color: #fff; }
.nav-group-arrow { font-size: 10px; margin-left: auto; transition: transform .2s; width: 12px; text-align:center; order: 1; }
.nav-group-header.expanded .nav-group-arrow { transform: rotate(90deg); }
.nav-group-title { flex: 1; }
.nav-group-body { overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.nav-group-body.open { max-height: 500px; }

.nav-item {
    display: flex; align-items: center; padding: 9px 16px; color: var(--sidebar-text);
    text-decoration: none; transition: all .15s; gap: 10px; font-size: 14px;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-item.sub { padding-left: 32px; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-divider { height: 1px; background: rgba(255,255,255,.1); margin: 8px 16px; }

.sidebar-footer {
    padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.1);
}
.user-info { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 600;
}
.user-name { font-size: 13px; color: #fff; }
.user-role { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.logout-btn { display: block; text-align: center; padding: 6px; border-radius: var(--radius); color: var(--sidebar-text); font-size: 13px; border: 1px solid rgba(255,255,255,.15); }
.logout-btn:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }

.main-content { margin-left: 220px; flex: 1; min-height: 100vh; transition: margin-left .25s; }
.sidebar.collapsed ~ .main-content { margin-left: 60px; }

/* ── Topbar ── */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    height: 52px; padding: 0 24px; background: var(--card-bg);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 15px; font-weight: 600; color: var(--text); }
.topbar-right { display: flex; align-items: center; }

.user-menu {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 6px 12px; border-radius: var(--radius); position: relative;
    user-select: none;
}
.user-menu:hover { background: var(--bg); }
.user-menu .user-avatar {
    width: 30px; height: 30px; border-radius: 50%; background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 13px; font-weight: 600;
}
.user-menu .user-name { font-size: 13px; color: var(--text); }
.user-menu .user-role { font-size: 11px; color: var(--text-secondary); }
.user-menu-arrow { font-size: 10px; color: var(--text-muted); }

/* 顶部只显示头像+名称 */
.user-menu .user-role,
.user-menu .user-menu-arrow { display: none; }
.topbar-expire-warn { font-size: 12px; color: #e67e22; background: #fef3cd; padding: 3px 10px; border-radius: 4px; white-space: nowrap; }

.topbar-guide-btn {
    display: inline-flex; align-items: center; gap: 5px;
    margin-right: 12px; padding: 5px 10px; border-radius: 4px;
    font-size: 13px; color: var(--text-secondary); text-decoration: none;
    border: 1px solid var(--border); background: var(--card-bg);
    transition: all .15s;
}
.topbar-guide-btn:hover { color: var(--primary); border-color: var(--primary); background: #eef2ff; }
.topbar-guide-btn svg { flex-shrink: 0; }

.user-dropdown {
    display: none; position: absolute; top: 100%; right: 0; margin-top: 4px;
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 180px; z-index: 200;
}
.user-dropdown.show { display: block; }
.dropdown-header {
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.dropdown-header .user-avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; font-weight: 600; flex-shrink: 0;
}
.dropdown-header div { display: flex; flex-direction: column; gap: 1px; }
.dropdown-header strong { font-size: 14px; }
.dropdown-header span { font-size: 12px; color: var(--text-secondary); }
.dropdown-item {
    display: block; padding: 9px 14px; font-size: 13px; color: var(--text);
    text-decoration: none; transition: background .1s;
}
.dropdown-item:hover { background: var(--bg); text-decoration: none; }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

.main-content-inner { padding: 24px; }

/* ── Login ── */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-container { width: 100%; max-width: 380px; padding: 20px; }
.login-card { background: #fff; padding: 40px 32px; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.15); }
.login-card h1 { font-size: 24px; text-align: center; margin-bottom: 4px; }
.login-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 24px; font-size: 13px; }
.login-org-welcome { text-align: center; color: var(--primary); margin: -16px 0 24px; font-size: 14px; font-weight: 500; letter-spacing: 1px; }
.login-error { color: var(--danger); text-align: center; margin-top: 12px; font-size: 13px; min-height: 20px; }

/* 记住密码 */
.remember-row { margin-bottom: 16px; }
.remember-label { display: flex !important; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.remember-checkbox { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* ── Page ── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-header h2 { font-size: 20px; font-weight: 600; }

/* ── Card ── */
.card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.card-header h3 { font-size: 15px; font-weight: 600; }
.card-body { padding: 16px 20px; }

.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ── Table ── */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-weight: 600; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.table tr:hover { background: #f8fafc; }
.table td.actions { white-space: nowrap; }
.table td.actions .btn-sm { margin-right: 4px; }

/* ── Button ── */
.btn, button.btn { display: inline-flex; align-items: center; gap: 4px; }
.btn { padding: 8px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 14px; transition: all .15s; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-info { background: var(--info); color: #fff; border-color: var(--info); }
.btn-outline { background: transparent; border-color: var(--border); }
.btn-block { width: 100%; justify-content: center; padding: 10px; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 4px; border: 1px solid var(--border); background: #fff; cursor: pointer; transition: all .15s; }
.btn-sm:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm.btn-primary,
.btn.btn-sm.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-sm.btn-primary:hover,
.btn.btn-sm.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-sm.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm.btn-danger:hover { background: #dc2626; border-color: #dc2626; }
.btn-sm.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-sm:disabled { opacity: .4; cursor: not-allowed; }

/* ── Form ── */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: var(--text-secondary); }
.form-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; background: #fff; transition: border-color .15s; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
select.form-input { padding: 8px 12px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; cursor: pointer; }

/* ── Toolbar ── */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar .form-input { width: auto; max-width: 200px; }

/* ── Badge ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-info { background: #e0e7ff; color: #3730a3; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* ── Pagination ── */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; padding: 12px 0; }
.pagination .btn-sm.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Modal ── */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,.4); z-index: 1000; align-items: center; justify-content: center;
}
.modal-content {
    background: #fff; border-radius: 12px; padding: 24px; max-width: 520px; width: 90%;
    max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.15);
    position: relative;
}
.modal-content:has(.modal-header) { padding: 0; }
.modal-content.modal-lg { max-width: 700px; }
.modal-close { position: absolute; top: 12px; right: 16px; font-size: 22px; cursor: pointer; color: var(--text-muted); background: none; border: none; z-index: 1; }
.modal-close:hover { color: var(--text); }

.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-close-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: none; background: transparent; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.modal-close-btn:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 16px 24px 24px; }

/* ── 修改密码弹窗（独立样式避免冲突） ── */
.cp-modal {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 1000; align-items: center; justify-content: center;
}
.cp-dialog {
    background: #fff; border-radius: 14px; width: 400px; max-width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,.2); overflow: hidden;
}
.cp-header {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 24px 0; font-size: 17px; font-weight: 600; color: #1a1a2e;
}
.cp-header-icon { color: var(--primary); display: flex; }
.cp-close-btn {
    margin-left: auto; display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px; border: none;
    background: transparent; color: #999; cursor: pointer; transition: all .15s;
}
.cp-close-btn:hover { background: #f0f0f0; color: #333; }
.cp-body { padding: 20px 24px; }
.cp-field { margin-bottom: 16px; }
.cp-label { display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 6px; }
.cp-input-wrap {
    display: flex; align-items: center; gap: 8px;
    border: 1px solid #e0e0e0; border-radius: 8px; padding: 0 12px;
    transition: border-color .15s; background: #fafafa;
}
.cp-input-wrap:focus-within { border-color: var(--primary); background: #fff; }
.cp-input-icon { color: #bbb; flex-shrink: 0; }
.cp-input {
    flex: 1; border: none; background: transparent; padding: 10px 0;
    font-size: 14px; outline: none;
}
.cp-error { color: var(--danger); font-size: 13px; min-height: 20px; margin-bottom: 4px; }
.cp-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 12px 24px 20px;
}

/* ── Toast ── */
.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: #1e293b; color: #fff; padding: 12px 28px; border-radius: 8px;
    font-size: 14px; font-weight: 500; z-index: 9999; opacity: 0; pointer-events: none;
    box-shadow: 0 4px 20px rgba(0,0,0,.3); transition: opacity .25s;
}
.toast.show { opacity: 1; }

/* ── Tabs ── */
.tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid var(--border); }
.tab { padding: 10px 20px; border: none; background: none; cursor: pointer; font-size: 14px; color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Overview ── */
.overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.overview-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: #fafbfc; }
.ov-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.ov-value { font-size: 22px; font-weight: 700; }

.overview-items { display: grid; gap: 12px; }
.overview-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.overview-item:last-child { border-bottom: none; }
.overview-item strong { font-size: 16px; }

/* ── Mobile Attendance ── */
.course-card { padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; transition: all .15s; }
.course-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(79,110,247,.12); }
.course-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.course-card-body { display: flex; gap: 12px; flex-wrap: wrap; color: var(--text-secondary); font-size: 13px; }

.student-checkin {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 6px; transition: all .15s;
}
.student-checkin.attended { border-color: var(--success); background: #f0fdf4; }
.student-info { display: flex; flex-direction: column; gap: 2px; }
.student-status { display: flex; align-items: center; gap: 8px; }

/* ── Quick Actions ── */
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-actions .action-btn { display: block; padding: 12px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 14px; }
.quick-actions .action-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; background: var(--primary-light); }

/* ── Utilities ── */
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.loading { color: var(--text-muted); padding: 12px 0; }
.mt-1 { margin-top: 12px; }
.mb-1 { margin-bottom: 12px; }

/* ── Switch Toggle ── */
.switch { position:relative; display:inline-block; width:40px; height:22px; }
.switch input { opacity:0; width:0; height:0; }
.slider { position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0; background:#ccc; transition:.3s; border-radius:22px; }
.slider:before { position:absolute; content:''; height:16px; width:16px; left:3px; bottom:3px; background:#fff; transition:.3s; border-radius:50%; }
input:checked + .slider { background:var(--primary); }
input:checked + .slider:before { transform:translateX(18px); }

/* ── Pager ── */
.pager { display:flex; gap:6px; justify-content:center; flex-wrap:wrap; }
.pager .btn-sm { min-width:30px; text-align:center; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .nav-text, .sidebar .nav-group-title, .sidebar-header h2 { display: none; }
    .sidebar .nav-item { justify-content: center; padding: 12px; }
    .main-content { margin-left: 60px; }
    .main-content-inner { padding: 16px; }
    .topbar { padding: 0 12px; }
    .topbar-title { display: none; }
    .user-menu .user-name, .user-menu .user-role, .user-menu-arrow { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .card-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .toolbar .form-input { max-width: 100%; }
}

/* ── 成长档案 ── */
.gr-student-label { font-weight:600; white-space:nowrap; }
.actions .btn-sm + .btn-sm { margin-left:4px; }

/* ── 成长档案 - 左右分栏 ── */
.gr-layout { display: flex; gap: 16px; align-items: flex-start; }
.gr-sidebar {
    width: 200px; flex-shrink: 0;
    background: var(--card-bg); border-radius: var(--radius);
    border: 1px solid var(--border); overflow: hidden;
    position: sticky; top: 16px; max-height: calc(100vh - 120px);
    display: flex; flex-direction: column;
}
.gr-sidebar-header {
    padding: 14px 16px 10px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.gr-sidebar-header h3 { font-size: 14px; font-weight: 600; }
.gr-student-list { overflow-y: auto; flex: 1; }
.gr-student-item {
    padding: 10px 16px; cursor: pointer; display: flex; align-items: center;
    border-left: 3px solid transparent; transition: all .15s;
}
.gr-student-item:hover { background: var(--primary-light); }
.gr-student-item.active {
    background: var(--primary-light); border-left-color: var(--primary); font-weight: 600; color: var(--primary);
}
.gr-student-name { font-size: 14px; }
.gr-main { flex: 1; min-width: 0; }
.gr-empty { text-align: center; padding: 30px; color: var(--text-muted); font-size: 14px; }
.gr-empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 80px 20px; color: var(--text-muted);
}
.gr-empty-state p { font-size: 15px; }
.gr-profile-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px; background: var(--primary-light);
    border: 1px solid var(--border); border-left: 4px solid var(--primary);
    border-radius: var(--radius); margin-bottom: 16px;
}
.gr-profile-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.gr-profile-info h3 { font-size: 16px; margin-bottom: 4px; }
.gr-profile-meta { font-size: 13px; color: var(--text-secondary); }

/* ── 文件上传 ── */
.gr-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background: #fafbfc;
    transition: border-color .2s, background .2s;
    margin-top: 4px;
}
.gr-upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.gr-upload-area input[type="file"] { display: none; }
.gr-upload-area .upload-label { font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.gr-upload-area .upload-label svg { vertical-align: middle; margin-right: 4px; }
.gr-preview-list {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.gr-preview-item {
    position: relative; width: 80px; height: 80px;
    border-radius: 6px; overflow: hidden; border: 1px solid var(--border);
    background: #f5f5f5;
}
.gr-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.gr-preview-remove {
    position: absolute; top: 2px; right: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(0,0,0,.6); color: #fff;
    border: none; cursor: pointer; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.gr-thumb { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; cursor: pointer; border: 1px solid var(--border); vertical-align: middle; }
.gr-thumb + .gr-thumb { margin-left: 4px; }

/* ── 成长档案 - 学员列表 ── */
.gr-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary);
    color: #fff; font-size: 18px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
#grListBody tr:hover { background: var(--primary-light); }
#grListBody tr td:first-child { color: var(--text-muted); font-size: 13px; }

/* ── Switch 开关 ── */
.mini-switch { position:relative; display:inline-flex; align-items:center; gap:6px; cursor:pointer; user-select:none; }
.mini-switch input { display:none; }
.mini-switch .mini-track { width:38px; height:20px; border-radius:10px; background:#cbd5e1; position:relative; transition:background .2s; flex-shrink:0; }
.mini-switch .mini-track::after { content:''; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:transform .2s; }
.mini-switch input:checked + .mini-track { background:#22c55e; }
.mini-switch input:checked + .mini-track::after { transform:translateX(18px); }
.mini-switch .mini-label { font-size:12px; font-weight:500; white-space:nowrap; }
.mini-switch.on .mini-label { color:#166534; }
.mini-switch.off .mini-label { color:#94a3b8; }
.mini-switch.disabled { cursor:default; opacity:.7; }
