/* ===== 国小安亲托管班项目管理系统 全局样式 ===== */
:root {
    --primary: #3b6ef6;
    --primary-dark: #2b57cc;
    --primary-soft: #eef3ff;
    --success: #16a34a;
    --success-soft: #e8f7ee;
    --warning: #ea8c00;
    --warning-soft: #fdf3e3;
    --danger: #dc2626;
    --danger-soft: #fdecec;
    --gray: #94a3b8;
    --gray-soft: #f1f5f9;
    --text: #1e293b;
    --text-sub: #64748b;
    --line: #e8edf5;
    --bg: #f5f7fb;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 30, 54, .04), 0 8px 24px rgba(16, 30, 54, .06);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* ---------- 登录 / 注册 ---------- */
/* 背景不是一张白纸：四团柔光（蓝 / 天蓝 / 薄荷 / 暖橙）压在一层冷蓝底上，
   再叠一层几乎看不见的点阵给点纸质感。全部用渐变画，不引图片。
   分寸：登录页停留短、表单是主角，颜色只做「有温度」的底，不能抢注意力。
   刻意不用 background-attachment: fixed —— 注册页比一屏长，fixed 背景只铺到视口
   高度，滚到下面会露出 body 白底压出一道断层；按自身高度铺满才对。 */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: #e6eefc;
    background-image:
        radial-gradient(circle at center, rgba(59, 110, 246, .10) 0.9px, rgba(59, 110, 246, 0) 1.2px),
        radial-gradient(760px 640px at 2% 0%, rgba(59, 110, 246, .26), rgba(59, 110, 246, 0) 62%),
        radial-gradient(700px 580px at 100% 0%, rgba(96, 158, 255, .30), rgba(96, 158, 255, 0) 60%),
        radial-gradient(860px 740px at 98% 100%, rgba(46, 190, 168, .17), rgba(46, 190, 168, 0) 62%),
        radial-gradient(640px 560px at 0% 100%, rgba(246, 173, 85, .15), rgba(246, 173, 85, 0) 60%),
        linear-gradient(158deg, #edf3ff 0%, #e2ecfd 46%, #e9f5ff 100%);
    background-size: 18px 18px, auto, auto, auto, auto, auto;
    background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

.auth-card {
    width: 100%;
    max-width: 940px;
    display: grid;
    grid-template-columns: 1fr 400px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    /* 底色有了颜色后，卡片要多一点「浮起来」的重量，否则和背景糊成一片 */
    box-shadow: 0 2px 6px rgba(16, 30, 54, .05), 0 28px 70px rgba(16, 30, 54, .16);
}

.auth-side {
    padding: 48px 44px;
    color: #fff;
    background: linear-gradient(150deg, #23325a 0%, #3b6ef6 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-side::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.auth-side h1 {
    font-size: 26px;
    line-height: 1.4;
    margin: 0 0 14px;
    letter-spacing: .5px;
}

.auth-side p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
    line-height: 1.9;
    font-size: 13px;
}

.auth-side .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 1px;
}

.auth-side .brand .dot {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .16);
    display: grid;
    place-items: center;
    font-size: 16px;
}

.auth-form {
    padding: 44px 40px;
}

.auth-form h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.auth-form .sub {
    margin: 0 0 26px;
    color: var(--text-sub);
    font-size: 13px;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 7px;
}

.input, .select, .textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}

.input:focus, .select:focus, .textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 110, 246, .12);
}

/* 自动算出来的字段（如出生年月 = 出生日期推导）：不可编辑，但和普通输入框长得一样，
   只把底色压暗一点，免得灰成一块「坏掉的控件」 */
.input:disabled,
.input[readonly] {
    background: var(--gray-soft);
    color: var(--text-sub);
    cursor: default;
    opacity: 1;
    -webkit-text-fill-color: var(--text-sub);
}

/* ===== 密码框的显示/隐藏按钮 ===== */
.pwd-wrap {
    position: relative;
    display: block;
}

.pwd-wrap .input {
    padding-right: 42px;
}

.pwd-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s, background .15s;
}

.pwd-eye:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.pwd-eye.on {
    color: var(--primary);
}

/* 隐藏 Edge/IE 原生的密码显示按钮，避免和自绘按钮重复 */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* ===== 图形验证码 =====
   输入框和图片排在一行：图必须紧挨着输入框，家长在小屏上才不会
   「输到一半忘了画的是什么、滚回去看又要重新找」。
   图固定 120px 宽，输入框吃掉剩下的空间；窄屏上图片不缩，缩了就认不出。 */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-row .input {
    flex: 1;
    min-width: 0;
    /* 四个字符拉开一点，和图片里的字形对应得上 */
    letter-spacing: .18em;
    text-transform: uppercase;
}

.captcha-img {
    flex: 0 0 auto;
    width: 120px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--gray-soft);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    object-fit: cover;
    transition: border-color .15s, opacity .15s;
}

.captcha-img:hover {
    border-color: var(--primary);
}

/* 还没取到图 / 取图失败：显示成一块浅底占位，而不是浏览器那个破图标 */
.captcha-img:not([src]),
.captcha-img[src=""] {
    background: var(--gray-soft);
}

.captcha-img.is-loading {
    opacity: .45;
    cursor: progress;
}

.textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.8;
}

.auth-tip {
    font-size: 12px;
    color: var(--text-sub);
    background: var(--gray-soft);
    border-radius: 8px;
    padding: 10px 12px;
    line-height: 1.8;
    margin-top: 18px;
}

.auth-switch {
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-sub);
    text-align: center;
}

/* 管理员入口：故意做得比正文更轻，扫站的人看到也不觉得是个「后台入口」；
   但鼠标移上去会变深，管理员自己找得到。 */
.auth-admin {
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    text-align: center;
}

.auth-admin a {
    font-size: 12px;
    color: #b6bfcc;
    text-decoration: none;
    letter-spacing: .5px;
    transition: color .16s;
}

.auth-admin a:hover {
    color: var(--text-sub);
}

/* 注册页比登录页长得多（家长还要填孩子信息），
   靠 margin:auto 居中而不是 align-items:center，超出可视高度时顶部才不会被裁掉。 */
.auth-card {
    margin: auto;
}

/* 注册第 1 步：选身份 */
.role-pick {
    display: grid;
    gap: 12px;
    margin-bottom: 6px;
}

.role-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 2px 14px;
    align-items: center;
    text-align: left;
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.role-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(59, 110, 246, .12);
    transform: translateY(-1px);
}

.role-card .rc-ico {
    grid-row: span 2;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #eef3ff, #dbe7ff);
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.role-card b {
    font-size: 15px;
    color: var(--text);
}

.role-card .rc-desc {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.7;
}

/* 注册第 2 步 */
.reg-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-sub);
    background: var(--primary-soft);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 16px;
}

.reg-selected b {
    color: var(--primary);
}

.reg-selected .link-btn {
    margin-left: auto;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

.reg-split {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 18px 0 12px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

.reg-split span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.reg-split i {
    font-style: normal;
    font-size: 11px;
    color: var(--text-sub);
    line-height: 1.6;
}

.field-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-sub);
    line-height: 1.7;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 9px;
    border: 1px solid transparent;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    background: #fff;
    color: var(--text);
    transition: all .15s;
    white-space: nowrap;
}

.btn:hover {
    opacity: .9;
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(59, 110, 246, .24);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-ghost {
    border-color: var(--line);
    color: var(--text-sub);
}

.btn-ghost:hover {
    border-color: #cbd5e1;
    color: var(--text);
}

.btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 7px;
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 15px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 4px;
    margin-right: 6px;
    font-family: inherit;
}

.link-btn:last-child {
    margin-right: 0;
}

.link-btn.danger {
    color: var(--danger);
}

.link-btn:hover {
    text-decoration: underline;
}

/* ---------- 主框架 ---------- */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 228px;
    flex: 0 0 228px;
    background: linear-gradient(180deg, #1b2540 0%, #16203a 100%);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar .logo {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sidebar .logo .mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, #4d7ef8, #7aa2ff);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.sidebar .logo .name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.sidebar .logo .name small {
    display: block;
    font-size: 11px;
    color: #7f8cab;
    font-weight: 400;
    letter-spacing: .5px;
}

.nav {
    padding: 14px 12px;
    flex: 1;
    overflow-y: auto;
}

.nav .group-title {
    font-size: 11px;
    color: #64748b;
    padding: 12px 10px 8px;
    letter-spacing: 1px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #cbd5e1;
    font-size: 13.5px;
    margin-bottom: 3px;
    transition: all .15s;
}

.nav a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.nav a.active {
    background: linear-gradient(90deg, rgba(59, 110, 246, .95), rgba(59, 110, 246, .65));
    color: #fff;
    box-shadow: 0 6px 18px rgba(59, 110, 246, .3);
}

.nav a .ico {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.nav a .nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #f97316;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 600;
}

.sidebar .foot {
    padding: 14px 18px;
    font-size: 11px;
    color: #5c6b8a;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 62px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar .crumb {
    font-size: 15px;
    font-weight: 600;
}

.topbar .crumb span {
    font-size: 12px;
    color: var(--text-sub);
    font-weight: 400;
    margin-left: 8px;
}

.userbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 13px;
}

.userbox .who {
    line-height: 1.3;
    font-size: 13px;
    white-space: nowrap;
}

.userbox .who small {
    display: block;
    color: var(--text-sub);
    font-size: 11px;
}

.content {
    padding: 22px 26px 40px;
    flex: 1;
}

/* ---------- 卡片 / 统计 ---------- */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(232, 237, 245, .8);
}

.card-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-head h3 {
    margin: 0;
    font-size: 15px;
}

.card-head .desc {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 4px;
}

.card-body {
    padding: 18px 20px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stat {
    background: #fff;
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(232, 237, 245, .8);
    position: relative;
    overflow: hidden;
}

.stat .label {
    font-size: 12.5px;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat .value {
    font-size: 28px;
    font-weight: 700;
    margin: 8px 0 4px;
    letter-spacing: -.5px;
}

.stat .value small {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
    margin-left: 4px;
}

/* 文字型统计值（如「任职校区」）：不能沿用 28px 数字字号，否则长校区名会撑破卡片 */
.stat .value.text {
    font-size: 20px;
    letter-spacing: 0;
    line-height: 1.4;
    word-break: break-word;
}

.stat .foot {
    font-size: 12px;
    color: var(--text-sub);
}

.stat .bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.stat.green .bar {
    background: var(--success);
}

.stat.orange .bar {
    background: var(--warning);
}

.stat.red .bar {
    background: var(--danger);
}

.two-col {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 16px;
}

@media (max-width: 1100px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

/* ---------- 工具条 ---------- */
.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.toolbar .input, .toolbar .select {
    width: auto;
    min-width: 140px;
    padding: 8px 12px;
    font-size: 13px;
}

.toolbar .spacer {
    flex: 1;
}

/* ---------- 表格 ---------- */
.table-wrap {
    overflow-x: auto;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.data th {
    text-align: left;
    padding: 12px 14px;
    background: #fafbfe;
    color: var(--text-sub);
    font-weight: 600;
    font-size: 12.5px;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}

/* 表头的对齐必须跟着单元格走：数字列右对齐、文字列左对齐。
   `table.data th` 的权重（0,1,2）高于 `.text-right`（0,1,0），
   只写 .text-right 会被压掉，导致「表头靠左、数字靠右」看着错位，所以单独补一条 */
table.data th.text-right {
    text-align: right;
}

table.data td {
    padding: 13px 14px;
    border-bottom: 1px solid #f2f5fa;
    color: #334155;
    vertical-align: middle;
}

table.data tbody tr:hover {
    background: #fafcff;
}

table.data tbody tr:last-child td {
    border-bottom: none;
}

.num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.empty {
    padding: 44px 20px;
    text-align: center;
    color: var(--gray);
    font-size: 13px;
}

/* ---------- 状态标签 ---------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.6;
    white-space: nowrap;
}

.pill::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.pill.green {
    background: var(--success-soft);
    color: var(--success);
}

.pill.orange {
    background: var(--warning-soft);
    color: var(--warning);
}

.pill.red {
    background: var(--danger-soft);
    color: var(--danger);
}

.pill.gray {
    background: var(--gray-soft);
    color: #64748b;
}

.pill.blue {
    background: var(--primary-soft);
    color: var(--primary);
}

/* ---------- 分页 ---------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-sub);
}

.pager .pages {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pager button {
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-sub);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}

.pager button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pager button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pager button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* ---------- 弹窗 ---------- */
.mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100;
    animation: fade .16s ease;
}

@keyframes fade {
    from {
        opacity: 0;
    }
}

.modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .3);
    animation: pop .18s ease;
}

.modal.wide {
    max-width: 720px;
}

@keyframes pop {
    from {
        transform: translateY(8px) scale(.99);
        opacity: 0;
    }
}

.modal-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-head h3 {
    margin: 0;
    font-size: 16px;
}

.modal-head .close {
    border: none;
    background: none;
    font-size: 20px;
    color: var(--gray);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.modal-body {
    padding: 20px 22px;
    overflow-y: auto;
}

.modal-foot {
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.required::after {
    content: " *";
    color: var(--danger);
}

/* ---------- 标签页 ---------- */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-soft);
    padding: 4px;
    border-radius: 10px;
    width: fit-content;
}

.tabs button {
    border: none;
    background: transparent;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-sub);
    cursor: pointer;
    font-family: inherit;
}

.tabs button.active {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(16, 30, 54, .1);
}

/* ---------- 提示 ---------- */
#toast-wrap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 220px;
    max-width: 380px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
    font-size: 13px;
    border-left: 4px solid var(--primary);
    animation: slidein .2s ease;
    line-height: 1.7;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warn {
    border-left-color: var(--warning);
}

@keyframes slidein {
    from {
        transform: translateX(16px);
        opacity: 0;
    }
}

/* ---------- 图表 ---------- */
.chart {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding: 10px 4px 0;
    overflow-x: auto;
}

.chart .col {
    flex: 1;
    min-width: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* 命中区只在柱身上：整列（含月份标签和柱顶空白）都能触发的话，
   鼠标扫过图表就一路弹提示，手指也容易误触到相邻月份。 */
.chart .b {
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    /* 连点两下不触发双击缩放，否则「点第二下收起」会变成放大页面 */
    touch-action: manipulation;
}

/* 柱宽只有 13px，手指按不准。用透明伪元素把命中区往外扩一圈：
   左右各 4px（正好吃掉柱子间 4px 的缝，不与邻居重叠），向上 8px 兜住柱顶。
   数值为 0 的月份柱子几乎是一条线，min-height 保证仍有 28px 可按。 */
.chart .b::after {
    content: "";
    position: absolute;
    left: -4px;
    right: -4px;
    bottom: 0;
    height: calc(100% + 8px);
    min-height: 28px;
}

/* 数值浮层：body 下的 fixed 元素，由 app.js 定位。
   默认 visibility:hidden 常驻，尺寸随时可量，避免先算位置再显形的抖动。 */
.chart-tip {
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    visibility: hidden;
    opacity: 0;
    min-width: 132px;
    padding: 10px 13px;
    border-radius: 11px;
    background: rgba(17, 24, 39, .95);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .26);
    font-size: 12.5px;
    line-height: 1.75;
    color: #fff;
    /* 可接收鼠标：从柱子挪到浮层上继续看，不会因为离开柱子就被关掉 */
    pointer-events: auto;
    transform: translateY(4px);
    transition: opacity .14s ease, transform .14s ease;
}

.chart-tip.show {
    visibility: visible;
    opacity: 1;
    transform: none;
}

.chart-tip b {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.chart-tip span {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: rgba(255, 255, 255, .66);
}

.chart-tip em {
    font-style: normal;
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.chart .bars {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 170px;
}

.chart .b {
    width: 13px;
    border-radius: 4px 4px 0 0;
    background: var(--primary);
    min-height: 2px;
    transition: height .4s ease;
}

.chart .b.paid {
    background: linear-gradient(180deg, #4f83ff, #3b6ef6);
}

.chart .b.unpaid {
    background: #ffd0a8;
}

/* 缴费统计页的退费柱：和「未收」的浅橙区分开，退费是钱往外走，用偏红 */
.chart .b.refund {
    background: linear-gradient(180deg, #ffb3ab, #ff9c92);
}

.chart .x {
    font-size: 11px;
    color: var(--text-sub);
    white-space: nowrap;
}

/* 横轴标签两套写法：PC 用完整的「26/11」「26春」，手机上格子只有 27px，
   换成「11」这种最短能分辨的形式（见 mobile.css 里的开关） */
.chart .x .x-mini {
    display: none;
}

.legend {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-sub);
    padding: 0 4px 6px;
}

.legend i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 3px;
    margin-right: 6px;
}

.notice-list {
    display: flex;
    flex-direction: column;
}

.notice-item {
    padding: 13px 0;
    border-bottom: 1px dashed var(--line);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item .t {
    font-size: 13.5px;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 5px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.notice-item .m {
    font-size: 12px;
    color: var(--gray);
}

.notice-body {
    white-space: pre-wrap;
    line-height: 2;
    color: #334155;
    font-size: 14px;
}

/* 工作台公告可点击 */
.notice-item[data-notice] {
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s;
}

.notice-item[data-notice]:hover {
    background: var(--primary-soft);
}

/* ===== 公告配图：编辑区缩略图 ===== */
.img-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.img-thumb {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--gray-soft);
}

.img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-thumb .img-del {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, .62);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-thumb .img-del:hover {
    background: var(--danger);
}

.img-add {
    width: 88px;
    height: 88px;
    border: 1px dashed #c7d4ea;
    border-radius: 10px;
    background: #fbfdff;
    color: var(--text-sub);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: border-color .15s, color .15s;
}

.img-add:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.img-add .plus {
    font-size: 20px;
    line-height: 1;
}

/* ===== 公告详情：图片画廊 ===== */
.notice-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
}

.notice-gallery img {
    width: 132px;
    height: 132px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    cursor: zoom-in;
    transition: transform .15s, box-shadow .15s;
    background: var(--gray-soft);
}

.notice-gallery img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 30, 54, .14);
}

/* ===== 图片放大查看 ===== */
.img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(8, 15, 30, .82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}

.img-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
    cursor: default;
}

.img-lightbox .lb-close {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.img-lightbox .lb-close:hover {
    background: rgba(255, 255, 255, .3);
}

.tag-mini {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 5px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 400;
}

.section-title {
    font-size: 13px;
    color: var(--text-sub);
    margin: 0 0 10px;
    font-weight: 600;
}

.alert-tip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff8ed;
    border: 1px solid #ffe2b8;
    color: #92400e;
    border-radius: var(--radius);
    padding: 13px 18px;
    margin-bottom: 16px;
    font-size: 13.5px;
}

.alert-tip .grow {
    flex: 1;
}

.alert-tip b {
    color: #b45309;
}

.hint {
    font-size: 12px;
    color: var(--gray);
    margin-top: 6px;
    line-height: 1.7;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: var(--text-sub);
}

.text-right {
    text-align: right;
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.nowrap {
    white-space: nowrap;
}

/* 备注列：单行截断，完整内容靠 title 气泡查看，避免撑宽表格 */
.remark-cell {
    max-width: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--text-sub);
    cursor: default;
}

@media (max-width: 860px) {
    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-side {
        display: none;
    }

    .sidebar {
        width: 66px;
        flex: 0 0 66px;
    }

    .sidebar .logo .name, .nav .group-title, .nav a span.txt, .sidebar .foot {
        display: none;
    }

    .nav a {
        justify-content: center;
    }
}

/* ===== 家长端「我的孩子」 ===== */
.child-card {
    margin-bottom: 16px;
}

.child-card .card-head h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
}

.child-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px 20px;
    padding-bottom: 18px;
    border-bottom: 1px dashed var(--line);
}

.child-info > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.child-info span {
    font-size: 12px;
    color: var(--gray);
}

.child-info b {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.child-teacher {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid #dbe6fb;
    border-radius: 10px;
    background: #f7faff;
}

.child-teacher.bound {
    border-color: #d6efe0;
    background: #f6fdf9;
}

.ct-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ct-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
}

.ct-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.ct-tip {
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-sub);
}

.ct-tip b {
    color: var(--danger);
}

.ct-pick {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    align-items: center;
}

.ct-pick .select {
    max-width: 340px;
}

.child-fee {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    padding-top: 4px;
}

.child-fee > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.child-fee span {
    font-size: 12px;
    color: var(--gray);
}

.child-fee b {
    font-size: 16px;
}

/* 家长工作台的缴费小列表 */
.mini-list {
    display: flex;
    flex-direction: column;
}

.mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--line);
}

.mini-row:last-child {
    border-bottom: none;
}

.mini-row .mr-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
}

.mini-row .mr-main span {
    font-size: 12px;
    color: var(--gray);
}

.mini-row .mr-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-row .mr-right .num {
    font-size: 14px;
    font-weight: 600;
}

/* ---------- 家长缴费入口 ---------- */
.fee-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 22px 26px;
    border-radius: var(--radius);
    border: 1px solid #d6e4ff;
    background: linear-gradient(120deg, #f2f7ff 0%, #eef3ff 55%, #ffffff 100%);
    box-shadow: var(--shadow);
}

.fee-hero .fh-label {
    font-size: 12px;
    color: var(--text-sub);
    letter-spacing: .04em;
}

.fee-hero .fh-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    margin: 4px 0 6px;
}

.fee-hero .fh-value.is-due {
    color: var(--danger);
}

.fee-hero .fh-sub {
    font-size: 12.5px;
    color: var(--text-sub);
}

.fee-hero .fh-sub b {
    color: var(--text);
}

.fee-hero .fh-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* 家长缴费页顶部汇总条 */
.fee-sum {
    display: flex;
    align-items: center;
    gap: 34px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 16px 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.fee-sum .fs-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fee-sum .fs-item span {
    font-size: 12px;
    color: var(--gray);
}

.fee-sum .fs-item b {
    font-size: 18px;
    font-weight: 700;
}

.fee-sum .fs-item b.is-due {
    color: var(--danger);
}

.fee-sum .fs-actions {
    margin-left: auto;
}

/* 学生列表里管理员点击「负责老师」的入口 */
.teacher-pick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.teacher-pick .pick-badge {
    display: inline-block;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 15px;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid #d6e4ff;
}

.teacher-pick:hover .pick-badge {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

@media (max-width: 720px) {
    .fee-hero {
        padding: 18px;
    }

    .fee-hero .fh-value {
        font-size: 26px;
    }

    .fee-sum {
        gap: 20px;
    }

    .fee-sum .fs-actions {
        margin-left: 0;
        width: 100%;
    }
}

/* ---------- 卡片头部多个按钮 ---------- */
.head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- 编辑弹窗里的「只读信息」区 ---------- */
.readonly-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px 20px;
    margin: 16px 0 10px;
    padding: 14px 16px;
    border: 1px dashed #dbe3ee;
    border-radius: 10px;
    background: #f8fafc;
}

.readonly-box > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.readonly-box span {
    font-size: 12px;
    color: var(--gray);
}

.readonly-box b {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    word-break: break-all;
}

@media (max-width: 720px) {
    .head-actions {
        width: 100%;
    }

    .head-actions .btn {
        flex: 1;
    }
}

/* ---------- 风采相册（管理端） ---------- */
.gallery-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.gcard {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .18s ease, border-color .18s ease;
}

.gcard:hover {
    box-shadow: var(--shadow);
    border-color: transparent;
}

.gcard.is-hidden .gcard-thumb img {
    filter: grayscale(1);
    opacity: .55;
}

.gcard-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--gray-soft);
}

.gcard-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gcard-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--text);
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(4px);
}

.gcard-off {
    position: absolute;
    top: 8px;
    right: 8px;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(30, 41, 59, .82);
    color: #fff;
    font-size: 11.5px;
    display: inline-flex;
    align-items: center;
}

.gcard-body {
    padding: 11px 13px 12px;
}

.gcard-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gcard-meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-sub);
}

.gcard-ops {
    display: flex;
    gap: 2px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid var(--line);
}

/* 弹窗里的两列表单 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* 上传区 */
.upload-box {
    position: relative;
    border: 1.5px dashed #d5deeb;
    border-radius: 12px;
    background: #fafbfe;
    min-height: 190px;
    display: grid;
    place-items: center;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 18px;
    transition: border-color .16s ease, background .16s ease;
}

.upload-box:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.upload-box img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

.upload-empty {
    text-align: center;
    color: var(--text-sub);
    padding: 26px;
}

.upload-empty svg {
    color: var(--primary);
    margin-bottom: 8px;
}

.upload-empty .t {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.upload-empty .hint {
    margin-top: 4px;
}

.upload-mask {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(255, 255, 255, .82);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    backdrop-filter: blur(2px);
}

@media (max-width: 720px) {
    .gallery-admin {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ---------- 缴费周期：按月 / 按学期切换 ---------- */
.seg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--gray-soft);
    border-radius: 10px;
}

.seg button {
    border: 0;
    background: transparent;
    padding: 7px 16px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-sub);
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.seg button.active {
    background: #fff;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(16, 30, 54, .1);
}

.period-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px;
}

.period-row .select {
    min-width: 0;
}

/* ---------- 老师简历：头像上传与展示 ---------- */
.avatar-field {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.avatar-upload {
    position: relative;
    flex: 0 0 auto;
    width: 96px;
    height: 120px;
    border: 1.5px dashed #d5deeb;
    border-radius: 12px;
    background: #fafbfe;
    overflow: hidden;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: border-color .16s ease, background .16s ease;
}

.avatar-upload:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.avatar-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload .av-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-sub);
    font-size: 12px;
}

.avatar-upload .av-empty svg {
    color: var(--primary);
}

.avatar-upload .av-empty em {
    font-style: normal;
}

.avatar-upload.busy::after {
    content: "上传中…";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .86);
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.avatar-tip {
    padding-top: 4px;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--text-sub);
}

.avatar-tip b {
    display: block;
    margin-bottom: 2px;
    font-size: 13.5px;
    color: var(--text);
}

.check-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 6px;
    font-size: 13.5px;
    color: var(--text);
    cursor: pointer;
}

.check-line input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* 简历只读展示 */
.resume {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.resume-photo {
    flex: 0 0 auto;
    width: 120px;
    height: 150px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--primary-soft);
    display: grid;
    place-items: center;
    font-size: 38px;
    font-weight: 700;
    color: var(--primary);
}

.resume-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resume-main {
    flex: 1;
    min-width: 0;
}

.resume-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
}

.resume-meta {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-sub);
}

.resume-intro {
    margin-top: 14px;
    font-size: 13.5px;
    line-height: 2;
    color: #334155;
    white-space: pre-line;
}

.muted {
    color: var(--gray);
}

/* 列表里的「头像 + 姓名」单元格 */
.cell-person {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cell-sub {
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 400;
    color: var(--gray);
}

/* ---------- 缴费统计：筛选条 ---------- */
/* 管理员要看的组合是「哪位老师 × 哪段时间 × 什么颗粒度」，三件事都放在第一行，
   避免为了换个维度先滚动半屏。窗口窄时自动折行。 */
.fs-filter {
    padding: 16px 20px;
    margin-bottom: 16px;
}

.fs-filter-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.fs-filter .toolbar {
    margin: 0;
}

.fs-month {
    width: 138px;
    /* 月份框没填时显示的是原生占位，不同浏览器样式不一，给个浅色兜底 */
    color-scheme: light;
}

.fs-quick {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px dashed var(--line);
}

.fs-quick button {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 5px 13px;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--text-sub);
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}

.fs-quick button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.fs-quick .cell-sub {
    margin: 0 0 0 auto;
    font-size: 12px;
}

.avatar-sm {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
}

.avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 640px) {
    .resume {
        flex-direction: column;
    }

    .resume-photo {
        width: 96px;
        height: 120px;
        font-size: 30px;
    }
}

/* ===== 日常（老师上传的学生近况） ===== */
.daily-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    /* 不拉伸：纯文字的那条就只占内容高度，否则会被拉成和带图卡片一样高、下半截全空 */
    align-items: start;
}

.daily-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .16s, border-color .16s;
}

.daily-card:hover {
    border-color: #d5dff2;
    box-shadow: var(--shadow);
}

/* 照片九宫格：1 张铺满、2 张两列、3 张以上三列 */
.daily-photos {
    display: grid;
    gap: 3px;
    background: var(--gray-soft);
}

.daily-photos.n1 { grid-template-columns: 1fr; }
.daily-photos.n2 { grid-template-columns: 1fr 1fr; }
.daily-photos.n3,
.daily-photos.n4,
.daily-photos.n5,
.daily-photos.n6,
.daily-photos.n7,
.daily-photos.n8,
.daily-photos.n9 { grid-template-columns: repeat(3, 1fr); }

.daily-photos img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.daily-photos.n1 img { aspect-ratio: 16 / 10; }

.daily-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.daily-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.daily-student {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.daily-student.muted {
    font-weight: 500;
    color: var(--gray);
}

.daily-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.75;
    color: var(--text-sub);
    white-space: pre-wrap;
    word-break: break-word;
}

.daily-meta {
    margin-top: auto;
    padding-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--gray);
}

/* 卡片整体可点：点开弹详情卡（和公告列表一致） */
.daily-card.is-clickable {
    cursor: pointer;
}

.daily-card.is-clickable:hover {
    border-color: #cddcff;
    box-shadow: 0 6px 18px rgba(16, 30, 54, .09);
}

/* 卡片里照片的手势让位给「打开详情」，放大改在详情卡里做 */
.daily-card.is-clickable .daily-photos img {
    cursor: pointer;
}

.daily-acts {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

/* ===== 日常详情卡 ===== */
.daily-view-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
}

.daily-view-meta {
    font-size: 12px;
    color: var(--gray);
}

.daily-view-text {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.daily-view-text.muted {
    color: var(--gray);
    font-size: 13px;
}

.daily-view-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
}

.daily-view-gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--gray-soft);
    cursor: zoom-in;
    transition: transform .15s, box-shadow .15s;
}

.daily-view-gallery img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 30, 54, .14);
}

.daily-view-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--gray);
}

/* 工作台上的「班级日常」小列表 */
.daily-mini {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.daily-mini-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.daily-mini-item:hover {
    border-color: #cddcff;
    background: #f8faff;
}

.dm-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--gray-soft);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--gray);
}

.dm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dm-main {
    flex: 1;
    min-width: 0;
}

.dm-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.dm-grade {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 500;
}

.dm-text {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--text-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-meta {
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--gray);
}

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

/* ---------- 首页编辑 ---------- */
.site-tip {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--text-sub);
    font-size: 12.5px;
    line-height: 1.75;
}

.site-group {
    padding: 2px 0 8px;
}

.site-group + .site-group {
    margin-top: 10px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}

.site-group-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.site-group-head .n {
    font-size: 12px;
    font-weight: 400;
    color: var(--gray);
}

/* 动过的项标一下，几十个字段里一眼能看出改过哪几个 */
.site-tag {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--warning-soft);
    color: var(--warning);
    font-size: 11px;
    font-weight: 500;
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
    .site-actions { flex-wrap: wrap; }
}

/* ---------- 孩子申请行（家长「我的孩子」下方 / 审核页共用） ---------- */
/* 一条申请就三行字 + 一个按钮，用卡片包起来，PC 与手机同一套排版：
   手机上没有表格可以横滑，这里正好是「够用但不占地方」的密度。 */
.apply-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 2px;
    border-bottom: 1px dashed var(--line);
}

.apply-row:first-child {
    padding-top: 2px;
}

.apply-row:last-child {
    border-bottom: none;
    padding-bottom: 2px;
}

.apply-main {
    flex: 1;
    min-width: 0;
}

.apply-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    color: var(--text);
}

.apply-sub {
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-sub);
}

.apply-reason {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 12.5px;
    line-height: 1.6;
}

.apply-row .btn {
    flex: 0 0 auto;
}

/* ===== 连接中断 / 服务器维护 =====
 *
 * 两件套：
 *   1) .netbar —— 顶部细条，第一次请求失败就出来，几乎不打扰；
 *   2) .maintain —— 大块说明，用于视图区或整页遮罩。
 * 文案统一在 common.js 的 ServerDown 里，样式只负责长相。
 */
.netbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #7a4700;
    background: #fff5e4;
    border-bottom: 1px solid #f2d9ab;
    transform: translateY(-102%);
    transition: transform .26s ease;
}

.netbar.on {
    transform: none;
}

/* 细条出现时给整页让出高度，别把顶栏和用户信息压住 */
body.net-on {
    --net-h: 38px;
    padding-top: var(--net-h);
}

body.net-on .layout,
body.net-on .auth-wrap,
body.net-on .pay-wrap {
    min-height: calc(100vh - var(--net-h));
}

/* 侧栏与顶栏是 sticky top:0，下移后不跟着改就会滑到细条底下 */
body.net-on .sidebar,
body.net-on .topbar {
    top: var(--net-h);
}

body.net-on #toast-wrap {
    top: calc(20px + var(--net-h));
}

body.net-on .maintain-mask {
    padding-top: var(--net-h);
}

@media (max-width: 640px) {
    body.net-on {
        --net-h: 36px;
    }

    .netbar {
        gap: 8px;
        padding: 8px 12px;
        font-size: 12.5px;
    }
}

.netbar.ok {
    color: #10623c;
    background: var(--success-soft);
    border-bottom-color: #b8e3c9;
}

.netbar .dot {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: netpulse 1.15s ease-in-out infinite;
}

.netbar.ok .dot {
    animation: none;
}

.netbar .txt {
    min-width: 0;
}

.netbar .txt b {
    font-weight: 600;
}

.netbar .act {
    flex: 0 0 auto;
    padding: 3px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}

.netbar .act:hover {
    background: rgba(0, 0, 0, .05);
}

@keyframes netpulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .3; transform: scale(.8); }
}

.maintain {
    padding: 48px 24px 44px;
    text-align: center;
}

.maintain .mt-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    color: var(--warning);
    background: var(--warning-soft);
}

.maintain h2 {
    margin: 16px 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.maintain p {
    max-width: 420px;
    margin: 0 auto;
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--text-sub);
}

.maintain .mt-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    padding: 5px 13px;
    border-radius: 999px;
    background: var(--gray-soft);
    color: var(--text-sub);
    font-size: 12.5px;
}

.maintain .mt-state .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--warning);
    animation: netpulse 1.15s ease-in-out infinite;
}

.maintain .mt-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.maintain .mt-foot {
    margin-top: 20px;
    font-size: 12.5px;
    color: var(--gray);
}

.maintain .mt-foot a {
    color: var(--text-sub);
    border-bottom: 1px dashed var(--gray);
}

/* 整页维护遮罩：断线超过 30 秒才用，避免抖一下就盖住整个页面 */
.maintain-mask {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(2px);
}

.maintain-mask .panel {
    width: 100%;
    max-width: 460px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(16, 30, 54, .22);
}

.maintain-mask .maintain {
    padding: 40px 28px 34px;
}
