:root {
  --ink: #17342c;
  --muted: #67756f;
  --paper: #f5f2ea;
  --card: #fffdf8;
  --line: #deddd3;
  --green: #18392f;
  --green-2: #28584a;
  --coral: #df6647;
  --yellow: #efbd4c;
  --red: #bd554a;
  --shadow: 0 16px 45px rgba(29, 49, 42, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, input, textarea { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar {
  background: var(--green);
  color: #f8f5ed;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: var(--coral); display: grid; place-items: center; font-size: 23px; }
.brand strong { display: block; font-size: 16px; }
.brand span { color: #b9ccc4; font-size: 12px; }
.nav { display: grid; gap: 7px; }
.nav button {
  border: 0; background: transparent; color: #c8d6d1; border-radius: 12px;
  padding: 13px 14px; text-align: left; cursor: pointer; display: flex; gap: 12px; align-items: center;
}
.nav button.active, .nav button:hover { background: rgba(255,255,255,.1); color: white; }
.nav-icon { width: 22px; text-align: center; }
.sidebar-note { margin-top: auto; background: rgba(255,255,255,.08); border-radius: 14px; padding: 14px; color: #c6d6d0; font-size: 12px; line-height: 1.5; }
.cloud-note { display: grid; gap: 7px; }
.cloud-note strong { color: #fffaf0; }
.cloud-note span { color: #c6d6d0; }
.cloud-note button { border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.cloud-note button:hover { background: rgba(255,255,255,.16); }

.auth-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(23,52,44,.34); backdrop-filter: blur(7px); overflow: auto; }
.auth-card { width: min(455px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 28px 90px rgba(23,52,44,.28); padding: 28px; }
.auth-logo { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 17px; background: var(--coral); color: #fff; font-size: 27px; margin-bottom: 16px; }
.auth-card h2 { font-family: Georgia, serif; font-size: 31px; font-weight: 500; letter-spacing: -.03em; margin-bottom: 8px; }
.auth-card p { color: var(--muted); line-height: 1.55; }
.auth-form { display: grid; gap: 12px; margin-top: 18px; }
.auth-form label { display: grid; gap: 7px; font-size: 12px; font-weight: 800; color: var(--green-2); }
.auth-form button { justify-content: center; }
.password-line { display: flex; gap: 8px; align-items: center; }
.password-line .input { flex: 1; min-width: 0; }
.password-toggle { width: 42px; min-width: 42px; border: 1px solid var(--line); background: #f1efe7; color: var(--green); border-radius: 10px; padding: 9px 0; cursor: pointer; font-weight: 800; font-size: 16px; line-height: 1; }
.password-toggle:hover { background: #e9eee9; }
.auth-message { display: none; border-radius: 12px; padding: 10px 12px; font-size: 12px; line-height: 1.45; }
.auth-message.error { display: block; background: #fbece5; color: #8b3827; }
.auth-message.ok { display: block; background: #e9f2ed; color: var(--green-2); }
.auth-switch { margin-top: 16px; background: transparent; border: 0; color: var(--coral); font-weight: 800; cursor: pointer; }
.auth-local { margin-top: 10px; background: transparent; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
.auth-hint { margin-top: 14px; padding: 11px 12px; border-radius: 12px; background: #fff5dd; color: #75602e; font-size: 12px; line-height: 1.45; }

.main { padding: 32px clamp(22px, 4vw, 58px) 48px; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.eyebrow { color: var(--coral); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 800; }
h1 { font-family: Georgia, serif; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; margin: 5px 0 0; font-weight: 500; }
h2, h3, p { margin-top: 0; }
.date-pill { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 10px 15px; font-size: 13px; color: var(--muted); white-space: nowrap; }

.grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr); gap: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.card-head { padding: 20px 22px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: 17px; margin: 0; }
.card-head p { color: var(--muted); font-size: 12px; margin: 3px 0 0; }
.select, .input {
  border: 1px solid var(--line); background: white; border-radius: 11px; padding: 10px 12px; outline: none;
}
.select:focus, .input:focus, textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(40,88,74,.1); }

.student-list { padding: 0 10px 12px; max-height: calc(100vh - 215px); overflow: auto; }
.student-row {
  width: 100%; border: 0; background: transparent; padding: 12px; border-radius: 14px; cursor: pointer;
  display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; text-align: left;
}
.student-row:hover, .student-row.selected { background: #eef0e8; }
.student-link { border:0; background:transparent; text-align:left; cursor:pointer; padding:0; display:grid; }
.row-end { display:flex; align-items:center; gap:10px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; background: #dce8e1; color: var(--green); }
.student-row:nth-child(3n) .avatar { background: #f5dfd2; color: #9e4b35; }
.student-row:nth-child(3n+2) .avatar { background: #f6e8bd; color: #735919; }
.student-name { font-weight: 720; font-size: 14px; }
.student-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.today-count { color: var(--coral); font-size: 11px; font-weight: 800; }

.quick-panel { padding: 22px; }
.selected-profile { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.selected-profile .avatar { width: 52px; height: 52px; font-size: 17px; background: var(--green); color: white; }
.selected-profile h2 { margin: 0 0 3px; font-size: 19px; }
.selected-profile p { margin: 0; color: var(--muted); font-size: 12px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick {
  border: 1px solid var(--line); background: white; border-radius: 13px; min-height: 66px; padding: 11px;
  cursor: pointer; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; justify-content: center;
}
.quick:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(26,49,41,.08); }
.quick b { font-size: 13px; }
.quick span { font-size: 18px; }
.quick.positive span { color: #27805e; }
.quick.negative span { color: var(--red); }
.note-box { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.note-box textarea { width: 100%; min-height: 92px; resize: vertical; border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: white; outline: none; }
.note-actions { display: flex; gap: 9px; margin-top: 9px; }
.btn { border: 0; border-radius: 11px; padding: 10px 14px; cursor: pointer; font-weight: 720; font-size: 13px; }
.btn.primary { background: var(--coral); color: white; flex: 1; }
.btn.secondary { background: #e9eee9; color: var(--green); }
.btn.recording { background: var(--red); color: white; animation: pulse 1.3s infinite; }
@keyframes pulse { 50% { opacity: .72; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { padding: 18px; }
.stat-value { font-family: Georgia, serif; font-size: 29px; margin: 3px 0; }
.stat-value.stat-text { font-family: inherit; font-size: 16px; font-weight: 780; line-height: 1.25; min-height: 40px; display:flex; align-items:center; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.stat-note { font-size: 11px; color: #74827d; }

.timeline { padding: 8px 22px 22px; }
.timeline-item { display: grid; grid-template-columns: 42px 1fr; gap: 12px; position: relative; padding: 10px 0; }
.timeline-item:not(:last-child)::after { content:""; position:absolute; left:20px; top:49px; bottom:-8px; width:1px; background:var(--line); }
.event-icon { width: 40px; height: 40px; border-radius: 12px; background: #eaf0eb; display: grid; place-items: center; z-index: 1; }
.event-body { padding-top: 2px; }
.event-title { font-size: 13px; font-weight: 750; }
.event-title-line { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.event-text { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.event-date { font-size: 10px; color: #919a96; margin-top: 5px; }
.empty { padding: 28px; text-align: center; color: var(--muted); font-size: 13px; }

.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.class-card { padding: 22px; cursor: pointer; transition: .15s ease; }
.class-card:hover { transform: translateY(-3px); }
.draggable-card { position:relative; cursor:grab; }
.drag-handle { color:#9aa39f; cursor:grab; user-select:none; font-size:20px; line-height:1; }
.draggable-card>.drag-handle { position:absolute; top:10px; left:50%; transform:translateX(-50%); }
.drag-hint { color:var(--muted); font-size:12px; margin:-12px 0 16px; }
.student-drag-hint { margin:4px 22px 8px; }
.dragging { opacity:.45; transform:scale(.98); }
.drag-over { outline:2px dashed var(--coral); outline-offset:3px; }
.class-top { display: flex; justify-content: space-between; align-items: flex-start; }
.class-badge { width: 50px; height: 50px; border-radius: 15px; background: var(--green); color: white; display: grid; place-items: center; font-family: Georgia,serif; font-size: 19px; }
.class-card h3 { margin: 18px 0 5px; }
.class-card p { color: var(--muted); font-size: 12px; }
.class-foot { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 18px; display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.mini-actions { display:flex; gap:4px; align-items:center; }
.mini-actions button { border:0; background:#edf0eb; color:var(--muted); width:28px; height:28px; border-radius:8px; cursor:pointer; display:grid; place-items:center; }
.mini-actions button:hover { background:#dfe6df; color:var(--ink); }
.draggable-row { grid-template-columns:24px 42px minmax(0,1fr) auto; }

.profile-grid { display: grid; grid-template-columns: 310px 1fr; gap: 22px; }
.profile-card { padding: 25px; }
.profile-big { width: 80px; height: 80px; border-radius: 24px; background: var(--green); color: white; display:grid; place-items:center; font-size:25px; font-weight:800; margin-bottom:16px; }
.detail-list { display: grid; gap: 13px; margin-top: 22px; }
.detail { border-top: 1px solid var(--line); padding-top: 11px; }
.detail label { display:block; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.08em; margin-bottom:4px; }
.detail div { font-size:13px; overflow-wrap:anywhere; }
.progress-bar { background:#e8e9e2; height:8px; border-radius:99px; overflow:hidden; margin-top:8px; }
.progress-fill { height:100%; background:var(--yellow); border-radius:99px; }
.back { border:0; background:transparent; cursor:pointer; color:var(--green-2); font-weight:750; padding:0; margin-bottom:14px; }

.modal-backdrop { position:fixed; inset:0; background:rgba(15,34,29,.42); display:grid; place-items:center; padding:20px; z-index:20; }
.modal { width:min(520px,100%); max-height:90vh; overflow:auto; background:var(--card); border-radius:20px; padding:24px; box-shadow:0 30px 80px rgba(0,0,0,.25); }
.modal h2 { margin-bottom:6px; }
.modal p { color:var(--muted); font-size:13px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.field { display:grid; gap:5px; }
.field.full { grid-column:1/-1; }
.field label { font-size:11px; color:var(--muted); font-weight:700; }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:20px; }

.toast { position:fixed; left:50%; bottom:24px; transform:translate(-50%, 30px); background:var(--green); color:white; padding:11px 17px; border-radius:999px; opacity:0; pointer-events:none; transition:.2s; z-index:90; font-size:13px; box-shadow:var(--shadow); }
.toast.show { opacity:1; transform:translate(-50%,0); }
.mobile-nav { display:none; }

.day-strip { padding:18px 20px; margin-bottom:18px; display:flex; align-items:center; gap:24px; }
.day-strip h2 { margin:4px 0 0; font-size:18px; }
.day-lessons { flex:1; display:flex; gap:10px; overflow:auto; padding:2px; }
.day-lesson { min-width:190px; border:1px solid var(--line); background:white; border-radius:13px; padding:10px 12px; cursor:pointer; display:grid; grid-template-columns:auto 1fr; gap:2px 10px; text-align:left; }
.day-lesson b { color:var(--coral); grid-row:1/3; align-self:center; }
.day-lesson span { font-size:12px; font-weight:800; }
.day-lesson small { color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.day-lesson.active { border-color:var(--green-2); background:#edf2ed; }
.special-today { width:100%; border-radius:13px; background:#f8e5d9; color:#8e402e; padding:12px 15px; display:grid; gap:4px; }
.special-today span { font-size:11px; color:#946454; }
.quiet { color:var(--muted); font-size:13px; }

.schedule-actions { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:18px; }
.schedule-actions p { color:var(--muted); margin:0; font-size:13px; }
.week-grid { display:grid; grid-template-columns:repeat(5,minmax(175px,1fr)); gap:12px; overflow-x:auto; padding-bottom:10px; }
.day-column { padding:14px; min-height:380px; box-shadow:none; }
.day-title { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--line); padding:3px 2px 12px; margin-bottom:10px; }
.day-title span { font-weight:800; }
.day-title small { color:var(--muted); }
.schedule-item { border-left:3px solid var(--coral); background:#f3f1e9; border-radius:9px; padding:10px; margin-bottom:9px; display:flex; gap:9px; align-items:flex-start; }
.schedule-item>.mini-actions { margin-left:auto; }
.schedule-item .mini-actions button { width:23px; height:23px; font-size:10px; }
.schedule-item>b { font-size:11px; color:var(--coral); }
.schedule-item div { min-width:0; display:grid; gap:3px; }
.schedule-item strong { font-size:12px; }
.schedule-item span,.schedule-item small { color:var(--muted); font-size:10px; line-height:1.3; }
.empty-mini { color:#9aa39f; font-size:11px; padding:16px 3px; }

.planning-toolbar { padding:16px 18px; display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; gap:16px; }
.planning-toolbar>div:first-child { display:flex; align-items:center; gap:14px; }
.planning-toolbar p { margin:0; color:var(--muted); font-size:12px; }
.planning-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(280px,.65fr); gap:20px; }
.module-accordions { display:grid; gap:12px; align-content:start; }
.module-accordion { overflow:hidden; box-shadow:none; }
.module-accordion.open { box-shadow:var(--shadow); }
.module-header { width:100%; border:0; background:var(--card); padding:18px 20px; display:grid; grid-template-columns:24px 1fr auto; gap:12px; align-items:center; text-align:left; cursor:pointer; }
.module-header:hover { background:#f1f2eb; }
.module-arrow { color:var(--coral); font-size:18px; }
.module-name,.module-progress { display:grid; gap:3px; }
.module-name b { font-family:Georgia,serif; font-size:18px; }
.module-name small,.module-progress small { color:var(--muted); font-size:10px; }
.module-progress { text-align:right; }
.module-progress b { color:var(--green-2); font-size:13px; }
.module-accordion .lesson-list { border-top:1px solid var(--line); padding-top:5px; }
.module-summary { display:grid; grid-template-columns:repeat(5,minmax(150px,1fr)); gap:10px; margin-bottom:18px; overflow-x:auto; padding-bottom:3px; }
.module-chip { min-width:150px; background:var(--green); color:white; border-radius:13px; padding:12px; display:grid; gap:3px; }
.module-chip b { font-size:12px; }
.module-chip span { color:var(--yellow); font-size:11px; font-weight:800; }
.module-chip small { color:#bfd0ca; font-size:9px; line-height:1.35; }
.lesson-list { padding:0 14px 16px; }
.module-divider { margin:10px -4px 2px; padding:10px 12px; background:#f3e5d8; border-radius:10px; display:flex; justify-content:space-between; align-items:center; gap:10px; color:#7f4535; }
.module-divider b { font-size:12px; }
.module-divider span { color:#9d6a5a; font-size:9px; }
.lesson-row { display:grid; grid-template-columns:38px 1fr auto; align-items:center; gap:12px; padding:13px 8px; border-top:1px solid var(--line); }
.lesson-row:first-child { border-top:0; }
.lesson-row.done { opacity:.62; }
.lesson-order { width:34px; height:34px; border-radius:11px; background:#e9ede7; display:grid; place-items:center; font-size:12px; font-weight:800; }
.lesson-row.done .lesson-order { background:#d8e9df; color:#277054; }
.lesson-info { display:grid; gap:3px; }
.lesson-info span { color:var(--coral); font-size:10px; text-transform:uppercase; letter-spacing:.06em; font-weight:750; }
.lesson-info b { font-size:13px; }
.lesson-info small { color:var(--muted); font-size:10px; }
.lesson-buttons { display:flex; gap:7px; }
.lesson-buttons { flex-wrap:wrap; justify-content:flex-end; }
.note-button { background:#f0eadc; color:#765c2b; }
.note-button.has-note { background:#dcebe3; color:#23664d; }
.homework-button { background:#e8edf4; color:#3d5d7a; }
.homework-button.has-homework { background:#dce7f2; color:#214f75; }
.material-button { background:#ede7f3; color:#674d7e; }
.material-button.has-material { background:#e2d8ee; color:#553370; }
.lesson-note-preview { margin-top:6px; padding:7px 9px; border-radius:8px; background:#f5f0e4; color:#6c6250; font-size:10px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.lesson-note-tools { display:flex; align-items:center; gap:10px; margin-top:10px; }
.lesson-note-tools span { color:var(--muted); font-size:11px; }
.danger-soft { background:#f7e4df; color:#a34339; margin-right:auto; }
.class-page-grid { display:grid; grid-template-columns:270px minmax(0,1fr); gap:20px; align-items:start; }
.class-overview { padding:24px; position:sticky; top:20px; }
.class-overview h2 { margin:16px 0 5px; }
.class-overview>p { color:var(--muted); font-size:12px; }
.class-overview>.btn { width:100%; margin-top:18px; }
.class-page-stats { display:grid; gap:10px; margin-top:20px; }
.class-page-stats>div { display:flex; justify-content:space-between; align-items:center; border-top:1px solid var(--line); padding-top:10px; }
.class-page-stats b { font-family:Georgia,serif; font-size:20px; }
.class-page-stats span { color:var(--muted); font-size:11px; }
.homework-table-card { overflow:hidden; }
.table-scroll { overflow:auto; }
.data-table { width:100%; border-collapse:collapse; font-size:11px; }
.data-table th { padding:10px 12px; text-align:left; color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.07em; background:#f3f1e9; white-space:nowrap; }
.data-table td { padding:11px 12px; border-top:1px solid var(--line); vertical-align:top; line-height:1.45; }
.data-table td>b,.data-table td>small { display:block; }
.data-table td>small { color:var(--muted); margin-top:3px; }
.module-pill { display:inline-block; white-space:nowrap; background:#e8eee9; color:var(--green-2); border-radius:99px; padding:4px 7px; font-size:9px; font-weight:800; }
.table-action { border:0; background:#e9eee9; width:28px; height:28px; border-radius:8px; cursor:pointer; }
.filter-tabs { display:flex; gap:7px; padding:0 20px 14px; overflow-x:auto; }
.filter-tabs button { border:1px solid var(--line); background:white; border-radius:99px; padding:7px 10px; white-space:nowrap; color:var(--muted); cursor:pointer; font-size:10px; }
.filter-tabs button.active { background:var(--green); color:white; border-color:var(--green); }
.export-layout { display:grid; grid-template-columns:360px minmax(0,1fr); gap:22px; align-items:start; }
.export-form-card { position:sticky; top:20px; }
.export-cards { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.export-card { border:1px solid var(--line); padding:17px; display:flex; align-items:flex-start; gap:12px; text-align:left; cursor:pointer; transition:.15s; }
.export-card:hover { transform:translateY(-2px); border-color:#bac8c1; }
.export-card>span { width:42px; height:42px; flex:0 0 auto; border-radius:13px; display:grid; place-items:center; background:#e7ede8; color:var(--green); font-family:Georgia,serif; font-size:17px; font-weight:800; }
.export-card b { font-size:13px; }
.export-card p { color:var(--muted); font-size:10px; line-height:1.45; margin:5px 0 0; }
.privacy-note { padding:11px 12px; border-left:3px solid var(--yellow); background:#fff6dc; color:#715c26; font-size:10px; line-height:1.5; }
.export-buttons { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.excel-btn { background:#217346; color:white; }
.word-btn { background:#2b579a; color:white; }
.export-help { margin-top:14px; padding:17px; }
.export-help p { margin:6px 0 0; color:var(--muted); font-size:11px; line-height:1.55; }
.standards-grid { display:grid; grid-template-columns:360px minmax(0,1fr); gap:22px; align-items:start; }
.standards-panel { position:sticky; top:20px; }
.standard-form { display:grid; gap:12px; padding-top:10px; border-top:1px solid var(--line); }
.standards-list { display:grid; gap:12px; margin-bottom:18px; }
.save-suggestions { margin:0 0 18px; }
.standard-card { position:relative; padding:18px 48px 18px 18px; display:grid; gap:10px; }
.standard-card.suggested { border-style:dashed; background:#fffaf0; }
.standard-card h3 { font-size:15px; margin:4px 0 0; }
.standard-card span { color:var(--coral); font-size:10px; font-weight:850; letter-spacing:.08em; }
.standard-card>.table-action { position:absolute; top:14px; right:14px; }
.standard-card small { color:#8b7352; font-size:10px; }
.standard-levels { display:grid; gap:5px; }
.standard-levels p { margin:0; color:var(--muted); font-size:11px; line-height:1.45; }
.test-generator { margin-bottom:18px; }
.item-bank-card { margin-bottom:18px; }
.item-list { display:grid; gap:8px; padding:0 22px 22px; }
.item-card { border-top:1px solid var(--line); padding-top:10px; display:grid; grid-template-columns:1fr auto; gap:12px; align-items:start; }
.item-card b { font-size:12px; line-height:1.4; }
.item-card small { display:block; margin-top:4px; color:var(--muted); font-size:10px; }
.generated-test { margin-bottom:18px; overflow:hidden; }
.test-export-buttons { display:flex; gap:9px; padding:0 22px 16px; }
.test-paper { padding:0 22px 22px; }
.test-paper h3 { margin:20px 0 9px; font-size:13px; text-transform:uppercase; letter-spacing:.07em; }
.test-paper li { margin-bottom:12px; line-height:1.45; }
.test-paper li p { margin:5px 0; color:var(--muted); font-size:12px; }
.test-paper li small { color:var(--coral); font-size:10px; font-weight:800; }
.library-intro { padding:20px 22px; display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:18px; background:var(--green); color:white; }
.library-intro h2 { margin:0 0 5px; }
.library-intro p { color:#bed0c9; font-size:12px; margin:0; }
.library-intro>span { width:58px; height:58px; border-radius:18px; background:var(--coral); display:grid; place-items:center; font-family:Georgia,serif; font-weight:800; }
.manual-library { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.library-book { display:grid; grid-template-columns:58px 1fr; overflow:hidden; min-height:230px; }
.book-spine { background:var(--green); color:white; display:grid; place-items:center; font-family:Georgia,serif; font-size:27px; writing-mode:vertical-rl; transform:rotate(180deg); padding:15px 0; }
.book-content { padding:20px; }
.book-content h2 { font-size:17px; margin:6px 0 4px; }
.book-content>p { color:var(--muted); font-size:11px; }
.book-content>small { display:block; color:var(--muted); font-size:9px; margin-top:7px; }
.book-status { display:inline-block; border-radius:99px; background:#f1eee5; color:#8a7660; padding:6px 9px; font-size:10px; font-weight:800; }
.book-status.offline { background:#deeee5; color:#277054; }
.book-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:16px; }
.book-actions a { text-decoration:none; }
.hidden-file-input { display:none; }
.storage-note { margin-top:16px; padding:17px 20px; }
.storage-note p { color:var(--muted); font-size:11px; line-height:1.55; margin:5px 0 0; }
.material-upload-zone { border:2px dashed var(--line); border-radius:14px; padding:15px; display:grid; gap:9px; justify-items:start; background:#f7f5ef; }
.material-upload-zone input { width:100%; font-size:11px; }
.material-upload-zone span { color:var(--muted); font-size:10px; }
.attachment-list { display:grid; gap:8px; margin-top:16px; }
.attachment-row { display:grid; grid-template-columns:44px 1fr auto; align-items:center; gap:10px; border-top:1px solid var(--line); padding-top:9px; }
.file-icon { width:42px; height:42px; border-radius:11px; background:var(--green); color:white; display:grid; place-items:center; font-size:9px; font-weight:850; }
.attachment-row>div:nth-child(2) { display:grid; gap:3px; min-width:0; }
.attachment-row b { font-size:11px; overflow-wrap:anywhere; }
.attachment-row small { color:var(--muted); font-size:9px; }
.done-label { color:#277054; font-size:11px; font-weight:800; }
.special-list { padding:4px 18px 20px; display:grid; gap:10px; }
.special-item { display:flex; gap:11px; align-items:center; padding:12px; border-radius:12px; background:#f2eee5; }
.special-item>span { color:var(--coral); }
.special-item.green>span { color:#397b61; }
.special-item div { display:grid; gap:3px; }
.special-item b { font-size:12px; }
.special-item small { color:var(--muted); font-size:10px; }
.shift-note { margin-top:18px; padding:18px; display:flex; gap:13px; background:var(--green); color:white; }
.shift-note>span { font-size:27px; color:var(--yellow); }
.shift-note p { margin:5px 0 0; color:#bed0c9; font-size:11px; line-height:1.5; }
.manual-card { margin-bottom:18px; }
.manual-summary { padding:2px 18px 20px; display:flex; gap:13px; align-items:center; }
.manual-cover { width:48px; height:62px; flex:0 0 auto; border-radius:6px 11px 11px 6px; background:var(--coral); color:white; display:grid; place-items:center; font-family:Georgia,serif; font-size:24px; box-shadow:inset 5px 0 rgba(0,0,0,.09); }
.manual-summary>div:last-child { min-width:0; display:grid; gap:4px; }
.manual-summary b { font-size:12px; }
.manual-summary span { color:var(--muted); font-size:10px; line-height:1.4; }
.manual-links { display:flex; flex-wrap:wrap; gap:7px; margin-top:4px; }
.manual-links a,.plan-manual a { color:var(--green-2); font-size:10px; font-weight:800; text-decoration:none; }
.manual-empty { padding:0 20px 20px; line-height:1.5; }
.manual-lesson-fields { display:grid; gap:11px; padding:12px; background:#f3f0e7; border-radius:13px; border:1px solid var(--line); }

.assistant-grid { display:grid; grid-template-columns:360px minmax(0,1fr); gap:22px; align-items:start; }
.assistant-form { position:sticky; top:20px; }
.form-stack { padding:2px 22px 24px; display:grid; gap:13px; }
.form-stack textarea { resize:vertical; }
.plan-preview { min-height:610px; }
.assistant-empty { min-height:610px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:40px; color:var(--muted); }
.assistant-empty>span { width:62px; height:62px; border-radius:20px; background:#f5e5ce; color:var(--coral); display:grid; place-items:center; font-size:28px; margin-bottom:16px; }
.assistant-empty h2 { color:var(--ink); margin-bottom:8px; }
.assistant-empty p { max-width:430px; line-height:1.6; }
.assistant-empty small { max-width:430px; color:#8e9893; }
.plan-sheet { padding:34px clamp(22px,4vw,52px); }
.plan-sheet>h2 { text-align:center; font-family:Georgia,serif; font-size:25px; margin:13px 0 25px; }
.plan-sheet h3 { font-size:14px; text-transform:uppercase; letter-spacing:.06em; margin:24px 0 10px; }
.plan-sheet p,.plan-sheet li,.plan-meta { font-family:Georgia,serif; font-size:13px; line-height:1.55; }
.plan-manual { border-left:4px solid var(--coral); background:#f8f1e9; padding:12px 14px; border-radius:0 10px 10px 0; display:grid; gap:4px; }
.plan-manual>span { color:var(--muted); font-size:11px; }
.plan-manual p { margin:3px 0; }
.plan-manual>div { display:flex; gap:12px; flex-wrap:wrap; }
.plan-warning { background:#fff5dd; border-radius:9px; padding:10px; color:#75602e; }
.stage-list { border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.stage-list>div { padding:12px 14px; border-top:1px solid var(--line); display:grid; grid-template-columns:1fr auto; gap:4px 12px; }
.stage-list>div:first-child { border-top:0; }
.stage-list b { font-size:12px; }
.stage-list span { color:var(--coral); font-size:11px; }
.stage-list p { grid-column:1/-1; margin:2px 0 0; color:var(--muted); }
.rich-stages>.rich-stage { display:block; padding:16px; }
.stage-heading { display:flex; justify-content:space-between; gap:12px; margin-bottom:10px; }
.stage-heading span { color:var(--coral); font-size:11px; }
.stage-columns { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.stage-columns section { background:#f6f4ed; border-radius:9px; padding:10px; }
.stage-columns label { color:var(--green-2); font-size:9px; text-transform:uppercase; letter-spacing:.07em; font-weight:850; }
.stage-columns p { font-size:11px; line-height:1.5; margin:5px 0 0; color:var(--ink); }
.stage-tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; }
.stage-tags span { background:#e9eee9; border-radius:99px; padding:5px 8px; color:#56655f; font-size:9px; }
.stage-suggestion { margin-top:9px; padding:9px 10px; border-left:3px solid var(--yellow); background:#fff7df; color:#705b25; font-size:10px; line-height:1.45; }
.stage-suggestion.worksheet { border-color:var(--coral); background:#fbece5; color:#764637; }
.plan-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:20px; }

.grades-card { margin-bottom:20px; }
.progress-card { margin-bottom:20px; overflow:hidden; }
.subtle-detail { color:var(--muted); }
.subtle-detail div { font-size:11px; }
.chart-wrap { padding:0 18px 18px; overflow-x:auto; }
.progress-chart { display:block; width:100%; min-width:500px; height:auto; }
.chart-grid line { stroke:#e4e4dc; stroke-width:1; }
.chart-grid text { fill:#8b9691; font-size:10px; text-anchor:end; }
.grade-line { fill:none; stroke:var(--coral); stroke-width:4; stroke-linecap:round; stroke-linejoin:round; }
.grade-dots circle { fill:var(--card); stroke:var(--coral); stroke-width:4; }
.grade-dots .dot-label { fill:var(--ink); font-size:11px; font-weight:800; text-anchor:middle; }
.grade-dots .date-label { fill:#8b9691; font-size:9px; text-anchor:middle; }
.average-line { stroke:var(--green-2); stroke-width:2; stroke-dasharray:7 6; }
.average-label { fill:var(--green-2); font-size:10px; text-anchor:end; font-weight:800; }
.chart-empty { min-height:190px; display:grid; place-items:center; align-content:center; color:var(--muted); gap:8px; }
.chart-empty span { font-size:34px; color:#a9b4af; }
.chart-empty p { font-size:12px; }
.final-average { margin:0 20px 14px; padding:14px; border-radius:13px; background:#f1efe7; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.final-average label { font-size:12px; font-weight:800; }
.final-average>div { display:flex; gap:7px; }
.final-average input { width:92px; }
.grade-list { padding:0 20px 18px; display:grid; gap:8px; }
.grade-row { display:grid; grid-template-columns:42px 1fr auto; gap:10px; align-items:center; border-top:1px solid var(--line); padding-top:9px; }
.grade-value { width:38px; height:38px; border-radius:12px; background:var(--green); color:white; display:grid; place-items:center; font-family:Georgia,serif; font-size:18px; }
.grade-row>div:nth-child(2) { display:grid; gap:3px; }
.grade-row b { font-size:12px; }
.grade-row small { color:var(--muted); font-size:10px; }

@media (max-width: 850px) {
  .app-shell { display:block; padding-bottom:78px; }
  .sidebar { display:none; }
  .main { padding:24px 16px 32px; }
  .topbar { margin-bottom:22px; align-items:flex-start; }
  .date-pill { font-size:11px; padding:8px 10px; }
  .grid, .profile-grid { grid-template-columns:1fr; }
  .student-list { max-height:390px; }
  .stats { grid-template-columns:1fr 1fr; }
  .stats .stat:last-child { grid-column:1/-1; }
  .mobile-nav { position:fixed; display:flex; overflow-x:auto; justify-content:space-around; bottom:0; left:0; right:0; z-index:15; background:#fffdf9; border-top:1px solid var(--line); padding:8px 8px max(8px, env(safe-area-inset-bottom)); }
  .mobile-nav button { border:0; background:transparent; color:var(--muted); display:grid; gap:2px; justify-items:center; font-size:10px; padding:5px; }
  .mobile-nav button span { font-size:19px; }
  .mobile-nav button.active { color:var(--coral); font-weight:800; }
  .day-strip { display:block; }
  .day-lessons { margin-top:13px; }
  .planning-grid,.assistant-grid { grid-template-columns:1fr; }
  .standards-grid { grid-template-columns:1fr; }
  .standards-panel { position:static; }
  .export-layout { grid-template-columns:1fr; }
  .export-form-card { position:static; }
  .manual-library { grid-template-columns:1fr; }
  .assistant-form { position:static; }
  .planning-toolbar { align-items:flex-start; }
  .planning-toolbar>div:first-child { display:block; }
  .planning-toolbar p { margin-top:6px; }
}

@media (max-height: 760px) and (min-width: 851px) {
  .sidebar { padding: 18px 14px; gap: 14px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 20px; }
  .brand strong { font-size: 14px; }
  .brand span { font-size: 10px; }
  .nav { gap: 4px; }
  .nav button { padding: 9px 11px; font-size: 13px; border-radius: 10px; }
  .sidebar-note { padding: 11px; font-size: 11px; }
}

@media (max-width: 480px) {
  h1 { font-size:31px; }
  .quick-grid { grid-template-columns:1fr 1fr; }
  .card-head { align-items:flex-start; }
  .card-head .select { max-width:130px; }
  .form-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .planning-toolbar { display:grid; }
  .lesson-row { grid-template-columns:34px 1fr; }
  .lesson-buttons { grid-column:2; }
  .module-header { grid-template-columns:22px 1fr; }
  .module-progress { grid-column:2; text-align:left; display:flex; gap:7px; align-items:center; }
  .schedule-actions { align-items:flex-start; }
  .schedule-actions>div { display:flex; flex-direction:column-reverse; gap:7px; }
  .final-average { align-items:flex-start; flex-direction:column; }
  .draggable-row { grid-template-columns:20px 42px minmax(0,1fr); }
  .draggable-row .row-end { grid-column:3; justify-content:space-between; }
  .stage-columns { grid-template-columns:1fr; }
  .class-page-grid { grid-template-columns:1fr; }
  .class-overview { position:static; }
  .export-cards { grid-template-columns:1fr; }
  .export-buttons { grid-template-columns:1fr; }
  .book-actions { display:grid; }
}

@media print {
  .sidebar,.mobile-nav,.topbar,.assistant-form,.plan-actions { display:none!important; }
  .app-shell,.main,.assistant-grid { display:block; padding:0; }
  .plan-preview { border:0; box-shadow:none; }
  .plan-sheet { padding:10mm; }
}
