:root {
  color-scheme: light;
  --ink: #18373d;
  --ink-2: #34555c;
  --muted: #74898f;
  --line: #e1e9ea;
  --surface: #ffffff;
  --canvas: #f3f7f8;
  --teal-950: #08363c;
  --teal-900: #0b4d54;
  --teal-700: #137d72;
  --teal-600: #168c7d;
  --teal-500: #1aa391;
  --teal-100: #e8f5f2;
  --amber: #e2a23e;
  --amber-soft: #fff5e5;
  --coral: #d9644d;
  --coral-soft: #fcebe8;
  --blue: #6077b3;
  --blue-soft: #eef1fa;
  --shadow: 0 8px 24px rgba(24, 55, 61, 0.08);
  font-family: Inter, "Segoe UI", "DejaVu Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 1080px; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(22, 140, 125, 0.22); outline-offset: 2px; }
.is-hidden { display: none !important; }

.loading-screen {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; gap: 10px;
  text-align: center; background: var(--canvas); color: var(--ink);
}
.loading-screen small { color: var(--muted); }
.auth-screen { overflow:auto; padding:24px; place-content:center; }
.auth-card { width:min(460px,calc(100vw - 48px)); padding:26px 34px; border:1px solid var(--line); border-radius:18px; background:white; box-shadow:var(--shadow); }
.auth-card > img { display:block; width:82px; height:82px; margin:0 auto 12px; border-radius:18px; }
.auth-card h1 { margin:8px 0 6px; font-size:25px; }
.auth-card > p:not(.eyebrow) { margin:0 0 18px; color:var(--muted); line-height:1.5; }
.auth-card .plan-form { gap:11px; text-align:left; }
.auth-card .primary-button { width:100%; justify-content:center; }
.auth-card .ghost-button { width:100%; justify-content:center; margin-top:10px; }
.auth-card > small { display:block; margin-top:16px; }
.password-field { display:grid; grid-template-columns:minmax(0,1fr) auto; }
.password-field .input { border-radius:9px 0 0 9px; }
.password-field button { padding:0 13px; border:1px solid var(--line); border-left:0; border-radius:0 9px 9px 0; background:#f5f8f9; cursor:pointer; }
.auth-error { margin-bottom:12px; padding:10px 12px; border-radius:9px; color:#8a3429; background:var(--coral-soft); }
.loading-mark { width: 62px; height: 62px; margin: 0 auto 8px; position: relative; animation: breathe 1.3s ease-in-out infinite alternate; }
.loading-mark span { position: absolute; top: 7px; bottom: 7px; width: 32px; border-radius: 7px 18px 7px 18px; }
.loading-mark span:first-child { left: 4px; background: var(--teal-600); transform: skewY(-10deg); }
.loading-mark span:last-child { right: 4px; background: var(--amber); transform: scaleX(-1) skewY(-10deg); }
@keyframes breathe { from { transform: scale(.96); opacity: .75; } to { transform: scale(1.03); opacity: 1; } }

.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); width: 100%; height: 100%; }
.sidebar { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.24) transparent; padding: 20px 14px; color: #d8e9ea; background: linear-gradient(180deg, var(--teal-900), var(--teal-950)); }
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-thumb { border-radius: 8px; background: rgba(255,255,255,.2); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 23px; }
.brand img { width: 48px; height: 48px; border-radius: 50%; }
.brand div { min-width: 0; }
.brand strong { display: block; color: white; font-size: 20px; letter-spacing: .4px; }
.brand span { display: block; margin-top: 2px; color: #a7c8ca; font-size: 9.6px; white-space: nowrap; }
.nav-label { margin: 4px 10px 8px; color: #85acb0; font-size: 10px; letter-spacing: 1.25px; }
.sidebar nav { display: grid; gap: 3px; }
.nav-item {
  position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 9px;
  width: 100%; min-height: 43px; padding: 8px 12px; border: 0; border-radius: 9px; color: #d3e4e5;
  text-align: left; background: transparent; cursor: pointer; transition: background .16s, color .16s;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.08); }
.nav-item.is-active { color: white; font-weight: 650; background: rgba(255,255,255,.14); }
.nav-item.is-active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 3px; background: var(--amber); }
.nav-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; color: #a9ced0; font-size: 20px; }
.nav-item b { min-width: 25px; padding: 3px 6px; border-radius: 12px; color: #ffd5ca; background: rgba(217,100,77,.22); font-size: 10px; text-align: center; }
.nav-divider { height: 1px; margin: 17px 10px 15px; background: rgba(208,234,235,.18); }
.profile-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; align-items: center; gap: 10px; margin-top: auto; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.1); }
.profile-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #13454a; background: #f0b64c; font-weight: 800; }
.profile-card strong { display: block; color: white; font-size: 12.5px; }
.profile-card span { display: block; margin-top: 3px; color: #aecacc; font-size: 10.5px; }
.profile-chevron { font-size: 18px !important; }

.workspace { min-width: 0; height: 100%; overflow: hidden; }
.topbar { display: grid; grid-template-columns: minmax(310px, 1fr) minmax(270px, 330px) 184px 42px; align-items: center; gap: 16px; height: 86px; padding: 0 30px; border-bottom: 1px solid var(--line); background: white; }
.school-heading { min-width: 0; }
.school-heading span { display: block; margin-bottom: 8px; color: #82969b; font-size: 10.5px; letter-spacing: .45px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.school-heading strong { display: block; font-size: 17px; }
.global-search { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid #dfe8e9; border-radius: 10px; background: #f5f8f9; }
.global-search span { color: #718b91; font-size: 23px; line-height: 1; }
.global-search input { min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.global-search input::placeholder { color: #83989d; }
.global-search kbd { padding: 3px 6px; border: 1px solid #d8e2e4; border-bottom-width: 2px; border-radius: 5px; color: #819499; background: white; font-size: 9px; }
.year-box { height: 44px; padding: 7px 16px; border: 1px solid #dce6e8; border-radius: 10px; background: white; }
.year-box span { display: block; color: #819499; font-size: 9.5px; }
.year-box strong { display: block; margin-top: 2px; font-size: 12.5px; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer; }
.add-button { color: var(--teal-700); background: var(--teal-100); font-size: 25px; }

#main-content { height: calc(100vh - 86px); overflow: auto; padding: 24px 30px 36px; scroll-behavior: smooth; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.eyebrow { margin: 0 0 7px; color: var(--teal-700); font-size: 10.5px; font-weight: 750; letter-spacing: 1px; text-transform: uppercase; }
.page-head h1 { margin: 0; color: var(--ink); font-size: 25px; line-height: 1.25; }
.page-head p { max-width: 760px; margin: 7px 0 0; color: var(--muted); line-height: 1.55; }
.primary-button, .secondary-button, .ghost-button, .danger-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 9px; font-weight: 650; cursor: pointer; transition: transform .12s, background .12s;
}
.primary-button { border: 1px solid var(--teal-600); color: white; background: var(--teal-600); }
.primary-button:hover { background: var(--teal-700); transform: translateY(-1px); }
.secondary-button { border: 1px solid #dce6e8; color: var(--ink-2); background: white; }
.secondary-button:hover, .ghost-button:hover { background: #f2f7f7; }
.ghost-button { border: 1px solid transparent; color: var(--teal-700); background: transparent; }
.danger-button { border: 1px solid #efb5a9; color: #b44833; background: #fff5f2; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card, .panel { border: 1px solid rgba(219,230,232,.9); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.stat-card { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; min-height: 108px; padding: 19px; }
.stat-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--teal-700); background: var(--teal-100); font-size: 18px; }
.stat-card:nth-child(2) .stat-icon { color: var(--blue); background: var(--blue-soft); }
.stat-card:nth-child(3) .stat-icon { color: #bd7920; background: var(--amber-soft); }
.stat-card:nth-child(4) .stat-icon { color: var(--coral); background: var(--coral-soft); }
.stat-label { display: block; color: var(--muted); font-size: 10.5px; font-weight: 650; letter-spacing: .35px; }
.stat-value { display: block; margin-top: 5px; color: var(--ink); font-size: 27px; font-weight: 800; }
.stat-note { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 18px; }
.work-task-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.work-task-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 112px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; box-shadow: var(--shadow); cursor: pointer; text-align: left; transition: transform .14s,border-color .14s,box-shadow .14s; }
.work-task-card:hover { border-color: #91c8c0; box-shadow: 0 12px 28px rgba(24,55,61,.11); transform: translateY(-2px); }
.work-task-card i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--teal-700); background: var(--teal-100); font-style: normal; font-size: 18px; }
.work-task-card strong,.work-task-card small { display: block; }
.work-task-card strong { font-size: 12.5px; line-height: 1.35; }
.work-task-card small { margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.work-task-card b { color: var(--teal-700); font-size: 24px; }
.document-summary { padding: 0; overflow: hidden; }
.document-summary summary { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 17px 20px; cursor: pointer; list-style: none; }
.document-summary summary::-webkit-details-marker { display: none; }
.document-summary summary strong,.document-summary summary small { display: block; }
.document-summary summary small { margin-top: 4px; color: var(--muted); font-size: 10.5px; }
.document-summary summary i { color: var(--teal-700); font-style: normal; font-size: 18px; transition: transform .15s; }
.document-summary[open] summary i { transform: rotate(180deg); }
.document-summary > .stats-grid,.document-summary > .button-row { margin-inline: 20px; }
.document-summary > .button-row { margin-bottom: 20px; }
.compact-stats { padding-top: 3px; }
.compact-stats .stat-card { min-height: 94px; box-shadow: none; }
.route-placeholder { display: grid; justify-items: start; gap: 12px; max-width: 820px; min-height: 300px; align-content: start; }
.route-placeholder > i { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: var(--teal-700); background: var(--teal-100); font-style: normal; font-size: 24px; }
.route-placeholder h2 { margin: 2px 0 0; font-size: 19px; }
.route-placeholder p { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.6; }
.route-placeholder .notice { width: 100%; margin-top: 12px; }
.panel { padding: 24px; }
.panel-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.panel h2 { margin: 0; font-size: 16px; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; }
.metric-highlight { color: var(--teal-600); font-size: 23px; font-weight: 800; }
.progress-track { width: 100%; height: 8px; overflow: hidden; border-radius: 6px; background: #e4edee; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-500), #57b88b); }
.progress-meta { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 10.5px; }

.age-cards { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; margin-top: 20px; }
.age-card { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfd; cursor: pointer; text-align: left; }
.age-card:hover { border-color: #9ccbc4; background: #f0f8f6; }
.age-card strong { display: block; font-size: 12px; }
.age-card b { display: block; margin-top: 10px; color: var(--teal-700); font-size: 21px; }
.age-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; }

.issue-list { display: grid; gap: 8px; }
.issue-summary-item { display: grid; grid-template-columns: 11px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf2f2; }
.issue-dot { width: 10px; height: 10px; border: 1px solid var(--amber); border-radius: 50%; background: var(--amber-soft); }
.issue-summary-item strong { display: block; font-size: 12px; }
.issue-summary-item span { color: var(--muted); font-size: 10.5px; }
.issue-summary-item b { min-width: 34px; padding: 4px 7px; border-radius: 12px; color: #a86619; background: var(--amber-soft); font-size: 10px; text-align: center; }

.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.quick-action { min-height: 73px; padding: 13px; border: 0; border-radius: 11px; color: var(--ink-2); background: #edf7f4; cursor: pointer; text-align: left; }
.quick-action:nth-child(2) { background: #f0f2fa; }
.quick-action:nth-child(3) { background: #fff4e3; }
.quick-action:nth-child(4) { background: #eff4f5; }
.quick-action i { display: grid; place-items: center; width: 27px; height: 27px; margin-bottom: 8px; border-radius: 50%; color: white; background: var(--teal-600); font-style: normal; }
.quick-action:nth-child(2) i { background: var(--blue); }
.quick-action:nth-child(3) i { background: #d9912a; }
.quick-action:nth-child(4) i { background: #55747b; }
.quick-action strong { font-size: 11px; }

.toolbar { display: grid; grid-template-columns: minmax(220px, 1.6fr) minmax(160px, .8fr) minmax(190px, 1fr) auto; gap: 10px; margin-bottom: 16px; }
.field { display: grid; gap: 6px; }
.field > span { color: var(--muted); font-size: 10.5px; font-weight: 650; }
.input, .select { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #dbe6e7; border-radius: 9px; color: var(--ink); background: white; }
.input:focus, .select:focus { border-color: #8dc6bd; outline: 3px solid rgba(22,140,125,.12); }
.result-count { display: flex; align-items: end; justify-content: flex-end; min-width: 100px; padding-bottom: 11px; color: var(--muted); font-size: 11.5px; }

.document-list { display: grid; gap: 10px; }
.document-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 3px 12px rgba(24,55,61,.035); }
.document-card:hover { border-color: #b9d7d3; }
.doc-mark { display: grid; place-items: center; width: 43px; height: 48px; border-radius: 9px; color: #d2513d; background: #fff0ed; font-size: 11px; font-weight: 800; }
.document-card h3 { margin: 0; font-size: 13.5px; line-height: 1.35; }
.document-card p { display: -webkit-box; margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 10.5px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 12px; color: #547078; background: #f0f5f6; font-size: 9.5px; }
.chip.teal { color: var(--teal-700); background: var(--teal-100); }
.chip.amber { color: #a36314; background: var(--amber-soft); }
.chip.coral { color: #b54c37; background: var(--coral-soft); }
.doc-actions { display: flex; gap: 7px; }
.small-button { min-height: 34px; padding: 0 11px; border: 1px solid #dce6e8; border-radius: 8px; color: var(--ink-2); background: white; cursor: pointer; font-size: 10.5px; font-weight: 650; }
.small-button:hover { background: #f2f7f7; }
.small-button.is-on { color: white; border-color: var(--teal-600); background: var(--teal-600); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 18px; }
.page-button { min-width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; }
.page-button.is-active { color: white; border-color: var(--teal-600); background: var(--teal-600); }
.empty-state { padding: 54px 20px; border: 1px dashed #cddcde; border-radius: 14px; color: var(--muted); background: rgba(255,255,255,.6); text-align: center; }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--ink-2); }

.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.collection-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; }
.collection-card:hover { border-color: #97c7c0; box-shadow: var(--shadow); }
.collection-card span { color: var(--muted); font-size: 10px; }
.collection-card h3 { margin: 7px 0 12px; font-size: 13px; line-height: 1.35; }
.collection-card footer { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10.5px; }
.collection-card footer b { color: var(--teal-700); }

.review-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 16px; }
.review-filters { align-self: start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.review-filters h3 { margin: 0 0 13px; font-size: 12px; }
.filter-button { display: flex; justify-content: space-between; width: 100%; padding: 9px 8px; border: 0; border-radius: 7px; color: var(--ink-2); background: transparent; cursor: pointer; text-align: left; font-size: 11px; }
.filter-button:hover, .filter-button.is-active { color: var(--teal-700); background: var(--teal-100); }
.issue-card { margin-bottom: 9px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 10px; background: white; }
.issue-card.info { border-left-color: var(--blue); }
.issue-card header { display: flex; justify-content: space-between; gap: 12px; }
.issue-card h3 { margin: 0; font-size: 12.5px; }
.issue-card p { margin: 7px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.issue-card footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.issue-card footer span { max-width: 70%; overflow: hidden; color: #60787e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.bar-list { display: grid; gap: 14px; }
.bar-item { display: grid; grid-template-columns: 112px minmax(0,1fr) 42px; align-items: center; gap: 10px; }
.bar-item label { color: var(--ink-2); font-size: 11px; }
.bar { height: 12px; overflow: hidden; border-radius: 8px; background: #edf2f2; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--teal-600),#72bfa2); }
.bar-item b { color: var(--ink-2); font-size: 11px; text-align: right; }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th, .report-table td { padding: 11px 9px; border-bottom: 1px solid #e9efef; text-align: left; font-size: 11px; }
.report-table th { color: var(--muted); font-size: 10px; letter-spacing: .4px; }

.backup-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.notice { padding: 13px 15px; border: 1px solid #ead29f; border-radius: 10px; color: #795722; background: #fff9ec; font-size: 11.5px; line-height: 1.5; }
.about-list { display: grid; gap: 11px; margin: 18px 0 0; padding: 0; list-style: none; }
.about-list li { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #edf1f2; font-size: 11.5px; }
.about-list span { color: var(--muted); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(3,28,32,.3); backdrop-filter: blur(1px); }
.document-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 21; width: min(720px, 62vw); overflow: auto; background: white; box-shadow: -18px 0 45px rgba(9,49,55,.18); transform: translateX(102%); transition: transform .2s ease; }
.document-drawer.is-open { transform: translateX(0); }
.drawer-header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 18px; padding: 21px 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.drawer-header h2 { margin: 4px 0 0; font-size: 18px; line-height: 1.35; }
.drawer-close { flex: 0 0 auto; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f0f5f6; cursor: pointer; font-size: 20px; }
.drawer-body { padding: 22px 24px 34px; }
.drawer-intro { margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.import-source-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.import-source-grid button { display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 12px; min-height: 92px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fbfdfd; cursor: pointer; text-align: left; }
.import-source-grid button:hover { border-color: #8dc6bd; background: var(--teal-100); }
.import-source-grid button > b { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: white; background: var(--teal-600); font-size: 17px; }
.import-source-grid button:nth-child(2) > b { background: #278051; }
.import-source-grid button:nth-child(3) > b { background: #c95c48; }
.import-source-grid button:nth-child(4) > b { background: #55747b; }
.import-source-grid strong,.import-source-grid small { display: block; }
.import-source-grid small { margin-top: 5px; color: var(--muted); line-height: 1.35; }
.selected-files { display: grid; gap: 7px; }
.selected-files > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #f6f9f9; }
.selected-files span { color: var(--muted); font-size: 11px; }
.import-preview { display: grid; gap: 9px; max-height: 340px; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.import-preview article { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.import-preview h3 { margin: 0 0 6px; font-size: 13px; }
.import-preview p { margin: 0; color: #445e64; font-size: 11px; line-height: 1.55; white-space: pre-wrap; }
.privacy-warning { padding: 13px 15px; border: 1px solid #e6b6ae; border-radius: 10px; color: #7d3f34; background: #fff3f1; }
.privacy-warning p { margin: 5px 0; font-size: 11px; line-height: 1.45; }
.privacy-warning ul { margin: 8px 0 0; padding-left: 18px; font-size: 11px; }
.privacy-warning small { color: #83584f; }
.mapping-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.table-scroll { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.import-table { max-height: 310px; }
.import-table table { min-width: 100%; border-collapse: collapse; white-space: nowrap; }
.import-table th,.import-table td { max-width: 260px; padding: 8px 10px; overflow: hidden; border: 1px solid #e6eeee; font-size: 10.5px; text-overflow: ellipsis; }
.import-table th { position: sticky; top: 0; color: white; background: var(--teal-700); }
.import-log { margin-top: 16px; }
.log-list { display: grid; gap: 8px; }
.log-list > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(180px,auto) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; background: #f6f9f9; }
.log-list span { color: var(--muted); font-size: 10.5px; }
.log-list b { color: var(--teal-700); font-size: 10.5px; }
.settings-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; padding:7px; border:1px solid var(--line); border-radius:12px; background:white; }
.settings-tabs button { min-height:38px; padding:0 14px; border:0; border-radius:8px; color:var(--muted); background:transparent; cursor:pointer; font-weight:650; }
.settings-tabs button.is-active { color:var(--teal-700); background:var(--teal-100); }
.settings-form { max-width:980px; }
.school-logo-preview { width:78px; height:78px; object-fit:contain; border:1px solid var(--line); border-radius:12px; background:white; }
.directory-table { width:100%; min-width:900px; border-collapse:collapse; }
.directory-table th,.directory-table td { padding:10px; border-bottom:1px solid var(--line); font-size:11px; text-align:left; vertical-align:middle; }
.directory-table th { color:var(--muted); background:#f6f9f9; }
.directory-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.directory-grid article,.signature-grid article { padding:15px; border:1px solid var(--line); border-radius:11px; background:#fbfdfd; }
.directory-grid header { display:flex; justify-content:space-between; gap:10px; }
.directory-grid strong,.directory-grid small { display:block; }
.directory-grid small { margin-top:4px; color:var(--muted); }
.directory-grid footer { display:flex; gap:7px; }
.checkbox-group { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding:14px; border:1px solid var(--line); border-radius:10px; }
.checkbox-group legend { padding:0 6px; color:var(--muted); font-size:11px; font-weight:700; }
.multi-select { min-height:92px; padding:8px 10px; }
.legal-warning { padding:13px 15px; border-left:4px solid #c95c48; border-radius:8px; color:#753f35; background:#fff2ef; font-size:11.5px; line-height:1.5; }
.signature-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:16px; }
.signature-grid small { display:block; margin:5px 0; color:var(--muted); }
.signature-preview { display:grid; place-items:center; min-height:85px; margin-bottom:10px; overflow:hidden; border:1px dashed #cbdadb; border-radius:9px; color:var(--muted); background:white; }
.signature-preview.large { min-height:150px; }
.signature-preview img { max-width:180px; max-height:90px; object-fit:contain; }
.signature-preview.large img { max-width:320px; max-height:140px; }
.professional-reviews { margin-top:16px; }
.review-timeline { display:grid; gap:12px; padding-left:18px; border-left:2px solid #cfe2df; }
.review-timeline > article { position:relative; padding:13px 15px; border:1px solid var(--line); border-radius:10px; background:#fbfdfd; }
.review-timeline > article > i { position:absolute; left:-25px; top:18px; width:12px; height:12px; border:3px solid white; border-radius:50%; background:var(--teal-600); box-shadow:0 0 0 1px #9fc9c3; }
.review-timeline article.is-resolved { opacity:.75; }
.review-timeline header { display:flex; justify-content:space-between; gap:10px; }
.review-timeline small { color:var(--muted); }
.review-timeline p { line-height:1.55; }
.review-response { padding:9px 11px; border-radius:8px; background:var(--teal-100); font-size:11px; }
.review-quote { margin:16px 0; padding:14px; border-left:4px solid var(--teal-500); background:#f2f8f7; line-height:1.55; }
.drawer-metadata { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 18px; }
.metadata-item { padding: 11px; border-radius: 9px; background: #f3f7f8; }
.metadata-item span { display: block; color: var(--muted); font-size: 9.5px; }
.metadata-item strong { display: block; margin-top: 5px; font-size: 11.5px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.source-policy { margin-bottom: 16px; padding: 11px 13px; border-left: 4px solid var(--teal-600); color: #4e686e; background: var(--teal-100); font-size: 10.8px; line-height: 1.45; }
.text-preview { max-height: 52vh; overflow: auto; padding: 17px; border: 1px solid var(--line); border-radius: 10px; color: #344f55; background: #fbfcfc; font-family: "Segoe UI", Arial, sans-serif; font-size: 11.5px; line-height: 1.7; white-space: pre-wrap; }
.drawer-issues { display: grid; gap: 7px; margin: 16px 0; }
.drawer-issue { padding: 10px 12px; border-radius: 8px; color: #77501a; background: var(--amber-soft); font-size: 10.5px; }
.note-field { display: grid; gap: 7px; }
.note-field > span { color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.note-field textarea { width: 100%; min-height: 88px; padding: 11px 12px; resize: vertical; border: 1px solid #dbe6e7; border-radius: 9px; color: var(--ink); background: white; line-height: 1.5; }
.secondary-button.is-on { color: var(--teal-700); border-color: #8dc6bd; background: var(--teal-100); }
.video-section { margin-top: 20px; }
.video-section > h2 { margin: 0 0 12px; font-size: 17px; }
.video-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.video-card { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: var(--shadow); }
.video-card h3 { margin: 8px 0 6px; font-size: 14px; }
.video-card p { margin: 0 0 8px; color: var(--muted); line-height: 1.5; }
.video-card small { color: var(--muted); }
.video-card footer { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.video-thumbnail { display: grid; place-items: center; min-height: 118px; overflow: hidden; border-radius: 10px; color: white; background: linear-gradient(135deg,var(--teal-700),var(--teal-950)); font-size: 28px; }
.video-thumbnail img { width: 100%; height: 118px; object-fit: cover; }
.guide-library { padding: 18px; border: 1px solid #cfe5e1; border-radius: 14px; background: linear-gradient(135deg,#f9fdfc,#edf8f6); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-heading h2 { margin: 4px 0 5px; font-size: 18px; }
.section-heading p { margin: 0; color: var(--muted); }
.guide-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.guide-card { display: grid; grid-template-columns: 50px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.guide-card h3 { margin: 0 0 5px; font-size: 13.5px; }
.guide-card p { margin: 0 0 5px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.guide-card small { color: var(--teal-700); font-size: 10.5px; font-weight: 700; }
.guide-icon { display: grid; place-items: center; width: 50px; height: 58px; border-radius: 9px; color: white; font-size: 13px; font-weight: 850; box-shadow: 0 5px 12px rgba(24,55,61,.12); }
.guide-icon.pdf { background: #c94f42; }
.guide-icon.word { background: #3568a8; font-size: 22px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: 520px; padding: 11px 16px; border-radius: 9px; color: white; background: #173f45; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%,12px); transition: opacity .18s, transform .18s; }
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }
.doc-mark.open { font-size: 10px; background:#e4f5ef; color:#15705f; }
.planner-layout { display:grid; grid-template-columns:minmax(0, 1fr) 320px; gap:18px; align-items:start; }
.plan-form { display:grid; gap:14px; }
.plan-form textarea { width:100%; min-height:105px; resize:vertical; border:1px solid var(--line); border-radius:10px; padding:11px 12px; font:inherit; color:var(--ink); background:#fff; }
.plan-form textarea.tall { min-height:260px; }
.template-editor { border:1px solid var(--line); border-radius:14px; background:#f9fbfb; overflow:hidden; }
.template-editor > summary { cursor:pointer; padding:14px 16px; font-weight:800; color:var(--ink); background:#eef6f5; }
.template-editor[open] > summary { border-bottom:1px solid var(--line); }
.template-editor > :not(summary) { margin-left:16px; margin-right:16px; }
.template-editor > :last-child { margin-bottom:16px; }
.ai-settings .connection-state { max-width:360px; }
.assistant-card { display:grid; grid-template-columns:58px minmax(0,1fr) auto; align-items:center; gap:16px; border-color:#cfe5e1; background:linear-gradient(135deg,#fff,#edf8f6); }
.assistant-card h2 { margin:4px 0 6px; font-size:18px; }
.assistant-mark { display:grid; place-items:center; width:58px; height:58px; border-radius:16px; color:white; background:linear-gradient(135deg,var(--teal-500),var(--teal-900)); font-size:17px; font-weight:850; box-shadow:0 7px 16px rgba(11,77,84,.18); }
.privacy-inline { margin-top:9px; color:#7b5149; font-size:10.8px; line-height:1.45; }
.ai-draft-preview { border:1px solid var(--line); border-radius:14px; padding:16px; background:#fff; }
.ai-draft-preview p { white-space:pre-wrap; }
.pending-ai { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 0; border-bottom:1px solid var(--line); }
.pending-ai div:first-child { display:grid; gap:4px; }
.template-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.template-list article { padding:14px; border:1px solid var(--line); border-radius:11px; background:#fbfdfd; }
.template-list h3 { margin:0 0 10px; font-size:13px; }
.template-list small { display:block; margin-top:7px; color:var(--muted); }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.plan-list { position:sticky; top:18px; max-height:calc(100vh - 150px); overflow:auto; }
.saved-plan { width:100%; display:flex; flex-direction:column; gap:5px; text-align:left; padding:12px; margin-bottom:8px; border:1px solid var(--line); border-radius:10px; background:#fff; cursor:pointer; }
.saved-plan:hover { border-color:var(--teal-600); background:#f3fbf8; }
.saved-plan span { font-size:12px; color:var(--muted); }
@media (max-width: 1050px) { .planner-layout { grid-template-columns:1fr; } .plan-list { position:static; } }
@media (max-width: 900px) { .signature-grid,.directory-grid { grid-template-columns:1fr; } }
@media (max-width: 700px) { .form-grid,.mapping-grid,.import-source-grid,.checkbox-group,.template-list { grid-template-columns:1fr; } }

@media (max-width: 1240px) {
  .app-shell { grid-template-columns: 226px minmax(0,1fr); }
  .topbar { grid-template-columns: minmax(250px,1fr) minmax(250px,300px) 155px 42px; padding: 0 22px; }
  .sidebar { padding-inline: 10px; }
  .brand span { font-size: 8.5px; }
  .nav-item { padding-inline: 9px; font-size: 12.5px; }
  #main-content { padding-inline: 22px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .work-task-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .age-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .collection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .video-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) { .work-task-grid { grid-template-columns: 1fr; } }
