:root {
  --ink: #291a46;
  --muted: #76698e;
  --line: #e7dcf5;
  --surface: #ffffff;
  --ground: #f5f0fc;
  --purple: #6d39c5;
  --purple-dark: #48208e;
  --green: #18875e;
  --danger: #d94f61;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--ground);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--ground); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #a5cbe3; outline-offset: 2px; }
a { color: inherit; }

.app-shell { min-height: 100vh; max-width: 820px; margin: auto; background: var(--ground); padding-bottom: max(22px, env(safe-area-inset-bottom)); }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; background: rgba(255,255,255,.82); border-bottom: 1px solid rgba(231,231,240,.85); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; flex-shrink: 0; align-items: center; gap: 9px; border: 0; background: none; padding: 2px 0; color: var(--ink); font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.brand-mark, .auth-logo { display: grid; place-items: center; color: #f7f9fa; background: linear-gradient(145deg, #4394cd, #236fa8); box-shadow: 0 6px 14px rgba(85,76,225,.25); }
.brand-mark { width: 31px; height: 31px; border-radius: 10px; font-family: Georgia, serif; font-size: 20px; }
.user-chip { display: flex; align-items: center; gap: 7px; min-width: 0; color: #56556b; font-size: 13px; font-weight: 700; }
.user-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip button { flex-shrink: 0; width: 29px; height: 29px; border: 0; border-radius: 9px; color: #166da8; background: #e6f1f7; font-size: 16px; line-height: 1; }
.page-heading { display: flex; gap: 13px; align-items: center; padding: 27px 22px 19px; }
.page-heading h1 { margin: 0; font-size: clamp(26px, 7vw, 34px); letter-spacing: -1.2px; line-height: 1.1; }
.page-heading p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.back-button { flex: 0 0 37px; height: 37px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); background: #f7f9fa; font-size: 23px; line-height: 1; }
.content { padding: 0 16px; }

.subject-list { display: grid; gap: 12px; }
.subject-card { min-height: 138px; padding: 19px; display: grid; grid-template-columns: 49px 1fr; align-items: start; gap: 13px; border: 1px solid transparent; border-radius: 21px; background: #f7f9fa; box-shadow: 0 5px 17px rgba(36,36,60,.035); position: relative; overflow: hidden; }
.subject-card::after { content: ''; position: absolute; width: 150px; height: 150px; right: -67px; top: -86px; border-radius: 50%; opacity: .8; pointer-events: none; }
.subject-card.violet { border-color: #dce9f1; }.subject-card.violet::after { background: #dce9f1; }.subject-card.cyan { border-color: #d8effa; }.subject-card.cyan::after { background: #d6f1fc; }.subject-card.orange { border-color: #dce9f0; }.subject-card.orange::after { background: #e1edf3; }
.subject-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: #e0edf4; color: #176ba7; font-family: Georgia, serif; font-size: 28px; font-weight: 600; z-index: 1; }.cyan .subject-icon { color: #1d84a3; background: #e7f7fc; font-family: inherit; font-size: 25px; }.orange .subject-icon { color: #316f98; background: #e6f0f5; font-size: 29px; }
.subject-copy { z-index: 1; }.subject-copy h2 { margin: 3px 0 5px; font-size: 19px; letter-spacing: -.5px; }.subject-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.card-action { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 4px; padding: 0; border: 0; color: #166da8; background: transparent; font-size: 14px; font-weight: 800; z-index: 1; }.card-action span { font-size: 21px; font-weight: 400; }.card-action.continue { color: #1c70aa; }.pending-pill { grid-column: 1 / -1; width: fit-content; margin-top: 5px; padding: 7px 10px; border-radius: 9px; color: #577184; background: #e6eef3; font-size: 12px; font-weight: 700; z-index: 1; }

.bottom-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(820px, 100%); padding: 10px 18px max(11px, env(safe-area-inset-bottom)); border-top: 1px solid #d8e2e8; background: rgba(247,249,250,.94); backdrop-filter: blur(18px); z-index: 8; }.bottom-nav button { display: grid; place-items: center; gap: 2px; padding: 5px; border: 0; color: #788894; background: none; font-size: 12px; font-weight: 700; }.bottom-nav button span { font-size: 18px; line-height: 1; }.bottom-nav button.active { color: var(--purple); }.course-content { padding-bottom: 72px; }
.student-home-nav { grid-template-columns: repeat(2, 1fr); }

.calendar { padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }.calendar-header strong { font-size: 15px; text-transform: capitalize; }.calendar-header button { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; color: #4d4c61; background: #f7f9fa; font-size: 25px; line-height: 1; }.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }.calendar-weekdays { margin-bottom: 6px; color: #a5a4b3; font-size: 10px; font-weight: 700; }.calendar-day { height: 35px; display: grid; place-items: center; position: relative; color: #4e4e63; font-size: 12px; font-weight: 600; }.calendar-day.has-lesson { color: #236fa8; background: #e4f0f6; border-radius: 9px; }.calendar-day i { position: absolute; bottom: 3px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.lesson-list { margin-top: 25px; }.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 3px 10px; }.section-title h2 { margin: 0; font-size: 17px; letter-spacing: -.35px; }.section-title > span, .journal-heading > span { display: grid; place-items: center; min-width: 25px; height: 24px; padding: 0 7px; border-radius: 8px; color: #696778; background: #ecebf2; font-size: 12px; font-weight: 800; }.lesson-card { width: 100%; min-height: 68px; display: grid; grid-template-columns: 63px 1fr 15px; gap: 12px; align-items: center; margin-bottom: 9px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-align: left; background: #f7f9fa; }.lesson-card:hover { border-color: #c4d9e6; }.lesson-card-date { color: #166da8; font-size: 13px; font-weight: 800; }.lesson-card > span:nth-child(2) { color: var(--muted); font-size: 13px; line-height: 1.3; }.lesson-card b { color: #8e8c9e; font-size: 24px; font-weight: 400; }.empty-state { padding: 23px 15px; border: 1px dashed #d9d8e5; border-radius: 16px; color: var(--muted); text-align: center; background: rgba(255,255,255,.6); font-size: 14px; line-height: 1.45; }

.text-back { margin: -2px 0 16px; padding: 5px 0; border: 0; color: var(--purple); background: none; font-size: 13px; font-weight: 800; }.lesson-detail { padding-bottom: 5px; }.lesson-date { display: flex; gap: 8px; align-items: center; margin: 4px 0 18px; font-size: 16px; font-weight: 800; letter-spacing: -.2px; }.date-dot { width: 9px; height: 9px; border-radius: 50%; background: #2d81ba; box-shadow: 0 0 0 5px #eae9ff; }.detail-block { margin-bottom: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #f7f9fa; }.block-label { margin: 0 0 11px; color: #8b899a; font-size: 10px; font-weight: 900; letter-spacing: .9px; }.detail-block > p:not(.block-label) { margin: 0; color: #3e3d51; font-size: 14px; line-height: 1.55; }.video-link { display: flex; align-items: center; justify-content: space-between; padding: 14px 15px; border-radius: 13px; color: #236fa8; background: #e7f2f8; text-decoration: none; font-size: 14px; font-weight: 800; }.video-link span { font-size: 19px; }.video-link.compact { margin-bottom: 13px; }.homework { border-color: #d3e4ef; background: linear-gradient(135deg, #f7f9fa 5%, #f3f7f9); }.answer-form form, .add-lesson form { display: grid; gap: 13px; }.answer-form label, .add-lesson label, .grade-form label { display: grid; gap: 6px; color: #575669; font-size: 12px; font-weight: 700; }.answer-form textarea, .add-lesson textarea, .grade-form textarea { min-height: 104px; resize: vertical; }.answer-form input, .answer-form textarea, .add-lesson input, .add-lesson textarea, .grade-form input, .grade-form textarea { width: 100%; padding: 11px 12px; border: 1px solid #dbdae6; border-radius: 10px; color: var(--ink); background: #f7f9fa; outline: none; font-size: 14px; }.answer-form input:focus, .answer-form textarea:focus, .add-lesson input:focus, .add-lesson textarea:focus, .grade-form input:focus, .grade-form textarea:focus { border-color: #5a9bc6; box-shadow: 0 0 0 3px #edecff; }.file-input { display: flex !important; align-items: center; flex-wrap: wrap; gap: 4px 9px !important; padding: 10px 12px; border: 1px dashed #c6d3dc; border-radius: 11px; color: #2a719f !important; }.file-input input { width: 0; height: 0; padding: 0; border: 0; position: absolute; opacity: 0; }.file-input span { font-size: 13px; }.file-input small { color: #9492a3; font-size: 11px; font-weight: 500; }.primary-button, .secondary-button { display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 45px; padding: 10px 16px; border: 0; border-radius: 12px; color: #f7f9fa; background: linear-gradient(135deg, #277eb7, #4d43d1); box-shadow: 0 8px 16px rgba(80,71,211,.18); font-size: 14px; font-weight: 800; }.primary-button span { font-size: 18px; font-weight: 400; }.submitted { border-color: #d5eee1; background: #fbfffc; }.submitted small { display: block; margin-top: 11px; color: #8a988f; font-size: 11px; }.file-link { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; padding: 10px 12px; border-radius: 10px; color: #3a805e; background: #eaf8f0; font-size: 12px; font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }.file-link span { flex: 0 0 auto; margin-left: 9px; font-size: 17px; }.grade-result { display: grid; grid-template-columns: 62px 1fr; gap: 8px 15px; align-items: center; border-color: #c7dfef; background: #f3f8fb; }.grade-result .block-label { grid-column: 1 / -1; margin-bottom: 0; }.score-circle { width: 59px; height: 59px; display: grid; place-items: center; border-radius: 50%; color: #1d669d; background: #d3e9f7; font-size: 21px; font-weight: 900; }.teacher-comment { padding-left: 2px; border-left: 2px solid #6fa8ca; color: #565045 !important; font-size: 13px !important; }

.add-lesson { margin-bottom: 24px; border: 1px solid #c8dce9; border-radius: 18px; background: #f7f9fa; overflow: hidden; }.add-lesson summary { display: flex; align-items: center; gap: 10px; padding: 15px 17px; color: #1a679f; list-style: none; font-size: 14px; font-weight: 800; }.add-lesson summary::-webkit-details-marker { display: none; }.add-lesson summary span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 8px; color: #f7f9fa; background: #176ba7; font-size: 18px; font-weight: 400; }.add-lesson form { padding: 0 17px 17px; }.add-lesson label small { color: #a09ead; font-weight: 500; }.teacher-lessons { margin-top: 0; }.answers { margin-top: 23px; }.submission-card { margin: 0 0 12px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: #f7f9fa; }.submission-card h3 { margin: 0 0 10px; font-size: 15px; }.submission-card > p { margin: 0; color: #4d4c5d; font-size: 13px; line-height: 1.52; }.grade-form { display: grid; grid-template-columns: 95px 1fr; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #efeff5; }.grade-form label:nth-child(2) { grid-column: 1 / -1; }.grade-form textarea { min-height: 72px; }.secondary-button { grid-column: 1 / -1; min-height: 40px; background: #e4f0f6; box-shadow: none; color: #1d669d; font-size: 13px; }
.form-note { margin: -2px 0 1px; color: #7e7b8e; font-size: 12px; line-height: 1.45; }.material-form { margin: 14px 0 0; }
.student-grades { overflow: hidden; border: 1px solid #d8e2e8; border-radius: 13px; }.student-grades .student-grade-row { display: grid; grid-template-columns: minmax(92px, 1.15fr) minmax(72px, .8fr) minmax(78px, .85fr); align-items: center; min-height: 58px; border-top: 1px solid #e3e9ed; }.student-grades .student-grade-row:first-child { border-top: 0; }.student-grade-row > * { padding: 7px 8px; text-align: center; }.student-grade-row time { color: #455563; font-size: 12px; text-align: left; }.student-grade-row strong { display: grid; place-items: center; min-width: 38px; min-height: 30px; margin: 0 auto; border-radius: 8px; color: #176ba7; background: #dcecf5; font-size: 13px; }.student-grade-row .empty-score { color: #8b98a2; background: #edf1f4; }.student-grades .student-grade-header { min-height: 38px; color: #6d7a84; background: #edf3f6; font-size: 10px; font-weight: 900; letter-spacing: .35px; text-transform: uppercase; }.student-grade-header > * { text-align: center !important; }.student-grade-row .attendance-value { min-width: 47px; font-size: 11px; }.student-grade-row .is-present { color: #157052; background: #e4f4ee; }.student-grade-row .is-absent { color: #b04c5a; background: #faeaed; }
.attendance-panel { margin-top: 18px; }.attendance-list { overflow: hidden; border: 1px solid #d8e2e8; border-radius: 15px; background: #f7f9fa; }.attendance-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 9px 12px; border-top: 1px solid #e3e9ed; }.attendance-row:first-child { border-top: 0; }.attendance-row b { overflow: hidden; color: #40515f; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.attendance-row > div { display: flex; gap: 5px; }.attendance-button { min-width: 47px; min-height: 31px; border: 1px solid #d1dce3; border-radius: 8px; color: #71808b; background: #f4f7f8; font-size: 11px; font-weight: 800; }.attendance-button.present.active { border-color: #62ad8c; color: #13714d; background: #e4f4ee; }.attendance-button.absent.active { border-color: #e1a6af; color: #b54454; background: #faeaed; }.attendance-result { border-color: #cfe0e9; }.attendance-result strong { font-size: 14px; }.attendance-result.present { background: #eff8f4; }.attendance-result.present strong { color: #157052; }.attendance-result.absent { background: #fff5f6; }.attendance-result.absent strong { color: #b04c5a; }
.payment-list { display: grid; gap: 13px; }.payment-list > .journal-heading { margin: 1px 3px 0; }.payment-card { padding: 18px; border: 1px solid #d8e3e9; border-radius: 19px; background: #f7f9fa; }.payment-card h2 { margin: 0; color: #334857; font-size: 18px; text-transform: capitalize; }.payment-hint { margin: 8px 0 14px; color: #70808b; font-size: 12px; line-height: 1.4; }.payment-subject { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 10px 0; border-top: 1px solid #e0e8ed; }.payment-subject > div { display: grid; gap: 5px; }.payment-subject b { font-size: 13px; }.payment-status { width: fit-content; padding: 4px 7px; border-radius: 7px; color: #7b8b95; background: #e8edf0; font-size: 10px; font-weight: 800; }.payment-status.pending { color: #946a21; background: #fff4d7; }.payment-status.approved { color: #147150; background: #e4f4ee; }.payment-status.declined { color: #b04c5a; background: #faeaed; }.payment-button { min-width: 88px; min-height: 35px; padding: 7px 9px; border: 1px solid #b8d4e5; color: #176ba7; background: #e5f1f7; font-size: 12px; }.add-payment-month { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 15px; border: 1px solid #d1e1eb; border-radius: 16px; background: #f1f7fa; }.add-payment-month label { display: grid; gap: 6px; color: #536978; font-size: 12px; font-weight: 800; }.add-payment-month input { height: 39px; padding: 0 9px; border: 1px solid #cbd9e1; border-radius: 9px; color: #334856; background: #f7f9fa; }.add-payment-month .primary-button { min-height: 39px; padding: 8px 11px; font-size: 12px; white-space: nowrap; }.admin-payment-hint { margin: 10px 3px 19px; }.payment-admin-subject { margin-top: 24px; }.payment-table td { max-width: 90px; white-space: normal; font-size: 10px; font-weight: 800; }.payment-table td.payment-approved { color: #147150; background: #e4f4ee; }.payment-table td.payment-pending { color: #946a21; background: #fff4d7; }.payment-table td.payment-declined { color: #b04c5a; background: #faeaed; }.payment-table td.payment-unpaid { color: #a14e59; background: #faeaed; }

.journal-card { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: #f7f9fa; }.journal-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }.journal-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.4px; }.student-grades > div { display: flex; justify-content: space-between; align-items: center; min-height: 53px; border-top: 1px solid #f0eff4; }.student-grades time { color: #555468; font-size: 13px; }.student-grades strong { display: grid; place-items: center; min-width: 37px; height: 31px; border-radius: 9px; color: #176ba7; background: #d3e9f7; font-size: 14px; }.student-grades .empty-score { color: #9d9bac; background: #f2f1f5; }.table-wrap { overflow: auto; margin: 0 -2px; border: 1px solid #ecebf2; border-radius: 12px; }.grade-table { min-width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 12px; }.grade-table th, .grade-table td { height: 44px; min-width: 70px; padding: 7px 10px; border-right: 1px solid #efeff5; border-bottom: 1px solid #efeff5; text-align: center; }.grade-table thead th { position: sticky; top: 0; z-index: 1; color: #747286; background: #fafafd; font-weight: 800; }.grade-table th:first-child { position: sticky; left: 0; z-index: 2; min-width: 110px; color: #4e4c5e; text-align: left; background: #f7f9fa; font-weight: 800; }.grade-table thead th:first-child { z-index: 3; background: #fafafd; }.grade-table tbody tr:last-child th, .grade-table tbody tr:last-child td { border-bottom: 0; }.grade-table td { color: #adabb9; }.grade-table td.scored { color: #1c679e; background: #e5f1f7; font-size: 14px; font-weight: 900; }.grade-table td.submitted-cell { color: #1f73ad; background: #e7f1f6; font-weight: 900; }.grid-note { margin: 10px 0 0; color: #9694a3; font-size: 11px; }

.admin-content { padding-bottom: 24px; }.admin-nav { display: flex; gap: 7px; overflow-x: auto; margin: 0 -1px 16px; padding-bottom: 2px; scrollbar-width: none; }.admin-nav::-webkit-scrollbar { display: none; }.admin-nav button { flex: 0 0 auto; padding: 9px 12px; border: 1px solid #dfdee9; border-radius: 10px; color: #706f7f; background: #f7f9fa; font-size: 12px; font-weight: 800; }.admin-nav button.active { border-color: #2475ac; color: #f7f9fa; background: #1f73ad; }.admin-card { min-height: 210px; }.requests { margin-top: 2px; }.request-card { display: flex; justify-content: space-between; align-items: center; gap: 11px; min-height: 85px; padding: 12px 0; border-top: 1px solid #efeff5; }.request-card h3 { margin: 0 0 4px; font-size: 14px; }.request-card p { margin: 0; color: #777587; font-size: 12px; }.request-actions { display: grid; gap: 5px; }.request-actions button { min-width: 89px; padding: 7px 8px; border-radius: 8px; font-size: 11px; font-weight: 800; }.approve { border: 1px solid #beead5; color: #13714d; background: #edfbf3; }.decline { border: 1px solid #f2ccd1; color: #bd4958; background: #fff4f5; }

.auth-screen { min-height: 100vh; display: grid; place-items: center; overflow: hidden; padding: 25px 16px; position: relative; background: #e8eef2; }.auth-orb { position: absolute; border-radius: 50%; filter: blur(1px); }.orb-one { width: 420px; height: 420px; top: -240px; right: -190px; background: #d8e7f0; }.orb-two { width: 250px; height: 250px; bottom: -150px; left: -115px; background: #d8f5f0; }.auth-card { width: min(100%, 438px); padding: 33px 25px 24px; border: 1px solid rgba(255,255,255,.9); border-radius: 27px; background: rgba(255,255,255,.88); box-shadow: 0 20px 60px rgba(55,51,117,.12); backdrop-filter: blur(15px); position: relative; z-index: 1; }.auth-logo { width: 52px; height: 52px; margin-bottom: 18px; border-radius: 17px; font-family: Georgia, serif; font-size: 34px; }.eyebrow { margin: 0 0 5px; color: #2874a8; font-size: 10px; font-weight: 900; letter-spacing: 1.3px; }.auth-card h1 { margin: 0; letter-spacing: -1.5px; font-size: 36px; }.auth-lead { margin: 9px 0 22px; color: #77758a; font-size: 14px; line-height: 1.5; }.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 4px; border-radius: 11px; background: #f0eff6; }.auth-switch button { min-height: 34px; border: 0; border-radius: 8px; color: #7a7889; background: transparent; font-size: 12px; font-weight: 800; }.auth-switch button.active { color: #1d669d; background: #f7f9fa; box-shadow: 0 1px 4px rgba(38,36,73,.1); }.auth-form { display: grid; gap: 14px; margin-top: 20px; }.auth-form.hidden { display: none; }.auth-form > label { display: grid; gap: 6px; color: #555366; font-size: 12px; font-weight: 800; }.auth-form input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #dedde7; border-radius: 10px; color: var(--ink); background: #f7f9fa; outline: none; font-size: 14px; }.auth-form input:focus { border-color: #5a9bc6; box-shadow: 0 0 0 3px #edecff; }.auth-form fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; }.auth-form legend { margin-bottom: 7px; color: #555366; font-size: 12px; font-weight: 800; }.role-option { display: grid; grid-template-columns: 16px 1fr; gap: 2px 7px; padding: 10px 8px; border: 1px solid #e4e3eb; border-radius: 11px; color: #545268; font-size: 12px; font-weight: 800; }.role-option input { grid-row: 1 / 3; width: 16px; height: 16px; margin: 0; accent-color: #166da8; }.role-option small { grid-column: 2; color: #9997a5; font-size: 9px; font-weight: 500; line-height: 1.25; }.auth-form .primary-button { margin-top: 3px; }.admin-hint { margin: 19px 0 0; color: #9997a6; text-align: center; font-size: 11px; }.admin-hint b { color: #757384; }

.toast { position: fixed; left: 50%; bottom: 25px; z-index: 30; width: max-content; max-width: calc(100vw - 30px); padding: 12px 15px; border-radius: 12px; color: #f7f9fa; background: #343345; box-shadow: 0 8px 25px rgba(35,34,52,.22); font-size: 13px; font-weight: 700; opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: .22s ease; }.toast.show { opacity: 1; transform: translate(-50%, 0); }.toast.success { background: #287956; }.toast.error { background: #c64d5d; }

.consent-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 7px; color: #747286; font-size: 11px; line-height: 1.42; }.consent-row input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: #166da8; }.consent-row label { font-weight: 600; }.consent-row button, .policy-link { padding: 0; border: 0; color: #1d669d; background: transparent; font-size: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }.policy-link { display: block; margin: 18px auto 0; color: #898798; font-size: 11px; }
.install-link { margin-top: 10px; color: #1d669d; }

/* МАТДРОИД: фиолетово-лиловая тема */
body, .app-shell { background: radial-gradient(circle at 88% -8%, #e8d8ff 0, transparent 31rem), var(--ground); }
.auth-screen { background: radial-gradient(circle at 82% 8%, #dfc8ff 0, transparent 24rem), radial-gradient(circle at 6% 100%, #eee3ff 0, transparent 20rem), #f5f0fc; }
.orb-one { background: #dfc8ff; }.orb-two { background: #eadcff; }
.brand-mark, .auth-logo { background: linear-gradient(145deg, #9b5de5, #5b21b6); box-shadow: 0 8px 20px rgba(91, 33, 182, .28); }
.brand span:last-child { letter-spacing: .7px; font-size: 14px; }.auth-card h1 { color: #35115f; letter-spacing: 1.2px; font-size: 31px; }
.auth-card, .subject-card, .journal-card, .detail-block, .lesson-card, .payment-card, .submission-card, .attendance-list, .add-lesson, .choice-card, .mode-button, .auth-switch button.active, .bottom-nav { background: rgba(255, 255, 255, .94); }
.subject-card.violet, .subject-card.cyan, .subject-card.orange, .choice-card, .mode-button, .add-lesson { border-color: #e4d3fa; }
.subject-card.violet::after, .subject-card.cyan::after, .subject-card.orange::after { background: #eadcff; }
.subject-icon, .cyan .subject-icon, .orange .subject-icon, .mode-button > span { color: #6730bc; background: #efe4ff; }
.user-chip button, .payment-button { color: #6730bc; background: #efe5ff; }.user-chip button { border: 1px solid #dfccfa; }
.card-action, .card-action.continue, .text-action, .consent-row button, .policy-link, .install-link, .mode-button i, .bottom-nav button.active { color: #6730bc; }
.primary-button { background: linear-gradient(135deg, #5b21b6, #9b5de5); box-shadow: 0 9px 19px rgba(91, 33, 182, .24); }
.secondary-button, .payment-button { border-color: #d8c1f6; color: #6730bc; background: #f2e9ff; }
.calendar-day.has-lesson { color: #6730bc; background: #f0e6ff; }.date-dot { background: #7c3fd0; box-shadow: 0 0 0 5px #eee1ff; }
.video-link { color: #5c25b1; background: #f0e5ff; }.homework { border-color: #dfcef7; background: linear-gradient(135deg, #fff 5%, #faf6ff); }
.file-input { border-color: #d5bcf4; color: #6730bc !important; }.file-link { color: #65408e; background: #f1e8ff; }
.grade-result { border-color: #dcc8f6; background: #f7f1ff; }.score-circle { color: #5c25b1; background: #e8d8ff; }.teacher-comment { border-left-color: #a66bea; }
.add-lesson summary { color: #5c25b1; }.add-lesson summary span { background: #6d39c5; }
.student-grades strong, .student-grades .student-grade-row strong { color: #5c25b1; background: #ede1ff; }
.admin-nav button.active { border-color: #7c3fd0; background: #6d39c5; }.admin-nav button:hover, .lesson-card:hover { border-color: #cdb2ee; }
.auth-switch button.active, .auth-form input:focus, .answer-form input:focus, .answer-form textarea:focus, .add-lesson input:focus, .add-lesson textarea:focus, .grade-form input:focus, .grade-form textarea:focus { border-color: #9561da; box-shadow: 0 0 0 3px #f0e6ff; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline-color: #a873e8; }
.policy-card { max-height: calc(100vh - 34px); overflow-y: auto; }.policy-content { padding-bottom: 27px; }.policy-text { color: #504f61; font-size: 14px; line-height: 1.55; }.policy-text h1 { margin: 5px 0 20px; color: var(--ink); font-size: 25px; letter-spacing: -.8px; line-height: 1.15; }.policy-text h2 { margin: 22px 0 7px; color: var(--ink); font-size: 16px; }.policy-text p { margin: 0 0 10px; }.policy-text .eyebrow { margin-top: 12px; }
.choice-card { padding: 22px 18px; border: 1px solid #d5e2eb; border-radius: 20px; background: linear-gradient(140deg, #f7f9fa, #f3f7f9); }.choice-card h2 { margin: 4px 0 7px; font-size: 24px; letter-spacing: -.7px; }.choice-card > p:not(.eyebrow) { margin: 0 0 18px; color: #777587; font-size: 13px; line-height: 1.5; }.mode-button { width: 100%; display: grid; grid-template-columns: 36px 1fr 20px; gap: 0 10px; align-items: center; margin-top: 10px; padding: 14px; border: 1px solid #d9e4ec; border-radius: 15px; color: var(--ink); text-align: left; background: #f7f9fa; }.mode-button:hover { border-color: #a7c5d8; background: #f7f9fa; }.mode-button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #166da8; background: #e4f0f6; font-size: 18px; }.mode-button b { font-size: 14px; }.mode-button small { color: #858394; font-size: 11px; line-height: 1.35; }.mode-button i { grid-column: 3; grid-row: 1 / 3; color: #2475ac; font-size: 20px; font-style: normal; }
.settings-content { display: grid; gap: 13px; padding-bottom: 27px; }.settings-card { margin: 0; }.settings-card form { display: grid; gap: 12px; margin-top: 14px; }.settings-card label:not(.delete-confirm) { display: grid; gap: 6px; color: #575669; font-size: 12px; font-weight: 700; }.settings-card input:not([type="checkbox"]) { width: 100%; padding: 11px 12px; border: 1px solid #dbdae6; border-radius: 10px; color: var(--ink); background: #f7f9fa; font-size: 14px; }.current-nickname { margin-bottom: 13px !important; }.text-action { padding: 0; border: 0; color: #1d669d; background: transparent; font-size: 13px; font-weight: 800; text-align: left; }.danger-zone { border-color: #f0d7db; background: #fffafb; }.danger-zone .block-label { color: #bd5360; }.delete-confirm { display: flex; gap: 8px; align-items: flex-start; color: #716a71; font-size: 12px; line-height: 1.4; }.delete-confirm input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: #c6515e; }.danger-button { min-height: 42px; padding: 10px 15px; border: 1px solid #e6aab1; border-radius: 11px; color: #b74352; background: #fff4f5; font-size: 13px; font-weight: 800; }

@media (min-width: 700px) { .app-shell { box-shadow: 0 0 80px rgba(56,53,100,.08); }.topbar { padding-left: 31px; padding-right: 31px; }.page-heading { padding-left: 31px; padding-right: 31px; }.content { padding-left: 31px; padding-right: 31px; }.subject-list { grid-template-columns: repeat(3, 1fr); }.subject-card { min-height: 197px; grid-template-columns: 1fr; gap: 7px; }.subject-card .card-action, .subject-card .pending-pill { grid-column: 1; align-self: end; }.subject-icon { margin-bottom: 4px; }.course-content { max-width: 720px; margin: auto; }.calendar { padding: 21px; }.calendar-day { height: 43px; font-size: 13px; }.auth-card { padding: 38px 34px 27px; }.request-actions { grid-template-columns: repeat(2, auto); }.request-actions button { min-width: 95px; } }

/* Финальные переопределения палитры МАТДРОИД */
.eyebrow, .lesson-card-date { color: #6730bc; }
.calendar-header button, .answer-form input, .answer-form textarea, .add-lesson input, .add-lesson textarea, .grade-form input, .grade-form textarea, .auth-form input, .settings-card input:not([type="checkbox"]), .add-payment-month input { border-color: #dfcff4; background: #fff; }
.calendar-header button { color: #6730bc; }
.add-payment-month { border-color: #dfcff4; background: #f8f3ff; }.add-payment-month label, .payment-card h2 { color: var(--ink); }.payment-subject { border-color: #eee4f8; }
.student-grades, .attendance-list, .payment-card { border-color: #e3d7f4; }.student-grades .student-grade-row, .attendance-row { border-color: #eee6f8; }.student-grades .student-grade-header { color: #76698e; background: #f4edfc; }

/* Чеки и отправка оплаты на проверку. */
.payment-subject { display: grid; align-items: stretch; justify-content: stretch; gap: 10px; }
.payment-subject > .payment-subject-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.payment-subject-summary > div { display: grid; gap: 5px; min-width: 0; }
.payment-request-form { display: grid; gap: 10px; padding: 13px; border: 1px solid #e2d2f5; border-radius: 13px; background: #faf6ff; }
.receipt-input { position: relative; cursor: pointer; background: #fff; }
.receipt-input:focus-within { outline: 2px solid #a873e8; outline-offset: 3px; }
.receipt-input small { flex-basis: 100%; line-height: 1.5; }
.receipt-selection { min-width: 0; margin: 0; color: var(--ink); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.payment-request-form .receipt-hint { margin: 0; color: var(--muted); }
.payment-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.payment-form-actions .primary-button { flex: 1 1 180px; font-size: 12px; }
.payment-form-actions .secondary-button { flex: 0 1 auto; font-size: 12px; }
.payment-request-form [disabled], .payment-button[disabled] { opacity: .65; cursor: wait; }
.payment-request-error { margin: 0; color: #ad3452; font-size: 12px; line-height: 1.5; }
.payment-request-error:empty { display: none; }
.receipt-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: fit-content; max-width: 100%; padding: 8px 10px; border-radius: 8px; color: #6730bc; background: #efe5ff; font-size: 12px; font-weight: 700; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
.receipt-link:hover { color: #48208e; background: #e7d7fc; }
.receipt-link span { flex: 0 0 auto; }
.payment-request-card > div:first-child { flex: 1; min-width: 0; }
.payment-request-card .receipt-link { margin-top: 8px; }
.payment-table .receipt-link.compact { margin: 6px auto 0; padding: 5px 6px; font-size: 10px; }
.attendance-button { border-color: #dbc9f1; color: #76698e; background: #fbf9ff; }.attendance-result { border-color: #e0d3f2; }
.grade-table td.scored, .grade-table td.submitted-cell { color: #5c25b1; background: #f0e6ff; }.grade-table th:first-child, .grade-table thead th { background: #fbf9ff; }
.admin-nav button { border-color: #e1d5f1; background: #fff; }.choice-card { border-color: #e4d3fa; background: linear-gradient(140deg, #fff, #f8f2ff); }
.mode-button:hover { border-color: #cba9ed; background: #fbf8ff; }.auth-switch { background: #f0e7fa; }.role-option input, .consent-row input { accent-color: #6d39c5; }
