:root {
    --navy-950: #07182a;
    --navy-900: #0a2038;
    --navy-800: #102d4c;
    --navy-700: #31506a;
    --teal-600: #0ca99f;
    --teal-500: #0d7774;
    --teal-400: #24d3c5;
    --teal-100: #d9f8f4;
    --gold-500: #f1b84b;
    --ink: #17324d;
    --muted: #65788a;
    --line: #dfe8ee;
    --surface: #ffffff;
    --surface-soft: #f5f8fa;
    --surface-blue: #e8f3f5;
    --danger: #bd3b4a;
    --danger-soft: #fff0f1;
    --shadow-sm: 0 4px 15px rgba(10, 32, 56, .05);
    --shadow-lg: 0 20px 55px rgba(7, 24, 42, .22);
    --radius-sm: 8px;
    --radius-md: 11px;
    --radius-lg: 18px;
    color-scheme: light;
    font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
    margin: 0;
    background: var(--surface-soft);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.eyebrow {
    display: block;
    margin-bottom: .75rem;
    color: var(--teal-400);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.eyebrow--dark { color: var(--teal-600); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: .7rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 750;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .6; transform: none; }
.button--wide { width: 100%; }
.button--primary { background: var(--navy-900); color: #fff; box-shadow: 0 8px 22px rgba(11, 41, 68, .18); }
.button--primary:hover { background: var(--navy-800); box-shadow: 0 12px 28px rgba(11, 41, 68, .22); }
.button--primary svg { width: 1.1rem; margin-left: .5rem; }
.button--ghost { border-color: var(--line); background: #fff; color: var(--ink); }

.icon-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 11px;
    background: transparent;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.icon-button:hover:not(:disabled) { background: rgba(18, 59, 92, .08); color: var(--teal-600); }
.icon-button:disabled { cursor: default; opacity: .35; }
.icon-button--soft { width: 34px; height: 34px; background: var(--surface-blue); }

.field { display: grid; gap: .45rem; }
.field > span:first-child, .field > label { color: var(--ink); font-size: .85rem; font-weight: 750; }
.field small { color: var(--muted); font-weight: 500; }

.field input, .field select {
    width: 100%;
    height: 48px;
    padding: 0 .9rem;
    border: 1px solid #cbdbe1;
    border-radius: 11px;
    outline: 0;
    background: #fff;
    color: var(--ink);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.field input:focus, .field select:focus, .composer textarea:focus {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 4px rgba(22, 183, 173, .12);
}

.alert {
    padding: .8rem .95rem;
    border-radius: 10px;
    font-size: .875rem;
    line-height: 1.45;
}

.alert--error { border: 1px solid #f1c4ca; background: var(--danger-soft); color: #8f2633; }

.avatar {
    display: inline-grid;
    flex: 0 0 auto;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 13px;
    background: var(--avatar-color, var(--teal-500));
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.avatar--tom { --avatar-color: #237b98; }
.avatar--sarah { --avatar-color: #7f6dd1; }
.avatar--peter { --avatar-color: #d9824c; }
.avatar--julie { --avatar-color: #d15f88; }

/* Login */
.login-page { overflow-x: hidden; background: #fff; }

.login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(380px, .92fr) minmax(500px, 1.08fr);
}

.login-visual {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 5vw, 4.75rem);
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 12%, rgba(38, 200, 189, .3), transparent 30%),
        radial-gradient(circle at 12% 90%, rgba(230, 184, 92, .18), transparent 32%),
        linear-gradient(145deg, var(--navy-950), var(--navy-900) 55%, #124766);
    color: #fff;
}

.login-visual::before, .login-visual::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.login-visual::before { top: -160px; right: -100px; }
.login-visual::after { right: -190px; bottom: -80px; width: 460px; height: 460px; }

.brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--ink);
    text-decoration: none;
}

.brand img { border-radius: 12px; box-shadow: 0 7px 18px rgba(0, 0, 0, .12); }
.brand div { display: grid; line-height: 1.1; }
.brand span { font-size: 1.05rem; font-weight: 800; letter-spacing: -.015em; }
.brand small { margin-top: .2rem; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.brand--light { color: #fff; }
.brand--light small { color: rgba(255, 255, 255, .6); }

.login-visual__content { position: relative; z-index: 1; max-width: 560px; margin: 6rem 0; }
.login-visual h1 { max-width: 530px; margin: 0; font-size: clamp(2.5rem, 4vw, 4.6rem); line-height: 1.02; letter-spacing: -.055em; }
.login-visual__content > p { max-width: 500px; margin: 1.5rem 0 2.2rem; color: rgba(255, 255, 255, .72); font-size: 1.06rem; line-height: 1.7; }
.login-feature-list { display: grid; gap: .9rem; color: rgba(255, 255, 255, .84); font-size: .94rem; }
.login-feature-list span { display: flex; align-items: center; gap: .75rem; }
.feature-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold-500); box-shadow: 0 0 0 6px rgba(230, 184, 92, .12); }
.login-visual__footer { position: relative; z-index: 1; margin: 0; color: rgba(255, 255, 255, .45); font-size: .78rem; }

.login-panel { display: grid; min-height: 100vh; place-items: center; padding: 3rem clamp(1.5rem, 6vw, 6.5rem); background: #fff; }
.login-card { width: min(100%, 510px); }
.login-card__heading h2 { margin: 0; color: var(--navy-900); font-size: clamp(1.85rem, 3vw, 2.6rem); letter-spacing: -.04em; }
.login-card__heading p { margin: .8rem 0 0; color: var(--muted); line-height: 1.6; }
.mobile-brand { display: none; margin-bottom: 2rem; color: var(--navy-900); font-size: 1.15rem; font-weight: 850; }
.login-card .alert { margin-top: 1.4rem; }
.login-form { display: grid; gap: 1.15rem; margin-top: 2rem; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 3rem; }
.password-toggle { position: absolute; top: 4px; right: 4px; display: grid; width: 40px; height: 40px; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.section-divider { display: flex; align-items: center; gap: .75rem; margin: 1.8rem 0 1rem; color: #8a9ca6; font-size: .73rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.section-divider::before, .section-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.demo-account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.demo-account { display: flex; min-width: 0; align-items: center; gap: .65rem; padding: .7rem; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.demo-account:hover { border-color: var(--teal-500); background: #f7fcfb; transform: translateY(-1px); }
.demo-account > span:last-child { display: grid; min-width: 0; }
.demo-account strong, .demo-account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-account strong { font-size: .84rem; }
.demo-account small { margin-top: .18rem; color: var(--muted); font-size: .68rem; }
.demo-password { margin: 1rem 0 0; color: var(--muted); font-size: .78rem; text-align: center; }
.demo-password code { padding: .15rem .35rem; border-radius: 5px; background: var(--surface-blue); color: var(--navy-800); }
.parent-login-form { margin-top: 1.4rem; }
.parent-demo { margin-top: 12px; padding: 12px 14px; border: 1px solid #d8e9e7; border-radius: 9px; background: #f2faf9; }
.parent-demo__label { display: inline-flex; margin-bottom: 5px; padding: 3px 7px; border-radius: 999px; background: #dff4f1; color: #14766f; font-size: .57rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.parent-demo p { margin: 0 0 5px; color: #56717e; font-size: .7rem; line-height: 1.45; }
.parent-demo .text-button { padding: 0; font-size: .66rem; }
.section-divider--login { margin-top: 1.5rem; }
.parent-login-status { display: grid; gap: 10px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: .7rem; line-height: 1.5; }
.parent-login-status p { margin: 0; }
.parent-login-status.is-success { border-color: #b8dfd5; background: #effaf6; color: #236f5e; }
.parent-login-status.is-error { border-color: #efd0d4; background: #fff4f5; color: var(--danger); }
.button--soft { border: 1px solid #b9dcd8; background: #fff; color: #14766f; }
.button--soft:hover { border-color: var(--teal-500); background: #f7fcfb; }
.login-shell--message { display: grid; grid-template-columns: 1fr; background: var(--surface-soft); }
.login-card--message { display: grid; max-width: 520px; gap: 15px; text-align: center; }
.login-card--message img { margin: 0 auto; }
.login-card--message h1 { margin: 0; color: var(--navy-900); font-size: 1.55rem; }
.login-card--message p { margin: 0 0 8px; color: var(--muted); font-size: .78rem; line-height: 1.65; }

/* App shell */
.app-page { height: 100vh; overflow: hidden; }
.app-shell { display: grid; height: 100dvh; grid-template-columns: 300px minmax(0, 1fr); background: var(--surface-soft); }

.sidebar {
    position: relative;
    z-index: 30;
    display: flex;
    min-width: 0;
    height: 100dvh;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: #fff;
}

.sidebar__brand-row { display: flex; min-height: 82px; align-items: center; justify-content: space-between; padding: 1rem 1.3rem; border-bottom: 1px solid #edf2f4; }
.sidebar-close { display: none; }
.sidebar__context { display: flex; align-items: center; gap: .7rem; margin: 1rem 1rem .4rem; padding: .8rem; border-radius: 13px; background: var(--surface-soft); }
.sidebar__context > div { display: grid; min-width: 0; flex: 1; }
.sidebar__context strong { overflow: hidden; color: var(--navy-900); font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__context small { margin-top: .15rem; color: var(--muted); font-size: .68rem; }
.sidebar__context > svg { width: 1rem; color: #8ba0ab; }
.context-logo { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; background: var(--navy-900); color: #fff; font-size: .68rem; font-weight: 800; }
.sidebar__section-heading { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem .55rem; color: #82949f; font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }

.channel-list { min-height: 0; flex: 1; overflow-y: auto; padding: 0 .7rem 1rem; }
.channel-item { position: relative; display: grid; width: 100%; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .7rem .65rem; border: 0; border-radius: 13px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background .15s ease, color .15s ease; }
.channel-item:hover { background: var(--surface-soft); }
.channel-item.is-active { background: var(--teal-100); color: var(--navy-900); }
.channel-item.is-active::before { content: ""; position: absolute; top: 13px; bottom: 13px; left: -11px; width: 4px; border-radius: 0 5px 5px 0; background: var(--teal-600); }
.channel-item__mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--surface-blue); color: var(--navy-700); font-size: 1rem; font-weight: 850; }
.channel-item.is-active .channel-item__mark { background: #fff; color: var(--teal-600); box-shadow: var(--shadow-sm); }
.channel-item__copy { display: grid; min-width: 0; }
.channel-item__copy strong { overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.channel-item__copy small { overflow: hidden; margin-top: .22rem; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.unread-badge { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 .35rem; border-radius: 999px; background: var(--navy-900); color: #fff; font-size: .67rem; font-weight: 800; }
.read-lock { width: .95rem; color: #91a3ad; }
.channel-skeleton { display: flex; align-items: center; gap: .7rem; padding: .75rem .65rem; }
.channel-skeleton i, .channel-skeleton span { display: block; background: linear-gradient(90deg, #edf2f4 25%, #f8fafb 50%, #edf2f4 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.channel-skeleton i { width: 42px; height: 42px; border-radius: 12px; }
.channel-skeleton span { width: 65%; height: 13px; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.install-card { display: flex; align-items: center; gap: .7rem; margin: .4rem 1rem 1rem; padding: .75rem; border: 1px solid #cdeae7; border-radius: 13px; background: #f2fbfa; text-align: left; cursor: pointer; }
.install-card__icon { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--teal-500); color: #fff; }
.install-card__icon svg { width: 1rem; }
.install-card > span:last-child { display: grid; }
.install-card strong { color: var(--navy-900); font-size: .78rem; }
.install-card small { margin-top: .15rem; color: var(--muted); font-size: .65rem; }
.notification-card { margin-top: -.45rem; }

.profile-card { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.profile-card__text { display: grid; min-width: 0; flex: 1; }
.profile-card__text strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-card__text small { margin-top: .15rem; color: var(--teal-600); font-size: .68rem; }

.sidebar-scrim { display: none; }

.chat-pane { display: grid; min-width: 0; height: 100dvh; grid-template-rows: auto auto minmax(0, 1fr) auto; background: #f8fafb; }
.chat-header { display: flex; min-height: 82px; align-items: center; gap: .85rem; padding: .85rem clamp(1rem, 2.5vw, 2rem); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); }
.mobile-menu { display: none; }
.channel-mark { display: grid; width: 45px; height: 45px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: var(--surface-blue); color: var(--navy-700); font-size: 1.1rem; font-weight: 850; }
.chat-header__title { min-width: 0; flex: 1; }
.chat-header__title > div { display: flex; align-items: center; gap: .6rem; }
.chat-header h1 { overflow: hidden; margin: 0; color: var(--navy-900); font-size: 1rem; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.chat-header p { overflow: hidden; margin: .25rem 0 0; color: var(--muted); font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.permission-pill { padding: .22rem .45rem; border-radius: 999px; background: var(--surface-blue); color: var(--navy-700); font-size: .61rem; font-weight: 750; }
.permission-pill.is-readonly { background: #fff4df; color: #88601a; }
.chat-header__actions { display: flex; align-items: center; gap: .55rem; }
.connection-status { display: flex; align-items: center; gap: .4rem; padding: .4rem .6rem; border-radius: 999px; background: #eef9f5; color: #38705c; font-size: .68rem; font-weight: 700; }
.connection-status i { width: 7px; height: 7px; border-radius: 50%; background: #35a86f; }
.connection-status.is-offline { background: #fff1e7; color: #9a5529; }
.connection-status.is-offline i { background: #db7a3c; }

.channel-tools { display: flex; align-items: center; gap: .55rem; padding: .5rem clamp(1rem,2.5vw,2rem); border-bottom: 1px solid var(--line); background: #fff; }
.channel-tool { display: grid; min-width: 190px; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: .55rem; padding: .48rem .65rem; border: 1px solid #d7e4e8; border-radius: 11px; background: #fbfdfe; color: var(--ink); text-align: left; cursor: pointer; }
.channel-tool:hover { border-color: #8ccdc7; background: #f2fbfa; }
.channel-tool__icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; background: #e5f5f3; color: var(--teal-600); }
.channel-tool__icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.channel-tool > span:nth-child(2) { display: grid; min-width: 0; }
.channel-tool strong { font-size: .69rem; }
.channel-tool small { margin-top: 1px; overflow: hidden; color: var(--muted); font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.channel-tool__badge { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--navy-900); color: #fff; font-size: .56rem; font-weight: 850; }

.message-area { position: relative; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
.welcome-state { display: grid; min-height: 100%; place-content: center; justify-items: center; padding: 3rem 1.5rem; text-align: center; }
.welcome-state__art { position: relative; display: grid; width: 260px; height: 170px; place-items: center; margin-bottom: 1.2rem; }
.welcome-state__art::before { content: ""; position: absolute; inset: 18px 35px; border-radius: 50%; background: var(--teal-100); filter: blur(1px); }
.welcome-state__art img { position: relative; z-index: 2; border-radius: 18px; box-shadow: var(--shadow-lg); }
.art-bubble { position: absolute; z-index: 3; padding: .55rem .75rem; border-radius: 12px 12px 12px 3px; background: #fff; box-shadow: var(--shadow-sm); color: var(--navy-800); font-size: .7rem; font-weight: 750; }
.art-bubble--one { top: 18px; left: 13px; }
.art-bubble--two { right: 0; bottom: 18px; border-radius: 12px 12px 3px 12px; background: var(--navy-900); color: #fff; }
.welcome-state h2 { margin: 0; color: var(--navy-900); font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.04em; }
.welcome-state > p { max-width: 430px; margin: .75rem 0 0; color: var(--muted); line-height: 1.6; }

.messages { width: min(100%, 940px); margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 3rem) 2rem; }
.day-divider { display: flex; align-items: center; gap: .8rem; margin: 1.1rem 0 1.5rem; color: #8a9aa3; font-size: .67rem; font-weight: 750; text-transform: uppercase; }
.day-divider::before, .day-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.message-row { display: flex; align-items: flex-end; gap: .65rem; margin: .35rem 0 1.05rem; }
.message-row.is-own { flex-direction: row-reverse; }
.message-avatar { width: 34px; height: 34px; border-radius: 11px; font-size: .66rem; }
.message-content { max-width: min(74%, 610px); }
.message-meta { display: flex; align-items: baseline; gap: .45rem; margin: 0 .25rem .32rem; }
.message-row.is-own .message-meta { justify-content: flex-end; }
.message-meta strong { color: var(--navy-800); font-size: .72rem; }
.message-meta time { color: #8c9da6; font-size: .62rem; }
.message-bubble { padding: .78rem .95rem; border: 1px solid var(--line); border-radius: 5px 15px 15px 15px; background: #fff; box-shadow: 0 2px 5px rgba(11, 41, 68, .035); color: #294353; font-size: .88rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-row.is-own .message-bubble { border-color: var(--navy-900); border-radius: 15px 5px 15px 15px; background: var(--navy-900); color: #fff; }
.message-empty { display: grid; justify-items: center; padding: 5rem 1rem; text-align: center; }
.message-empty span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; background: var(--teal-100); color: var(--teal-600); font-size: 1.4rem; font-weight: 850; }
.message-empty h3 { margin: 1rem 0 .35rem; color: var(--navy-900); }
.message-empty p { margin: 0; color: var(--muted); font-size: .84rem; }

.composer-shell { padding: .85rem clamp(1rem, 4vw, 3rem) max(.85rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255, 255, 255, .96); }
.composer, .readonly-banner { width: min(100%, 860px); margin: 0 auto; }
.composer { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) 44px; align-items: end; gap: .5rem; padding: .42rem; border: 1px solid #cfdde2; border-radius: 16px; background: #fff; box-shadow: 0 5px 20px rgba(11, 41, 68, .06); }
.composer:focus-within { border-color: var(--teal-500); }
.composer__action { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #6b818d; cursor: pointer; }
.composer textarea { width: 100%; max-height: 120px; min-height: 42px; resize: none; padding: .65rem .4rem; border: 0; outline: 0; background: transparent; color: var(--ink); line-height: 1.35; }
.composer textarea:focus { box-shadow: none; }
.send-button { display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 11px; background: var(--teal-500); color: #fff; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.send-button:hover:not(:disabled) { background: var(--teal-600); transform: translateY(-1px); }
.send-button:disabled { background: #dbe4e7; cursor: default; }
.emoji-panel { position: absolute; bottom: calc(100% + 9px); left: 0; display: grid; width: 210px; grid-template-columns: repeat(5, 1fr); gap: .25rem; padding: .55rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); }
.emoji-panel button { display: grid; height: 35px; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; font-size: 1.15rem; cursor: pointer; }
.emoji-panel button:hover { background: var(--surface-soft); }
.readonly-banner { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border: 1px solid #f0dfb6; border-radius: 13px; background: #fff9eb; color: #795c20; }
.readonly-banner > svg { flex: 0 0 auto; }
.readonly-banner > div { display: grid; }
.readonly-banner strong { font-size: .8rem; }
.readonly-banner span { margin-top: .15rem; font-size: .7rem; }

/* Information drawer */
.info-panel { position: fixed; z-index: 50; top: 0; right: 0; width: min(390px, 92vw); height: 100dvh; padding: 1.4rem; overflow-y: auto; border-left: 1px solid var(--line); background: #fff; box-shadow: -18px 0 48px rgba(7, 29, 48, .14); transform: translateX(105%); transition: transform .24s ease; }
.info-panel.is-open { transform: translateX(0); }
.info-panel__header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.info-panel h2 { margin: 0; color: var(--navy-900); font-size: 1.35rem; }
.info-channel { padding: 1.4rem 0; }
.info-channel__mark { display: grid; width: 60px; height: 60px; place-items: center; border-radius: 17px; background: var(--teal-100); color: var(--teal-600); font-size: 1.4rem; font-weight: 850; }
.info-channel h3 { margin: 1rem 0 .35rem; color: var(--navy-900); }
.info-channel > p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.info-label { margin: 1.5rem 0 .65rem; color: #83949e; font-size: .67rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.member-list { display: grid; gap: .4rem; }
.member-row { display: flex; align-items: center; gap: .65rem; padding: .55rem; border-radius: 11px; background: var(--surface-soft); }
.member-row .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: .66rem; }
.member-row > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.member-row strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.member-row small { color: var(--muted); font-size: .65rem; }
.member-right { padding: .2rem .4rem; border-radius: 999px; background: #fff; color: var(--teal-600); font-size: .58rem; font-weight: 800; }

/* Modal */
.modal { width: min(620px, calc(100% - 2rem)); max-height: min(88dvh, 850px); padding: 0; overflow: hidden; border: 0; border-radius: 22px; background: #fff; box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(7, 29, 48, .55); backdrop-filter: blur(3px); }
.modal__card { display: grid; max-height: min(88dvh, 850px); grid-template-rows: auto minmax(0, 1fr) auto; }
.modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.6rem 1.2rem; border-bottom: 1px solid var(--line); }
.modal__header h2 { margin: 0; color: var(--navy-900); font-size: 1.5rem; letter-spacing: -.03em; }
.modal__header p { margin: .4rem 0 0; color: var(--muted); font-size: .82rem; }
.modal__body { display: grid; gap: 1.15rem; padding: 1.35rem 1.6rem; overflow-y: auto; }
.modal__footer { display: flex; justify-content: flex-end; gap: .65rem; padding: 1rem 1.6rem; border-top: 1px solid var(--line); background: #fbfcfd; }
.form-section { display: grid; gap: .65rem; margin: 0; padding: 0; border: 0; }
.form-section legend { padding: 0; color: var(--ink); font-size: .85rem; font-weight: 800; }
.form-section > p { margin: -.35rem 0 .2rem; color: var(--muted); font-size: .72rem; }
.member-picker { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.member-option { display: flex; min-width: 0; align-items: center; gap: .6rem; padding: .65rem; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.member-option:has(input:checked) { border-color: var(--teal-500); background: #f2fbfa; }
.member-option input { accent-color: var(--teal-600); }
.member-option .avatar { width: 32px; height: 32px; border-radius: 9px; font-size: .62rem; }
.member-option > span:last-child { display: grid; min-width: 0; }
.member-option strong, .member-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-option strong { font-size: .75rem; }
.member-option small { color: var(--muted); font-size: .62rem; }
.loading-inline { color: var(--muted); font-size: .78rem; }
.choice-card { display: grid; grid-template-columns: auto 38px minmax(0, 1fr); align-items: center; gap: .65rem; padding: .7rem; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--teal-500); background: #f2fbfa; }
.choice-card input { accent-color: var(--teal-600); }
.choice-card__icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: #fff; color: var(--teal-600); }
.choice-card__icon svg { width: 1rem; }
.choice-card > span:last-child { display: grid; }
.choice-card strong { font-size: .78rem; }
.choice-card small { margin-top: .12rem; color: var(--muted); font-size: .67rem; }
.single-poster { margin-top: .35rem; }

.toast-region { position: fixed; z-index: 100; right: 1.2rem; bottom: 1.2rem; display: grid; gap: .6rem; width: min(360px, calc(100vw - 2rem)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; border-radius: 13px; background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg); font-size: .8rem; animation: toast-in .2s ease both; }
.toast::before { content: ""; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--teal-400); }
.toast.is-error::before { background: #ff8a98; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

.offline-page { display: grid; min-height: 100vh; place-items: center; padding: 1.5rem; background: var(--surface-soft); }
.offline-card { width: min(100%, 480px); padding: 2.5rem; border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg); text-align: center; }
.offline-card img { margin-bottom: 1.25rem; border-radius: 18px; }
.offline-card h1 { margin: 0; color: var(--navy-900); font-size: 1.8rem; }
.offline-card p { margin: .9rem 0 1.5rem; color: var(--muted); line-height: 1.6; }

/* Align the PWA with the current CampusFlow operational webapp. */
.button { min-height: 40px; border-radius: 8px; font-size: .78rem; font-weight: 750; }
.button--primary { border-color: #0d7774; background: #0d7774; box-shadow: 0 5px 13px rgba(13,119,116,.18); }
.button--primary:hover { background: #096965; box-shadow: 0 8px 18px rgba(13,119,116,.2); }
.icon-button { width: 38px; height: 38px; border-radius: 8px; }
.icon-button:hover:not(:disabled) { background: rgba(36,211,197,.1); color: var(--teal-400); }
.icon-button--soft { width: 32px; height: 32px; background: rgba(255,255,255,.075); }
.field input, .field select { height: 43px; border-color: #cfdae2; border-radius: 9px; font-size: .78rem; }
.field input:focus, .field select:focus, .composer textarea:focus { border-color: #23a9a1; box-shadow: 0 0 0 3px rgba(36,211,197,.15); }
.avatar { border-radius: 9px; }
.eyebrow { font-size: .64rem; letter-spacing: .13em; }

.app-shell { grid-template-columns: 252px minmax(0,1fr); background: var(--surface-soft); }
.sidebar { border-right: 0; background: var(--navy-900); color: #fff; }
.sidebar__brand-row { min-height: 78px; padding: 14px 18px; border-color: rgba(255,255,255,.1); }
.sidebar .brand { color: #fff; gap: .7rem; }
.sidebar .brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: none; }
.sidebar .brand span { font-size: .96rem; letter-spacing: -.03em; }
.sidebar .brand small { color: #9eb3c2; font-size: .59rem; letter-spacing: .08em; }
.sidebar .sidebar-close { color: #b4c7d6; }
.sidebar .sidebar-close:hover { color: #fff; background: rgba(255,255,255,.075); }
.sidebar__context { margin: 12px 12px 3px; padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(255,255,255,.055); }
.sidebar__context strong { color: #fff; font-size: .76rem; }
.sidebar__context small { color: #8fa8ba; font-size: .62rem; }
.sidebar__context > svg { color: #6f8a9e; }
.family-context { margin: 8px 12px 0; padding: 11px; border: 1px solid rgba(36,211,197,.18); border-radius: 9px; background: rgba(36,211,197,.065); }
.family-context__heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: #d9e8ef; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.family-context__badge { padding: 3px 6px; border-radius: 999px; background: rgba(36,211,197,.14); color: var(--teal-400); font-size: .49rem; letter-spacing: .05em; }
.family-child { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.07); }
.family-child__avatar { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: rgba(255,255,255,.08); color: #fff; font-size: .57rem; font-weight: 800; }
.family-child__copy { display: grid; min-width: 0; }
.family-child__copy strong { overflow: hidden; color: #fff; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.family-child__copy small, .family-context > small { color: #86a3b5; font-size: .54rem; line-height: 1.4; }
.family-context > small { display: block; margin-top: 6px; }
.context-logo { width: 32px; height: 32px; border-radius: 7px; color: var(--navy-900); background: var(--teal-400); }
.sidebar__section-heading { padding: 22px 20px 7px; color: #7790a5; font-size: .61rem; letter-spacing: .13em; }
.sidebar__section-heading .icon-button { color: #83a7b5; }
.sidebar__section-heading .icon-button:hover { color: #fff; background: rgba(255,255,255,.075); }
.channel-list { padding: 0 12px 20px; scrollbar-color: #446077 transparent; }
.channel-item { grid-template-columns: 30px minmax(0,1fr) auto; min-height: 50px; gap: .55rem; padding: 7px 9px; border-radius: 8px; color: #b4c7d6; }
.channel-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.channel-item.is-active { color: #fff; background: rgba(255,255,255,.075); box-shadow: inset 3px 0 var(--teal-400); }
.channel-item.is-active::before { display: none; }
.channel-item__mark { width: 30px; height: 30px; border-radius: 7px; color: #83a7b5; background: rgba(255,255,255,.055); font-size: .8rem; }
.channel-item.is-active .channel-item__mark { color: var(--teal-400); background: rgba(36,211,197,.09); box-shadow: none; }
.channel-item__copy strong { font-size: .76rem; font-weight: 650; }
.channel-item__copy small { color: #7892a5; font-size: .62rem; }
.channel-item:hover .channel-item__copy small, .channel-item.is-active .channel-item__copy small { color: #98afbf; }
.unread-badge { min-width: 18px; height: 18px; background: var(--teal-600); font-size: .58rem; }
.read-lock { color: #6f899c; }
.channel-skeleton i, .channel-skeleton span { background: linear-gradient(90deg,rgba(255,255,255,.05) 25%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.05) 75%); background-size: 200% 100%; }
.channel-skeleton i { width: 30px; height: 30px; border-radius: 7px; }
.install-card { margin: 4px 12px 12px; padding: 9px; border-color: rgba(36,211,197,.16); border-radius: 9px; background: rgba(36,211,197,.07); color: #fff; }
.install-card__icon { width: 32px; height: 32px; border-radius: 7px; background: rgba(36,211,197,.16); color: var(--teal-400); }
.install-card strong { color: #fff; font-size: .7rem; }
.install-card small { color: #8fa8ba; font-size: .58rem; }
.notification-card { border-color: rgba(241,184,75,.18); background: rgba(241,184,75,.065); }
.notification-card .install-card__icon { color: #ffd77d; background: rgba(241,184,75,.13); }
.profile-card { padding: 13px 15px max(13px,env(safe-area-inset-bottom)); border-color: rgba(255,255,255,.1); background: rgba(0,0,0,.08); }
.profile-card .avatar { width: 34px; height: 34px; border-radius: 8px; }
.profile-card__text strong { color: #fff; font-size: .74rem; }
.profile-card__text small { color: var(--teal-400); font-size: .6rem; }
.profile-card .icon-button { color: #8ea6b7; }
.profile-card .icon-button:hover { color: #fff; background: rgba(255,255,255,.075); }

.chat-header { min-height: 68px; padding: 0 max(18px,calc((100% - 1320px)/2)); border-color: var(--line); background: #fff; backdrop-filter: none; }
.channel-mark { width: 38px; height: 38px; border-radius: 9px; background: #e8f5f5; color: var(--navy-800); font-size: .92rem; }
.chat-header h1 { font-size: .88rem; font-weight: 700; }
.chat-header p { font-size: .66rem; }
.permission-pill { border-radius: 7px; color: #177658; background: #e8f7ee; font-size: .56rem; }
.permission-pill.is-readonly { color: #96651b; background: #fff1d7; }
.connection-status { padding: 5px 8px; border-radius: 7px; color: #257d65; background: #e5f4ee; font-size: .6rem; }
.message-area { background: var(--surface-soft); }
.messages { width: min(100%,1060px); padding-top: 1.25rem; }
.day-divider { color: #8496a3; font-size: .59rem; letter-spacing: .07em; }
.message-row { gap: .55rem; margin-bottom: .85rem; }
.message-avatar { width: 32px; height: 32px; border-radius: 8px; }
.message-meta strong { color: var(--ink); font-size: .66rem; }
.message-meta time { font-size: .56rem; }
.message-bubble { padding: .68rem .82rem; border-color: var(--line); border-radius: 4px 10px 10px 10px; box-shadow: 0 2px 10px rgba(10,32,56,.02); color: #355166; font-size: .78rem; }
.message-row.is-own .message-bubble { border-color: #0d7774; border-radius: 10px 4px 10px 10px; background: #0d7774; }
.composer-shell { padding-top: .72rem; padding-bottom: max(.72rem,env(safe-area-inset-bottom)); border-color: var(--line); }
.composer { max-width: 930px; grid-template-columns: 38px minmax(0,1fr) 40px; padding: .34rem; border-color: #cfdae2; border-radius: 11px; box-shadow: 0 4px 15px rgba(10,32,56,.025); }
.composer__action, .send-button { width: 38px; height: 38px; border-radius: 8px; }
.composer textarea { min-height: 38px; padding: .55rem .35rem; font-size: .78rem; }
.send-button { background: #0d7774; }
.send-button:hover:not(:disabled) { background: #096965; }
.emoji-panel { border-radius: 10px; }
.readonly-banner { max-width: 930px; border-color: #ecd9a7; border-radius: 9px; font-size: .72rem; }

.info-panel { border-color: var(--line); box-shadow: -15px 0 45px rgba(10,32,56,.12); }
.info-panel__header h2 { font-size: 1.15rem; }
.info-channel__mark { width: 48px; height: 48px; border-radius: 10px; }
.info-channel h3 { font-size: .92rem; }
.info-channel > p { font-size: .72rem; }
.member-row { padding: .5rem; border-radius: 8px; background: var(--surface-soft); }
.member-row .avatar { border-radius: 8px; }
.member-right { border-radius: 7px; color: #257d65; background: #e5f4ee; }

.modal { border: 1px solid rgba(255,255,255,.15); border-radius: 18px; }
.modal__header { padding: 1.35rem 1.5rem 1rem; background: linear-gradient(135deg,#f7fbfc 0%,#edf7f7 100%); }
.modal__header h2 { font-size: 1.28rem; }
.modal__header p { font-size: .72rem; }
.modal__body { padding: 1.2rem 1.5rem; }
.modal__footer { padding: .85rem 1.5rem; }
.member-option, .choice-card { border-color: #d8e4e9; border-radius: 9px; background: #fbfdfe; }
.member-option:has(input:checked), .choice-card:has(input:checked) { border-color: #81c9c2; background: #f0faf8; box-shadow: 0 0 0 2px rgba(11,129,123,.08); }
.choice-card__icon { border-radius: 8px; color: #0b817b; background: #e1f4f1; }

.login-visual { background: radial-gradient(circle at 95% -20%,#1a5772 0,transparent 39%),var(--navy-900); }
.login-visual h1 { font-size: clamp(2.35rem,3.7vw,4.1rem); }
.login-panel { background: var(--surface-soft); }
.login-card { max-width: 470px; padding: 34px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 12px 36px rgba(10,32,56,.07); }
.login-card__heading h2 { font-size: clamp(1.65rem,2.7vw,2.2rem); }
.demo-account { border-radius: 9px; background: #fbfdfe; }
.demo-account:hover { border-color: #81c9c2; background: #f0faf8; }

@media (min-width: 1280px) {
    .app-shell:has(.info-panel.is-open) { grid-template-columns: 300px minmax(0, 1fr) 390px; }
    .app-shell:has(.info-panel.is-open) .info-panel { position: relative; grid-column: 3; grid-row: 1; width: 390px; box-shadow: none; transform: none; }
}

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-panel { min-height: 100vh; padding: 2.2rem 1.25rem; }
    .mobile-brand { display: block; }

    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 88vw); box-shadow: var(--shadow-lg); transform: translateX(-105%); transition: transform .22s ease; }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-close, .mobile-menu { display: inline-grid; }
    .sidebar-scrim { position: fixed; z-index: 25; inset: 0; border: 0; background: rgba(7, 29, 48, .5); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
    .sidebar.is-open + .sidebar-scrim { display: block; opacity: 1; pointer-events: auto; }
    .chat-header { min-height: 72px; }
}

@media (max-width: 600px) {
    .login-panel { place-items: start center; }
    .login-card { padding-top: 1rem; }
    .demo-account-grid { grid-template-columns: 1fr; }
    .demo-account:nth-child(n+4) { display: none; }

    .chat-header { gap: .55rem; padding: .65rem .75rem; }
    .channel-mark { display: none; }
    .chat-header__actions { gap: .15rem; }
    .connection-status span { display: none; }
    .connection-status { width: 28px; height: 28px; justify-content: center; padding: 0; }
    .chat-header p { max-width: 54vw; }
    .permission-pill { display: none; }
    #agenda-button { display: none; }
    .channel-tools { gap: .45rem; padding: .45rem .65rem; }
    .channel-tool { min-width: 0; flex: 1; grid-template-columns: 30px minmax(0,1fr) auto; gap: .45rem; padding: .42rem .5rem; }
    .channel-tool__icon { width: 29px; height: 29px; }
    .channel-tool strong { font-size: .65rem; }
    .channel-tool small { font-size: .52rem; }
    .messages { padding: 1.1rem .75rem 1.5rem; }
    .message-content { max-width: 82%; }
    .message-avatar { width: 31px; height: 31px; }
    .composer-shell { padding: .6rem .65rem max(.6rem, env(safe-area-inset-bottom)); }
    .composer { grid-template-columns: 38px minmax(0, 1fr) 40px; gap: .25rem; padding: .3rem; border-radius: 14px; }
    .composer__action, .send-button { width: 38px; height: 38px; }
    .composer textarea { min-height: 38px; padding: .55rem .3rem; }
    .readonly-banner { padding: .65rem .75rem; }
    .modal { width: 100%; max-width: none; max-height: 94dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
    .modal__card { max-height: 94dvh; }
    .modal__header, .modal__body, .modal__footer { padding-left: 1rem; padding-right: 1rem; }
    .member-picker { grid-template-columns: 1fr; }
    .toast-region { right: 1rem; bottom: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Install and Web Push settings */
.install-guide { gap: .8rem; }
.platform-guide { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfe; }
.platform-guide__mark { display: grid; width: 48px; height: 42px; place-items: center; border-radius: 8px; background: #e8f5f5; color: var(--teal-500); font-size: .64rem; font-weight: 850; }
.platform-guide h3 { margin: 1px 0 7px; color: var(--navy-900); font-size: .78rem; }
.platform-guide ol { display: grid; gap: 5px; margin: 0; padding-left: 18px; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.install-ready { padding: 12px 14px; border: 1px solid #bee6d5; border-radius: 9px; background: #e8f7ee; color: #257d65; font-size: .72rem; font-weight: 700; }
.install-health { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #d9e4e8; border-radius: 9px; background: #f8fafb; }
.install-health__dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 999px; background: #d49b31; box-shadow: 0 0 0 4px rgba(212,155,49,.13); }
.install-health > span:last-child { display: grid; }
.install-health strong { color: var(--navy-900); font-size: .68rem; }
.install-health small { margin-top: 2px; color: var(--muted); font-size: .59rem; line-height: 1.4; }
.install-health.is-ready { border-color: #bee6d5; background: #eff9f4; }
.install-health.is-ready .install-health__dot { background: #2e9a70; box-shadow: 0 0 0 4px rgba(46,154,112,.13); }
.install-health.is-error { border-color: #efc8cd; background: #fff4f5; }
.install-health.is-error .install-health__dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(189,59,74,.12); }

.notification-settings { align-content: start; }
.notification-state { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfe; }
.notification-state.is-active { border-color: #bee6d5; background: #eef9f4; }
.notification-state__icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--surface-blue); color: var(--teal-500); }
.notification-state.is-active .notification-state__icon { color: #257d65; background: #d8f1e7; }
.notification-state > span:last-child { display: grid; min-width: 0; }
.notification-state strong { color: var(--navy-900); font-size: .75rem; }
.notification-state small { margin-top: 3px; color: var(--muted); font-size: .64rem; line-height: 1.4; }
.ios-push-note { padding: 13px; border: 1px solid #ecd9a7; border-radius: 10px; background: #fff9e9; }
.ios-push-note strong { color: #7d591c; font-size: .72rem; }
.ios-push-note p { margin: 5px 0 8px; color: #806d49; font-size: .65rem; line-height: 1.45; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--teal-500); font-size: .66rem; font-weight: 800; cursor: pointer; }
.notification-channel-list { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.notification-channel { display: flex; min-height: 54px; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid #e9eff2; background: #fff; cursor: pointer; }
.notification-channel:last-child { border-bottom: 0; }
.notification-channel > span { display: grid; min-width: 0; flex: 1; }
.notification-channel strong { overflow: hidden; color: var(--ink); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.notification-channel small { margin-top: 2px; color: var(--muted); font-size: .6rem; }
.notification-channel input { position: relative; width: 38px; height: 22px; flex: 0 0 auto; margin: 0; appearance: none; border-radius: 999px; background: #cbd7dd; cursor: pointer; transition: background .16s ease; }
.notification-channel input::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(10,32,56,.2); content: ''; transition: transform .16s ease; }
.notification-channel input:checked { background: var(--teal-500); }
.notification-channel input:checked::after { transform: translateX(16px); }
.notification-channel input:disabled { cursor: wait; opacity: .6; }
.notification-footer { flex-wrap: wrap; }

@media (max-width: 600px) {
    .platform-guide { grid-template-columns: 40px minmax(0,1fr); padding: 12px; }
    .platform-guide__mark { width: 40px; height: 38px; }
    .notification-footer .button { flex: 1 1 auto; }
}

/* Management portal and invite registration */
.register-login-link { margin: 1.25rem 0 0; color: var(--muted); font-size: .78rem; text-align: center; }
.register-login-link a { color: var(--teal-500); font-weight: 700; }

.management-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin: auto 12px 10px;
    padding: 10px;
    border: 1px solid rgba(36,211,197,.22);
    border-radius: 9px;
    background: rgba(36,211,197,.08);
    color: #fff;
    text-decoration: none;
}
.management-link > span:first-child { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: rgba(36,211,197,.14); color: var(--teal-400); }
.management-link > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.management-link strong { font-size: .7rem; }
.management-link small { overflow: hidden; margin-top: .1rem; color: #8fa8ba; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.management-link > svg { width: 15px; color: #6f8a9e; }
.management-link:hover { background: rgba(36,211,197,.13); }

.admin-page { min-height: 100vh; background: var(--surface-soft); }
.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 240px minmax(0,1fr); }
.admin-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; background: var(--navy-900); color: #fff; }
.admin-brand { min-height: 70px; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.09); text-decoration: none; }
.admin-school { display: flex; align-items: center; gap: .65rem; margin: 14px 12px 8px; padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 9px; background: rgba(255,255,255,.05); }
.admin-school > span:last-child { display: grid; min-width: 0; }
.admin-school strong { font-size: .72rem; }
.admin-school small { margin-top: 2px; color: #8fa8ba; font-size: .6rem; }
.admin-nav { display: grid; gap: 3px; padding: 16px 12px; }
.admin-nav button { display: flex; align-items: center; gap: .7rem; min-height: 40px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: #a9bdcb; font-size: .72rem; font-weight: 650; text-align: left; cursor: pointer; }
.admin-nav button span { display: grid; width: 20px; place-items: center; color: #7893a7; font-size: .9rem; }
.admin-nav button:hover { background: rgba(255,255,255,.055); color: #fff; }
.admin-nav button.is-active { box-shadow: inset 3px 0 var(--teal-400); background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar__footer { display: grid; gap: 14px; margin-top: auto; padding: 14px; border-top: 1px solid rgba(255,255,255,.09); }
.admin-sidebar__footer > a { color: #94adbe; font-size: .66rem; font-weight: 650; text-decoration: none; }
.admin-profile { display: flex; align-items: center; gap: .65rem; }
.admin-profile > span:last-child { display: grid; min-width: 0; }
.admin-profile strong { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-profile small { color: #8fa8ba; font-size: .57rem; }

.admin-main { min-width: 0; }
.admin-topbar { position: sticky; z-index: 12; top: 0; display: flex; min-height: 70px; align-items: center; justify-content: space-between; padding: 10px clamp(20px,4vw,54px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.admin-topbar .eyebrow { margin: 0 0 2px; font-size: .58rem; letter-spacing: .11em; }
.admin-topbar h1 { margin: 0; color: var(--navy-900); font-size: 1.05rem; }
.admin-topbar__actions { display: flex; align-items: center; gap: 12px; }
.admin-topbar .button, .section-heading .button { min-height: 38px; border-radius: 7px; font-size: .7rem; }
.admin-mobile-nav { display: none; }
.admin-content { width: min(1440px,100%); margin: 0 auto; padding: 30px clamp(20px,4vw,54px) 54px; }
.admin-section { display: none; }
.admin-section.is-active { display: block; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading h2, .admin-card h2 { margin: 0; color: var(--navy-900); font-size: 1rem; }
.section-heading p, .admin-card__header p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; }

.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card, .admin-card, .channel-admin-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.stat-card { display: grid; gap: 4px; padding: 18px; }
.stat-card span { color: var(--muted); font-size: .66rem; font-weight: 700; }
.stat-card strong { color: var(--navy-900); font-size: 1.7rem; line-height: 1.15; }
.stat-card small { color: #8a9aa8; font-size: .6rem; }
.admin-grid { display: grid; gap: 16px; }
.admin-grid--two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.admin-card__header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.text-button { padding: 3px 5px; border: 0; background: transparent; color: var(--teal-500); font-size: .65rem; font-weight: 750; cursor: pointer; }
.text-button--danger { color: var(--danger); }
.compact-list { padding: 5px 18px; }
.compact-row { display: flex; min-height: 62px; align-items: center; gap: 10px; border-bottom: 1px solid #edf2f5; }
.compact-row:last-child { border-bottom: 0; }
.compact-row > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.compact-row strong { overflow: hidden; color: var(--ink); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.compact-row small { color: var(--muted); font-size: .6rem; }
.admin-count { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 999px; background: var(--surface-blue); color: var(--teal-500); font-size: .6rem; font-weight: 800; }
.channel-admin-mark { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #e8f5f5; color: var(--teal-500); font-size: .8rem; font-weight: 850; }

.admin-table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8fafb; color: #718493; font-size: .59rem; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid #edf2f5; color: var(--ink); font-size: .67rem; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.align-right { text-align: right !important; }
.table-actions { white-space: nowrap; }
.person-cell { display: flex; min-width: 190px; align-items: center; gap: 9px; }
.person-cell > span:last-child { display: grid; min-width: 0; }
.person-cell strong { font-size: .7rem; }
.person-cell small { color: var(--muted); font-size: .59rem; }
.table-select { min-width: 128px; padding: 7px 28px 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: .64rem; }
.button--small { min-height: 32px; padding: .4rem .7rem; border-radius: 7px; font-size: .62rem; }
.button--danger { border-color: #f0cfd3; background: #fff5f6; color: var(--danger); }
.admin-status { display: inline-flex; min-height: 22px; align-items: center; padding: 0 8px; border-radius: 999px; background: #edf2f4; color: var(--muted); font-size: .57rem; font-weight: 750; }
.admin-status--active, .admin-status--accepted { background: #e4f6ef; color: #218361; }
.admin-status--pending { background: #fff5dc; color: #9b6a10; }
.admin-status--expired, .admin-status--revoked, .admin-status--suspended, .admin-status--archived { background: #fff0f1; color: var(--danger); }
.admin-empty, .admin-loading { padding: 24px; color: var(--muted); font-size: .7rem; text-align: center; }
.audit-details { max-width: 360px; color: var(--muted) !important; }

.channel-admin-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.channel-admin-card { display: grid; min-height: 210px; padding: 17px; }
.channel-admin-card.is-archived { opacity: .68; }
.channel-admin-card header { display: flex; align-items: center; gap: 10px; }
.channel-admin-card header > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.channel-admin-card header strong { font-size: .75rem; }
.channel-admin-card header small { color: var(--muted); font-size: .6rem; }
.channel-admin-card > p { margin: 15px 0; color: var(--muted); font-size: .68rem; line-height: 1.55; }
.channel-admin-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: #7f909e; font-size: .58rem; }
.channel-admin-card footer { display: flex; align-items: flex-end; gap: 7px; margin-top: auto; padding-top: 15px; }

.admin-modal { width: min(620px,calc(100% - 24px)); }
.admin-form-grid { display: grid; gap: 16px; }
.admin-check-list, .admin-member-list { display: grid; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.admin-check-list label, .admin-member-row { display: flex; min-height: 54px; align-items: center; gap: 10px; padding: 8px 11px; border-bottom: 1px solid #edf2f5; cursor: pointer; }
.admin-check-list label:last-child, .admin-member-row:last-child { border-bottom: 0; }
.admin-check-list label > span, .admin-member-row > span:nth-child(3) { display: grid; min-width: 0; flex: 1; }
.admin-check-list strong, .admin-member-row strong { font-size: .68rem; }
.admin-check-list small, .admin-member-row small { color: var(--muted); font-size: .58rem; }
.write-toggle { display: flex !important; flex: 0 0 auto !important; align-items: center; gap: 5px; }
.copy-field { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.copy-field input { min-width: 0; }
.link-modal { width: min(650px,calc(100% - 24px)); }

@media (max-width: 1080px) {
    .channel-admin-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
    .admin-shell { display: block; }
    .admin-sidebar { position: static; display: none; }
    .admin-topbar { position: static; padding: 12px 16px; }
    .admin-topbar__actions .connection-status { display: none; }
    .admin-mobile-nav { display: flex; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fff; }
    .admin-mobile-nav button { flex: 0 0 auto; padding: 8px 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: .64rem; font-weight: 700; }
    .admin-mobile-nav button.is-active { border-color: var(--teal-500); color: var(--teal-500); }
    .admin-content { padding: 20px 14px 42px; }
    .admin-grid--two, .channel-admin-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .stat-card { padding: 14px; }
    .stat-card strong { font-size: 1.35rem; }
    .admin-topbar .button { padding: .5rem .65rem; }
    .section-heading { display: grid; }
    .section-heading .button { width: 100%; }
}

/* Polls and deliberately small-scale group file sharing */
.composer { grid-template-columns: auto minmax(0,1fr) 40px; }
.composer__tools { display: flex; align-items: center; }
.composer__tools .composer__action { width: 34px; height: 38px; }
.composer-preview { display: flex; grid-column: 1 / -1; align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f8fbfc; }
.composer-preview > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.composer-preview strong { overflow: hidden; color: var(--ink); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.composer-preview small { color: var(--muted); font-size: .58rem; }
.attachment-preview__mark { display: grid; min-width: 34px; height: 30px; place-items: center; border-radius: 6px; background: var(--surface-blue); color: var(--teal-500); font-size: .52rem; font-weight: 850; }
.attachment-preview__remove { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 1.15rem; cursor: pointer; }
.attachment-preview__remove:hover { background: var(--danger-soft); color: var(--danger); }

.message-attachment { display: flex; max-width: min(430px,100%); align-items: center; gap: 10px; margin-top: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 2px 8px rgba(10,32,56,.035); }
.message-content.has-rich-content { width: min(440px,82%); }
.message-attachment:hover { border-color: #b8d8d7; }
.message-attachment > span:nth-child(2) { display: grid; min-width: 0; flex: 1; }
.message-attachment strong { overflow: hidden; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.message-attachment small { color: var(--muted); font-size: .58rem; }
.attachment-file-mark { display: grid; width: 40px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: #e8f5f5; color: var(--teal-500); font-size: .53rem; font-weight: 850; }
.message-attachment.is-image { display: block; overflow: hidden; padding: 0; }
.message-attachment.is-image img { display: block; width: 100%; max-height: 310px; object-fit: cover; background: #edf2f5; }
.attachment-caption { display: grid; padding: 9px 11px; }

.poll-card { width: min(440px,100%); margin-top: 7px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 2px 9px rgba(10,32,56,.035); }
.poll-card__heading { margin-bottom: 11px; }
.poll-card__heading h3 { margin: 4px 0; color: var(--navy-900); font-size: .78rem; line-height: 1.35; }
.poll-card__heading p { margin: 0; color: var(--muted); font-size: .57rem; }
.poll-label { color: var(--teal-500); font-size: .55rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.poll-options { display: grid; gap: 6px; }
.poll-option { position: relative; isolation: isolate; display: grid; min-height: 38px; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 7px; overflow: hidden; padding: 7px 10px; border: 1px solid #dbe5ea; border-radius: 7px; background: #fff; color: var(--ink); font-size: .64rem; text-align: left; cursor: pointer; }
.poll-option::before { position: absolute; z-index: -1; inset: 0 auto 0 0; width: var(--poll-progress); background: #e4f6f3; content: ''; transition: width .2s ease; }
.poll-option:hover:not(:disabled), .poll-option.is-selected { border-color: var(--teal-500); }
.poll-option:disabled { cursor: default; }
.poll-option__choice { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid #b7c7d1; border-radius: 999px; background: #fff; color: #fff; font-size: .55rem; font-weight: 900; }
.poll-option.is-selected .poll-option__choice { border-color: var(--teal-500); background: var(--teal-500); }
.poll-option__label { overflow-wrap: anywhere; }
.poll-option > strong { color: var(--teal-500); font-size: .62rem; }
.poll-closes { display: block; margin-top: 9px; color: var(--muted); font-size: .56rem; }

.poll-option-editor { display: grid; gap: 7px; margin-top: 10px; }
.poll-option-edit-row { display: grid; grid-template-columns: minmax(0,1fr) 34px; gap: 6px; }
.poll-option-edit-row input { width: 100%; padding: .66rem .75rem; border: 1px solid var(--line); border-radius: 8px; outline: 0; }
.poll-option-edit-row button { border: 0; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 1rem; cursor: pointer; }
.poll-add-option { margin-top: 8px; }
.toggle-field { display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; }
.toggle-field > span { display: grid; }
.toggle-field strong { color: var(--ink); font-size: .68rem; }
.toggle-field small { margin-top: 2px; color: var(--muted); font-size: .59rem; }

@media (max-width: 600px) {
    .composer { grid-template-columns: auto minmax(0,1fr) 40px; }
    .composer__tools .composer__action { width: 30px; }
    .message-attachment, .poll-card { max-width: 100%; }
    .message-attachment.is-image img { max-height: 240px; }
}

/* Channel-native checklists and agenda */
.field textarea { width: 100%; resize: vertical; padding: .72rem .78rem; border: 1px solid #cfdae2; border-radius: 9px; outline: 0; color: var(--ink); font: inherit; font-size: .78rem; line-height: 1.45; }
.field textarea:focus { border-color: #23a9a1; box-shadow: 0 0 0 3px rgba(36,211,197,.15); }
.checklist-card, .agenda-card { width: min(440px,100%); margin-top: 7px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 2px 9px rgba(10,32,56,.035); }
.checklist-card__heading, .agenda-card__copy { min-width: 0; }
.checklist-card__heading { margin-bottom: 11px; }
.checklist-card__heading h3, .agenda-card h3 { margin: 4px 0; color: var(--navy-900); font-size: .78rem; line-height: 1.35; }
.checklist-card__heading p { margin: 0; color: var(--muted); font-size: .57rem; }
.checklist-label, .agenda-label { color: var(--teal-500); font-size: .55rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.checklist-items { display: grid; gap: 7px; }
.checklist-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding: 9px; border: 1px solid #dbe5ea; border-radius: 8px; background: #fbfdfe; }
.checklist-item.is-completed { border-color: #b9ddd8; background: #f2fbf9; }
.checklist-item__copy { display: grid; align-content: center; min-width: 0; }
.checklist-item__copy strong { color: var(--ink); font-size: .64rem; line-height: 1.35; overflow-wrap: anywhere; }
.checklist-item.is-completed .checklist-item__copy strong { color: #52706f; text-decoration: line-through; }
.checklist-item__copy small { margin-top: 2px; color: var(--muted); font-size: .54rem; }
.checklist-item__actions { display: flex; align-items: center; gap: 5px; }
.checklist-action { min-height: 28px; padding: 5px 7px; border: 1px solid #d5e0e5; border-radius: 6px; background: #fff; color: #5f737e; font-size: .54rem; font-weight: 750; cursor: pointer; }
.checklist-action:hover:not(:disabled), .checklist-action.is-active { border-color: #63bbb4; background: #eaf8f6; color: #08736d; }
.checklist-action--complete.is-active { border-color: #0b817b; background: #0b817b; color: #fff; }
.checklist-action:disabled { cursor: default; opacity: .65; }
.checklist-item-editor { display: grid; gap: 7px; margin-top: 10px; }
.checklist-item-edit-row { display: grid; grid-template-columns: minmax(0,1fr) 34px; gap: 6px; }
.checklist-item-edit-row input { width: 100%; padding: .66rem .75rem; border: 1px solid var(--line); border-radius: 8px; outline: 0; }
.checklist-item-edit-row button { border: 0; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 1rem; cursor: pointer; }
.checklist-add-item { margin-top: 8px; }
.checklist-overview-modal { width: min(640px,calc(100% - 2rem)); }
.checklist-overview-list { align-content: start; }
.checklist-overview-list .checklist-card { width: 100%; margin-top: 0; }

.agenda-card { display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: start; gap: 11px; border-left: 4px solid var(--teal-500); }
.agenda-card__date, .agenda-list-card__date { display: grid; place-items: center; align-content: center; min-height: 48px; border-radius: 8px; background: #e8f6f4; color: var(--teal-600); text-transform: uppercase; }
.agenda-card__date strong, .agenda-list-card__date strong { font-size: 1rem; line-height: 1; }
.agenda-card__date small, .agenda-list-card__date small { margin-top: 3px; font-size: .52rem; font-weight: 850; }
.agenda-timing { margin: 0; color: #516a77; font-size: .59rem; font-weight: 700; }
.agenda-description { margin: 6px 0 0; color: var(--muted); font-size: .61rem; line-height: 1.45; white-space: pre-wrap; }
.agenda-modal { width: min(760px,calc(100% - 2rem)); }
.agenda-modal__body { gap: 1.5rem; }
.agenda-overview, .agenda-create { display: grid; gap: 10px; }
.agenda-create { padding-top: 1.2rem; border-top: 1px solid var(--line); }
.agenda-section-heading h3 { margin: 3px 0 0; color: var(--navy-900); font-size: 1rem; }
.agenda-section-heading--actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.button--small { min-height: 34px; padding: .45rem .7rem; font-size: .62rem; }
.agenda-view-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: #edf3f5; }
.agenda-view-tab { min-height: 36px; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; color: #657a85; font-size: .65rem; font-weight: 800; cursor: pointer; }
.agenda-view-tab.is-active { background: #fff; color: var(--navy-900); box-shadow: 0 1px 4px rgba(10,32,56,.1); }
.agenda-focus-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 8px; color: var(--muted); }
.agenda-focus-note strong { color: var(--teal-600); font-size: .65rem; }
.agenda-focus-note span { font-size: .56rem; text-align: right; }
.agenda-event-list { display: grid; gap: 8px; }
.agenda-focus-item { display: grid; grid-template-columns: 23px minmax(0,1fr); align-items: center; gap: 7px; }
.agenda-focus-rank { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 999px; background: var(--navy-900); color: #fff; font-size: .55rem; font-weight: 850; }
.agenda-focus-item .agenda-list-card { width: 100%; }
.agenda-list-group { display: grid; gap: 8px; }
.agenda-list-group + .agenda-list-group { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.agenda-list-group__heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--navy-800); }
.agenda-list-group__heading strong { font-size: .68rem; }
.agenda-list-group__heading span { display: grid; min-width: 21px; height: 21px; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--surface-blue); color: var(--navy-700); font-size: .55rem; font-weight: 850; }
.agenda-list-card { display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfe; }
.agenda-list-card:has(.agenda-label:first-child) { border-color: var(--line); }
.agenda-list-card__copy { min-width: 0; }
.agenda-list-card__copy h3 { margin: 3px 0; color: var(--navy-900); font-size: .76rem; }
.agenda-creator { display: block; margin-top: 5px; color: var(--muted); font-size: .55rem; }
.agenda-empty { padding: 1rem; border: 1px dashed #cbdbe2; border-radius: 10px; background: #fbfdfe; text-align: center; }
.agenda-empty strong { color: var(--ink); font-size: .75rem; }
.agenda-empty p { margin: 4px 0 0; color: var(--muted); font-size: .64rem; }
.agenda-visibility { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; }
.choice-card--compact { grid-template-columns: auto minmax(0,1fr); }
.agenda-date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.agenda-calendar-panel { display: grid; gap: 8px; }
.agenda-calendar-panel[hidden] { display: none; }
.calendar-toolbar { display: grid; grid-template-columns: 36px minmax(0,1fr) 36px; align-items: center; gap: 8px; }
.calendar-toolbar strong { color: var(--navy-900); font-size: .78rem; text-align: center; text-transform: capitalize; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; }
.calendar-weekdays span { padding: 4px 0; color: #84959e; font-size: .52rem; font-weight: 850; text-align: center; text-transform: uppercase; }
.calendar-day { display: grid; min-width: 0; min-height: 48px; place-items: center; align-content: center; gap: 5px; padding: 4px 2px; border: 1px solid #e0e8eb; border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
.calendar-day:hover, .calendar-day.is-selected { border-color: var(--teal-500); background: #edf9f7; }
.calendar-day.is-today .calendar-day__number { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 999px; background: var(--navy-900); color: #fff; }
.calendar-day.is-outside { opacity: .38; }
.calendar-day__number { font-size: .62rem; font-weight: 800; }
.calendar-day__markers { display: flex; min-height: 6px; align-items: center; justify-content: center; gap: 3px; }
.calendar-day__markers i { width: 5px; height: 5px; border-radius: 999px; background: var(--teal-500); }
.calendar-day__markers i.is-personal { background: #efa94a; }
.calendar-day__markers small { color: var(--muted); font-size: .45rem; }
.calendar-day-events { display: grid; gap: 8px; margin-top: 5px; padding-top: 12px; border-top: 1px solid var(--line); }
.calendar-day-events__heading { color: var(--navy-800); text-transform: capitalize; }
.calendar-day-events__heading strong { font-size: .68rem; }
.calendar-day-empty { margin: 0; padding: 10px; border-radius: 8px; background: #f7fafb; color: var(--muted); font-size: .62rem; text-align: center; }

.meeting-card { width: min(440px,100%); margin-top: 7px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid #e4ad48; border-radius: 10px; background: #fff; box-shadow: 0 2px 9px rgba(10,32,56,.035); }
.meeting-card__heading { margin-bottom: 12px; }
.meeting-label { color: #a66b08; font-size: .55rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.meeting-card__heading h3 { margin: 4px 0; color: var(--navy-900); font-size: .8rem; }
.meeting-card__heading p { margin: 0; color: var(--muted); font-size: .6rem; line-height: 1.45; }
.meeting-day + .meeting-day { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.meeting-day__title { display: block; margin-bottom: 6px; color: var(--navy-800); font-size: .61rem; text-transform: capitalize; }
.meeting-slots { display: grid; gap: 6px; }
.meeting-slot { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid #dce5e9; border-radius: 8px; background: #fbfdfe; }
.meeting-slot.is-attending { border-color: #d9b365; background: #fff9eb; }
.meeting-slot__copy { display: grid; min-width: 0; }
.meeting-slot__copy strong { color: var(--navy-900); font-size: .7rem; }
.meeting-slot__copy small { margin-top: 2px; color: var(--muted); font-size: .54rem; overflow-wrap: anywhere; }
.meeting-attendance { min-height: 30px; padding: 5px 8px; border: 1px solid #d8e1e5; border-radius: 7px; background: #fff; color: #667c87; font-size: .54rem; font-weight: 800; cursor: pointer; }
.meeting-attendance.is-active { border-color: #c58a20; background: #e4ad48; color: #2f260f; }
.meeting-slot-editor { display: grid; gap: 7px; margin: 10px 0 8px; }
.meeting-slot-edit-row { display: grid; grid-template-columns: minmax(0,1fr) 34px; gap: 6px; }
.meeting-slot-edit-row input { width: 100%; height: 42px; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; outline: 0; }
.meeting-slot-edit-row button { border: 0; border-radius: 7px; background: var(--surface-soft); color: var(--muted); font-size: 1rem; cursor: pointer; }
.meeting-editor-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

.login-summary-modal { width: min(620px,calc(100% - 2rem)); }
.login-summary { align-content: start; gap: 10px; }
.login-summary-hero { display: grid; padding: 14px; border-radius: 11px; background: linear-gradient(135deg,#0a2038,#164563); color: #fff; }
.login-summary-hero.is-clear { background: linear-gradient(135deg,#0b817b,#19a89f); }
.login-summary-hero strong { font-size: .9rem; }
.login-summary-hero span { margin-top: 3px; color: rgba(255,255,255,.78); font-size: .62rem; }
.login-summary-section { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.login-summary-section__heading { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; background: #f5f8f9; }
.login-summary-section__heading strong { color: var(--navy-800); font-size: .66rem; }
.login-summary-section__heading span { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--navy-900); color: #fff; font-size: .54rem; font-weight: 850; }
.login-summary-list { display: grid; }
.login-summary-row { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border: 0; border-top: 1px solid #edf1f3; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.login-summary-row:first-child { border-top: 0; }
.login-summary-row:hover { background: #f3fbfa; }
.login-summary-row > span:first-child { display: grid; min-width: 0; }
.login-summary-row strong { overflow: hidden; font-size: .64rem; text-overflow: ellipsis; white-space: nowrap; }
.login-summary-row small { margin-top: 2px; color: var(--muted); font-size: .55rem; }
.login-summary-row__arrow { color: var(--teal-500); font-size: 1rem; }
.login-summary-empty { margin: 0; padding: 10px 11px; color: var(--muted); font-size: .59rem; }

@media (max-width: 600px) {
    .message-attachment, .poll-card, .checklist-card, .agenda-card { max-width: 100%; }
    .meeting-card { max-width: 100%; }
    .checklist-item { grid-template-columns: 1fr; }
    .checklist-item__actions { justify-content: stretch; }
    .checklist-action { flex: 1; }
    .agenda-modal { width: 100%; }
    .checklist-overview-modal { width: 100%; }
    .agenda-visibility, .agenda-date-grid { grid-template-columns: 1fr; }
    .agenda-focus-note span { display: none; }
    .agenda-focus-item { grid-template-columns: 20px minmax(0,1fr); gap: 5px; }
    .agenda-focus-rank { width: 20px; height: 20px; }
    .calendar-weekdays, .calendar-grid { gap: 3px; }
    .calendar-day { min-height: 41px; border-radius: 7px; }
    .agenda-section-heading--actions { align-items: flex-start; }
    .agenda-section-heading--actions .button { max-width: 48%; }
    .meeting-slot { grid-template-columns: 1fr; }
    .meeting-attendance { width: 100%; }
    .login-summary-modal { width: 100%; }
}
