/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"Plus_Jakarta_Sans","arguments":[{"subsets":["latin"],"display":"swap","variable":"--font-jakarta","weight":["400","500","600","700","800"]}],"variableName":"jakarta"} ***!
  \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/6fe53d21e6e7ebd8-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/8ebc6e9dde468c4a-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/9e7b0a821b9dfcb4-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/636a5ac981f94f8b-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/6fe53d21e6e7ebd8-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/8ebc6e9dde468c4a-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/9e7b0a821b9dfcb4-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/636a5ac981f94f8b-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/6fe53d21e6e7ebd8-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/8ebc6e9dde468c4a-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/9e7b0a821b9dfcb4-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/636a5ac981f94f8b-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/6fe53d21e6e7ebd8-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/8ebc6e9dde468c4a-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/9e7b0a821b9dfcb4-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/636a5ac981f94f8b-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/_next/static/media/6fe53d21e6e7ebd8-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/_next/static/media/8ebc6e9dde468c4a-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/_next/static/media/9e7b0a821b9dfcb4-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/_next/static/media/636a5ac981f94f8b-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Plus Jakarta Sans Fallback';src: local("Arial");ascent-override: 98.88%;descent-override: 21.15%;line-gap-override: 0.00%;size-adjust: 104.98%
}.__className_64a611 {font-family: 'Plus Jakarta Sans', 'Plus Jakarta Sans Fallback';font-style: normal
}.__variable_64a611 {--font-jakarta: 'Plus Jakarta Sans', 'Plus Jakarta Sans Fallback'
}

/*!*******************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/design/tokens.css ***!
  \*******************************************************************************************************************************************************************************************************************************************************************/
/* AUTO-GENERATED from design/tokens.json — do not edit by hand. */
/* Regenerate: node design/build-tokens.mjs */
:root {
  --color-accent-parent: #C24D05;
  --color-accent-student: #3A45E8;
  --color-accent-teacher: #0B8374;
  --color-border-default: #D3D8E4;
  --color-border-focus: #6B80FF;
  --color-border-strong: #B4BBCB;
  --color-border-subtle: #E4E7EF;
  --color-bubble-incoming: #FFFFFF;
  --color-bubble-outgoing-default: #3A45E8;
  --color-bubble-outgoing-parent: #C24D05;
  --color-bubble-outgoing-teacher: #0B8374;
  --color-chat-dot-color: rgba(70, 80, 110, 0.07);
  --color-chat-hover-bg: rgba(15, 23, 40, 0.04);
  --color-chat-selected-bg: rgba(58, 69, 232, 0.08);
  --color-chat-selected-border: rgba(58, 69, 232, 0.22);
  --color-role-parent-100: #FFE6CC;
  --color-role-parent-200: #FFC894;
  --color-role-parent-300: #FFA552;
  --color-role-parent-400: #F9821F;
  --color-role-parent-50: #FFF4E8;
  --color-role-parent-500: #E9640A;
  --color-role-parent-600: #C24D05;
  --color-role-parent-700: #993B07;
  --color-role-parent-800: #7B300B;
  --color-role-parent-900: #65290C;
  --color-role-student-100: #DDE3FF;
  --color-role-student-200: #BCC7FF;
  --color-role-student-300: #93A4FF;
  --color-role-student-400: #6B80FF;
  --color-role-student-50: #EEF1FF;
  --color-role-student-500: #4A5DFB;
  --color-role-student-600: #3A45E8;
  --color-role-student-700: #2F37C4;
  --color-role-student-800: #2A319B;
  --color-role-student-900: #262E79;
  --color-role-teacher-100: #C6F5EB;
  --color-role-teacher-200: #8DE9D9;
  --color-role-teacher-300: #4FD8C3;
  --color-role-teacher-400: #22BFA8;
  --color-role-teacher-50: #E6FBF7;
  --color-role-teacher-500: #0FA38E;
  --color-role-teacher-600: #0B8374;
  --color-role-teacher-700: #0C685D;
  --color-role-teacher-800: #0D524B;
  --color-role-teacher-900: #0D443E;
  --color-state-danger: #C42B31;
  --color-state-live-bg: #E42B34;
  --color-state-live-fg: #FFFFFF;
  --color-state-read-only-bg: #F1F3F8;
  --color-state-read-only-fg: #6B7385;
  --color-state-recording-bg: #D42A33;
  --color-state-recording-fg: #FFFFFF;
  --color-state-success: #12855F;
  --color-state-warning: #B36A00;
  --color-surface-base: #E8ECF4;
  --color-surface-canvas: #F4F6FB;
  --color-surface-inverse: #0F1728;
  --color-surface-overlay: rgba(15, 23, 40, 0.52);
  --color-surface-raised: #FFFFFF;
  --color-surface-shell: #0F1728;
  --color-surface-shell-muted: #1A2438;
  --color-surface-sunken: #F1F3F9;
  --color-text-danger: #C42B31;
  --color-text-inverse: #FFFFFF;
  --color-text-link: #3A45E8;
  --color-text-on-role: #FFFFFF;
  --color-text-on-shell: #E8ECF4;
  --color-text-on-shell-muted: #9AA6BC;
  --color-text-primary: #0F1728;
  --color-text-secondary: #4A5568;
  --color-text-tertiary: #7A8499;
  --font-family-family-name: Plus Jakarta Sans;
  --font-family-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-letter-spacing-normal: 0;
  --font-letter-spacing-tight: -0.02em;
  --font-letter-spacing-wide: 0.02em;
  --font-line-height-normal: 1.55;
  --font-line-height-snug: 1.4;
  --font-line-height-tight: 1.25;
  --font-size-2xl: 26px;
  --font-size-3xl: 32px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-md: 13px;
  --font-size-sm: 12px;
  --font-size-xl: 20px;
  --font-size-xs: 11px;
  --font-weight-bold: 700;
  --font-weight-medium: 500;
  --font-weight-regular: 400;
  --font-weight-semibold: 600;
  --layout-breakpoint-desktop: 1024px;
  --layout-breakpoint-tablet: 768px;
  --layout-composer-min-height: 44px;
  --layout-content-max-width: 1440px;
  --layout-detail-pane-max-width: 760px;
  --layout-frame-mobile: 390px;
  --layout-frame-mobile-height: 844px;
  --layout-list-pane-width: 380px;
  --layout-shell-max-width: 1280px;
  --layout-shell-radius: 20px;
  --layout-tab-bar-height: 56px;
  --meta-description: Role-based accents: student indigo, teacher teal, parent orange. Plus Jakarta Sans.;
  --meta-name: school-chat;
  --meta-version: 1;
  --motion-duration-base: 200ms;
  --motion-duration-fast: 120ms;
  --motion-duration-slow: 320ms;
  --motion-easing-accelerate: cubic-bezier(0.3, 0, 1, 1);
  --motion-easing-decelerate: cubic-bezier(0, 0, 0, 1);
  --motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
  --radius-bubble: 18px;
  --radius-bubble-tail: 8px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --radius-sm: 8px;
  --radius-xl: 20px;
  --radius-xs: 4px;
  --shadow-avatar: 0px 2px 8px -2px rgba(15, 23, 40, 0.18);
  --shadow-card: 0px 1px 2px 0px rgba(15, 23, 40, 0.04), 0px 10px 28px -10px rgba(15, 23, 40, 0.10);
  --shadow-focus-ring: 0px 0px 0px 3px rgba(74, 93, 251, 0.40);
  --shadow-live-now: 0px 4px 16px -4px rgba(228, 43, 52, 0.35);
  --shadow-raised: 0px 2px 6px 0px rgba(15, 23, 40, 0.06), 0px 20px 48px -14px rgba(15, 23, 40, 0.16);
  --shadow-shell: 0px 4px 8px 0px rgba(15, 23, 40, 0.06), 0px 32px 64px -16px rgba(15, 23, 40, 0.22);
  --shadow-tab-bar: 0px -1px 0px 0px rgba(15, 23, 40, 0.06), 0px -8px 24px 0px rgba(15, 23, 40, 0.04);
  --size-avatar-lg: 64px;
  --size-avatar-md: 40px;
  --size-avatar-sm: 28px;
  --size-avatar-xl: 96px;
  --size-icon-lg: 24px;
  --size-icon-md: 20px;
  --size-icon-sm: 16px;
  --size-touch-target-min: 44px;
  --space-0: 0px;
  --space-1: 4px;
  --space-10: 40px;
  --space-12: 48px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --z-index-base: 0;
  --z-index-dropdown: 30;
  --z-index-modal: 50;
  --z-index-overlay: 40;
  --z-index-sticky: 10;
  --z-index-tab-bar: 20;
  --z-index-toast: 60;
}

/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-jakarta), var(--font-family-sans);
  font-size: var(--font-size-base);
  line-height: var(--font-line-height-normal);
  color: var(--color-text-primary);
  background: var(--color-surface-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--color-text-link);
  text-decoration: none;
}

button,
input {
  font: inherit;
}

/* ---------------------------------------------------------------------------
   Utilities
   --------------------------------------------------------------------------- */

.dot-pattern {
  background-color: var(--color-surface-canvas);
  background-image:
    radial-gradient(var(--color-chat-dot-color) 1.1px, transparent 1.1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 120px);
  background-size: 20px 20px, 100% 100%;
}

.card {
  background: var(--color-surface-raised);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border-subtle);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.badge-readonly {
  background: var(--color-state-read-only-bg);
  color: var(--color-state-read-only-fg);
  border: 1px solid var(--color-border-subtle);
}

.badge-parent-visible {
  background: var(--color-role-parent-100);
  color: var(--color-role-parent-800);
  border: 1px solid var(--color-role-parent-200);
}

.badge-parent-chat {
  background: color-mix(in srgb, var(--color-accent-parent) 16%, transparent);
  color: var(--color-accent-parent);
  border: 1px solid color-mix(in srgb, var(--color-accent-parent) 35%, transparent);
}

.tabbar {
  display: flex;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface-raised);
  box-shadow: var(--shadow-tab-bar);
}

.tabbar__item {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

.tabbar__item[aria-current='page'] {
  background: var(--color-accent-student);
  color: var(--color-text-on-role);
}

.app-frame {
  max-width: 440px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4);
  min-height: 100dvh;
}

.stack-4 > * + * { margin-top: var(--space-4); }
.stack-2 > * + * { margin-top: var(--space-2); }
.row { display: flex; align-items: center; gap: var(--space-3); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); font-size: var(--font-size-sm); }

/* ---------------------------------------------------------------------------
   Messenger shell — campus ink
   --------------------------------------------------------------------------- */

.wa {
  --app-accent: var(--color-accent-student);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1100px 560px at 8% -8%, rgba(58, 69, 232, 0.28), transparent 58%),
    radial-gradient(900px 520px at 92% 8%, rgba(11, 131, 116, 0.18), transparent 52%),
    radial-gradient(720px 480px at 78% 100%, rgba(233, 100, 10, 0.12), transparent 55%),
    linear-gradient(155deg, #cfd7e8 0%, #e4e9f4 38%, #d5ddec 100%);
}and 

.wa::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(15, 23, 40, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 40, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
  pointer-events: none;
}

.wa__list {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  background: color-mix(in srgb, var(--color-surface-raised) 92%, transparent);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
  border-right: 1px solid var(--color-border-subtle);
}

.wa__main {
  display: none;
  flex: 1 1;
  min-width: 0;
  flex-direction: column;
  background: var(--color-surface-canvas);
}

/* Mobile: one pane at a time (list XOR thread), like WhatsApp phone. */
@media (max-width: 1023px) {
  .wa[data-pane='thread'] .wa__list { display: none; }
  .wa[data-pane='thread'] .wa__main { display: flex; }
}

.wa__frame {
  display: flex;
  flex: 1 1;
  min-height: 0;
  min-width: 0;
}

@media (min-width: 1024px) {
  .wa {
    flex-direction: row;
    padding: var(--space-5);
    align-items: stretch;
    justify-content: center;
    gap: var(--space-3);
  }

  .wa__frame {
    width: min(100%, var(--layout-shell-max-width));
    border-radius: var(--layout-shell-radius);
    overflow: hidden;
    background: var(--color-surface-raised);
    box-shadow: var(--shadow-shell);
    border: 1px solid rgba(255, 255, 255, 0.55);
  }

  /* Desktop = WhatsApp Web: chat list stays beside the open thread. */
  .wa__list {
    display: flex;
    width: var(--layout-list-pane-width);
    flex: none;
    background: var(--color-surface-raised);
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
  }

  .wa__main {
    display: flex;
  }

  .wa[data-pane='thread'] .wa__list {
    display: flex;
  }

  /* Directory / status / calls: list is the primary surface. */
  .wa[data-section='contacts'] .wa__list,
  .wa[data-section='status'] .wa__list,
  .wa[data-section='calls'] .wa__list,
  .wa[data-section='profile'] .wa__list {
    flex: 1 1;
    width: auto;
    max-width: 420px;
  }
}

/* Mobile: list/main fill; nav is a bottom bar */
@media (max-width: 1023px) {
  .wa__frame {
    order: 1;
  }

  .nav-rail {
    order: 2;
  }
}

/* ---- List header + search ---- */

.wa-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5) var(--space-3);
}

.wa-header__brand {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  min-width: 0;
  gap: 1px;
}

.wa-header__eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.wa-header__title {
  flex: 1 1;
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--color-text-primary);
}

.wa-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.wa-header__user {
  display: none;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  max-width: 9ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 420px) {
  .wa-header__user { display: inline; }
}

.wa-search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 var(--space-4) var(--space-3);
  padding: 0 var(--space-4);
  min-height: 44px;
  background: var(--color-surface-sunken);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  color: var(--color-text-tertiary);
  transition:
    border-color var(--motion-duration-fast) var(--motion-easing-standard),
    box-shadow var(--motion-duration-fast) var(--motion-easing-standard),
    background var(--motion-duration-fast) var(--motion-easing-standard);
}

.wa-search:focus-within {
  background: var(--color-surface-raised);
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-focus-ring);
  color: var(--color-text-secondary);
}

.wa-search__input {
  flex: 1 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--color-text-primary);
  outline: none;
}

.wa-search__input::placeholder {
  color: var(--color-text-tertiary);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-sunken);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  white-space: nowrap;
  border: 1px solid var(--color-border-subtle);
}

.chip--link {
  color: var(--color-text-on-role);
  background: var(--app-accent, var(--color-accent-student));
  border-color: transparent;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--app-accent, var(--color-accent-student)) 70%, transparent);
  transition: transform var(--motion-duration-fast) var(--motion-easing-standard);
}

.chip--link:hover {
  transform: translateY(-1px);
}

.chip--demo {
  background: var(--color-role-student-50);
  color: var(--color-role-student-800);
  border-color: var(--color-role-student-100);
}

/* ---- Conversation list ---- */

.room-list {
  flex: 1 1;
  overflow-y: auto;
  margin: 0;
  padding: 0 var(--space-2) var(--space-4);
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-default) transparent;
}

.wa-empty-list {
  padding: var(--space-8) var(--space-5);
  color: var(--color-text-secondary);
  text-align: center;
}

.room {
  position: relative;
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: 12px 14px;
  margin: 2px var(--space-1);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background var(--motion-duration-fast) var(--motion-easing-standard),
    border-color var(--motion-duration-fast) var(--motion-easing-standard),
    transform var(--motion-duration-fast) var(--motion-easing-standard);
}

.room:hover {
  background: var(--color-chat-hover-bg);
}

.room[aria-current='page'] {
  background: var(--color-chat-selected-bg);
  border-color: var(--color-chat-selected-border);
}

.room[aria-current='page']::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: var(--radius-pill);
  background: var(--app-accent, var(--color-accent-student));
}

.room__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1;
  min-width: 0;
}

.room__top,
.room__bottom {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.room__name {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
}

.room__time {
  flex: none;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-tertiary);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.room[aria-current='page'] .room__time,
.room:has(.room__unread) .room__time {
  color: var(--app-accent, var(--color-accent-student));
  font-weight: var(--font-weight-semibold);
}

.room__preview {
  flex: 1 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-secondary);
  font-size: var(--font-size-md);
  line-height: 1.35;
}

.room__tick {
  display: inline-flex;
  color: var(--color-text-tertiary);
  flex: none;
}

.room__unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--app-accent, var(--color-state-success));
  color: var(--color-text-inverse);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--app-accent, var(--color-accent-student)) 65%, transparent);
}

.room__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

/* ---- Avatars + icon buttons ---- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 50%;
  color: var(--color-text-on-role);
  font-weight: 700;
  letter-spacing: 0.02em;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  box-shadow: var(--shadow-avatar);
  position: relative;
}

.avatar--me {
  box-shadow:
    0 0 0 2px var(--color-surface-raised),
    0 0 0 4px color-mix(in srgb, var(--app-accent, var(--color-accent-student)) 35%, transparent),
    var(--shadow-avatar);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background var(--motion-duration-fast) var(--motion-easing-standard);
}

.icon-btn:hover { background: var(--color-surface-sunken); }

.icon-btn--onAccent { color: var(--color-text-on-role); }
.icon-btn--onAccent:hover { background: rgba(255, 255, 255, 0.16); }

/* ---- Empty right pane ---- */

.wa-empty {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-8);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(500px 280px at 50% 35%, rgba(74, 93, 251, 0.10), transparent 70%),
    var(--color-surface-canvas);
}

.wa-empty__orb {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 93, 251, 0.14), transparent 68%);
  filter: blur(8px);
  animation: wa-breathe 6s var(--motion-easing-standard) infinite;
  pointer-events: none;
}

.wa-empty__art {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-bottom: var(--space-2);
  border-radius: 28px;
  background: linear-gradient(145deg, #ffffff, #eef1fb);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-raised);
  color: var(--app-accent, var(--color-accent-student));
  animation: wa-rise 520ms var(--motion-easing-decelerate) both;
}

.wa-empty__art svg {
  width: 48px;
  height: 48px;
}

.wa-empty__brand {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  animation: wa-rise 560ms var(--motion-easing-decelerate) both;
}

.wa-empty__title {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  animation: wa-rise 600ms var(--motion-easing-decelerate) both;
}

.wa-empty__text {
  max-width: 36ch;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.5;
  animation: wa-rise 640ms var(--motion-easing-decelerate) both;
}

.wa-empty__hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-3);
  animation: wa-rise 700ms var(--motion-easing-decelerate) both;
}

.wa-empty__hint {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-card);
}

@keyframes wa-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wa-breathe {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* ---- Thread ---- */

.thread {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.parent-chat-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--color-accent-parent) 12%, var(--color-surface-raised));
  border-bottom: 1px solid color-mix(in srgb, var(--color-accent-parent) 28%, transparent);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  line-height: 1.35;
}

.parent-chat-banner__links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.parent-chat-banner__link {
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent-parent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.msg__voice--error {
  color: var(--color-text-secondary);
  font-style: italic;
}

.thread__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px var(--space-4);
  background:
    linear-gradient(
      135deg,
      var(--app-accent, var(--color-accent-student)) 0%,
      color-mix(in srgb, var(--app-accent, var(--color-accent-student)) 72%, #0f1728) 100%
    );
  color: var(--color-text-on-role);
  box-shadow: 0 8px 24px -16px color-mix(in srgb, var(--app-accent, var(--color-accent-student)) 80%, transparent);
  z-index: 1;
}

.thread__titles {
  display: flex;
  flex-direction: column;
  flex: 1 1;
  min-width: 0;
  line-height: var(--font-line-height-tight);
  gap: 2px;
}

.thread__title {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.thread__subtitle {
  font-size: var(--font-size-sm);
  opacity: 0.88;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--font-weight-medium);
}

.thread__back { display: inline-flex; }

@media (min-width: 1024px) {
  .thread__back { display: none; }
}

.thread__body {
  flex: 1 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-4);
}

.thread__group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.thread__empty {
  margin: auto;
  color: var(--color-text-secondary);
}

.day-divider {
  align-self: center;
  margin: var(--space-3) 0 var(--space-2);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-surface-raised) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-card);
  color: var(--color-text-secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: min(78%, 560px);
  animation: wa-rise 280ms var(--motion-easing-decelerate) both;
}

.msg--in { align-self: flex-start; }
.msg--out { align-self: flex-end; }

.msg__sender {
  margin: 0 0 3px var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--app-accent, var(--color-accent-student));
  letter-spacing: -0.01em;
}

.msg__bubble {
  padding: 10px 14px;
  border-radius: var(--radius-bubble);
  box-shadow: var(--shadow-card);
}

.msg__bubble::after { content: ''; display: block; clear: both; }

.msg--in .msg__bubble {
  background: var(--color-bubble-incoming);
  color: var(--color-text-primary);
  border: 1px solid rgba(15, 23, 40, 0.04);
}

.msg--out .msg__bubble {
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--app-accent, var(--color-bubble-outgoing-default)) 92%, white) 0%,
    var(--app-accent, var(--color-bubble-outgoing-default)) 100%
  );
  color: var(--color-text-on-role);
}

.msg--first.msg--in .msg__bubble { border-top-left-radius: var(--radius-bubble-tail); }
.msg--first.msg--out .msg__bubble { border-top-right-radius: var(--radius-bubble-tail); }

.msg__text {
  margin: 0;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  font-size: 14.5px;
  line-height: 1.45;
}

.msg__meta {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 6px 0 -2px var(--space-3);
  font-size: 10.5px;
  font-weight: var(--font-weight-medium);
  opacity: 0.72;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.msg__file,
.msg__voice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.msg__voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 14%, transparent);
  color: inherit;
  cursor: pointer;
}

.msg__voice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.msg__bar--playing {
  opacity: 0.95;
  animation: msg-bar-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes msg-bar-pulse {
  from {
    transform: scaleY(0.85);
  }
  to {
    transform: scaleY(1.15);
  }
}

.msg__image {
  display: block;
  min-width: 180px;
  padding: var(--space-6) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-surface-sunken);
  color: var(--color-text-secondary);
  text-align: center;
}

.msg__wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}

.msg__bar {
  width: 2px;
  border-radius: var(--radius-pill);
  background: currentColor;
  opacity: 0.6;
}

.msg-system {
  align-self: center;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-surface-raised) 90%, transparent);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-card);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* ---- Composer ---- */

.composer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px var(--space-4) 14px;
  background: color-mix(in srgb, var(--color-surface-raised) 88%, var(--color-surface-sunken));
  border-top: 1px solid var(--color-border-subtle);
}

.composer__field {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1 1;
  min-width: 0;
  padding: 0 var(--space-1) 0 var(--space-2);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-pill);
  min-height: 48px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color var(--motion-duration-fast) var(--motion-easing-standard);
}

.composer__field:focus-within {
  border-color: var(--color-border-focus);
}

.composer__input {
  flex: 1 1;
  min-width: 0;
  min-height: 48px;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--color-text-primary);
  outline: none;
}

.composer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
}

.composer__icon:disabled { cursor: default; opacity: 0.55; }

.composer__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border: none;
  border-radius: 50%;
  background: var(--app-accent, var(--color-accent-student));
  color: var(--color-text-on-role);
  cursor: pointer;
  box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--app-accent, var(--color-accent-student)) 80%, transparent);
  transition: transform var(--motion-duration-fast) var(--motion-easing-standard);
}

.composer__send:not(:disabled):hover { transform: translateY(-1px); }
.composer__send:not(:disabled):active { transform: scale(0.94); }
.composer__send:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.composer__send--recording {
  background: var(--color-state-danger);
  animation: pulse-record 1s ease-in-out infinite;
}

@keyframes pulse-record {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.composer--locked {
  justify-content: center;
  gap: var(--space-2);
  background: var(--color-state-read-only-bg);
  color: var(--color-state-read-only-fg);
  font-size: var(--font-size-md);
  text-align: center;
  font-weight: var(--font-weight-medium);
}

/* ---- Safeguarding ---- */

.safeguard {
  margin: 0;
  padding: 10px var(--space-4) 14px;
  border-top: 1px solid var(--color-border-subtle);
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: 12px;
  line-height: 1.45;
  background: var(--color-surface-raised);
}

/* ---- Login ---- */

.login {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--space-6) var(--space-4);
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 10% 0%, rgba(74, 93, 251, 0.18), transparent 55%),
    radial-gradient(700px 420px at 90% 100%, rgba(15, 163, 142, 0.12), transparent 50%),
    linear-gradient(160deg, #dfe5f2 0%, #e8ecf4 50%, #d9e0ee 100%);
}

.login::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(15, 23, 40, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 40, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.login__panel {
  position: relative;
  width: min(100%, 420px);
  padding: var(--space-8) var(--space-6);
  border-radius: 22px;
  background: color-mix(in srgb, var(--color-surface-raised) 94%, transparent);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-shell);
  animation: wa-rise 480ms var(--motion-easing-decelerate) both;
}

.login__brand {
  margin: 0 0 var(--space-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.login__title {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.login__lede {
  margin: var(--space-2) 0 var(--space-4);
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

.login__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 6px;
  gap: 6px;
  margin-bottom: var(--space-4);
  padding: 4px;
  border-radius: 14px;
  background: var(--color-surface-sunken);
}

.login__tab {
  min-height: 38px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.login__tab--active {
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-card);
}

.login__hint {
  margin: var(--space-3) 0 0;
  color: var(--color-text-tertiary);
  font-size: 12.5px;
  line-height: 1.45;
}

.login__text-btn {
  border: none;
  background: none;
  padding: 0;
  color: var(--color-text-link);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.login__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-4);
}

.login__label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
}

.login__input {
  min-height: 48px;
  padding: 0 var(--space-4);
  border-radius: 12px;
  border: 1.5px solid var(--color-border-strong);
  background: #fbfcff;
  color: var(--color-text-primary);
  outline: none;
  transition:
    border-color var(--motion-duration-fast) var(--motion-easing-standard),
    box-shadow var(--motion-duration-fast) var(--motion-easing-standard),
    background var(--motion-duration-fast) var(--motion-easing-standard);
}

.login__input:focus {
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-focus-ring);
}

.login__submit {
  width: 100%;
  min-height: 48px;
  margin-top: var(--space-2);
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(160deg, #4a5dfb 0%, #3a45e8 55%, #2f37c4 100%);
  color: var(--color-text-on-role);
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 16px 32px -14px rgba(47, 55, 196, 0.85);
  transition: transform var(--motion-duration-fast) var(--motion-easing-standard);
}

.login__submit:hover:not(:disabled) { transform: translateY(-1px); }
.login__submit:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.login__footer {
  margin: var(--space-5) 0 0;
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: var(--font-size-sm);
}

.login__alert {
  margin: 0 0 var(--space-3);
  color: var(--color-text-danger);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.login__status {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  border-radius: 12px;
  background: var(--color-surface-sunken);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* ---- Nav rail ---- */

.nav-rail {
  display: flex;
  z-index: 5;
  background: color-mix(in srgb, var(--color-surface-shell) 94%, #24304a);
  color: var(--color-text-on-shell);
  box-shadow: 0 -8px 28px rgba(15, 23, 40, 0.18);
}

.nav-rail__brand {
  display: none;
}

.nav-rail__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #6b80ff, #3a45e8);
  color: white;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.nav-rail__items {
  display: flex;
  flex: 1 1;
  justify-content: space-around;
  align-items: stretch;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  gap: 2px;
}

.nav-rail__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 56px;
  padding: 8px 6px;
  border-radius: 14px;
  color: var(--color-text-on-shell-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition:
    background var(--motion-duration-fast) var(--motion-easing-standard),
    color var(--motion-duration-fast) var(--motion-easing-standard);
}

.nav-rail__item--active,
.nav-rail__item[aria-current='page'] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

@media (min-width: 1024px) {
  .nav-rail {
    flex-direction: column;
    width: 84px;
    border-radius: var(--layout-shell-radius);
    box-shadow: var(--shadow-shell);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 10px;
    gap: 16px;
  }

  .nav-rail__brand {
    display: grid;
    place-items: center;
  }

  .nav-rail__items {
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    gap: 6px;
  }

  .nav-rail__item {
    width: 100%;
    min-width: 0;
    padding: 10px 6px;
  }
}

/* ---- Section panels (status / calls / contacts / profile) ---- */

.section-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.section-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-3);
}

.section-panel__eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}

.section-panel__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.section-panel__lede {
  margin: 0 var(--space-5) var(--space-3);
  color: var(--color-text-secondary);
  font-size: 13.5px;
  line-height: 1.45;
}

.section-panel__body {
  flex: 1 1;
  overflow-y: auto;
  padding: 0 var(--space-4) var(--space-5);
}

/* ---- Buttons / toasts ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.btn--sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}

.btn--primary {
  background: var(--app-accent, var(--color-accent-student));
  color: var(--color-text-on-role);
  box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--app-accent, var(--color-accent-student)) 80%, transparent);
}

.btn--ghost {
  background: var(--color-surface-sunken);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-subtle);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.toast {
  margin: 0 var(--space-4) var(--space-3);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--color-surface-inverse);
  color: var(--color-text-inverse);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

.toast--thread {
  position: absolute;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  width: min(92%, 420px);
  margin: 0;
  text-align: center;
}

.thread {
  position: relative;
}

.thread__actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.badge-danger {
  background: #fde8e9;
  color: var(--color-state-danger);
  border: 1px solid #f5c2c5;
  text-transform: capitalize;
}

/* ---- Status / calls / contacts / profile ---- */

.status-list,
.call-list,
.contact-list,
.settings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-card {
  position: relative;
  display: flex;
  gap: 14px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 16px;
  background: var(--color-surface-raised);
  box-shadow: var(--shadow-card);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.status-card__ring {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  box-shadow: inset 0 0 0 3px var(--color-surface-raised);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), transparent 40%),
    currentColor;
  opacity: 0.9;
}

.status-card--indigo { color: var(--color-role-student-500); }
.status-card--teal { color: var(--color-role-teacher-500); }
.status-card--amber { color: var(--color-role-parent-500); }
.status-card--slate { color: #64748b; }

.status-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.status-card__author {
  font-weight: 750;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.status-card__caption {
  color: var(--color-text-secondary);
  font-size: 13.5px;
  line-height: 1.4;
}

.status-card__meta {
  color: var(--color-text-tertiary);
  font-size: 12px;
  font-weight: 600;
}

.call-row,
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-raised);
}

.call-row__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-surface-sunken);
  color: var(--color-text-secondary);
}

.call-row__icon--missed { color: var(--color-state-danger); background: #fde8e9; }
.call-row__icon--outgoing { color: var(--color-accent-student); background: var(--color-role-student-50); }
.call-row__icon--incoming { color: var(--color-accent-teacher); background: var(--color-role-teacher-50); }

.call-row__body,
.contact-row__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1;
  min-width: 0;
}

.call-row__title,
.contact-row__name {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.call-row__meta,
.contact-row__meta {
  color: var(--color-text-secondary);
  font-size: 12.5px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-bottom: 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(58, 69, 232, 0.1), transparent 55%),
    var(--color-surface-sunken);
  border: 1px solid var(--color-border-subtle);
}

.profile-card__name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.profile-card__meta {
  margin: 4px 0 0;
  color: var(--color-text-secondary);
  font-size: 13px;
}

.settings-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-raised);
}

.settings-list__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-role-student-50);
  color: var(--color-accent-student);
}

.settings-list strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.settings-list em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  color: var(--color-text-secondary);
  font-size: 12.5px;
  line-height: 1.4;
}

/* ---- Composer extras / menu ---- */

.menu {
  position: relative;
}

.menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 6px;
  border-radius: 14px;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-raised);
}

.menu__panel button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
}

.menu__panel button:hover {
  background: var(--color-surface-sunken);
}

.composer {
  position: relative;
  flex-wrap: wrap;
}

.attach-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-bottom: 4px;
}

.attach-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-raised);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
}

/* Wrapper for emoji-picker-react */
.emoji-picker {
  width: 100%;
  margin-bottom: 8px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 16px;
  background: var(--color-surface-raised);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.emoji-picker__loading {
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: 13px;
}

.emoji-picker .EmojiPickerReact {
  --epr-emoji-size: 28px;
  --epr-header-padding: 10px 12px;
  border: none !important;
  border-radius: 16px !important;
}

.msg__photo {
  display: block;
  max-width: min(260px, 70vw);
  max-height: 220px;
  border-radius: 12px;
  margin-bottom: 4px;
  object-fit: cover;
}

.msg__size {
  opacity: 0.75;
  font-size: 11px;
}

.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;
}

/* ---- Shared focus + motion ---- */

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus-ring);
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.liveclass {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: radial-gradient(120% 120% at 50% 0%, #0b152b, #050814);
  color: #fff;
}
.liveclass__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}
.liveclass__title {
  margin: 0;
  font-size: 1rem;
}
.liveclass__subtitle {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.7;
}
.liveclass__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.liveclass__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.liveclass__status,
.liveclass__error {
  position: absolute;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(5, 8, 20, 0.6);
  font-size: 0.9rem;
}
.liveclass__error {
  background: rgba(220, 38, 38, 0.8);
}
.liveclass__controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
}

