.icon { display: inline-block; width: 18px; height: 18px; vertical-align: middle; }
.icon--14 { width: 14px; height: 14px; }.icon--16 { width: 16px; height: 16px; }.icon--17 { width: 17px; height: 17px; }.icon--20 { width: 20px; height: 20px; }.icon--24 { width: 24px; height: 24px; }.icon--32 { width: 32px; height: 32px; }.icon--40 { width: 40px; height: 40px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--radius-md); font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center; background: var(--ink); color: var(--on-dark); transition: background-color .15s; }
.btn--lg { min-height: 52px; }.btn--sm { min-height: 44px; padding: 0 16px; }.btn--xs { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn--primary { background: var(--accent); }.btn--primary:hover { background: var(--accent-ink); }.btn--primary:active { background: var(--accent-press); }
.btn--dark:hover { background: var(--dark-hover); }.btn--dark:active { background: var(--dark-press); }
.btn--outline { background: var(--bg); border-color: var(--line-strong); color: var(--ink); }.btn--outline:hover { background: var(--surface); }.btn--outline:active { background: var(--surface-2); }
.btn--light { background: var(--bg); color: var(--ink); }.btn--light:hover { background: var(--surface-2); }
.btn--block { width: 100%; }.btn:disabled { color: var(--ink-3); background: var(--surface-2); border-color: var(--line); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md); flex-shrink: 0; }
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: var(--radius-xs); background: var(--accent); color: var(--on-dark); font-size: 12px; font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 9px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex-shrink: 0; }
.chip--sm { min-height: 24px; font-size: 12px; padding: 3px 8px; }
.chip--success { background: var(--success-soft); color: var(--success-ink); }.chip--success .chip__dot { background: var(--success); }
.chip--warning { background: var(--warning-soft); color: var(--warning-ink); }.chip--warning .chip__dot { background: var(--warning); }
.chip--danger { background: var(--accent-soft); color: var(--accent-ink); }.chip--danger .chip__dot { background: var(--accent); }
.chip--info { background: var(--info-soft); color: var(--info-ink); }.chip--info .chip__dot { background: var(--info); }
.chip--closed { color: var(--ink); }.chip--closed .chip__dot { background: var(--ink); }
.chip--dark { background: var(--ink); color: var(--on-dark); }.chip--dark .chip__dot { background: var(--on-dark); }
.chip--on-image { background: var(--bg); }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }.field label { font-size: 14px; font-weight: 500; }
.field__control { position: relative; min-width: 0; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, .input { display: block; min-width: 0; max-width: 100%; width: 100%; min-height: 52px; padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--bg); outline-offset: 2px; }
.field textarea { min-height: 120px; }.field input[type=password] { padding-right: 48px; }.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); outline: none; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: 2px solid var(--ink); }
.field input[readonly], .field input:disabled { background: var(--surface); color: var(--ink-3); }
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: var(--ink-3); opacity: 1; }
.field__hint { font-size: 13px; color: var(--ink-2); }.field__error { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent-ink); }
.field--error input:not([type=checkbox]) { border-color: var(--accent); }
.field__eye { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); padding: 4px; border: 0; background: transparent; color: var(--ink-2); }
.check-label { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--ink); flex-shrink: 0; margin: 0; vertical-align: middle; }
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }.toggle input { appearance: none; width: 40px; height: 24px; border: 0; border-radius: var(--radius-pill); background: var(--line-strong); position: relative; transition: background .15s; }
.toggle input::after { content: ''; display: block; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); transition: transform .15s; }.toggle input:checked { background: var(--ink); }.toggle input:checked::after { transform: translateX(16px); }
.form-error { color: var(--accent-ink); background: var(--accent-soft); padding: 12px 16px; border-radius: var(--radius-md); font-size: 14px; }
.avatar { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; flex-shrink: 0; }.avatar--small { width: 26px; height: 26px; }.avatar--initials { display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); font-size: 13px; font-weight: 500; }.avatar--large { width: 72px; height: 72px; }
.progress { display: block; width: 100%; height: 6px; border: 0; appearance: none; background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }.progress::-webkit-progress-bar { background: var(--surface-2); }.progress::-webkit-progress-value { background: var(--accent); border-radius: var(--radius-pill); }.progress::-moz-progress-bar { background: var(--accent); }.progress--complete::-webkit-progress-value { background: var(--success); }.progress--muted::-webkit-progress-value { background: var(--ink-3); }
.file-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; }.file-badge { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); background: var(--ink); color: var(--on-dark); font-size: 11px; font-weight: 700; letter-spacing: .4px; flex-shrink: 0; }.file-row__name { display: flex; flex: 1; flex-direction: column; min-width: 0; }.file-row__name strong { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }.file-row__name span { font-size: 12px; color: var(--ink-2); }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); }.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 0 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; color: var(--ink-2); background: transparent; font-size: 14px; white-space: nowrap; }.tabs .is-active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.segments { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: var(--surface); border-radius: var(--radius-md); }.segments a, .segments button { border: 0; background: transparent; border-radius: var(--radius-sm); padding: 8px 16px; font-size: 14px; color: var(--ink-2); }.segments .is-active { background: var(--bg); color: var(--ink); font-weight: 500; }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--ink-2); font-size: 13px; }.breadcrumbs span:last-child { color: var(--ink); font-weight: 500; }
.empty-state { padding: 88px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }.empty-state > .icon { color: var(--ink-3); }.empty-state p { max-width: 440px; color: var(--ink-2); }.empty-state .btn { margin-top: 8px; }
.skeleton { border-radius: var(--radius-md); background: var(--surface-2); min-height: 20px; }.skeleton--title { width: 45%; height: 34px; }.skeleton--card { height: 390px; }.skeleton--row { height: 48px; margin: 12px 0; }.skeleton--hero { height: 380px; }
.dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 64px); padding: 32px; border: 0; border-radius: var(--radius-lg); background: var(--bg); color: var(--ink); overflow-y: auto; }.dialog--wide { width: min(780px, calc(100% - 32px)); }.dialog--extend { width: min(600px, calc(100% - 32px)); }.dialog::backdrop { background: var(--overlay); }.dialog__heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }.dialog__heading h2 { font-size: 24px; }.dialog__close { border: 0; }.dialog__footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; }.dialog__body { display: flex; flex-direction: column; gap: 20px; }.quick-choices { display: flex; flex-wrap: wrap; gap: 8px; }.quick-choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }.quick-choices label { position: relative; }.quick-choices span { display: block; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); cursor: pointer; font-size: 14px; }.quick-choices input:checked + span { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }.quick-choices input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.toast-region { position: fixed; z-index: var(--z-toast); top: 24px; right: 24px; display: flex; flex-direction: column; gap: 12px; }.toast { display: flex; align-items: center; gap: 12px; max-width: 460px; padding: 16px 20px; border-radius: var(--radius-md); background: var(--ink); color: var(--on-dark); font-size: 14px; }.toast > .icon { color: var(--success-on-dark); }.toast button { display: flex; border: 0; color: var(--on-dark-muted); background: transparent; margin-left: 16px; }
.cookie-banner { position: fixed; z-index: var(--z-overlay); left: 50%; bottom: 24px; transform: translateX(-50%); width: min(920px, calc(100% - 32px)); display: flex; align-items: center; gap: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg); }.cookie-banner__text { display: flex; align-items: flex-start; gap: 12px; flex: 1; }.cookie-banner p { font-size: 13px; }.cookie-banner a { text-decoration: underline; }.cookie-banner .button-row { flex-shrink: 0; gap: 8px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0 0; font-size: 13px; color: var(--ink-2); }.pagination > div { display: flex; gap: 4px; align-items: center; }.page-number { width: 32px; height: 32px; border: 0; background: transparent; border-radius: var(--radius-sm); }.page-number.is-active { background: var(--ink); color: var(--on-dark); }
@media (max-width: 1023px) {
  .desktop-label { display: none; }.breadcrumbs { display: none; }
  .cookie-banner { bottom: calc(88px + env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch; padding: 20px; gap: 16px; }.cookie-banner .button-row { flex-wrap: nowrap; }.cookie-banner .btn { flex: 1; padding: 0 10px; font-size: 13px; }
  .dialog--sheet { margin: auto 0 0; width: 100%; max-width: none; max-height: calc(100dvh - 56px); padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 10px 10px 0 0; }.dialog--sheet::before { content: ''; width: 36px; height: 4px; border-radius: var(--radius-pill); background: var(--line-strong); display: block; margin: -12px auto 24px; }
  .toast-region { top: 72px; right: 16px; left: 16px; }.toast { max-width: none; }
}

/* One attachment component for lesson, module homework and admin chat. */
.chat-attachment { display:flex; align-items:center; gap:10px; width:100%; min-width:0; padding:8px 12px 8px 8px; border-radius:var(--radius-md); background:var(--surface); }
.chat-attachment__body { flex:1; min-width:0; }
.chat-attachment__name { display:block; font-size:13px; font-weight:600; line-height:1.35; overflow-wrap:anywhere; }
.chat-message .chat-attachment__size { display:block; margin:1px 0 0; color:var(--ink-2); font-size:12px; line-height:1.35; }
.chat-attachment__download { display:flex; align-items:center; justify-content:center; width:24px; height:32px; flex-shrink:0; color:inherit; border:0; border-radius:var(--radius-xs); }
.chat-message .chat-attachment { margin-top:10px; }
.chat-message--own .chat-attachment { background:var(--chat-attachment-bg); }
.chat-message--own .chat-attachment .file-badge { background:var(--on-dark); color:var(--ink); }
.chat-message--own .chat-attachment__size { color:var(--on-dark-2); }
.chat-message--own > small { text-align:right; }
