:root {
  color-scheme: dark;
  --bg: #08111f;
  --panel: #101c2d;
  --panel-2: #14243a;
  --text: #f4f7fb;
  --muted: #9eb0c7;
  --accent: #51d3a5;
  --accent-dark: #183f37;
  --border: #263951;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 20% 0%, #142b43 0, var(--bg) 38%); color: var(--text); }
button, input { font: inherit; }
button { border: 0; border-radius: .75rem; padding: .8rem 1rem; background: var(--accent); color: #052019; font-weight: 750; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #8ce9ca; outline-offset: 2px; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; }
.auth-card { width: min(100%, 28rem); background: rgba(16, 28, 45, .94); border: 1px solid var(--border); border-radius: 1.25rem; padding: clamp(1.5rem, 5vw, 2.5rem); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.brand-mark { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .9rem; background: var(--accent); color: #052019; font-weight: 900; font-size: 1.25rem; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 800; margin: 1.25rem 0 .5rem; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.05; margin: 0 0 .75rem; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 1.15rem; }
.muted, .hero p, .module-card p, .session-card p { color: var(--muted); line-height: 1.55; }
form { display: grid; gap: 1rem; margin-top: 1.5rem; }
label { display: grid; gap: .45rem; color: #d9e3ef; font-size: .9rem; font-weight: 650; }
input { width: 100%; color: var(--text); background: #091422; border: 1px solid var(--border); border-radius: .7rem; padding: .85rem .9rem; }
.check { display: flex; align-items: center; gap: .65rem; font-weight: 500; }
.check input { width: 1.05rem; height: 1.05rem; }
.alert { border-radius: .7rem; padding: .8rem 1rem; margin: 1rem 0; }
.alert.error { background: #4a1f2a; color: #ffc8d1; }
.alert.success { background: var(--accent-dark); color: #bdf5df; }
.topbar { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 max(1.25rem, calc((100vw - 76rem) / 2)); border-bottom: 1px solid var(--border); background: rgba(8, 17, 31, .85); backdrop-filter: blur(12px); }
.topbar form { margin: 0; }
.logo { color: var(--text); text-decoration: none; font-weight: 850; letter-spacing: -.02em; }
.secondary { color: var(--text); background: transparent; border: 1px solid var(--border); }
.dashboard { width: min(76rem, calc(100% - 2rem)); margin: 0 auto; padding: 3.5rem 0; }
.hero { max-width: 45rem; margin-bottom: 2.25rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.module-card, .session-card { background: linear-gradient(145deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: 1rem; padding: 1.25rem; }
.module-card { min-height: 12rem; display: flex; flex-direction: column; }
.module-card p { flex: 1; }
.module-card small { color: #bed0e4; }
.active-card { border-color: #386b62; }
.card-link { color: var(--accent); font-weight: 750; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.status-dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 .3rem rgba(81,211,165,.12); margin-bottom: 1.25rem; }
.session-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.session-card form { margin: 0; }
.topbar-label { color: var(--muted); font-size: .9rem; }
.school-page { width: min(100rem, calc(100% - 2rem)); max-width: none; }
.school-hero { margin-bottom: 1.5rem; }
.settings-card { display: grid; grid-template-columns: 1fr minmax(18rem, 28rem); gap: 2rem; background: var(--panel); border: 1px solid var(--border); border-radius: 1rem; padding: clamp(1.25rem, 4vw, 2rem); }
.settings-card form { margin: 0; }
.school-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.school-summary div { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 1rem; padding: 1.25rem; }
.school-summary strong { font-size: 2rem; }
.school-summary span { color: var(--muted); }
.school-summary .danger-count { border-color: #67404a; }
.school-columns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; }
.school-workspace { display: grid; grid-template-columns: minmax(19rem, .72fr) minmax(48rem, 1.7fr); align-items: start; gap: 1.25rem; }
.school-content { display: grid; gap: 1.5rem; min-width: 0; }
.school-section { min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: .85rem; }
.section-heading span { display: grid; place-items: center; min-width: 1.8rem; height: 1.8rem; border-radius: 99px; background: var(--panel-2); color: var(--muted); font-size: .8rem; }
.assignment-list { display: grid; gap: .65rem; }
.assignment { display: grid; gap: .25rem; color: var(--text); text-decoration: none; background: var(--panel); border: 1px solid var(--border); border-radius: .85rem; padding: 1rem; }
.assignment:hover, .course-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.assignment small, .assignment-course, .course-card small { color: var(--muted); }
.assignment-course { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.assignment.missing { border-left: 3px solid #e66f86; }
.assignment-row { display: flex; align-items: center; gap: .75rem; background: var(--panel); border: 1px solid var(--border); border-radius: .85rem; padding: .9rem 1rem; }
.assignment-row.missing { border-left: 3px solid #e66f86; }
.assignment-row.archived { opacity: .85; }
.assignment-row > a { display: grid; flex: 1; gap: .25rem; min-width: 0; color: var(--text); text-decoration: none; }
.assignment-row > a:hover strong { color: var(--accent); }
.assignment-row small, .hidden-item small { display: block; color: var(--muted); margin-top: .2rem; }
.assignment-row form, .hidden-item form { margin: 0; }
.text-button { padding: .4rem .55rem; color: var(--muted); background: transparent; border: 1px solid var(--border); font-size: .8rem; }
.text-button:hover { color: var(--text); border-color: var(--accent); }
.empty-state { color: var(--muted); background: var(--panel); border: 1px dashed var(--border); border-radius: .85rem; padding: 1rem; }
.archive-section { margin-top: 1.5rem; background: rgba(16, 28, 45, .55); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem; }
.archive-section summary { cursor: pointer; color: var(--text); font-weight: 750; }
.archive-section summary span { margin-left: .4rem; color: var(--muted); }
.archive-section > p { color: var(--muted); }
.hidden-section { border-color: #386b62; }
.course-section { margin-top: 2.5rem; }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.compact-courses { grid-template-columns: 1fr; }
.course-card { display: flex; flex-direction: column; gap: .55rem; color: var(--text); text-decoration: none; background: var(--panel); border: 1px solid var(--border); border-radius: 1rem; padding: 1.15rem; transition: .15s ease; }
.course-card .status-dot { margin-bottom: .35rem; }
.connection-settings { margin-top: 2.5rem; color: var(--muted); }
.connection-settings summary { cursor: pointer; color: var(--text); font-weight: 700; }
.connection-settings form { width: fit-content; }
.hidden-settings { display: grid; gap: .5rem; margin: 1.25rem 0; }
.hidden-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 42rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.danger-button { background: #4a1f2a; color: #ffc8d1; }
.calendar-panel { min-width: 0; overflow-x: auto; background: rgba(16, 28, 45, .78); border: 1px solid var(--border); border-radius: 1.15rem; padding: 1rem; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-width: 46rem; margin-bottom: .7rem; }
.calendar-toolbar .eyebrow { margin: 0 0 .25rem; }
.calendar-toolbar h2 { font-size: 1.35rem; }
.week-navigation { display: flex; align-items: center; gap: .35rem; }
.week-navigation a { display: grid; place-items: center; min-width: 2.4rem; height: 2.4rem; padding: 0 .7rem; color: var(--text); text-decoration: none; background: #091422; border: 1px solid var(--border); border-radius: .65rem; font-weight: 700; }
.week-navigation a:hover { border-color: var(--accent); }
.calendar-legend { display: flex; gap: 1rem; min-width: 46rem; margin-bottom: .85rem; color: var(--muted); font-size: .78rem; }
.calendar-legend span::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; }
.legend-class::before { background: #3cc8a0; }
.legend-assignment::before { background: #ff708a; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(7.2rem, 1fr)); min-width: 51rem; border: 1px solid var(--border); border-radius: .9rem; overflow: hidden; }
.calendar-day { min-height: 38rem; background: rgba(8, 17, 31, .62); border-right: 1px solid var(--border); }
.calendar-day:last-child { border-right: 0; }
.calendar-day.today { background: rgba(30, 65, 67, .34); }
.calendar-day > header { display: flex; align-items: center; justify-content: space-between; gap: .4rem; min-height: 3.4rem; padding: .65rem .7rem; border-bottom: 1px solid var(--border); }
.calendar-day > header span { color: var(--muted); font-size: .76rem; }
.calendar-day > header strong { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; }
.calendar-day.today > header strong { color: #052019; background: var(--accent); }
.day-events { display: grid; align-content: start; gap: .5rem; padding: .55rem; }
.calendar-event { display: grid; gap: .2rem; padding: .55rem; color: var(--text); text-decoration: none; border-radius: .65rem; border-left: 3px solid; overflow-wrap: anywhere; }
.calendar-event.class { background: rgba(37, 118, 103, .32); border-color: #3cc8a0; }
.calendar-event.assignment { background: rgba(116, 39, 57, .38); border-color: #ff708a; }
.calendar-event:hover { filter: brightness(1.12); }
.calendar-event time { color: #d8e6f3; font-size: .7rem; font-weight: 800; }
.calendar-event strong { font-size: .76rem; line-height: 1.25; }
.calendar-event small { color: #b4c7da; font-size: .65rem; line-height: 1.25; }
.no-events { display: block; padding: .75rem .2rem; color: #71849b; font-size: .72rem; text-align: center; }
.timeplan-connect { min-width: 46rem; margin-bottom: .85rem; padding: .8rem 1rem; background: var(--accent-dark); border: 1px solid #386b62; border-radius: .8rem; }
.timeplan-connect summary, .timeplan-settings summary { cursor: pointer; color: var(--text); font-weight: 750; }
.timeplan-connect p { color: #b9d9cf; font-size: .85rem; }
.timeplan-connect form { grid-template-columns: 1fr auto; align-items: end; margin-top: .75rem; }
.timeplan-settings { margin-top: .85rem; color: var(--muted); }
.timeplan-settings form { width: fit-content; }
.calendar-panel { overflow: hidden; background: #101321; }
.calendar-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-width: 68rem; margin-bottom: .9rem; }
.calendar-meta > p { margin: 0; padding-bottom: .35rem; border-bottom: 2px solid #8070ff; color: #f1f3fa; font-weight: 750; }
.calendar-meta > p span { margin-right: .35rem; color: #b9aeff; }
.calendar-meta .calendar-legend { min-width: 0; margin: 0; }
.week-timeline { min-width: 68rem; overflow: auto; border: 1px solid #35394a; border-radius: .9rem; background: #292c38; }
.timeline-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 4.5rem repeat(7, minmax(9rem, 1fr)); min-width: 67.5rem; background: #292c38; border-bottom: 1px solid #494c58; }
.timeline-corner { border-right: 1px solid #494c58; }
.timeline-day-heading { display: flex; justify-content: center; gap: .35rem; padding: .85rem .4rem; border-right: 1px solid #494c58; color: #f4f4f7; font-size: .8rem; }
.timeline-day-heading:last-child { border-right: 0; }
.timeline-day-heading span { font-weight: 750; }
.timeline-day-heading.today { color: #a9f1dc; background: #303d40; }
.timeline-body { display: grid; grid-template-columns: 4.5rem minmax(63rem, 1fr); min-width: 67.5rem; }
.time-axis { display: grid; grid-template-rows: repeat(16, 4rem); height: 64rem; border-right: 1px solid #535663; color: #f0f1f5; font-size: .76rem; font-weight: 750; text-align: right; }
.time-axis span { padding-right: .7rem; transform: translateY(-.5rem); }
.timeline-days { display: grid; grid-template-columns: repeat(7, minmax(9rem, 1fr)); min-width: 63rem; }
.timeline-day { position: relative; display: grid; grid-template-rows: repeat(64, 1rem); min-width: 0; height: 64rem; border-right: 1px solid #535663; background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(4rem - 1px), #535663 calc(4rem - 1px), #535663 4rem); }
.timeline-day:last-child { border-right: 0; }
.timeline-day.today { background-color: rgba(61, 89, 84, .18); }
.timeline-day .calendar-event { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: stretch; gap: .12rem; width: auto; min-width: 0; min-height: 0; margin: 1px .14rem; padding: .42rem .48rem; overflow: hidden; border: 1px solid; border-left-width: 3px; border-radius: .35rem; color: #17202a; text-align: left; filter: none; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.timeline-day .calendar-event:hover { z-index: 5; filter: brightness(1.04); transform: scale(1.015); }
.timeline-day .calendar-event:focus-visible { z-index: 6; }
.timeline-day .calendar-event.class { background: #9dd3f2; border-color: #41aeea; }
.timeline-day .calendar-event.assignment { background: #ffc99f; border-color: #ff8b47; }
.timeline-day .event-kicker { font-size: .57rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; opacity: .72; }
.timeline-day .calendar-event strong { font-size: .72rem; line-height: 1.2; overflow-wrap: anywhere; }
.timeline-day .event-title { font-size: .63rem; line-height: 1.2; overflow-wrap: anywhere; }
.timeline-day .calendar-event time, .timeline-day .event-location { font-size: .64rem; line-height: 1.25; font-weight: 650; }
.timeline-day .event-location { margin-top: .08rem; }
.weekly-deadlines { margin-top: .9rem; padding: 1rem; border: 1px solid #35394a; border-radius: .9rem; background: #171b29; }
.weekly-deadlines-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.weekly-deadlines-heading .eyebrow { margin: 0 0 .18rem; }
.weekly-deadlines-heading h3 { margin: 0; font-size: 1rem; }
.weekly-deadlines-heading > span { display: grid; place-items: center; min-width: 1.8rem; height: 1.8rem; padding: 0 .45rem; border-radius: 999px; color: #21141a; background: #ff9caf; font-size: .75rem; font-weight: 850; }
.deadline-list { display: grid; gap: .5rem; }
.deadline-card { display: grid; grid-template-columns: minmax(7rem, .35fr) minmax(12rem, 1fr) auto; align-items: center; gap: .75rem; width: 100%; padding: .68rem .8rem; border: 1px solid #754453; border-left: 4px solid #ff708a; border-radius: .65rem; color: var(--text); background: #2f2530; text-align: left; }
.deadline-card:hover { filter: brightness(1.1); }
.deadline-card:focus-visible { outline: 2px solid #ff9caf; outline-offset: 2px; }
.deadline-course { color: #ffb8c6; font-size: .72rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.deadline-card strong { font-size: .82rem; line-height: 1.3; }
.deadline-card time { color: #ffd4dc; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.current-time-line { position: absolute; z-index: 12; left: 0; width: 100%; height: 2px; pointer-events: none; background: #ff5d73; box-shadow: 0 0 8px rgba(255, 93, 115, .65); }
.current-time-line::before { content: ""; position: absolute; left: -.26rem; top: -.22rem; width: .5rem; height: .5rem; border-radius: 50%; background: #ff5d73; }
.current-time-label { position: absolute; left: .35rem; top: -.72rem; padding: .1rem .3rem; color: #fff; background: #c83e55; border-radius: .3rem; font-size: .58rem; font-weight: 850; }
.current-time-line[hidden] { display: none; }
.current-time-offset-0 { top: 0rem; }
.current-time-offset-1 { top: 0.3333rem; }
.current-time-offset-2 { top: 0.6667rem; }
.current-time-offset-3 { top: 1rem; }
.current-time-offset-4 { top: 1.3333rem; }
.current-time-offset-5 { top: 1.6667rem; }
.current-time-offset-6 { top: 2rem; }
.current-time-offset-7 { top: 2.3333rem; }
.current-time-offset-8 { top: 2.6667rem; }
.current-time-offset-9 { top: 3rem; }
.current-time-offset-10 { top: 3.3333rem; }
.current-time-offset-11 { top: 3.6667rem; }
.current-time-offset-12 { top: 4rem; }
.current-time-offset-13 { top: 4.3333rem; }
.current-time-offset-14 { top: 4.6667rem; }
.current-time-offset-15 { top: 5rem; }
.current-time-offset-16 { top: 5.3333rem; }
.current-time-offset-17 { top: 5.6667rem; }
.current-time-offset-18 { top: 6rem; }
.current-time-offset-19 { top: 6.3333rem; }
.current-time-offset-20 { top: 6.6667rem; }
.current-time-offset-21 { top: 7rem; }
.current-time-offset-22 { top: 7.3333rem; }
.current-time-offset-23 { top: 7.6667rem; }
.current-time-offset-24 { top: 8rem; }
.current-time-offset-25 { top: 8.3333rem; }
.current-time-offset-26 { top: 8.6667rem; }
.current-time-offset-27 { top: 9rem; }
.current-time-offset-28 { top: 9.3333rem; }
.current-time-offset-29 { top: 9.6667rem; }
.current-time-offset-30 { top: 10rem; }
.current-time-offset-31 { top: 10.3333rem; }
.current-time-offset-32 { top: 10.6667rem; }
.current-time-offset-33 { top: 11rem; }
.current-time-offset-34 { top: 11.3333rem; }
.current-time-offset-35 { top: 11.6667rem; }
.current-time-offset-36 { top: 12rem; }
.current-time-offset-37 { top: 12.3333rem; }
.current-time-offset-38 { top: 12.6667rem; }
.current-time-offset-39 { top: 13rem; }
.current-time-offset-40 { top: 13.3333rem; }
.current-time-offset-41 { top: 13.6667rem; }
.current-time-offset-42 { top: 14rem; }
.current-time-offset-43 { top: 14.3333rem; }
.current-time-offset-44 { top: 14.6667rem; }
.current-time-offset-45 { top: 15rem; }
.current-time-offset-46 { top: 15.3333rem; }
.current-time-offset-47 { top: 15.6667rem; }
.current-time-offset-48 { top: 16rem; }
.current-time-offset-49 { top: 16.3333rem; }
.current-time-offset-50 { top: 16.6667rem; }
.current-time-offset-51 { top: 17rem; }
.current-time-offset-52 { top: 17.3333rem; }
.current-time-offset-53 { top: 17.6667rem; }
.current-time-offset-54 { top: 18rem; }
.current-time-offset-55 { top: 18.3333rem; }
.current-time-offset-56 { top: 18.6667rem; }
.current-time-offset-57 { top: 19rem; }
.current-time-offset-58 { top: 19.3333rem; }
.current-time-offset-59 { top: 19.6667rem; }
.current-time-offset-60 { top: 20rem; }
.current-time-offset-61 { top: 20.3333rem; }
.current-time-offset-62 { top: 20.6667rem; }
.current-time-offset-63 { top: 21rem; }
.current-time-offset-64 { top: 21.3333rem; }
.current-time-offset-65 { top: 21.6667rem; }
.current-time-offset-66 { top: 22rem; }
.current-time-offset-67 { top: 22.3333rem; }
.current-time-offset-68 { top: 22.6667rem; }
.current-time-offset-69 { top: 23rem; }
.current-time-offset-70 { top: 23.3333rem; }
.current-time-offset-71 { top: 23.6667rem; }
.current-time-offset-72 { top: 24rem; }
.current-time-offset-73 { top: 24.3333rem; }
.current-time-offset-74 { top: 24.6667rem; }
.current-time-offset-75 { top: 25rem; }
.current-time-offset-76 { top: 25.3333rem; }
.current-time-offset-77 { top: 25.6667rem; }
.current-time-offset-78 { top: 26rem; }
.current-time-offset-79 { top: 26.3333rem; }
.current-time-offset-80 { top: 26.6667rem; }
.current-time-offset-81 { top: 27rem; }
.current-time-offset-82 { top: 27.3333rem; }
.current-time-offset-83 { top: 27.6667rem; }
.current-time-offset-84 { top: 28rem; }
.current-time-offset-85 { top: 28.3333rem; }
.current-time-offset-86 { top: 28.6667rem; }
.current-time-offset-87 { top: 29rem; }
.current-time-offset-88 { top: 29.3333rem; }
.current-time-offset-89 { top: 29.6667rem; }
.current-time-offset-90 { top: 30rem; }
.current-time-offset-91 { top: 30.3333rem; }
.current-time-offset-92 { top: 30.6667rem; }
.current-time-offset-93 { top: 31rem; }
.current-time-offset-94 { top: 31.3333rem; }
.current-time-offset-95 { top: 31.6667rem; }
.current-time-offset-96 { top: 32rem; }
.current-time-offset-97 { top: 32.3333rem; }
.current-time-offset-98 { top: 32.6667rem; }
.current-time-offset-99 { top: 33rem; }
.current-time-offset-100 { top: 33.3333rem; }
.current-time-offset-101 { top: 33.6667rem; }
.current-time-offset-102 { top: 34rem; }
.current-time-offset-103 { top: 34.3333rem; }
.current-time-offset-104 { top: 34.6667rem; }
.current-time-offset-105 { top: 35rem; }
.current-time-offset-106 { top: 35.3333rem; }
.current-time-offset-107 { top: 35.6667rem; }
.current-time-offset-108 { top: 36rem; }
.current-time-offset-109 { top: 36.3333rem; }
.current-time-offset-110 { top: 36.6667rem; }
.current-time-offset-111 { top: 37rem; }
.current-time-offset-112 { top: 37.3333rem; }
.current-time-offset-113 { top: 37.6667rem; }
.current-time-offset-114 { top: 38rem; }
.current-time-offset-115 { top: 38.3333rem; }
.current-time-offset-116 { top: 38.6667rem; }
.current-time-offset-117 { top: 39rem; }
.current-time-offset-118 { top: 39.3333rem; }
.current-time-offset-119 { top: 39.6667rem; }
.current-time-offset-120 { top: 40rem; }
.current-time-offset-121 { top: 40.3333rem; }
.current-time-offset-122 { top: 40.6667rem; }
.current-time-offset-123 { top: 41rem; }
.current-time-offset-124 { top: 41.3333rem; }
.current-time-offset-125 { top: 41.6667rem; }
.current-time-offset-126 { top: 42rem; }
.current-time-offset-127 { top: 42.3333rem; }
.current-time-offset-128 { top: 42.6667rem; }
.current-time-offset-129 { top: 43rem; }
.current-time-offset-130 { top: 43.3333rem; }
.current-time-offset-131 { top: 43.6667rem; }
.current-time-offset-132 { top: 44rem; }
.current-time-offset-133 { top: 44.3333rem; }
.current-time-offset-134 { top: 44.6667rem; }
.current-time-offset-135 { top: 45rem; }
.current-time-offset-136 { top: 45.3333rem; }
.current-time-offset-137 { top: 45.6667rem; }
.current-time-offset-138 { top: 46rem; }
.current-time-offset-139 { top: 46.3333rem; }
.current-time-offset-140 { top: 46.6667rem; }
.current-time-offset-141 { top: 47rem; }
.current-time-offset-142 { top: 47.3333rem; }
.current-time-offset-143 { top: 47.6667rem; }
.current-time-offset-144 { top: 48rem; }
.current-time-offset-145 { top: 48.3333rem; }
.current-time-offset-146 { top: 48.6667rem; }
.current-time-offset-147 { top: 49rem; }
.current-time-offset-148 { top: 49.3333rem; }
.current-time-offset-149 { top: 49.6667rem; }
.current-time-offset-150 { top: 50rem; }
.current-time-offset-151 { top: 50.3333rem; }
.current-time-offset-152 { top: 50.6667rem; }
.current-time-offset-153 { top: 51rem; }
.current-time-offset-154 { top: 51.3333rem; }
.current-time-offset-155 { top: 51.6667rem; }
.current-time-offset-156 { top: 52rem; }
.current-time-offset-157 { top: 52.3333rem; }
.current-time-offset-158 { top: 52.6667rem; }
.current-time-offset-159 { top: 53rem; }
.current-time-offset-160 { top: 53.3333rem; }
.current-time-offset-161 { top: 53.6667rem; }
.current-time-offset-162 { top: 54rem; }
.current-time-offset-163 { top: 54.3333rem; }
.current-time-offset-164 { top: 54.6667rem; }
.current-time-offset-165 { top: 55rem; }
.current-time-offset-166 { top: 55.3333rem; }
.current-time-offset-167 { top: 55.6667rem; }
.current-time-offset-168 { top: 56rem; }
.current-time-offset-169 { top: 56.3333rem; }
.current-time-offset-170 { top: 56.6667rem; }
.current-time-offset-171 { top: 57rem; }
.current-time-offset-172 { top: 57.3333rem; }
.current-time-offset-173 { top: 57.6667rem; }
.current-time-offset-174 { top: 58rem; }
.current-time-offset-175 { top: 58.3333rem; }
.current-time-offset-176 { top: 58.6667rem; }
.current-time-offset-177 { top: 59rem; }
.current-time-offset-178 { top: 59.3333rem; }
.current-time-offset-179 { top: 59.6667rem; }
.current-time-offset-180 { top: 60rem; }
.current-time-offset-181 { top: 60.3333rem; }
.current-time-offset-182 { top: 60.6667rem; }
.current-time-offset-183 { top: 61rem; }
.current-time-offset-184 { top: 61.3333rem; }
.current-time-offset-185 { top: 61.6667rem; }
.current-time-offset-186 { top: 62rem; }
.current-time-offset-187 { top: 62.3333rem; }
.current-time-offset-188 { top: 62.6667rem; }
.current-time-offset-189 { top: 63rem; }
.current-time-offset-190 { top: 63.3333rem; }
.current-time-offset-191 { top: 63.6667rem; }
.current-time-offset-192 { top: 64rem; }
.lane-0-of-1 { width: calc(100% - .28rem) !important; margin-left: .14rem !important; }
.lane-0-of-2 { width: calc(50% - .2rem) !important; margin-left: .14rem !important; }
.lane-1-of-2 { width: calc(50% - .2rem) !important; margin-left: calc(50% + .05rem) !important; }
.lane-0-of-3 { width: calc(33.333% - .16rem) !important; margin-left: .14rem !important; }
.lane-1-of-3 { width: calc(33.333% - .16rem) !important; margin-left: calc(33.333% + .02rem) !important; }
.lane-2-of-3 { width: calc(33.333% - .16rem) !important; margin-left: calc(66.666% + .02rem) !important; }
.lane-0-of-4 { width: calc(25% - .14rem) !important; margin-left: .14rem !important; }
.lane-1-of-4 { width: calc(25% - .14rem) !important; margin-left: calc(25% + .02rem) !important; }
.lane-2-of-4 { width: calc(25% - .14rem) !important; margin-left: calc(50% + .02rem) !important; }
.lane-3-of-4 { width: calc(25% - .14rem) !important; margin-left: calc(75% + .02rem) !important; }
.calendar-dialog { width: min(29rem, calc(100% - 2rem)); max-height: min(42rem, calc(100vh - 2rem)); padding: 0; overflow: auto; color: #f5f6fa; background: #30333f; border: 2px solid #f5f6fa; border-radius: .8rem; box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.calendar-dialog:not([open]), .calendar-dialog[hidden] { display: none; }
.calendar-dialog::backdrop { background: rgba(3, 8, 15, .66); backdrop-filter: blur(2px); }
.calendar-dialog .dialog-accent { height: .5rem; background: #9dd3f2; }
.calendar-dialog.assignment .dialog-accent { background: #ffc99f; }
.calendar-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid #555967; }
.calendar-dialog > header span { color: #c7cfdb; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.dialog-close-form { display: block; margin: 0; }
.dialog-close { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; color: #f5f6fa; background: transparent; border: 1px solid transparent; font-size: 1.65rem; line-height: 1; }
.dialog-close:hover { border-color: #777c8d; }
.dialog-content { padding: 1.15rem; }
.dialog-course { width: fit-content; margin: 0 0 .45rem; padding-bottom: .2rem; border-bottom: 2px solid #9dd3f2; color: #dcecf6; font-weight: 850; }
.calendar-dialog.assignment .dialog-course { border-color: #ffc99f; }
.dialog-content h3 { margin: 0; font-size: 1.25rem; line-height: 1.35; }
.dialog-subtitle { margin: .45rem 0 0; color: #c2cad6; line-height: 1.45; }
.dialog-content dl { display: grid; gap: .65rem; margin: 1.2rem 0; padding: 1rem 0; border-top: 1px solid #555967; border-bottom: 1px solid #555967; }
.dialog-content dl div { display: grid; grid-template-columns: 5.5rem 1fr; gap: .75rem; }
.dialog-content dt { color: #aeb8c7; font-size: .78rem; font-weight: 750; }
.dialog-content dd { margin: 0; font-weight: 700; }
.event-description { margin: 0 0 1rem; color: #eef1f6; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.dialog-links { display: grid; gap: .55rem; }
.dialog-links a { display: block; padding: .7rem .8rem; color: #071a16; background: var(--accent); border-radius: .55rem; font-weight: 800; text-decoration: none; }
.dialog-links a:hover { filter: brightness(1.08); }
.slot-start-0 { grid-row-start: 1; }
.slot-start-1 { grid-row-start: 2; }
.slot-start-2 { grid-row-start: 3; }
.slot-start-3 { grid-row-start: 4; }
.slot-start-4 { grid-row-start: 5; }
.slot-start-5 { grid-row-start: 6; }
.slot-start-6 { grid-row-start: 7; }
.slot-start-7 { grid-row-start: 8; }
.slot-start-8 { grid-row-start: 9; }
.slot-start-9 { grid-row-start: 10; }
.slot-start-10 { grid-row-start: 11; }
.slot-start-11 { grid-row-start: 12; }
.slot-start-12 { grid-row-start: 13; }
.slot-start-13 { grid-row-start: 14; }
.slot-start-14 { grid-row-start: 15; }
.slot-start-15 { grid-row-start: 16; }
.slot-start-16 { grid-row-start: 17; }
.slot-start-17 { grid-row-start: 18; }
.slot-start-18 { grid-row-start: 19; }
.slot-start-19 { grid-row-start: 20; }
.slot-start-20 { grid-row-start: 21; }
.slot-start-21 { grid-row-start: 22; }
.slot-start-22 { grid-row-start: 23; }
.slot-start-23 { grid-row-start: 24; }
.slot-start-24 { grid-row-start: 25; }
.slot-start-25 { grid-row-start: 26; }
.slot-start-26 { grid-row-start: 27; }
.slot-start-27 { grid-row-start: 28; }
.slot-start-28 { grid-row-start: 29; }
.slot-start-29 { grid-row-start: 30; }
.slot-start-30 { grid-row-start: 31; }
.slot-start-31 { grid-row-start: 32; }
.slot-start-32 { grid-row-start: 33; }
.slot-start-33 { grid-row-start: 34; }
.slot-start-34 { grid-row-start: 35; }
.slot-start-35 { grid-row-start: 36; }
.slot-start-36 { grid-row-start: 37; }
.slot-start-37 { grid-row-start: 38; }
.slot-start-38 { grid-row-start: 39; }
.slot-start-39 { grid-row-start: 40; }
.slot-start-40 { grid-row-start: 41; }
.slot-start-41 { grid-row-start: 42; }
.slot-start-42 { grid-row-start: 43; }
.slot-start-43 { grid-row-start: 44; }
.slot-start-44 { grid-row-start: 45; }
.slot-start-45 { grid-row-start: 46; }
.slot-start-46 { grid-row-start: 47; }
.slot-start-47 { grid-row-start: 48; }
.slot-start-48 { grid-row-start: 49; }
.slot-start-49 { grid-row-start: 50; }
.slot-start-50 { grid-row-start: 51; }
.slot-start-51 { grid-row-start: 52; }
.slot-start-52 { grid-row-start: 53; }
.slot-start-53 { grid-row-start: 54; }
.slot-start-54 { grid-row-start: 55; }
.slot-start-55 { grid-row-start: 56; }
.slot-start-56 { grid-row-start: 57; }
.slot-start-57 { grid-row-start: 58; }
.slot-start-58 { grid-row-start: 59; }
.slot-start-59 { grid-row-start: 60; }
.slot-start-60 { grid-row-start: 61; }
.slot-start-61 { grid-row-start: 62; }
.slot-start-62 { grid-row-start: 63; }
.slot-start-63 { grid-row-start: 64; }
.slot-span-1 { grid-row-end: span 1; }
.slot-span-2 { grid-row-end: span 2; }
.slot-span-3 { grid-row-end: span 3; }
.slot-span-4 { grid-row-end: span 4; }
.slot-span-5 { grid-row-end: span 5; }
.slot-span-6 { grid-row-end: span 6; }
.slot-span-7 { grid-row-end: span 7; }
.slot-span-8 { grid-row-end: span 8; }
.slot-span-9 { grid-row-end: span 9; }
.slot-span-10 { grid-row-end: span 10; }
.slot-span-11 { grid-row-end: span 11; }
.slot-span-12 { grid-row-end: span 12; }
.slot-span-13 { grid-row-end: span 13; }
.slot-span-14 { grid-row-end: span 14; }
.slot-span-15 { grid-row-end: span 15; }
.slot-span-16 { grid-row-end: span 16; }
.slot-span-17 { grid-row-end: span 17; }
.slot-span-18 { grid-row-end: span 18; }
.slot-span-19 { grid-row-end: span 19; }
.slot-span-20 { grid-row-end: span 20; }
.slot-span-21 { grid-row-end: span 21; }
.slot-span-22 { grid-row-end: span 22; }
.slot-span-23 { grid-row-end: span 23; }
.slot-span-24 { grid-row-end: span 24; }
.slot-span-25 { grid-row-end: span 25; }
.slot-span-26 { grid-row-end: span 26; }
.slot-span-27 { grid-row-end: span 27; }
.slot-span-28 { grid-row-end: span 28; }
.slot-span-29 { grid-row-end: span 29; }
.slot-span-30 { grid-row-end: span 30; }
.slot-span-31 { grid-row-end: span 31; }
.slot-span-32 { grid-row-end: span 32; }
.slot-span-33 { grid-row-end: span 33; }
.slot-span-34 { grid-row-end: span 34; }
.slot-span-35 { grid-row-end: span 35; }
.slot-span-36 { grid-row-end: span 36; }
.slot-span-37 { grid-row-end: span 37; }
.slot-span-38 { grid-row-end: span 38; }
.slot-span-39 { grid-row-end: span 39; }
.slot-span-40 { grid-row-end: span 40; }
.slot-span-41 { grid-row-end: span 41; }
.slot-span-42 { grid-row-end: span 42; }
.slot-span-43 { grid-row-end: span 43; }
.slot-span-44 { grid-row-end: span 44; }
.slot-span-45 { grid-row-end: span 45; }
.slot-span-46 { grid-row-end: span 46; }
.slot-span-47 { grid-row-end: span 47; }
.slot-span-48 { grid-row-end: span 48; }
.slot-span-49 { grid-row-end: span 49; }
.slot-span-50 { grid-row-end: span 50; }
.slot-span-51 { grid-row-end: span 51; }
.slot-span-52 { grid-row-end: span 52; }
.slot-span-53 { grid-row-end: span 53; }
.slot-span-54 { grid-row-end: span 54; }
.slot-span-55 { grid-row-end: span 55; }
.slot-span-56 { grid-row-end: span 56; }
.slot-span-57 { grid-row-end: span 57; }
.slot-span-58 { grid-row-end: span 58; }
.slot-span-59 { grid-row-end: span 59; }
.slot-span-60 { grid-row-end: span 60; }
.slot-span-61 { grid-row-end: span 61; }
.slot-span-62 { grid-row-end: span 62; }
.slot-span-63 { grid-row-end: span 63; }
.slot-span-64 { grid-row-end: span 64; }
@media (max-width: 800px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.telegram-page { width: min(64rem, calc(100% - 2rem)); }
.telegram-connect-card { align-items: start; }
.telegram-status-card { display: grid; gap: 1.1rem; padding: clamp(1.25rem, 4vw, 2rem); background: linear-gradient(145deg, #17283c, #101c2d); border: 1px solid var(--border); border-radius: 1.15rem; }
.telegram-bot-heading { display: flex; align-items: center; gap: 1rem; }
.telegram-bot-heading .eyebrow { margin: 0 0 .25rem; }
.telegram-mark { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; flex: 0 0 auto; color: white; background: #2799dc; border-radius: 50%; font-size: 1.4rem; font-weight: 900; }
.connection-badge { width: fit-content; padding: .35rem .65rem; border: 1px solid; border-radius: 99px; font-size: .76rem; font-weight: 800; }
.connection-badge.connected { color: #bdf5df; background: #183f37; border-color: #386b62; }
.connection-badge.pending { color: #ffe4a3; background: #493b1d; border-color: #75612d; }
.pairing-box { display: grid; gap: .8rem; max-width: 36rem; padding: 1rem; background: #0b1726; border: 1px solid #2b4967; border-radius: .85rem; }
.pairing-box p { margin: 0; color: #c6d3e2; line-height: 1.5; }
.pairing-link, .secondary-link { display: inline-flex; align-items: center; justify-content: center; width: fit-content; padding: .75rem .9rem; color: #061d18; background: var(--accent); border-radius: .65rem; font-weight: 800; text-decoration: none; }
.pairing-link:hover, .secondary-link:hover { filter: brightness(1.08); }
.pairing-code strong { color: white; letter-spacing: .13em; }
.telegram-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.telegram-actions form, .telegram-settings form, .telegram-status-card > form { width: fit-content; margin: 0; }
.secondary-link { color: var(--text); background: transparent; border: 1px solid var(--border); }
.telegram-settings { margin-top: 1.2rem; }
.notification-settings-card { display: grid; grid-template-columns: 1fr minmax(16rem, 22rem); gap: 1.5rem; margin-top: .35rem; padding-top: 1.35rem; border-top: 1px solid var(--border); }
.notification-settings-card .eyebrow { margin: 0 0 .3rem; }
.notification-settings-card h3 { margin: 0; }
.notification-settings-card p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.notification-settings-card form { margin: 0; }
.notification-check { align-self: start; }
.topbar-actions { display: flex; align-items: center; gap: .75rem; }
.ai-page { width: min(92rem, calc(100% - 2rem)); padding-top: 2rem; }
.ai-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ai-heading .eyebrow { margin-top: 0; }
.ai-heading h1 { font-size: clamp(2rem, 4vw, 3rem); }
.ai-heading p:last-child { max-width: 46rem; margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.new-chat-button { display: inline-flex; flex: 0 0 auto; padding: .75rem 1rem; border-radius: .7rem; color: #052019; background: var(--accent); font-weight: 800; text-decoration: none; }
.ai-status { display: inline-flex; align-items: center; gap: .45rem; color: #e7a7b3; font-size: .78rem; font-weight: 750; }
.ai-status i { width: .55rem; height: .55rem; border-radius: 50%; background: #dc6b80; }
.ai-status.online { color: #9be8d0; }
.ai-status.online i { background: var(--accent); box-shadow: 0 0 0 .25rem rgba(81, 211, 165, .12); }
.ai-shell { display: grid; grid-template-columns: 18rem minmax(0, 1fr); min-height: 42rem; overflow: hidden; border: 1px solid var(--border); border-radius: 1rem; background: #0c1726; box-shadow: 0 20px 55px rgba(0, 0, 0, .22); }
.conversation-sidebar { padding: 1rem; border-right: 1px solid var(--border); background: #0b1522; }
.conversation-sidebar h2 { margin: .2rem .35rem .85rem; font-size: .9rem; }
.conversation-list { display: grid; gap: .35rem; }
.conversation-list a { display: grid; gap: .25rem; padding: .75rem; border: 1px solid transparent; border-radius: .65rem; color: var(--text); text-decoration: none; }
.conversation-list a:hover { background: #122237; }
.conversation-list a.active { border-color: #386b62; background: #15332f; }
.conversation-list strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.conversation-list small, .conversation-empty { color: var(--muted); font-size: .68rem; }
.conversation-empty { padding: .75rem .35rem; line-height: 1.5; }
.chat-panel { display: grid; grid-template-rows: auto minmax(20rem, 1fr) auto; min-width: 0; height: min(47rem, calc(100vh - 11rem)); min-height: 42rem; }
.chat-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); }
.chat-toolbar h2 { margin-top: .15rem; }
.chat-toolbar form { margin: 0; }
.chat-model-label { color: var(--accent); font-size: .65rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.chat-messages { display: grid; align-content: start; gap: 1rem; overflow-y: auto; padding: 1.25rem clamp(1rem, 4vw, 3.5rem); }
.chat-message { display: grid; gap: .3rem; max-width: min(46rem, 88%); }
.chat-message > span { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.chat-message p { margin: 0; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: .85rem; background: #14243a; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.user { justify-self: end; }
.chat-message.user > span { text-align: right; }
.chat-message.user p { color: #082019; background: #77dfbd; border-color: #77dfbd; }
.chat-welcome { align-self: center; justify-self: center; max-width: 32rem; padding: 3rem 1rem; text-align: center; }
.chat-welcome h2 { margin: 1rem 0 .6rem; font-size: 1.35rem; }
.chat-welcome p { margin: 0; color: var(--muted); line-height: 1.55; }
.ai-orb { display: grid; place-items: center; width: 4rem; height: 4rem; margin: auto; border: 1px solid #4b897c; border-radius: 1.2rem; color: #07231b; background: linear-gradient(145deg, #8de8ca, #40b992); box-shadow: 0 14px 35px rgba(51, 182, 143, .2); font-size: 1.4rem; font-weight: 900; }
.chat-composer { gap: .45rem; margin: 0; padding: 1rem; border-top: 1px solid var(--border); background: #0b1522; }
.chat-composer label { font-size: .72rem; }
.chat-composer > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .65rem; }
.chat-composer textarea { width: 100%; min-height: 4.5rem; max-height: 12rem; resize: vertical; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: .7rem; color: var(--text); background: #091422; font: inherit; line-height: 1.45; }
.chat-composer textarea:focus-visible { outline: 3px solid #8ce9ca; outline-offset: 2px; }
.chat-composer small { color: var(--muted); font-size: .68rem; }
.chat-composer button:disabled, .chat-composer textarea:disabled { cursor: not-allowed; opacity: .55; }
@media (max-width: 1180px) { .school-workspace { grid-template-columns: 1fr; } .school-content { grid-template-columns: repeat(2, minmax(0, 1fr)); } .school-content .archive-section, .school-content .course-section { grid-column: 1 / -1; } .compact-courses { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) { .settings-card, .school-columns, .notification-settings-card { grid-template-columns: 1fr; } .school-content { grid-template-columns: 1fr; } .school-content .archive-section, .school-content .course-section { grid-column: auto; } .course-grid { grid-template-columns: repeat(2, 1fr); } .timeplan-connect form { grid-template-columns: 1fr; } .deadline-card { grid-template-columns: 1fr; gap: .2rem; } .deadline-card time { white-space: normal; } .ai-shell { grid-template-columns: 1fr; } .conversation-sidebar { max-height: 10rem; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--border); } .conversation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .chat-panel { height: 40rem; min-height: 36rem; } }
@media (max-width: 540px) { .grid, .course-grid { grid-template-columns: 1fr; } .dashboard { padding-top: 2rem; } .session-card { align-items: stretch; flex-direction: column; } .school-summary { gap: .5rem; } .school-summary div { padding: .85rem; } .school-summary strong { font-size: 1.5rem; } .calendar-meta { align-items: flex-start; flex-direction: column; } .calendar-dialog { width: calc(100% - 1rem); } .topbar-actions .ai-status { display: none; } .ai-heading { align-items: stretch; flex-direction: column; } .new-chat-button { justify-content: center; } .conversation-list { grid-template-columns: 1fr; } .chat-message { max-width: 94%; } .chat-composer > div { grid-template-columns: 1fr; } }
