/* ============ Chats (.wa): WhatsApp's look, in light and dark (js/pages/chats.js) ============ */
.wa {
  /* WhatsApp's structure, the student app's colours (app.css tokens, so dark mode and the ERP follow) */
  --wa-side: var(--card); --wa-head: var(--n-100); --wa-hover: var(--n-50); --wa-on: var(--p-100); --wa-line: var(--n-150); --wa-text: var(--text); --wa-sub: var(--text-3);
  --wa-green: var(--accent); --wa-accent-ink: var(--accent); --wa-accent-tint: var(--accent-tint); --wa-badge: var(--accent); --wa-chat: #ECEAF4; --wa-out: #E1DDFB; --wa-in: #ffffff;
  --wa-pill: #ffffff; --wa-pill-ink: var(--text-2); --wa-e2e: var(--p-50); --wa-e2e-ink: var(--text-2); --wa-blue: #4F7DF3; --wa-input: #ffffff; --wa-compose: var(--n-100);
  --wa-icon: var(--text-2); --wa-pop: var(--card); --wa-quote: rgba(54, 46, 126, .06); --wa-shadow: 0 1px .5px rgba(25, 22, 52, .13); --wa-red: var(--alert);
  --wa-panel-head: var(--p-800); --wa-panel-ink: #ffffff;
  position: relative; display: grid; grid-template-columns: minmax(300px, 30%) minmax(0, 1fr); height: 100dvh; overflow: hidden; width: 100%; max-width: 100vw;
  background: var(--wa-head); color: var(--wa-text); font-size: 14.2px; line-height: 1.35;
}
:root[data-theme="dark"] .wa {
  --wa-side: var(--card); --wa-head: var(--fill); --wa-hover: var(--surface-2); --wa-on: var(--fill-2); --wa-line: rgba(255, 255, 255, .06); --wa-text: var(--text); --wa-sub: var(--muted);
  --wa-green: var(--accent); --wa-accent-ink: var(--brand); --wa-accent-tint: var(--accent-tint); --wa-badge: var(--accent); --wa-chat: var(--bg); --wa-out: #2D2A6E; --wa-in: var(--fill);
  --wa-pill: var(--surface-2); --wa-pill-ink: var(--muted); --wa-e2e: var(--surface-2); --wa-e2e-ink: #C7CBF7; --wa-blue: #7FA6FF; --wa-input: var(--fill-2); --wa-compose: var(--surface-2);
  --wa-icon: var(--text-2); --wa-pop: #20243A; --wa-quote: rgba(255, 255, 255, .06); --wa-shadow: 0 1px .5px rgba(0, 0, 0, .35); --wa-red: var(--danger);
  --wa-panel-head: var(--surface-2); --wa-panel-ink: var(--text);
}
.wa button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.wa .wa-i { flex: none; }
.wa input, .wa textarea, .wa select { font: inherit; color: var(--wa-text); }

/* ---------- left pane ---------- */
.wa-side { position: relative; min-width: 0; display: flex; flex-direction: column; min-height: 0; background: var(--wa-side); border-right: 1px solid var(--wa-line); }
.wa-side-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.wa-head { display: flex; align-items: center; gap: 6px; min-height: 59px; padding: 10px 12px 10px 14px; background: var(--wa-side); }
.wa-head h1 { flex: 1; margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.wa-head.panel { background: var(--wa-panel-head); color: var(--wa-panel-ink); min-height: 64px; }
.wa-head.panel h1 { font-size: 18px; font-weight: 600; }
.wa-head-acts { display: flex; gap: 2px; }
.wa-ib { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--wa-icon); flex: none; }
.wa-head.panel .wa-ib { color: inherit; }
.wa-ib:hover { background: rgba(0, 0, 0, .05); }
:root[data-theme="dark"] .wa-ib:hover { background: rgba(255, 255, 255, .06); }
.wa-search { display: flex; align-items: center; gap: 10px; margin: 2px 12px 8px; padding: 0 12px; height: 36px; border-radius: 8px; background: var(--wa-head); color: var(--wa-sub); }
.wa-search.in { margin: 8px 12px; }
.wa-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%; }
/* Students | Employees (the GEMS Suite's Chats, faculty with classes): js/pages/chats.js tabsHtml */
.wa-spaces { display: grid; grid-template-columns: 1fr 1fr; margin: 4px 14px 8px; padding: 3px; border-radius: 10px; background: var(--wa-head); }
.wa-space { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; border-radius: 8px; color: var(--wa-sub); font-size: 14px; font-weight: 500; text-decoration: none; }
.wa-space:hover { color: var(--wa-text); }
.wa-space.on { background: var(--wa-side); color: var(--wa-text); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.wa-space b { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--wa-badge); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.wa-space:focus-visible { outline: 2px solid var(--wa-accent-ink); outline-offset: 1px; }
.wa-chips { display: flex; gap: 8px; padding: 2px 14px 8px; overflow-x: auto; scrollbar-width: none; }
.wa-chips button { padding: 6px 12px; border-radius: 16px; background: var(--wa-head); color: var(--wa-sub); font-size: 14px; white-space: nowrap; }
.wa-chips button.on { background: var(--wa-accent-tint); color: var(--wa-accent-ink); font-weight: 600; }
.wa-archived { display: flex; align-items: center; gap: 20px; width: 100%; padding: 12px 18px; color: var(--wa-text); }
.wa-archived span { flex: 1; } .wa-archived b { color: var(--wa-accent-ink); font-size: 12px; font-weight: 600; } .wa-archived .wa-i { color: var(--wa-accent-ink); }
.wa-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.wa-none { padding: 40px 24px; text-align: center; color: var(--wa-sub); }
.wa-row { display: flex; align-items: center; gap: 13px; width: 100%; padding: 0 0 0 13px; min-height: 72px; color: var(--wa-text); }
.wa-row:hover { background: var(--wa-hover); } .wa-row.on { background: var(--wa-on); }
.wa-row.sm { min-height: 60px; }
.wa-row-main { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-right: 15px; border-bottom: 1px solid var(--wa-line); }
.wa-row:last-child .wa-row-main { border-bottom-color: transparent; }
.wa-row-top, .wa-row-bot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wa-row-name { flex: 1; min-width: 0; font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-row-time { font-size: 12px; color: var(--wa-sub); flex: none; } .wa-row-time.new { color: var(--wa-accent-ink); font-weight: 600; }
.wa-row-comm { font-size: 12px; color: var(--wa-sub); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wa-row-last { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; color: var(--wa-sub); font-size: 14px; overflow: hidden; white-space: nowrap; }
.wa-row-last .wa-i { vertical-align: -3px; }
.wa-row-icons { display: flex; align-items: center; gap: 4px; color: var(--wa-sub); flex: none; }
.wa-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--wa-badge); color: var(--on-accent); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.wa-badge.mute { background: var(--wa-sub); }
.wa-typing { color: var(--wa-accent-ink); font-weight: 500; }
.wa-tick { display: inline-flex; color: var(--wa-sub); vertical-align: -3px; } .wa-tick.read { color: var(--wa-blue); }

/* avatars */
.wa-av { flex: none; width: 49px; height: 49px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 17px; overflow: hidden; user-select: none; }
.wa-av.sq { border-radius: 12px; }
.wa-av.sm { width: 40px; height: 40px; font-size: 15px; } .wa-av.lg { width: 64px; height: 64px; font-size: 24px; } .wa-av.xl { width: 160px; height: 160px; font-size: 54px; }
.wa-av.xl .wa-i { width: 72px; height: 72px; } .wa-av.lg .wa-i { width: 32px; height: 32px; }
.wa-av.green { background: var(--wa-green); color: var(--on-accent); }
/* Announcements and Notifications, the two rows at the top of the list (js/pages/chats.js sysRow) */
.wa-av.wa-av-sys { background: var(--wa-accent-tint); color: var(--wa-accent-ink); }

/* communities */
.wa-newcomm { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 14px; font-size: 16px; }
.wa-comms { flex: 1; overflow-y: auto; }
.wa-comm { border-top: 8px solid var(--wa-head); }
.wa-comm-head { display: flex; align-items: center; gap: 13px; width: 100%; padding: 14px; }
.wa-comm-head > span:not(.wa-av) { display: flex; flex-direction: column; } .wa-comm-head b { font-size: 16.5px; font-weight: 600; } .wa-comm-head small { color: var(--wa-sub); }
.wa-viewall { display: flex; align-items: center; gap: 22px; width: 100%; padding: 12px 22px; color: var(--wa-sub); }

/* ---------- right pane ---------- */
.wa-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--wa-chat); }
.wa-intro { margin: auto; max-width: 460px; padding: 30px; text-align: center; color: var(--wa-sub); }
.wa-intro h2 { margin: 18px 0 10px; color: var(--wa-text); font-weight: 300; font-size: 30px; }
.wa-intro-art { width: 150px; height: 150px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--wa-accent-tint); color: var(--wa-accent-ink); }
.wa-intro-lock { margin-top: 40px; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.wa-intro.sm { padding: 40px 20px; } .wa-intro.sm .wa-i { color: var(--wa-sub); }
.wa-main:has(.wa-intro) { background: var(--wa-head); border-bottom: 6px solid var(--brand); }
.wa-chead { display: flex; align-items: center; gap: 6px; min-height: 59px; padding: 8px 12px; background: var(--wa-head); border-left: 1px solid var(--wa-line); z-index: 2; }
.wa-back { display: none; }
.wa-chead-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 13px; }
.wa-chead-who .wa-av { width: 40px; height: 40px; font-size: 15px; }
.wa-chead-who > span:not(.wa-av) { display: flex; flex-direction: column; min-width: 0; }
.wa-chead-who b { font-weight: 500; font-size: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wa-chead-who small { font-size: 13px; color: var(--wa-sub); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wa-find { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--wa-side); border-bottom: 1px solid var(--wa-line); }
.wa-find input { flex: 1; height: 34px; border-radius: 8px; border: 0; padding: 0 12px; background: var(--wa-head); outline: 0; }

/* the conversation, on our own doodle wallpaper */
.wa-msgs { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 6% 8px;
  background-color: var(--wa-chat);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23362E7E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='.07'%3E%3Cpath d='M18 22h22a6 6 0 0 1 6 6v10a6 6 0 0 1-6 6H28l-7 6v-6h-3a6 6 0 0 1-6-6V28a6 6 0 0 1 6-6z'/%3E%3Cpath d='m110 18 4 8 9 1-6 6 1.5 9-8.5-4.5-8 4.5 1.5-9-6.5-6 9-1z'/%3E%3Cpath d='M70 70h20v26H70zM74 76h12M74 82h12M74 88h8'/%3E%3Ccircle cx='130' cy='92' r='9'/%3E%3Cpath d='M126 90h.01M134 90h.01M126 95a5 5 0 0 0 8 0'/%3E%3Cpath d='M22 112l12-6 12 6-12 6zM28 115v7c3 3 9 3 12 0v-7'/%3E%3Cpath d='M100 128c4-8 16-8 20 0M110 120v-6'/%3E%3Cpath d='M60 140l6-10 6 10M56 22c0 6 10 6 10 0'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 260px; }
:root[data-theme="dark"] .wa-msgs { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='.05'%3E%3Cpath d='M18 22h22a6 6 0 0 1 6 6v10a6 6 0 0 1-6 6H28l-7 6v-6h-3a6 6 0 0 1-6-6V28a6 6 0 0 1 6-6z'/%3E%3Cpath d='m110 18 4 8 9 1-6 6 1.5 9-8.5-4.5-8 4.5 1.5-9-6.5-6 9-1z'/%3E%3Cpath d='M70 70h20v26H70zM74 76h12M74 82h12M74 88h8'/%3E%3Ccircle cx='130' cy='92' r='9'/%3E%3Cpath d='M22 112l12-6 12 6-12 6zM28 115v7c3 3 9 3 12 0v-7'/%3E%3Cpath d='M100 128c4-8 16-8 20 0M110 120v-6'/%3E%3C/g%3E%3C/svg%3E"); }
.wa-msgs-in { display: flex; flex-direction: column; gap: 2px; max-width: 980px; margin: 0 auto; }
.wa-loading { margin: 30px auto; color: var(--wa-sub); }
.wa-e2e { align-self: center; max-width: 520px; margin: 6px 0 12px; padding: 6px 12px; border-radius: 7.5px; background: var(--wa-e2e); color: var(--wa-e2e-ink); font-size: 12.5px; text-align: center; box-shadow: var(--wa-shadow); }
.wa-e2e .wa-i { vertical-align: -2px; }
.wa-day, .wa-sys, .wa-unread { display: flex; justify-content: center; margin: 10px 0 8px; }
.wa-day span, .wa-sys span { padding: 5px 12px 6px; border-radius: 7.5px; background: var(--wa-pill); color: var(--wa-pill-ink); font-size: 12.5px; box-shadow: var(--wa-shadow); text-align: center; max-width: 80%; }
.wa-day span { text-transform: uppercase; font-size: 12px; }
.wa-unread span { width: 100%; text-align: center; padding: 5px; background: rgba(255, 255, 255, .55); color: var(--wa-sub); font-size: 12.5px; }
:root[data-theme="dark"] .wa-unread span { background: rgba(32, 44, 51, .7); }
.wa-older { align-self: center; padding: 6px 14px; border-radius: 16px; background: var(--wa-pill); color: var(--wa-accent-ink); font-size: 13px; box-shadow: var(--wa-shadow); margin-bottom: 6px; }

/* bubbles */
.wa-msg { display: flex; flex-direction: column; position: relative; margin-top: 1px; }
.wa-msg.first { margin-top: 8px; }
.wa-msg.in { align-items: flex-start; } .wa-msg.out { align-items: flex-end; }
.wa-msg.has-r { margin-bottom: 14px; }
.wa-bubble { position: relative; max-width: min(65%, 560px); min-width: 72px; padding: 6px 7px 8px 9px; border-radius: 7.5px; background: var(--wa-in); box-shadow: var(--wa-shadow); word-wrap: break-word; overflow-wrap: anywhere; }
.wa-msg.out .wa-bubble { background: var(--wa-out); }
.wa-msg.first.in .wa-bubble { border-top-left-radius: 0; } .wa-msg.first.out .wa-bubble { border-top-right-radius: 0; }
.wa-msg.first.in .wa-bubble::before, .wa-msg.first.out .wa-bubble::before { content: ''; position: absolute; top: 0; width: 8px; height: 13px; background: inherit; }
.wa-msg.first.in .wa-bubble::before { left: -8px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.wa-msg.first.out .wa-bubble::before { right: -8px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.wa-sender { font-size: 12.8px; font-weight: 600; margin-bottom: 2px; }
:root[data-theme="dark"] .wa-sender, :root[data-theme="dark"] .wa-quote b, :root[data-theme="dark"] .wa-bar-in b { filter: brightness(1.75) saturate(.9); }
.wa-text { white-space: pre-wrap; padding-right: 4px; font-size: 14.2px; }
.wa-text.big { font-size: 40px; line-height: 1.15; }
.wa-text a { color: var(--accent); text-decoration: underline; } :root[data-theme="dark"] .wa-text a { color: var(--brand); }
.wa-text::after { content: ''; display: inline-block; width: 74px; } /* room for the time on the last line */
.wa-msg.out .wa-text::after { width: 88px; }
.wa-meta { float: right; position: relative; margin: 4px -2px -5px 6px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--wa-sub); white-space: nowrap; }
.wa-text + .wa-meta, .wa-deleted + .wa-meta { position: absolute; right: 7px; bottom: 4px; margin: 0; }
.wa-meta i { font-style: normal; margin-right: 2px; }
.wa-meta .wa-star { color: var(--wa-sub); }
.wa-deleted { display: inline-flex; align-items: center; gap: 5px; font-style: italic; color: var(--wa-sub); padding-right: 64px; }
.wa-msg.out .wa-deleted { padding-right: 84px; }
.wa-more { position: absolute; top: 2px; right: 2px; width: 26px; height: 22px; border-radius: 0 6px 0 12px; display: grid; place-items: center; color: var(--wa-sub); opacity: 0; transition: opacity .12s;
  background: radial-gradient(circle at 70% 30%, var(--wa-in) 55%, transparent 80%) !important; }
.wa-msg.out .wa-more { background: radial-gradient(circle at 70% 30%, var(--wa-out) 55%, transparent 80%) !important; }
.wa-bubble:hover .wa-more { opacity: 1; }
.wa-quote { display: flex; flex-direction: column; width: 100%; margin: 0 0 4px; padding: 5px 9px 6px; border-radius: 6px; background: var(--wa-quote); border-left: 4px solid var(--ink, var(--wa-green)); min-width: 0; }
.wa-quote b { color: var(--ink); font-size: 12.8px; font-weight: 500; } .wa-quote span { color: var(--wa-sub); font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.wa-fwd { font-size: 12.5px; color: var(--wa-sub); font-style: italic; display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.wa-reacts { position: absolute; bottom: -16px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; height: 24px; border-radius: 12px; background: var(--wa-pill); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); font-size: 14px; z-index: 1; }
.wa-msg.in .wa-reacts { left: 10px; } .wa-msg.out .wa-reacts { right: 10px; }
.wa-reacts b { font-size: 12px; color: var(--wa-sub); font-weight: 500; margin-left: 2px; }
.wa-msg.flash .wa-bubble { animation: waFlash 1.6s ease; }
@keyframes waFlash { 0%, 60% { filter: brightness(.82); } 100% { filter: none; } }
.wa-msg.hit .wa-bubble { outline: 2px solid #ffd279; }
.wa-bubble.media { padding: 3px; }
.wa-bubble.media .wa-text { padding: 4px 6px 2px; }
.wa-img { display: block; width: min(330px, 62vw); max-height: 360px; border-radius: 5px; overflow: hidden; background: rgba(0, 0, 0, .08); }
.wa-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .25s; }
.wa-img img.blur { filter: blur(10px); transform: scale(1.06); }
.wa-img + .wa-meta { position: absolute; right: 9px; bottom: 7px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); margin: 0; }
.wa-filecard { display: flex; align-items: center; gap: 10px; width: min(300px, 62vw); padding: 10px; margin: -2px -3px 4px -5px; border-radius: 6px; background: var(--wa-quote); }
.wa-filecard span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .wa-filecard b { font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wa-filecard small { color: var(--wa-sub); font-size: 12px; } .wa-filecard > .wa-i:first-child { color: #e3a33f; }
.wa-godown { position: sticky; bottom: 8px; margin-left: auto; width: 42px; height: 42px; border-radius: 50%; display: grid !important; place-items: center; background: var(--wa-pill); color: var(--wa-sub); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); z-index: 3; }
.wa-godown[hidden] { display: none !important; }

/* composer */
.wa-compose { background: var(--wa-compose); padding: 5px 10px; z-index: 2; }
.wa-compose-row { display: flex; align-items: flex-end; gap: 4px; }
.wa-compose textarea { flex: 1; min-height: 42px; max-height: 140px; resize: none; padding: 10px 12px; margin: 0 4px; border: 0; outline: 0; border-radius: 8px; background: var(--wa-input); line-height: 1.4; }
.wa-send { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--wa-green) !important; color: var(--on-accent); flex: none; }
.wa-bar { display: flex; align-items: center; gap: 6px; padding: 6px 4px 4px; }
.wa-bar-in { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 6px 10px; border-radius: 6px; background: var(--wa-quote); border-left: 4px solid var(--ink, var(--wa-green)); }
.wa-bar-in.edit { --ink: var(--wa-green); }
.wa-bar-in b { color: var(--ink); font-size: 13px; font-weight: 500; } .wa-bar-in span { color: var(--wa-sub); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wa-ro { padding: 14px; text-align: center; background: var(--wa-compose); color: var(--wa-sub); font-size: 14px; }

/* ---------- panels (left) and the drawer (right) ---------- */
.wa-panel { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: var(--wa-side); animation: waIn .18s ease; }
.wa-panel[hidden] { display: none; }
@keyframes waIn { from { transform: translateX(-24px); opacity: 0; } }
.wa-panel-body { flex: 1; overflow-y: auto; padding-bottom: 90px; }
.wa-panel-foot { position: sticky; bottom: 0; display: flex; justify-content: center; padding: 18px; }
.wa-fab { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--wa-green) !important; color: var(--on-accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.wa.has-drawer { grid-template-columns: minmax(300px, 30%) minmax(0, 1fr) minmax(340px, 30%); }
.wa-drawer { display: flex; flex-direction: column; min-height: 0; background: var(--wa-head); border-left: 1px solid var(--wa-line); animation: waIn .18s ease; }
.wa-drawer[hidden] { display: none; }
.wa-dhead { display: flex; align-items: center; gap: 14px; min-height: 59px; padding: 8px 12px; background: var(--wa-head); }
.wa-dhead h2 { margin: 0; font-size: 16px; font-weight: 500; }
.wa-dbody { flex: 1; overflow-y: auto; }
.wa-dhero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 20px 20px; background: var(--wa-side); margin-bottom: 10px; text-align: center; }
.wa-dhero h3 { margin: 12px 0 0; font-size: 22px; font-weight: 400; }
.wa-dsec { background: var(--wa-side); margin-bottom: 10px; padding: 14px 0; }
.wa-dsec.center { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; text-align: center; color: var(--wa-sub); }
.wa-dsec.center .wa-i { color: var(--wa-accent-ink); }
.wa-dh { margin: 0 0 6px; padding: 0 22px; font-size: 14px; font-weight: 400; color: var(--wa-sub); display: flex; align-items: center; gap: 6px; }
.wa-dh small { margin-left: auto; } .wa-dh.up { padding: 16px 22px 6px; text-transform: none; color: var(--wa-accent-ink); font-weight: 600; }
.wa-desc, .wa-dsec > .wa-muted { padding: 0 22px; margin: 0; }
.wa-desc { white-space: pre-wrap; }
.wa-muted { color: var(--wa-sub); } .wa-muted.pad { padding: 10px 22px; }
.wa-link { display: flex; align-items: center; gap: 8px; padding: 10px 22px 0; color: var(--wa-accent-ink); }
.wa-opt { display: flex; align-items: center; gap: 22px; width: 100%; padding: 12px 22px; color: var(--wa-text); }
.wa-opt:hover, .wa-person.btn:hover { background: var(--wa-hover); }
.wa-opt > span:not(.wa-av) { display: flex; flex-direction: column; } .wa-opt small { color: var(--wa-sub); font-size: 13px; }
.wa-opt > .wa-i { color: var(--wa-sub); }
.wa-opt.big { gap: 15px; padding: 10px 14px; font-size: 16px; }
.wa-opt.red, .wa-opt.red .wa-i { color: var(--wa-red); }
.wa-person { display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px 22px; }
.wa-person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wa-person-main b { font-weight: 400; font-size: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wa-person-main small { color: var(--wa-sub); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wa-person input[type=checkbox], .wa-pick input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.wa-pick .wa-row { padding-left: 16px; }
.wa-admin { padding: 2px 6px; border-radius: 4px; background: var(--wa-accent-tint); color: var(--wa-accent-ink); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.wa-join { padding: 6px 14px; margin-right: 14px; border-radius: 16px; background: var(--wa-accent-tint) !important; color: var(--wa-accent-ink) !important; font-weight: 600; font-size: 13px; flex: none; }
.wa-join.red { background: var(--danger-tint) !important; color: var(--wa-red) !important; }
.wa-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; margin: 6px 4px 0 0; border-radius: 14px; background: var(--wa-head); color: var(--wa-text); font-size: 13px; }
.wa-chip.sel input { accent-color: var(--accent); margin: 0; }
.wa-chipsel { display: flex; flex-wrap: wrap; gap: 0; padding: 0 0 4px; }
.wa-media { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 4px 22px; }
.wa-mthumb { aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--wa-head); display: grid; place-items: center; }
.wa-mthumb img { width: 100%; height: 100%; object-fit: cover; }
.wa-mthumb.doc { color: var(--wa-sub); align-content: center; gap: 4px; } .wa-mthumb.doc small { font-size: 10px; }
.wa-code { margin: 6px 0; padding: 14px 18px; border-radius: 8px; background: var(--wa-head); color: var(--wa-text); font-size: 17px; letter-spacing: .12em; line-height: 1.7; text-align: center; }
.wa-starred { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 12px 18px; border-bottom: 1px solid var(--wa-line); }
.wa-starred .wa-muted { font-size: 12.5px; }
.wa-report { margin: 10px 14px; padding: 12px; border-radius: 8px; background: var(--wa-head); display: flex; flex-direction: column; gap: 6px; }
.wa-report.open { border-left: 4px solid var(--wa-red); }
.wa-rmsg { padding: 8px 10px; border-radius: 6px; background: var(--wa-side); white-space: pre-wrap; }
.wa-row-acts { display: flex; gap: 6px; }
.wa-form { padding: 6px 0; }
.wa-gtop { display: flex; align-items: center; gap: 16px; padding: 16px 20px 6px; }
.wa-field { display: flex; flex-direction: column; gap: 6px; margin: 10px 20px; padding: 0; border: 0; }
.wa-field.grow { flex: 1; margin: 0; }
.wa-field > span, .wa-field legend { font-size: 13px; color: var(--wa-accent-ink); font-weight: 600; padding: 0; }
.wa-field input:not([type=checkbox]):not([type=radio]), .wa-field textarea, .wa-field select { width: 100%; padding: 8px 2px; border: 0; border-bottom: 2px solid var(--wa-line); background: transparent; outline: 0; }
.wa-field input:focus, .wa-field textarea:focus { border-bottom-color: var(--accent); }
.wa-radio { display: flex; align-items: center; gap: 12px; padding: 7px 0; font-size: 15px; cursor: pointer; }
.wa-radio input { accent-color: var(--accent); width: 18px; height: 18px; }
.wa-modal .wa-field, .wa-modal .wa-radio { margin-left: 0; margin-right: 0; }

/* menus, reaction bar, emoji */
.wa-pop { position: absolute; z-index: 30; min-width: 180px; max-width: min(340px, 92vw); border-radius: 12px; background: var(--wa-pop); box-shadow: 0 2px 5px rgba(11, 20, 26, .26), 0 2px 10px rgba(11, 20, 26, .16); padding: 6px 0; animation: waPop .12s ease; }
.wa-pop[hidden] { display: none; }
@keyframes waPop { from { transform: scale(.94); opacity: 0; } }
.wa-menu { display: flex; flex-direction: column; }
.wa-menu button { display: flex; align-items: center; gap: 14px; padding: 9px 20px 9px 18px; font-size: 14.5px; }
.wa-menu button .wa-i { color: var(--wa-icon); width: 20px; height: 20px; }
.wa-menu button:hover { background: var(--wa-hover); }
.wa-rline { display: flex; justify-content: space-between; gap: 24px; padding: 8px 18px; }
.wa-rbar { display: flex; gap: 2px; padding: 4px 8px 8px; border-bottom: 1px solid var(--wa-line); margin-bottom: 4px; }
.wa-rbar button { width: 38px; height: 38px; border-radius: 50%; font-size: 24px; display: grid; place-items: center; transition: transform .12s; }
.wa-rbar button:hover { transform: scale(1.18); } .wa-rbar button.on { background: var(--wa-head); }
.wa-rbar button:last-child { color: var(--wa-icon); background: var(--wa-head); }
.wa-emoji { width: 320px; max-width: 86vw; max-height: 320px; overflow-y: auto; padding: 4px 10px 10px; }
.wa-emoji h5 { margin: 8px 4px 4px; font-size: 12px; color: var(--wa-sub); font-weight: 500; }
.wa-emoji div { display: grid; grid-template-columns: repeat(8, 1fr); }
.wa-emoji button { font-size: 24px; height: 38px; border-radius: 8px; display: grid; place-items: center; }
.wa-emoji button:hover { background: var(--wa-hover); }
.wa-modal-ov { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(11, 20, 26, .45); padding: 16px; }
:root[data-theme="dark"] .wa-modal-ov { background: rgba(11, 20, 26, .8); }
.wa-modal { width: min(460px, 100%); max-height: 90%; overflow-y: auto; border-radius: 6px; background: var(--wa-pop); padding: 22px 24px 18px; box-shadow: 0 17px 50px rgba(11, 20, 26, .19), 0 12px 15px rgba(11, 20, 26, .24); }
.wa-modal h3 { margin: 0 0 12px; font-size: 20px; font-weight: 400; }
.wa-modal-btns { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.wa-btn { padding: 9px 22px; border-radius: 22px; font-weight: 600; font-size: 14px; color: var(--wa-accent-ink) !important; border: 1px solid var(--wa-line) !important; }
.wa-btn.primary { background: var(--wa-green) !important; color: var(--on-accent) !important; border-color: var(--wa-green) !important; }
.wa-btn.danger { background: var(--wa-red) !important; color: #fff !important; border-color: var(--wa-red) !important; }
.wa-btn.ghost { border-color: transparent !important; }
.wa-viewer { position: absolute; inset: 0; z-index: 45; display: flex; flex-direction: column; background: rgba(11, 20, 26, .96); color: #e9edef; }
.wa-viewer header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
.wa-viewer header span { display: flex; flex-direction: column; } .wa-viewer small { color: #8696a0; } .wa-viewer .wa-ib { color: #e9edef; }
.wa-viewer-img { flex: 1; display: grid; place-items: center; min-height: 0; padding: 10px; }
.wa-viewer-img img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* the menu badge */
.tabbar [data-route="chats"].has-dot::after { content: ''; position: absolute; top: 6px; margin-left: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- a phone: one pane at a time ---------- */
@media (max-width: 900px) {
  .wa, .wa.has-drawer { grid-template-columns: minmax(0, 1fr); }
  .wa-side, .wa-main, .wa-drawer { grid-row: 1; grid-column: 1; }
  .wa.is-open .wa-side { display: none; }
  .wa:not(.is-open) .wa-main { display: none; }
  .wa-drawer { position: absolute; inset: 0; z-index: 8; }
  .wa-back { display: inline-grid; margin-left: -6px; }
  .wa-head { padding-top: max(10px, env(safe-area-inset-top)); }
  .wa-chead, .wa-dhead { padding-top: max(8px, env(safe-area-inset-top)); }
  .wa-compose { padding-bottom: max(5px, env(safe-area-inset-bottom)); }
  .wa-ro { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .wa-msgs { padding: 10px 4% 8px; }
  .wa-bubble { max-width: 85%; }
  .wa-more { display: none; }
  .wa-chead { border-left: 0; }
  .wa-av.xl { width: 120px; height: 120px; }
}
@media (min-width: 901px) { .wa-leave { margin-left: -6px; } }

/* ---------- notifications: the heads-up banner (anywhere in the app), switches, the "turn on" strip ---------- */
.wa-notes { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 2147483000; width: min(440px, calc(100vw - 16px));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.wa-note { pointer-events: auto; display: flex; align-items: center; gap: 4px; padding: 10px 6px 10px 12px; border-radius: 16px; background: var(--card); color: var(--text);
  box-shadow: 0 10px 30px rgba(20, 14, 51, .22), 0 2px 6px rgba(20, 14, 51, .12); border: 1px solid var(--line); animation: waNoteIn .32s cubic-bezier(.23, 1, .32, 1); }
.wa-note.prio { border: 1px solid var(--accent); box-shadow: 0 10px 30px rgba(79, 70, 229, .28), 0 2px 6px rgba(20, 14, 51, .12); }
.wa-note.out { animation: waNoteOut .2s ease forwards; }
@keyframes waNoteIn { from { transform: translateY(-120%); opacity: 0; } }
@keyframes waNoteOut { to { transform: translateY(-120%); opacity: 0; } }
.wa-note-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.wa-note .wa-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.wa-note .wa-av.sq { border-radius: 10px; }
.wa-note-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wa-note-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wa-note-top b { font-size: 14px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wa-note-top i { flex: none; display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 10px; background: var(--accent-tint); color: var(--accent); font-style: normal; font-size: 11px; font-weight: 600; }
.wa-note-top small { margin-left: auto; flex: none; color: var(--text-3); font-size: 11.5px; }
.wa-note-line { font-size: 13.5px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wa-note-x { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: none; border: 0; color: var(--text-3); cursor: pointer; }
.wa-note-x:hover { background: var(--fill); }
.wa-switch { display: flex; align-items: center; gap: 16px; padding: 12px 22px; cursor: pointer; }
.wa-switch > span { flex: 1; display: flex; flex-direction: column; gap: 2px; } .wa-switch b { font-weight: 400; font-size: 15.5px; } .wa-switch small { color: var(--wa-sub); font-size: 13px; }
.wa-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.wa-switch i { flex: none; position: relative; width: 36px; height: 20px; border-radius: 10px; background: var(--line-strong); transition: background .18s; }
.wa-switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .18s; }
.wa-switch input:checked + i { background: var(--accent); } .wa-switch input:checked + i::after { transform: translateX(16px); }
.wa-switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.wa-cta { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; padding: 12px 8px 12px 14px; background: var(--wa-accent-tint); }
.wa-cta > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; } .wa-cta b { font-weight: 500; }
.wa-cta button[data-act="osnotify"] { color: var(--wa-accent-ink); font-size: 13.5px; padding: 0; }

/* ---------- "Notifications on this device" (App.webPush: Notifications page strip, My Profile card) ---------- */
.wp-strip { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 10px 12px 14px; border-radius: var(--r-md, 12px);
  background: var(--accent-tint); border: 1px solid var(--line); }
.wp-strip > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wp-strip > div > b { font-size: 14px; color: var(--text); } .wp-strip > div > span { font-size: 13px; color: var(--text-2); }
.wp-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.wp-x { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: none; border: 0; color: var(--text-3); cursor: pointer; }
.wp-x:hover { background: var(--fill); }
.wp-acts { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .wp-strip { flex-wrap: wrap; } .wp-strip > .btn { order: 3; width: 100%; justify-content: center; } }

/* ---------- one-way groups (30 Oct 2026): the "only admins send" line, the student picker ---------- */
.wa-opt.static { cursor: default; } .wa-opt.static:hover { background: none; }
.wa-note { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--wa-hover); color: var(--wa-sub); font-size: 13px; line-height: 1.4; }
.wa-note > svg { flex: none; margin-top: 1px; }
.wa-pickall { margin-left: 10px; padding: 2px 4px; border: 0; background: none; color: var(--wa-accent-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.wa-person.btn.on { background: var(--wa-hover); }
/* meeting notes from an online meeting's organiser (4 Nov 2026) */
.wa-sys-notes > span { max-width: min(520px, 92%); text-align: left; white-space: normal; }
.wa-mnotes { display: grid; gap: 4px; padding: 4px 2px; font-size: 13.5px; line-height: 1.45; }
.wa-mnotes small { opacity: .75; }
.wa-mnotes-links a { font-weight: 600; }
