:root {
  --primary: #1473E6;
  --primary-dark: #1473E6;
  --deep: #0E61C8;
  --light: #F1F7FF;
  --bg: #FCFDFC;
  --surface: #fff;
  --text: #142033;
  --muted: #6b7280;
  --border: #E2E8F0;
  --danger: #c04444;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
.hidden { display: none !important; }
button, input, textarea, select { font: inherit; }
button, .button { min-height: 40px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; transition: .18s ease; }
.primary { color: white; background: var(--primary-dark); }
.primary:hover { background: var(--deep); transform: translateY(-1px); }
.ghost { color: var(--primary-dark); background: transparent; border: 1px solid var(--border); }
.ghost:hover { border-color: var(--primary); }
.small { min-height: 34px; padding-inline: 13px; font-size: 12px; }
.error { min-height: 20px; color: var(--danger); font-size: 13px; }
.login { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: var(--light); }
.login-card { width: min(420px, 100%); padding: 42px; display: grid; gap: 16px; background: white; border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 24px 60px rgba(15,35,60,.12); }
.brand-mark { color: var(--primary); font-size: 14px; font-weight: 700; letter-spacing: .18em; }
.login-card h1 { margin: 0; font-size: 30px; }
.login-card p { margin: -8px 0 4px; color: var(--muted); }
.login-card label, .field-panel label, .field-label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.captcha-row { display: flex; align-items: stretch; gap: 10px; }
.captcha-row input { min-width: 0; flex: 1; text-transform: uppercase; }
#captcha-image { width: 132px; height: 46px; flex: 0 0 auto; cursor: pointer; background: var(--light); border: 1px solid var(--border); border-radius: 9px; }
input, textarea, select { width: 100%; padding: 11px 13px; color: var(--text); background: white; border: 1px solid var(--border); border-radius: 9px; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(20,115,230,.14); border-color: var(--primary); }
.topbar { min-height: 68px; padding: 12px 28px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 22px; color: white; background: var(--primary); }
.topbar > div:first-child { display: flex; align-items: center; gap: 13px; }
.topbar strong { color: white; font-size: 19px; }
.topbar span { color: white; font-size: 13px; opacity: .76; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.topbar .ghost { color: white; border-color: rgba(255,255,255,.24); }
.pending-badge { padding: 5px 10px; color: #cfe2ff; background: rgba(20,115,230,.12); border: 1px solid rgba(20,115,230,.3); border-radius: 999px; }
.view { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 44px 0 70px; }
#consultations-view,#teachers-view { width: calc(100% - 32px); max-width: none; }
.view-head { margin-bottom: 26px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.view-toolbar { min-height: 40px; margin-bottom: 18px; display: flex; justify-content: flex-end; }
.view-head p { margin: 0 0 5px; color: var(--primary-dark); font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.view-head h1 { margin: 0; font-size: 30px; }
.view-actions { display: flex; gap: 9px; }
.import-status { min-height: 20px; margin: -16px 0 12px; color: var(--muted); font-size: 13px; text-align: right; }
.article-list { display: grid; gap: 10px; }
.article-row { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: white; border: 1px solid var(--border); border-radius: 14px; }
.article-summary { min-width: 0; flex: 1; }
.article-row h2 { margin: 0 0 8px; font-size: 17px; }
.article-row p { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 13px; align-items: center; color: var(--muted); font-size: 12px; }
.article-row code { color: #9a8d7e; }
.status { padding: 2px 8px; border-radius: 999px; }
.status.live { color: #0D966A; background: #DFF8EE; }
.status.new-draft { color: #145da8; background: #eaf3ff; }
.status.edited-draft { color: #145da8; background: #eaf3ff; }
.row-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.row-actions button:disabled { cursor: default; opacity: .48; transform: none; }
.row-more-actions summary { min-height: 34px; padding-inline: 13px; font-size: 12px; }
.row-more-actions .action-menu { top: calc(100% + 8px); bottom: auto; z-index: 12; }
.empty { padding: 70px; color: var(--muted); text-align: center; background: white; border: 1px dashed var(--border); border-radius: 14px; }
#edit-form { display: grid; gap: 18px; }
.field-panel, .editor-panel { padding: 24px; background: white; border: 1px solid var(--border); border-radius: 16px; }
.field-panel { display: grid; gap: 15px; }
.field-panel small { font-weight: 400; opacity: .8; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.custom-select { position: relative; }
.select-trigger { width: 100%; padding: 0 13px; justify-content: space-between; color: var(--text); background: white; border: 1px solid var(--border); border-radius: 9px; text-align: left; }
.select-trigger:hover, .custom-select.open .select-trigger { border-color: var(--primary); }
.custom-select.open .select-trigger { outline: 2px solid rgba(20,115,230,.14); }
.select-chevron { color: var(--muted); transition: transform .18s ease; }
.custom-select.open .select-chevron { transform: rotate(180deg); }
.select-menu { width: 100%; margin-top: 7px; position: absolute; z-index: 20; overflow: hidden; background: white; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 45px rgba(15,35,60,.16); }
.select-options { max-height: 220px; padding: 7px; display: grid; gap: 2px; overflow-y: auto; }
.select-option { width: 100%; min-height: 40px; padding: 0 11px; justify-content: space-between; color: var(--text); background: transparent; border-radius: 8px; }
.select-option:hover { background: #F1F7FF; }
.select-option[aria-selected="true"] { color: var(--primary-dark); background: #EAF3FF; font-weight: 600; }
.option-check { opacity: 0; color: var(--primary-dark); }
.select-option[aria-selected="true"] .option-check { opacity: 1; }
.category-create { padding: 12px; background: #F7F9FC; border-top: 1px solid var(--border); }
.category-create > span { display: block; margin-bottom: 8px; color: var(--text); font-weight: 600; }
.category-create > div { display: flex; gap: 8px; }
.category-create input { min-width: 0; }
.category-create button { min-width: 68px; flex: 0 0 auto; white-space: nowrap; }
.category-create .error { min-height: 0; margin: 6px 2px 0; }
.editor-titlebar { align-items: flex-end; }
.editor-titlebar > div { display: grid; gap: 12px; }
.editor-titlebar > .status { margin-bottom: 4px; padding: 6px 12px; font-size: 13px; }
.back-button { min-height: auto; width: max-content; padding: 0; color: var(--muted); background: transparent; border-radius: 0; }
.back-button:hover { color: var(--primary-dark); }
.version-note { margin: -12px 0 18px; padding: 13px 16px; color: #365a78; background: #eef7ff; border: 1px solid var(--border); border-radius: 11px; font-size: 13px; }
.auto-meta { margin: 0; padding: 11px 13px; color: var(--muted); background: #F7F9FC; border-radius: 9px; font-size: 12px; }
.editor-head { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.editor-head > div { display: flex; align-items: center; gap: 9px; }
.editor-head small { color: var(--muted); font-size: 12px; font-weight: 400; }
#upload-status { color: var(--muted); font-size: 12px; }
.editor-grid { min-height: 480px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#body { min-height: 480px; resize: vertical; font-family: inherit; font-size: 15px; line-height: 1.8; }
.preview { padding: 22px; overflow: auto; background: #F9FCFF; border: 1px solid var(--border); border-radius: 9px; line-height: 1.8; }
.preview:empty::before { content: "文章预览会显示在这里"; color: var(--muted); }
.preview h1, .preview h2, .preview h3 { color: var(--primary-dark); }
.preview img { max-width: 100%; }
.edit-actions { padding: 15px 18px; position: sticky; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.96); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 32px rgba(75,34,26,.1); backdrop-filter: blur(10px); }
.save-button { background: white; }
.more-actions { position: relative; }
.more-actions summary { min-height: 40px; padding: 0 15px; display: flex; align-items: center; color: var(--muted); background: white; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 13px; list-style: none; }
.more-actions summary::-webkit-details-marker { display: none; }
.more-actions summary::after { content: "⌄"; margin-left: 7px; transition: transform .18s ease; }
.more-actions[open] summary::after { transform: rotate(180deg); }
.more-actions[open] summary { color: var(--primary-dark); border-color: var(--primary); }
.action-menu { min-width: 180px; padding: 7px; position: absolute; right: 0; bottom: calc(100% + 8px); display: grid; gap: 2px; background: white; border: 1px solid var(--border); border-radius: 11px; box-shadow: 0 14px 36px rgba(75,34,26,.16); }
.menu-action { width: 100%; min-height: 38px; padding: 0 11px; justify-content: flex-start; color: var(--text); background: transparent; border-radius: 7px; font-size: 13px; }
.menu-action:hover { background: #f1f7ff; }
.menu-action.danger { color: var(--danger); }
.menu-action.danger:hover { background: #fff0f0; }
#message { margin-left: 8px; color: var(--muted); font-size: 13px; }
.modal { position: fixed; inset: 0; z-index: 30; padding: 20px; display: grid; place-items: center; overflow-y: auto; overscroll-behavior: contain; background: rgba(0,0,0,.6); }
.modal-card { width: min(780px, 100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: white; border-radius: 16px; overflow: hidden; }
.modal-card > div { padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.category-manager { width: min(680px, 100%); }
.modal-card > .modal-head { padding: 18px 20px; }
.modal-head > div { display: grid; gap: 4px; }
.modal-head > .modal-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.modal-head small { color: var(--muted); font-size: 12px; font-weight: 400; }
.password-card { width: min(500px, 100%); }
.modal-card > .password-form { padding: 20px; display: grid; gap: 14px; border: 0; }
.password-form label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.password-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.password-form .error { margin: -4px 0 0; }
.password-actions { display: flex; justify-content: flex-end; gap: 9px; }
.modal-card > .category-manager-body { max-height: 68vh; padding: 20px; display: block; overflow-y: auto; border: 0; }
.manager-create { display: flex; gap: 9px; }
.manager-create input { min-width: 0; }
.manager-create button { flex: 0 0 auto; white-space: nowrap; }
.category-manager-list { margin-top: 8px; display: grid; gap: 8px; }
.category-manager-row { padding: 13px 14px; background: #f5f9fd; border: 1px solid var(--border); border-radius: 11px; }
.category-row-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.category-row-name { min-width: 0; display: grid; gap: 3px; }
.category-row-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-row-name span { color: var(--muted); font-size: 12px; }
.category-row-actions { display: flex; gap: 5px; }
.category-row-actions button { min-height: 32px; padding-inline: 10px; font-size: 12px; }
.category-row-actions .danger { color: var(--danger); }
.category-row-actions button:disabled { cursor: not-allowed; opacity: .45; }
.category-inline-panel { margin-top: 11px; padding-top: 11px; display: grid; gap: 9px; border-top: 1px solid var(--border); }
.category-inline-panel p { margin: 0; color: var(--muted); font-size: 12px; }
.category-rename-form { display: flex; gap: 8px; }
.category-rename-form input { min-width: 0; }
.category-inline-actions, .replacement-options { display: flex; flex-wrap: wrap; gap: 7px; }
.category-inline-actions button, .replacement-options button { min-height: 32px; padding-inline: 11px; font-size: 12px; }
.confirm-danger { color: white; background: var(--danger); }
.replacement-options button { color: var(--primary-dark); background: white; border: 1px solid var(--border); }
.replacement-options button:hover { border-color: var(--primary); background: #eaf3ff; }
.admin-shell { min-height: 100vh; padding-left: 238px; }
.sidebar { width: 238px; position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; color: #dbeaff; background: #102f55; box-shadow: 8px 0 28px rgba(10,40,75,.12); }
.sidebar-brand { height: 86px; padding: 20px 24px; display: grid; align-content: center; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand span { color: #78b8ff; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.sidebar-brand strong { margin-top: 3px; color: white; font-size: 20px; }
.sidebar nav { padding: 20px 13px; display: grid; gap: 5px; }
.sidebar nav > p { margin: 17px 11px 5px; color: rgba(219,234,255,.48); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.sidebar nav > p:first-child { margin-top: 0; }
.sidebar-link { width: 100%; min-height: 44px; padding: 0 13px; justify-content: space-between; color: #dbeaff; background: transparent; border-radius: 10px; }
.sidebar-link:hover, .sidebar-link.active { color: white; background: rgba(92,166,255,.2); }
.sidebar-account { margin-top: auto; padding: 19px 24px 22px; display: grid; gap: 4px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-account small { color: rgba(219,234,255,.55); }
.sidebar-account strong { color: white; }
.admin-main { min-width: 0; }
.topbar { color: var(--text); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px); }
.topbar strong { color: var(--text); }
.topbar span { color: var(--muted); }
.topbar .ghost { color: var(--primary-dark); border-color: var(--border); }
.pending-badge { color: #145da8; background: #eaf3ff; border-color: #c7def8; }
.view-head > div > span { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; }
.metric-grid { margin-bottom: 16px; padding: 0 18px; display: flex; align-items: center; background: white; border: 1px solid var(--border); border-radius: 10px; }
.metric-grid article { min-width: 150px; padding: 15px 22px; display: flex; align-items: baseline; gap: 10px; border-right: 1px solid var(--border); }
.metric-grid article:first-child { padding-left: 0; }
.metric-grid article:last-child { border-right: 0; }
.metric-grid small { color: var(--muted); font-size: 12px; }
.metric-grid strong { color: #12365f; font-size: 20px; }
.table-card { overflow-x: auto; overflow-y: hidden; background: white; border: 1px solid var(--border); border-radius: 10px; scrollbar-color: #b8c7d8 #f2f5f8; scrollbar-width: thin; }
.table-card::-webkit-scrollbar { height: 9px; }
.table-card::-webkit-scrollbar-track { background: #f2f5f8; }
.table-card::-webkit-scrollbar-thumb { background: #b8c7d8; border: 2px solid #f2f5f8; border-radius: 999px; }
.data-list { min-width: 0; }
.data-row { display: grid; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 12px; }
.data-row:last-child { border-bottom: 0; }
.data-row:not(.data-head) { transition: background-color .16s ease; }
.data-row:not(.data-head):hover,.data-row:not(.data-head):focus-within { background: #f1f7ff; }
.data-head { min-height: 61px; padding-block: 8px; color: var(--muted); background: #f7f9fb; font-size: 12px; font-weight: 600; }
.column-filter { min-width: 0; display: grid; gap: 4px; }
.column-filter > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column-filter select { min-height: 24px; padding: 2px 19px 2px 5px; color: #657587; background-color: #fff; border-color: #d9e1e9; border-radius: 5px; font-size: 10px; }
#consultation-list { min-width: 1120px; }
.consultation-row { grid-template-columns: minmax(44px,.5fr) minmax(76px,.75fr) minmax(108px,1fr) minmax(165px,1.4fr) minmax(82px,.8fr) minmax(66px,.7fr) 20em minmax(68px,.7fr) minmax(102px,1fr) 86px; }
#teacher-list { min-width: 1050px; }
.teacher-row { grid-template-columns: .8fr 1fr .6fr 1fr .65fr .7fr .8fr .7fr 86px; }
.data-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.phone-text { color: var(--text); font-size: 12px; font-weight: 600; }
.page { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.created,.teacher-name { font-size: 12px; }
.created { color: var(--muted); }
.sequence,.call-count { color: var(--muted); font-size: 12px; }
.user-name,.location,.consultation-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.unadded-reason { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.55; }
.consultation-status { font-weight: 700; }
.consultation-status--unprocessed { color: #1769aa; }
.consultation-status--added { color: #0b805b; }
.consultation-status--not_added { color: #bd4141; }
.consultation-row > :last-child,.teacher-row > :last-child { position: sticky; right: 0; z-index: 2; min-height: 100%; align-content: center; justify-content: flex-start; background: #fff; border-left: 1px solid var(--border); }
.consultation-row:not(.data-head):hover > :last-child,.consultation-row:not(.data-head):focus-within > :last-child,.teacher-row:not(.data-head):hover > :last-child,.teacher-row:not(.data-head):focus-within > :last-child { background: #f1f7ff; }
.consultation-row.data-head > :last-child,.teacher-row.data-head > :last-child { z-index: 3; display: grid; place-items: center start; text-align: left; background: #f7f9fb; }
.consultation-row .row-actions,.teacher-row .row-actions { gap: 12px; flex-wrap: nowrap; }
.consultation-row .row-actions .text-action,.teacher-row .row-actions .text-action { min-height: auto; padding: 2px 0; color: var(--primary-dark); background: transparent; border: 0; border-radius: 0; font-size: 12px; line-height: 1.4; }
.consultation-row .row-actions .text-action:hover,.teacher-row .row-actions .text-action:hover { color: var(--deep); text-decoration: underline; transform: none; }
.consultation-row .row-actions .text-action.danger,.teacher-row .row-actions .text-action.danger { color: var(--danger); }
.table-pagination { min-width: 100%; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); background: #fafbfd; border-top: 1px solid var(--border); font-size: 12px; }
.table-pagination__controls { display: flex; align-items: center; gap: 9px; }
.table-pagination__controls label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.table-pagination__controls select { width: 58px; min-height: 32px; padding: 4px 7px; font-size: 12px; }
.table-pagination__controls > span { min-width: 44px; text-align: center; white-space: nowrap; }
.table-pagination__controls button:disabled { cursor: default; opacity: .42; }
.inline-follow-form { display: contents; }
.inline-follow-form select { padding: 8px 10px; font-size: 13px; }
.inline-note { min-width: 0; display: grid; gap: 4px; }
.inline-note textarea { height: 54px; min-height: 54px; padding: 7px 10px; overflow: hidden; resize: none; font-size: 13px; line-height: 1.5; }
.note-toggle { width: max-content; min-height: 22px; padding: 0; color: var(--primary-dark); background: transparent; border-radius: 0; font-size: 11px; }
.note-toggle:hover { text-decoration: underline; }
.inline-follow-actions { display: grid; justify-items:start; gap: 2px; }
.inline-follow-actions .save-state { min-height: 14px; margin: 0; white-space: nowrap; }
.staff-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.staff-wechat,.username { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.teacher-state { width: max-content; padding: 4px 9px; border-radius: 999px; font-size: 12px; }
.teacher-state.enabled { color: #087a56; background: #dff8ee; }
.teacher-state.disabled { color: #7b8190; background: #edf0f4; }
.row-actions .danger { color: var(--danger); }
.teacher-card { width: min(760px, 100%); }
.consultation-user-card { width: min(720px, 100%); }
.teacher-card > .modal-head,.consultation-user-card > .modal-head { flex: 0 0 auto; }
.consultation-user-card > .modal-head { padding: 14px 18px; }
.teacher-card > .teacher-modal-head { align-items: flex-start; justify-content: space-between; flex-direction: row; gap: 20px; }
.teacher-modal-head > .teacher-modal-heading { min-width: 0; flex: 1 1 auto; display: grid; gap: 4px; }
.teacher-form { min-height: 0; padding: 20px; display: grid; gap: 18px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.teacher-form::-webkit-scrollbar { width: 8px; }
.teacher-form::-webkit-scrollbar-track { background: #f3f6f9; }
.teacher-form::-webkit-scrollbar-thumb { background: #bdc9d6; border: 2px solid #f3f6f9; border-radius: 999px; }
.consultation-user-form { padding: 14px 16px; gap: 12px; }
.consultation-edit-section { padding: 13px 14px; display: grid; gap: 11px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfe; }
.consultation-edit-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.consultation-edit-heading strong { color: #203a57; font-size: 13px; }
.consultation-edit-heading span { color: var(--muted); font-size: 11px; }
.consultation-user-grid { grid-template-columns: minmax(0,.8fr) minmax(0,1fr) minmax(0,1.15fr); gap: 12px; align-items: start; }
.consultation-handling-grid { gap: 12px; }
.field-hint { color: #73869a; font-size: 10px !important; font-weight: 400; }
.consultation-reason-field { width: 100%; display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.consultation-reason-field textarea { min-height: 96px; resize: vertical; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.consultation-reason-field small { justify-self: end; color: var(--muted); font-size: 11px; }
#consultation-user-error { min-height: 0; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.number-stepper { display: grid; grid-template-columns: 38px 1fr 38px; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.number-stepper:focus-within { outline: 2px solid rgba(20,115,230,.14); border-color: var(--primary); }
.number-stepper input { min-width: 0; padding-inline: 6px; border: 0; border-inline: 1px solid var(--border); border-radius: 0; text-align: center; appearance: textfield; }
.number-stepper input:focus { outline: 0; }
.number-stepper input::-webkit-inner-spin-button,.number-stepper input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.number-stepper button { min-height: 42px; padding: 0; color: var(--primary-dark); background: #f7faff; border-radius: 0; font-size: 18px; }
.number-stepper button:hover:not(:disabled) { background: #eaf3ff; }
.number-stepper button:disabled { cursor: default; color: #aeb8c2; background: #f4f6f8; }
.teacher-form label, .qr-field { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.teacher-form label small { font-size: 11px; }
.qr-upload { min-height: 132px; padding: 14px; gap: 16px; color: var(--primary-dark); background: #f5f9fd; border: 1px dashed #9dc9f7; border-radius: 13px; }
.qr-upload img { width: 102px; height: 102px; object-fit: contain; background: white; border-radius: 7px; }
.switch-row { display: flex !important; align-items: center; gap: 9px !important; color: var(--text) !important; }
.switch-row input { width: 17px; height: 17px; }
.teacher-session #pending-badge { display: none !important; }
.settings-panel { padding: 22px 24px; display: flex; align-items:center; justify-content:space-between; gap: 30px; background:#fff; border:1px solid var(--border); border-radius:10px; }
.settings-panel > div { max-width:720px; }
.settings-panel strong { display:block; margin-bottom:7px; font-size:16px; }
.settings-panel p { margin:0; color:var(--muted); font-size:13px; line-height:1.7; }
.settings-panel button { flex:0 0 auto; }
@media (max-width: 760px) {
  .topbar, .view-head, .article-row { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; flex-wrap: wrap; }
  .view-actions { width: 100%; }
  .view-actions button { flex: 1; }
  .field-row, .editor-grid { grid-template-columns: 1fr; }
  .view { width: min(100% - 28px, 1120px); padding-top: 28px; }
  .row-actions { width: 100%; }
  .row-actions > button, .row-more-actions { flex: 1; }
  .row-more-actions summary { width: 100%; justify-content: center; }
  .edit-actions { flex-wrap: wrap; }
  #message { width: 100%; margin: 4px 0 0; }
  .login-card { padding: 30px 24px; }
  .manager-create, .category-row-main, .category-rename-form { align-items: stretch; flex-direction: column; }
  .admin-shell { padding: 0 0 72px; }
  .sidebar { width: auto; height: 64px; inset: auto 10px 8px; flex-direction: row; border-radius: 16px; }
  .sidebar-brand, .sidebar-account, .sidebar nav > p { display: none; }
  .sidebar nav { width: 100%; padding: 7px; display: flex; gap: 5px; overflow-x:auto; }
  .sidebar-link { min-height: 50px; flex: 1; padding: 0 8px; justify-content: center; }
  .topbar { position: static; }
  .metric-grid { padding: 0; overflow-x: auto; }
  .metric-grid article { min-width: 120px; padding: 13px 16px; }
  .metric-grid article:first-child { padding-left: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 10px; place-items: start center; }
  .modal-card { max-height: calc(100dvh - 20px); }
  .teacher-form { padding: 17px; }
  .consultation-user-form { padding: 12px; gap: 10px; }
  .consultation-row { grid-template-columns: minmax(44px,.5fr) minmax(76px,.75fr) minmax(108px,1fr) minmax(165px,1.4fr) minmax(82px,.8fr) minmax(66px,.7fr) 20em minmax(68px,.7fr) minmax(102px,1fr) 86px; }
  .teacher-row { grid-template-columns: .8fr 1fr .6fr 1fr .65fr .7fr .8fr .7fr 86px; }
  .consultation-edit-section { padding: 12px; }
  .consultation-edit-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .settings-panel { align-items:stretch; flex-direction:column; }
}
