@charset "UTF-8";
/* ==========================================================================
   智慧校园放学系统 · 设计系统
   --------------------------------------------------------------------------
   本文件是全项目唯一的配色与基础组件来源：后台、智慧大屏、安装向导、
   扫码授权页、离线预览页全部引用它。App 端有等价令牌（app/uni.scss）。

   配色规则（硬约定）：
     1. 主视觉只有一条蓝色轴 + 白色 + 深蓝黑文字，不引入第二条强调色。
     2. 状态语义色只允许两种：已放学 = 绿，未放学 = 灰蓝。
     3. 禁止紫、橙、粉、青、渐变文字、霓虹发光、彩色图标堆叠。
     4. 修改品牌色只需改本文件的 --blue 一族，其余一律引用变量。

   形状与阴影：卡片圆角 13~15px，1px 浅蓝描边，阴影极轻。
   ========================================================================== */

:root {
    /* ---------- 品牌蓝轴 ---------- */
    --blue-50:  #F1F6FF;
    --blue-100: #E3EDFF;
    --blue-200: #C9DDFE;
    --blue-300: #9AC0FB;
    --blue-400: #5D93F3;
    --blue:     #2563EB;
    --blue-600: #1D4ED8;
    --blue-700: #1B3FA8;
    --blue-800: #16307E;

    /* ---------- 文字（三级 + 反白） ---------- */
    --ink:     #0F1B2D;
    --text:    #1F2A3C;
    --text-2:  #4A566B;
    --muted:   #6B7789;
    --faint:   #98A3B3;
    --on-blue: #FFFFFF;

    /* ---------- 描边与面 ---------- */
    --line:      #E3E9F3;
    --line-2:    #EFF3F9;
    --surface:   #FFFFFF;
    --surface-2: #F8FAFD;
    --bg:        #F4F7FB;
    --bg-blue:   #EEF4FF;

    /* ---------- 状态语义（全项目仅此两种） ---------- */
    --ok:         #0E9F6E;
    --ok-600:     #0A7F58;
    --ok-bg:      #E9F7F1;
    --ok-line:    #C4E9DB;

    --wait:       #6E809C;
    --wait-600:   #55657D;
    --wait-bg:    #EFF3F9;
    --wait-line:  #DDE4EE;

    /* ---------- 破坏性操作专用（不出现在其它场景） ---------- */
    --danger:      #C94A4A;
    --danger-bg:   #FCEDED;
    --danger-line: #F3D2D2;

    /* ---------- 形状 ---------- */
    --r-sm:   7px;
    --r:      10px;
    --r-lg:   13px;
    --r-xl:   18px;
    --r-pill: 999px;

    --shadow-xs: 0 1px 2px rgba(15, 27, 45, .04);
    --shadow-sm: 0 1px 3px rgba(15, 27, 45, .05), 0 1px 2px rgba(15, 27, 45, .03);
    --shadow:    0 4px 14px rgba(15, 27, 45, .06);
    --shadow-lg: 0 12px 32px rgba(15, 27, 45, .10);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
            "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ==========================================================================
   基础重置
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
}

p { margin: 0; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--blue); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--blue-600); }

::selection { background: var(--blue-100); color: var(--blue-800); }

/* 细滚动条，与整体气质一致 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #D3DBE7;
    border-radius: var(--r-pill);
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #BFC9D8; background-clip: content-box; }

/* ==========================================================================
   通用工具类（克制使用，仅限真正的原子需求）
   ========================================================================== */

.u-muted  { color: var(--muted); }
.u-faint  { color: var(--faint); }
.u-strong { color: var(--ink); font-weight: 600; }
.u-num    { font-variant-numeric: tabular-nums; }
.u-nowrap { white-space: nowrap; }
.u-mono   { font-family: var(--mono); letter-spacing: .02em; }
.u-hide   { display: none !important; }
.u-right  { text-align: right; }
.u-center { text-align: center; }
.u-row    { display: flex; align-items: center; gap: 10px; }
.u-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.u-grow   { flex: 1 1 auto; min-width: 0; }
.u-wrap   { flex-wrap: wrap; }
.u-gap-sm { gap: 6px; }
.u-gap-lg { gap: 16px; }
.u-mt-sm  { margin-top: 8px; }
.u-mt     { margin-top: 14px; }
.u-mt-lg  { margin-top: 20px; }

/* ==========================================================================
   按钮
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--r);
    background: var(--surface);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease,
                color .15s ease, box-shadow .15s ease;
}

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

/* 主按钮：全项目唯一的实心蓝 */
.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--on-blue);
    box-shadow: 0 1px 2px rgba(37, 99, 235, .22);
}
.btn-primary:hover:not(:disabled) { background: var(--blue-600); border-color: var(--blue-600); }
.btn-primary:active:not(:disabled) { background: var(--blue-700); border-color: var(--blue-700); }

/* 次按钮：白底浅描边 */
.btn-line {
    background: var(--surface);
    border-color: var(--line);
    color: var(--text-2);
}
.btn-line:hover:not(:disabled) { border-color: var(--blue-200); color: var(--blue-600); background: var(--blue-50); }

/* 弱按钮：无边无底 */
.btn-ghost {
    background: transparent;
    color: var(--muted);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-blue); color: var(--blue-600); }

/* 破坏性操作 */
.btn-danger {
    background: var(--surface);
    border-color: var(--danger-line);
    color: var(--danger);
}
.btn-danger:hover:not(:disabled) { background: var(--danger-bg); }

.btn-sm { height: 29px; padding: 0 11px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-lg { height: 44px; padding: 0 24px; font-size: 15px; border-radius: var(--r); }
.btn-block { width: 100%; }
.btn-icon { width: 32px; padding: 0; }

/* ==========================================================================
   卡片
   ========================================================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

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

.card-head h2,
.card-head h3 {
    font-size: 15px;
    letter-spacing: .01em;
}

.card-head .sub {
    margin-top: 3px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--muted);
}

.card-body { padding: 20px; }
.card-body.tight { padding: 14px 20px; }
.card-body.flush { padding: 0; }

.card-foot {
    padding: 13px 20px;
    border-top: 1px solid var(--line-2);
    background: var(--surface-2);
}

/* ==========================================================================
   状态标签（全项目状态只用这两类）
   ========================================================================== */

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .78;
}
.tag.no-dot::before { display: none; }

.tag-ok   { background: var(--ok-bg);   border-color: var(--ok-line);   color: var(--ok-600); }
.tag-wait { background: var(--wait-bg); border-color: var(--wait-line); color: var(--wait-600); }

/* 中性标签：仅用于角色、类型等非状态信息 */
.tag-plain  { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.tag-blue   { background: var(--blue-50);   border-color: var(--blue-100); color: var(--blue-600); }
.tag-danger { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }

/* ==========================================================================
   表单
   ========================================================================== */

.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }

.field > label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}

.field .req { color: var(--danger); margin-left: 2px; }

.input,
.select,
.textarea {
    display: block;
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    appearance: none;
    -webkit-appearance: none;
}

.textarea {
    height: auto;
    min-height: 84px;
    padding: 10px 12px;
    line-height: 1.6;
    resize: vertical;
}

.input::placeholder,
.textarea::placeholder { color: var(--faint); }

.input:hover,
.select:hover,
.textarea:hover { border-color: var(--blue-200); }

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px var(--blue-50);
}

.select {
    padding-right: 34px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 4.4L6 7.8l3.4-3.4' fill='none' stroke='%236B7789' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.field-hint {
    margin-top: 5px;
    font-size: 12.5px;
    color: var(--muted);
}

/* 水平表单行：label 左、控件右 */
.form-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}
.form-row > label {
    flex: 0 0 84px;
    padding-top: 9px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}
.form-row > .grow { flex: 1 1 auto; min-width: 0; }

/* ==========================================================================
   表格
   ========================================================================== */

.table-wrap { width: 100%; overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}

.table th {
    padding: 11px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-2);
    color: var(--text);
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .cell-strong { color: var(--ink); font-weight: 500; }
.table .cell-actions { text-align: right; white-space: nowrap; }

/* 表格内的分组行（例如按年级分隔的班级表） */
.table tbody tr.group-row > td {
    padding: 9px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
}
.table tbody tr.group-row:hover > td { background: var(--surface-2); }

/* ==========================================================================
   空状态（一句话，不写操作指引）
   ========================================================================== */

.empty {
    padding: 46px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13.5px;
}

.empty b {
    display: block;
    margin-bottom: 5px;
    color: var(--text-2);
    font-size: 14.5px;
    font-weight: 600;
}

/* ==========================================================================
   指标格
   ========================================================================== */

.kpis {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}

.kpi {
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
}

.kpi .k-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
}

.kpi .k-value {
    margin-top: 9px;
    color: var(--ink);
    font-size: 27px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.kpi .k-value small {
    margin-left: 3px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted);
}

/* 只有状态类指标着色 */
.kpi.k-ok  .k-value { color: var(--ok-600); }
.kpi.k-wait .k-value { color: var(--wait-600); }

.kpi .k-bar {
    margin-top: 11px;
    height: 4px;
    border-radius: var(--r-pill);
    background: var(--line-2);
    overflow: hidden;
}
.kpi .k-bar i {
    display: block;
    height: 100%;
    border-radius: var(--r-pill);
    background: var(--blue-300);
}
.kpi.k-ok .k-bar i  { background: var(--ok); }
.kpi.k-wait .k-bar i { background: var(--wait); }

/* ==========================================================================
   提示条（仅用于操作结果反馈，不用于解释权限）
   ========================================================================== */

.flash {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 16px;
    padding: 11px 15px;
    border: 1px solid;
    border-radius: var(--r);
    font-size: 13.5px;
}

.flash-ok   { background: var(--ok-bg);     border-color: var(--ok-line);     color: var(--ok-600); }
.flash-err  { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.flash-info { background: var(--blue-50);   border-color: var(--blue-100);    color: var(--blue-700); }

/* 浮动提示 */
.toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    z-index: 9000;
    transform: translate(-50%, 10px);
    max-width: 78vw;
    padding: 11px 20px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--ink);
    color: #FFF;
    font-size: 13.5px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); border-color: var(--danger); }

/* ==========================================================================
   分段切换
   ========================================================================== */

.seg {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface-2);
}

.seg a,
.seg button {
    padding: 6px 14px;
    border: none;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.seg a:hover,
.seg button:hover { color: var(--blue-600); }

.seg a.on,
.seg button.on {
    background: var(--surface);
    color: var(--blue-700);
    font-weight: 500;
    box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   头像 / 标识块
   ========================================================================== */

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: var(--r);
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    color: var(--blue-600);
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; border-radius: var(--r-lg); font-size: 20px; }

/* ==========================================================================
   页面级通用
   ========================================================================== */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-head h1 {
    font-size: 20px;
    letter-spacing: -.01em;
}

.page-head .desc {
    margin-top: 5px;
    font-size: 13px;
    color: var(--muted);
}

.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 11px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-side { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }

@media (max-width: 1080px) {
    .grid-side { grid-template-columns: minmax(0, 1fr); }
}
