:root{--bg:#0a0908;--card:#171514;--card2:#100f0e;--line:#2a2624;--red:#e11d2e;--red2:#ff4757;--red-deep:#3a0d12;  /* Colour variables used everywhere (backgrounds, cards, red, amber, green, blue) */
--amber:#ffb020;--amber-deep:#2e1e02;--green:#2ecc71;--white:#f6f4f2;--muted:#9a938d;  /* More colour variables and the text colours */
padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);}  /* Keep content away from the phone notch and bottom bar */
*{box-sizing:border-box}  /* Padding and borders count inside the width of every element */
html,body{height:100%}  /* Page and body fill the whole screen height */
body{margin:0;font-family:'Inter',Arial,sans-serif;background:radial-gradient(900px 480px at 50% -8%,rgba(225,29,46,.14) 0%,transparent 62%),radial-gradient(560px 300px at 92% 100%,rgba(255,176,32,.06) 0%,transparent 60%),linear-gradient(180deg,#000,#0b0a0a 55%,#000);color:var(--white);-webkit-font-smoothing:antialiased}  /* Page body: font, background glow and text colour */
h1,h2,h3{font-family:'Poppins',sans-serif;margin:.2em 0;letter-spacing:-.01em}  /* Headings use the Poppins font */
.wrap{max-width:600px;margin:0 auto;padding:0 16px 104px;min-height:100%}  /* Main centered column (maximum 600 px wide) */
.hero{padding:32px 4px 12px;text-align:center;animation:drop .5s cubic-bezier(.2,.9,.3,1)}  /* Hero (the welcome block at the top) with a drop-in animation */
@keyframes drop{from{transform:translateY(-12px);opacity:0}to{transform:translateY(0);opacity:1}}  /* Animation: slide down and fade in */
.logo{width:60px;height:60px;border-radius:16px;margin:0 auto 12px;display:flex;align-items:center;justify-content:center;font-size:28px;background:linear-gradient(150deg,#3a3634,#0c0b0a);border:1px solid var(--line);box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}  /* Round logo box */
.hero h1{font-size:1.35rem;font-weight:800}  /* Hero title size */
.hero p{color:var(--muted);font-size:.84rem;margin-top:3px}  /* Hero paragraph (grey and small) */
.card{background:linear-gradient(180deg,var(--card),var(--card2));border:1px solid var(--line);border-radius:18px;padding:18px;margin:14px 0;box-shadow:0 1px 0 rgba(255,255,255,.04) inset,0 10px 24px -12px rgba(0,0,0,.6)}  /* Card: dark box with a border and rounded corners */
label{font-size:.76rem;color:var(--muted);display:block;margin:10px 2px 3px;font-weight:500}  /* Form labels */
input,textarea{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:#0e0c0c;color:var(--white);margin-top:4px;font-size:15px;font-family:inherit;transition:border-color .15s,box-shadow .15s}  /* Text boxes and text areas */
input:focus,textarea:focus{outline:none;border-color:var(--red2);box-shadow:0 0 0 3px rgba(225,29,46,.15)}  /* Red glow when a text box is selected */
button{cursor:pointer;border:none;border-radius:12px;padding:13px 16px;font-weight:700;font-size:15px;font-family:'Inter',sans-serif;transition:transform .12s,filter .15s}  /* Buttons: shape, font and pointer cursor */
button:active{transform:scale(.97)}  /* Buttons shrink slightly when pressed */
button:focus-visible{outline:2px solid var(--amber);outline-offset:2px}  /* Outline around a button when using the keyboard */
.btn-red{background:linear-gradient(135deg,var(--red2),var(--red));color:#fff;width:100%;box-shadow:0 8px 20px -6px rgba(225,29,46,.5)}  /* Main red button */
.btn-red:hover{filter:brightness(1.08)}  /* Red button gets brighter on hover */
.btn-icon{background:#1c1a19;color:#fff;width:auto;padding:12px 14px;border:1px solid var(--line)}  /* Small icon button */
.nav{position:fixed;bottom:0;left:0;right:0;background:rgba(8,7,6,.86);backdrop-filter:blur(14px);border-top:1px solid var(--line);display:flex;justify-content:space-around;padding:8px 4px calc(8px + env(safe-area-inset-bottom,0px));z-index:10}  /* Bottom navigation bar fixed to the bottom of the screen */
.nav button{background:none;flex:1;color:var(--muted);font-size:10px;font-weight:600;display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 2px;border-radius:12px;transition:color .15s,background .15s}  /* Buttons inside the bottom bar */
.nav button.active{color:#fff;background:rgba(225,29,46,.14)}  /* Highlight of the active tab button */
.nav span:first-child{font-size:19px}  /* Icon size inside the nav buttons */
.topbar{position:fixed;top:0;right:0;z-index:11;padding:calc(10px + env(safe-area-inset-top,0px)) 14px 10px}  /* Top bar fixed at the top right of the screen */
.hidden{display:none!important}  /* Hide anything with the class "hidden" */
.msg{padding:9px 13px;border-radius:15px;margin:6px 0;max-width:78%;font-size:14px;line-height:1.4}  /* Message bubble (first version) */
.msg.me{background:linear-gradient(135deg,#4a4644,#2b2827);margin-left:auto;border-bottom-right-radius:4px}  /* Bubble of my own messages (grey) */
.msg.admin{background:linear-gradient(135deg,var(--red2),var(--red));margin-left:auto;border-bottom-right-radius:4px}  /* Bubble of the admin's messages (red) */
.msg.user{background:#211f1e;border:1px solid var(--line);border-bottom-left-radius:4px}  /* Bubble of users' messages (dark) */
.chatbox{max-height:360px;overflow-y:auto;display:flex;flex-direction:column;padding:2px 2px 8px}  /* Chat box scroll area (first version) */
.imgprev{max-width:100%;border-radius:12px;margin:10px 0;border:1px solid var(--line)}  /* Picture preview inside forms */
.small{color:var(--muted);font-size:12.5px}  /* Small grey text */
.linklike{color:#ff6b74;text-decoration:none;cursor:pointer;font-weight:600;user-select:none}  /* Clickable text link style */
.linklike:hover{color:#ff8a90;text-decoration:underline}  /* Link colour on hover */
.linklike:focus-visible{outline:2px solid var(--amber);outline-offset:2px;border-radius:4px}  /* Link keyboard outline */
.loader{text-align:center;padding:80px 20px;color:var(--muted)}  /* Loading message block */
.spinner{width:34px;height:34px;border:3px solid var(--line);border-top-color:var(--red);border-radius:50%;margin:0 auto 14px;animation:spin .8s linear infinite}  /* Loading spinner circle */
@keyframes spin{to{transform:rotate(360deg)}}  /* Animation: rotate the spinner */
.row{display:flex;align-items:center;gap:10px}  /* Horizontal row of items */
.avatar{width:34px;height:34px;border-radius:50%;background:#221f1e;display:flex;align-items:center;justify-content:center;font-size:14px;border:1px solid var(--line);flex-shrink:0}  /* Round avatar picture */
.badge-admin{background:var(--amber-deep);color:#ffc24b;border:1px solid #4a3300;border-radius:8px;padding:2px 7px;font-size:11px;font-weight:700}  /* "Admin" badge */
.section-title{font-size:.95rem;font-weight:700;display:flex;align-items:center;gap:6px;margin-bottom:4px}  /* Section title */
.convo-item{display:flex;justify-content:space-between;align-items:center;padding:13px;border:1px solid var(--line);border-radius:14px;margin:8px 0;cursor:pointer;background:linear-gradient(180deg,var(--card),var(--card2));transition:border-color .15s}  /* One conversation row in the inbox */
.convo-item:hover{border-color:#4a4340}  /* Conversation row border on hover */
.unread{background:var(--red);color:#fff;border-radius:20px;padding:2px 8px;font-size:11px;font-weight:700}  /* Red unread counter */
select{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:#0e0c0c;color:var(--white);margin-top:4px;font-size:15px;font-family:inherit}  /* Dropdown boxes */
.btn-ghost{background:#1c1a19;color:#fff;border:1px solid var(--line)}  /* Grey ghost button */
button:disabled{opacity:.5;cursor:not-allowed}  /* Disabled buttons look faded */
.star{cursor:pointer;font-size:22px}  /* Bookmark star */
.macts{display:flex;gap:12px;justify-content:flex-end;margin-top:4px;font-size:12px;opacity:.85;cursor:pointer}  /* Small action links under a message */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}  /* Two-column grid */
.kpi{text-align:center;margin:0;padding:14px}  /* Statistics number card centered */
.kpi b{display:block;font-size:1.6rem;font-family:'Poppins',sans-serif}  /* Big number in a statistics card */
.barrow{display:flex;align-items:center;gap:8px;margin:6px 0}  /* Row of a bar chart */
.barbg{flex:1;height:10px;background:#221f1e;border-radius:6px;overflow:hidden}  /* Bar chart track */
.barbg i{display:block;height:100%;background:linear-gradient(90deg,var(--red2),var(--red))}  /* Bar chart fill (red) */
.badge-block{background:#2a0f10;color:#ff8a90;border:1px solid #6b1f25;border-radius:8px;padding:2px 7px;font-size:11px;font-weight:700}  /* "Blocked" badge */
@media(prefers-reduced-motion:reduce){*{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}  /* Remove animations for users who prefer less motion */
@media(min-width:900px){.wrap{max-width:760px}}  /* Wider page on big screens */

/* WhatsApp-style chat */
.chatbox{max-height:62vh;min-height:260px;background:#0b141a;background-image:radial-gradient(rgba(255,255,255,.035) 1px,transparent 1px);background-size:18px 18px;border-radius:14px;padding:10px 8px}  /* WhatsApp-style chat box (dark green-blue background) */
.wm{position:relative;max-width:82%;padding:6px 8px 4px;border-radius:9px;font-size:14.2px;line-height:1.35;margin:2px 0;overflow-wrap:anywhere;box-shadow:0 1px .5px rgba(0,0,0,.35);cursor:pointer;color:#e9edef}  /* Message bubble */
.wm.out{background:#005c4b;align-self:flex-end;border-top-right-radius:2px}  /* Bubble of my own messages (green, right) */
.wm.in{background:#202c33;align-self:flex-start;border-top-left-radius:2px}  /* Bubble of other people (dark, left) */
.wm .wt{float:right;margin:7px 0 0 10px;font-size:10.5px;color:rgba(233,237,239,.6);white-space:nowrap}  /* Time shown inside a bubble */
.tk{margin-left:3px;font-size:11px}  /* Message tick marks */
.tk.rd{color:#53bdeb}  /* Blue ticks (read) */
.wl{display:block;font-size:12.5px;color:#53bdeb;margin-bottom:2px}  /* Sender name label inside a bubble */
.wq{background:rgba(0,0,0,.25);border-left:4px solid #06cf9c;border-radius:6px;padding:4px 8px;margin-bottom:4px;font-size:12.5px;display:flex;flex-direction:column}  /* Quoted reply box inside a bubble */
.wq b{color:#06cf9c}  /* Name in the quote */
.wq span{opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}  /* Text in the quote (one line) */
.wd{align-self:center;margin:8px 0}  /* Date heading in the chat (centered) */
.wd span{background:#182229;color:#8696a0;font-size:12px;padding:4px 10px;border-radius:8px}  /* Date heading pill */
.wr{display:flex;justify-content:space-between;align-items:center;gap:8px;background:#1f2c34;border-left:4px solid #06cf9c;border-radius:8px;padding:6px 10px;margin-top:8px;font-size:12.5px}  /* Reply bar above the message box */
.wr div{display:flex;flex-direction:column;min-width:0}  /* Reply bar text column */
.wr b{color:#06cf9c}  /* Reply bar sender name */
.wr span{opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}  /* Reply bar text */
.wr>span{cursor:pointer;font-size:16px}  /* Reply bar cancel button */
.wm .msgimg{width:220px;max-width:100%;border-radius:7px;margin:0 0 3px}  /* Picture inside a bubble */
.wm .macts{clear:both;display:flex;gap:16px;padding-top:6px}  /* Action links inside a bubble */
.nav button{position:relative}  /* Nav button position (for the badge) */
.nb{position:absolute;top:2px;left:calc(50% + 6px);background:#25d366;color:#08130c;border-radius:20px;font-style:normal;font-size:10px;font-weight:800;padding:1px 6px}  /* Unread number badge on a tab */
.btn-icon.rec{background:#e11d2e!important;animation:recp 1s infinite}  /* Red button while recording */
@keyframes recp{50%{opacity:.55}}  /* Animation: blink while recording */
.wm audio{display:block;width:210px;max-width:100%;height:38px;margin:2px 0}  /* Voice note player inside a bubble */
.dr{background:#1f2c34;border-radius:12px;padding:10px;margin-top:8px;border-left:4px solid #06cf9c}  /* Draft box (preview before sending) */
.dr audio{width:100%;height:40px;display:block}  /* Audio player inside the draft */
.dr img{max-height:220px;max-width:100%;border-radius:10px;display:block}  /* Picture preview inside the draft */
.dr .row{gap:8px;margin-top:8px;flex-wrap:wrap}  /* Buttons inside the draft */
.dr .small{margin-top:6px}  /* Small text inside the draft */
/* responsive chat */
.wrap.chatwide{max-width:920px}  /* Wider page when the chat is open */
.chatbox{height:calc(100vh - 330px);height:calc(100dvh - 330px);min-height:300px;max-height:none;color-scheme:dark;scrollbar-width:thin;scrollbar-color:#2a3942 transparent}  /* Chat box height fills the screen */
.chatbox::-webkit-scrollbar{width:6px}  /* Thin scrollbar for the chat */
.chatbox::-webkit-scrollbar-thumb{background:#2a3942;border-radius:6px}  /* Scrollbar colour */
.wm{max-width:min(78%,640px)}  /* Bubble can be wider on big screens */
.wm .msgimg{width:320px;max-width:100%}  /* Bigger pictures on big screens */
@media(max-width:600px){.wrap.chatwide{padding-left:8px;padding-right:8px}.chatwide .card{padding:10px}.wm{max-width:88%}.wm .msgimg{width:100%}}  /* Phone layout: smaller margins in the chat */
#imgModal{position:fixed;inset:0;background:rgba(0,0,0,.92);z-index:50;display:flex;align-items:center;justify-content:center;padding:24px}  /* Full-screen picture viewer background */
#imgModal img{max-width:100%;max-height:100%;border-radius:12px}  /* Picture inside the viewer */
#imgModal img.avbig{width:min(92vw,520px);height:auto;max-height:80vh;object-fit:contain}  /* Large avatar picture inside the viewer */
/* dashboard menu */
.mlabel{color:var(--muted);font-size:.85rem;margin:18px 4px 6px}  /* Profile menu label */
.mlist{background:linear-gradient(180deg,var(--card),var(--card2));border:1px solid var(--line);border-radius:18px;overflow:hidden;margin:8px 0 14px}  /* Profile menu list box */
.mrow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:17px 18px;cursor:pointer;border-bottom:1px solid var(--line);font-weight:600;font-size:1.02rem;transition:background .15s}  /* One profile menu row */
.mrow:last-child{border-bottom:none}  /* No line under the last row */
.mrow:hover,.mrow:focus-visible{background:rgba(255,255,255,.05);outline:none}  /* Row highlight on hover or keyboard */
.mrow:active{background:rgba(255,255,255,.08)}  /* Row pressed colour */
.mrow .mi{display:flex;align-items:center;gap:12px}  /* Left part of a menu row (icon and text) */
.mrow .ch{color:var(--muted);font-size:22px;line-height:1}  /* Arrow on the right of a menu row */
/* result rows */
.xr{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 2px;border-bottom:1px solid var(--line)}  /* One exam result row */
.xr:last-child{border-bottom:none}  /* No line under the last result */
.pill{font-weight:800;padding:5px 12px;border-radius:20px;font-size:.95rem;white-space:nowrap}  /* Score pill */
.pill.ok{background:rgba(46,204,113,.14);color:#2ecc71}  /* Green pill for a pass */
.pill.bad{background:rgba(225,29,46,.16);color:#ff6b74}  /* Red pill for a fail */
.xs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}  /* Row of small info chips */
.xs span{background:#1c1a19;border:1px solid var(--line);border-radius:20px;padding:5px 12px;font-size:12.5px;font-weight:600}  /* One small info chip */
/* reactions, forward, status */
.mreact{display:flex;gap:12px;padding:6px 0 2px;font-size:21px;clear:both}  /* Emoji reaction picker row */
.mreact span{cursor:pointer}  /* Reaction emoji cursor */
.rxs{clear:both;display:flex;gap:4px;flex-wrap:wrap;padding-top:4px}  /* Row of reactions under a message */
.rx{background:rgba(0,0,0,.3);border-radius:12px;padding:1px 8px;font-size:12.5px;cursor:pointer}  /* One reaction chip */
.rx.me{outline:1px solid #06cf9c}  /* My own reaction outline */
.wf{font-size:11.5px;opacity:.7;font-style:italic;margin-bottom:2px}  /* "Forwarded" label */
.fwd{position:fixed;inset:0;background:rgba(0,0,0,.7);z-index:60;display:flex;align-items:center;justify-content:center;padding:16px}  /* Forward box dark background */
.fwdc{background:var(--card);border:1px solid var(--line);border-radius:18px;width:min(420px,100%);max-height:80vh;overflow:auto;padding:14px}  /* Forward box */
.fwdt{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);background:#25d366;color:#08130c;font-weight:700;padding:8px 16px;border-radius:20px;z-index:70}  /* Small "sent" notice at the bottom */
/* branding + splash */
.logo{background:none!important;border:none!important;overflow:hidden}  /* Logo without background or border */
.logo svg{display:block;width:100%;height:100%}  /* Logo picture fills its box */
.splash{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:80vh;text-align:center}  /* Splash (loading) screen layout */
.splash .sl{width:96px;height:96px;filter:drop-shadow(0 14px 30px rgba(225,29,46,.45));animation:spl 1.4s ease-in-out infinite}  /* Splash logo with animation */
.splash .sl svg{width:100%;height:100%;display:block}  /* Splash logo picture */
.splash b{font-family:Poppins,sans-serif;font-size:1.9rem;letter-spacing:.3px}  /* Splash app name */
.splash small{color:var(--muted)}  /* Splash small text */
.sbar{width:140px;height:3px;background:var(--line);border-radius:3px;overflow:hidden;margin-top:10px}  /* Splash loading bar track */
.sbar i{display:block;width:40%;height:100%;background:var(--red);border-radius:3px;animation:sbar 1.1s infinite}  /* Splash loading bar moving part */
@keyframes spl{50%{transform:scale(1.06)}}  /* Animation: splash logo pulses */
@keyframes sbar{from{margin-left:-40%}to{margin-left:100%}}  /* Animation: loading bar slides */
/* back button */
.backbar{padding:12px 0 2px}  /* Back bar at the top of sub-pages */
.bbtn{background:var(--card);border:1px solid var(--line);color:var(--white);border-radius:30px;padding:8px 16px;font-weight:600;font-size:.92rem;cursor:pointer;display:inline-flex;gap:6px;align-items:center;font-family:inherit;width:auto;box-shadow:none}  /* "Back" button */
.bbtn:active{background:var(--card2)}  /* Back button pressed colour */
.mback{position:fixed;top:calc(14px + env(safe-area-inset-top,0px));left:14px;z-index:2}  /* Floating back button */
/* WHITE PAGE BACKGROUND - dark cards, bars, dialogs and buttons are unchanged */
.avatar,.barbg,.bbtn:active,.card,.convo-item,.dr,.mlist,.msg.user,.sbar,.wm.in,.wr,.xs span,/* WhatsApp-style chat */  /* Dark boxes keep their dark colour on the red page */
.chatbox{color:var(--white)}  /* Chat text colour */
.nav{background:#070605}  /* Bottom bar background */
.fwdc{color:var(--white)}  /* Forward box text colour */
.fcard,.fcard-content{color:var(--white)}  /* Feature card text colour */
/* FULL RED + BLACK BACKGROUND (dark cards, bars, dialogs unchanged) */
html{background:#8f0c18}  /* Red page background colour */
body{background:transparent!important;color:#fff;position:relative}  /* Page transparent so the red background shows */
body::before{content:'';position:fixed;inset:0;z-index:0;pointer-events:none;  /* Glow layer behind the page */
 background:radial-gradient(520px 380px at 100% 0,rgba(255,255,255,.16),transparent 62%),radial-gradient(640px 460px at 0 100%,rgba(0,0,0,.72),transparent 66%),linear-gradient(155deg,#e11d2e 0%,#c0121f 38%,#7d0a15 70%,#14090a 100%)}  /* Glow colours (white top-right, black bottom-left) */
#app{position:relative;z-index:1}  /* App container above the glow */
#app>.hero h1,#app>.hero h2,#app>h1,#app>h2,#app>h3,#backBar+h2{color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.35)}  /* White headings with a soft shadow */
#app>.hero p,#app>.hero .small,#app>.small,#app>p,.splash small,.mlabel{color:rgba(255,255,255,.86)}  /* Soft white small text */
.hero .logo{box-shadow:0 0 0 3px rgba(255,255,255,.92),0 12px 28px -8px rgba(0,0,0,.6)}  /* White ring around the hero logo */
.splash b{color:#fff}  /* White splash name */
#app>h2,#app>h3,.mlabel{border-left:4px solid #fff;padding-left:10px}  /* White bar before headings and labels */
.mlabel{font-weight:700;text-transform:uppercase;letter-spacing:.06em;font-size:.76rem}  /* Menu label style (capital letters) */
.sbar{background:rgba(255,255,255,.3)}  /* Splash bar track on red */
.sbar i{background:#fff}  /* Splash bar fill white */
.bbtn{background:#0a0908;color:#fff;border-color:rgba(255,255,255,.25)}  /* Back button colours on red */
.topbar .linklike{background:#0a0908;color:#fff;border:1px solid rgba(255,255,255,.25);border-radius:20px;padding:6px 14px;font-weight:600;display:inline-block;box-shadow:0 6px 16px -6px rgba(0,0,0,.6)}  /* Top bar link style */

/* documents + upload progress */
.doc{display:flex;align-items:center;gap:12px;padding:12px 2px;border-bottom:1px solid var(--line)}  /* Document row */
.doc:last-child{border-bottom:none}  /* No line under the last document */
.doc .ic{font-size:26px}  /* Document icon size */
.doc .t{flex:1;min-width:0}  /* Document text column */
.doc .t b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}  /* Document name (one line) */
.pbar{height:6px;background:var(--line);border-radius:6px;overflow:hidden;margin:8px 0 2px}  /* Upload progress track */
.pbar i{display:block;height:100%;width:0;background:var(--red);transition:width .2s}  /* Upload progress fill */
