:root{
  --primary:#F47D35;
  --primary-dark:#D95F17;
  --primary-light:#FFF1E8;
  --accent:#FFD166;
  --text:#1f2937;
  --muted:#667085;
  --success:#0b8f60;
  --danger:#c40000;
  --bg:#fff7f2;
  --card:#ffffff;
  --shadow:0 12px 30px rgba(0,0,0,.12);
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  font-family:Arial, sans-serif;
  min-height:100vh;
  color:var(--text);
}

body{
  background:#f5f7f8;
}

/* ---------------- Login Page ---------------- */
.login-wrapper{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:linear-gradient(135deg,var(--primary),#FFD4BF);
}

.login-card{
  width:100%;
  max-width:430px;
  background:#fff;
  border-radius:18px;
  padding:28px 22px;
  text-align:center;
  box-shadow:0 18px 40px rgba(0,0,0,.25);
}

/* Use either ME badge or logo image safely */
.brand-badge{
  width:72px;
  height:72px;
  margin:0 auto 14px;
  border-radius:50%;
  background:var(--primary);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:26px;
}

.login-logo{
  text-align:center;
  margin-bottom:15px;
}

.login-logo img,
.login-card > img,
.login-card img.logo{
  width:96px !important;
  height:96px !important;
  max-width:96px !important;
  max-height:96px !important;
  object-fit:contain;
  display:block;
  margin:0 auto 14px;
  border-radius:50%;
  background:#fff;
  padding:4px;
  box-shadow:0 8px 20px rgba(0,0,0,.12);
}

.login-card h1{
  margin:0;
  color:var(--primary);
  font-size:28px;
}

.subtitle{
  color:#555;
  font-size:15px;
  margin:10px 0 22px;
  line-height:1.45;
}

.login-card input{
  width:100%;
  height:52px;
  margin:9px 0;
  padding:14px;
  border:1px solid #ccc;
  border-radius:10px;
  font-size:16px;
}

.login-card button{
  width:100%;
  height:52px;
  margin-top:12px;
  border:0;
  border-radius:10px;
  background:var(--primary);
  color:#fff;
  font-size:16px;
  font-weight:700;
  cursor:pointer;
}

.login-card button:hover{
  background:var(--primary-dark);
}

.error{
  background:#ffecec;
  color:var(--danger);
  border:1px solid #ffb7b7;
  padding:10px;
  border-radius:8px;
  margin-bottom:12px;
}

.success{
  background:#eafff1;
  color:#056333;
  border:1px solid #9ee5b8;
  padding:10px;
  border-radius:8px;
  margin-bottom:12px;
}

.footer-text{
  font-size:12px;
  color:#777;
  margin-top:18px;
}

/* ---------------- Live Page ---------------- */
.live-body{
  background:var(--bg);
  overflow-x:hidden;
}

.live-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  background:var(--primary);
  color:#fff;
  padding:16px 24px;
  gap:14px;
}

.live-header-left,
.live-header > div{
  flex:1;
  min-width:0;
}

.live-header h2{
  margin:0;
  font-size:24px;
  line-height:1.22;
  font-weight:800;
}

.live-header p{
  margin:6px 0 0;
  font-size:15px;
  opacity:.92;
}

.logout-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:var(--primary) !important;
  text-decoration:none;
  padding:9px 14px;
  border-radius:12px;
  font-weight:800;
  white-space:nowrap;
  box-shadow:0 6px 14px rgba(0,0,0,.14);
  min-width:auto;
  height:auto;
  line-height:1.2;
}

.logout-btn:hover{
  background:#fff;
  color:var(--primary-dark) !important;
}

.video-container{
  width:100%;
  max-width:1200px;
  margin:22px auto;
  padding:0 14px;
}

.video-box{
  width:100%;
  aspect-ratio:16/9;
  background:#000;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 12px 30px rgba(0,0,0,.22);
}

.video-box iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

.note{
  text-align:center;
  color:#555;
  font-size:17px;
  line-height:1.55;
  margin:18px auto 0;
}

/* ---------------- Notification Bell ---------------- */
.notice-bell{
  position:fixed;
  right:18px;
  bottom:22px;
  width:56px;
  height:56px;
  border:0;
  border-radius:50%;
  background:var(--primary);
  color:#fff;
  font-size:25px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
  cursor:pointer;
  z-index:9999;
}

.notice-dot,
.chat-dot{
  position:absolute;
  right:10px;
  top:8px;
  width:12px;
  height:12px;
  background:#ff3333;
  border:2px solid #fff;
  border-radius:50%;
  display:none;
}

.notice-popup{
  position:fixed;
  right:18px;
  bottom:90px;
  width:340px;
  max-width:calc(100vw - 30px);
  background:#fff;
  border-radius:16px;
  box-shadow:0 18px 45px rgba(0,0,0,.25);
  overflow:hidden;
  transform:translateY(18px);
  opacity:0;
  pointer-events:none;
  transition:.25s;
  z-index:9998;
}

.notice-popup.show{
  transform:translateY(0);
  opacity:1;
  pointer-events:auto;
}

.notice-popup-head{
  background:linear-gradient(135deg,var(--primary),var(--primary-dark));
  color:#fff;
  padding:13px 14px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
}

.notice-popup-head strong{
  display:block;
  font-size:16px;
}

.notice-popup-head small{
  display:block;
  font-size:11px;
  opacity:.8;
  margin-top:3px;
}

.notice-close{
  background:rgba(255,255,255,.18);
  border:0;
  color:#fff;
  border-radius:50%;
  width:28px;
  height:28px;
  font-size:22px;
  line-height:24px;
  cursor:pointer;
}

.notice-popup-body{
  padding:15px;
  color:#333;
  font-size:15px;
  line-height:1.5;
}


/* ---------------- Live Poll ---------------- */
.student-poll-card{
  background:linear-gradient(135deg,#ffffff,#fff4ee);
  border-radius:18px;
  box-shadow:0 12px 32px rgba(244,125,53,.16);
  padding:18px;
  margin:20px auto 0;
  max-width:850px;
  border:1px solid #ffd7c2;
}

.student-poll-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.student-poll-head strong{
  display:block;
  color:var(--primary);
  font-size:23px;
}

.student-poll-head span{
  display:block;
  color:#666;
  font-size:14px;
  margin-top:4px;
}

.poll-live-badge{
  background:#eafff1;
  color:#056333 !important;
  border:1px solid #bdebcf;
  font-size:12px !important;
  font-weight:900;
  letter-spacing:.5px;
  padding:6px 10px;
  border-radius:999px;
  margin-top:0 !important;
}

.poll-box{
  margin-top:10px;
}

.poll-form h3{
  margin:0 0 14px;
  color:#1f2937;
  font-size:20px;
  line-height:1.35;
}

.poll-options{
  display:grid;
  gap:10px;
}

.poll-option{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:13px;
  border:1px solid #f0d2c3;
  border-radius:13px;
  background:#fff;
  cursor:pointer;
  transition:.2s;
}

.poll-option:hover{
  border-color:var(--primary);
  box-shadow:0 8px 18px rgba(244,125,53,.12);
}

.poll-option input{
  margin-top:3px;
  accent-color:var(--primary);
}

.poll-option span{
  color:#333;
  line-height:1.45;
}

.poll-form button{
  margin-top:13px;
  background:var(--primary);
  color:#fff;
  border:0;
  border-radius:12px;
  padding:13px 18px;
  font-weight:900;
  font-size:15px;
  cursor:pointer;
}

.poll-form button:hover{
  background:var(--primary-dark);
}

.poll-thankyou{
  display:flex;
  align-items:center;
  gap:12px;
  background:#eafff1;
  border:1px solid #bdebcf;
  color:#064e3b;
  border-radius:14px;
  padding:15px;
}

.poll-thankyou strong{
  display:block;
  font-size:18px;
}

.poll-thankyou span{
  display:block;
  font-size:14px;
  color:#37604a;
  margin-top:3px;
}

.poll-check{
  width:38px;
  height:38px;
  border-radius:50%;
  background:#0b8f60;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  flex:0 0 auto;
}

/* ---------------- Poll Admin / Results ---------------- */
.poll-admin-wide{
  max-width:1100px;
}

.poll-options-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px 14px;
}

.poll-admin-list{
  display:grid;
  gap:14px;
}

.poll-admin-item{
  border:1px solid #eee;
  border-left:6px solid #ddd;
  border-radius:16px;
  padding:15px;
  background:#fff;
  display:flex;
  justify-content:space-between;
  gap:14px;
  box-shadow:0 8px 20px rgba(0,0,0,.06);
}

.poll-status-active{border-left-color:#0b8f60}
.poll-status-draft{border-left-color:#d99b00}
.poll-status-closed{border-left-color:#667085}

.poll-admin-main h3{
  margin:8px 0;
  color:#1f2937;
  line-height:1.35;
}

.poll-admin-main p{
  color:#666;
  margin:6px 0;
}

.poll-admin-main ol{
  margin:8px 0 0 20px;
  padding:0;
  color:#333;
  line-height:1.6;
}

.poll-status-pill{
  display:inline-flex;
  align-items:center;
  background:var(--primary-light);
  color:var(--primary);
  border:1px solid #ffd2bd;
  border-radius:999px;
  padding:5px 9px;
  font-size:12px;
  font-weight:900;
}

.poll-admin-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:140px;
}

.poll-admin-actions button,
.poll-admin-actions a{
  border:0;
  border-radius:10px;
  padding:10px 12px;
  background:var(--primary);
  color:#fff;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
  text-align:center;
  font-size:14px;
}

.poll-admin-actions button.secondary,
.poll-admin-actions a.secondary{
  background:#fff;
  color:var(--primary);
  border:1px solid #ffd2bd;
}

.poll-result-card h2{
  margin:8px 0;
  color:#1f2937;
}

.poll-result-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
}

.poll-result-bars{
  display:grid;
  gap:13px;
  margin-top:12px;
}

.poll-bar-label{
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:#333;
  font-size:14px;
  line-height:1.4;
}

.poll-bar-label span{
  color:#666;
  white-space:nowrap;
}

.poll-bar-track{
  height:12px;
  background:#fff1e8;
  border-radius:999px;
  overflow:hidden;
  margin-top:6px;
}

.poll-bar-fill{
  height:100%;
  background:linear-gradient(90deg,var(--primary),var(--primary-dark));
  border-radius:999px;
}


/* ---------------- Student Q&A ---------------- */
.student-qna-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 10px 28px rgba(0,0,0,.10);
  padding:18px;
  margin:20px auto 80px;
  max-width:850px;
  border:1px solid #edf0f2;
}

.student-qna-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.student-qna-head strong{
  display:block;
  color:var(--primary);
  font-size:22px;
}

.student-qna-head span{
  display:block;
  color:#666;
  font-size:14px;
  margin-top:4px;
}

.student-qna-form textarea{
  width:100%;
  border:1px solid #d8dde2;
  border-radius:12px;
  padding:13px;
  font-size:16px;
  resize:vertical;
  outline:none;
}

.student-qna-form textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(244,125,53,.16);
}

.student-qna-form button{
  margin-top:10px;
  background:var(--primary);
  color:#fff;
  border:0;
  border-radius:12px;
  padding:13px 18px;
  font-weight:800;
  font-size:15px;
  cursor:pointer;
}

.student-qna-status{
  font-size:14px;
  color:#056333;
  margin-top:8px;
}

.student-replies{
  margin-top:16px;
  display:grid;
  gap:10px;
}

.reply-item{
  border:1px solid #e7eaee;
  background:#fafafa;
  border-radius:12px;
  padding:12px;
}

.reply-question{
  color:#333;
  font-size:14px;
  line-height:1.45;
}

.reply-answer{
  margin-top:8px;
  background:#eafff1;
  border:1px solid #bdebcf;
  color:#064e3b;
  border-radius:10px;
  padding:10px;
  font-size:14px;
  line-height:1.45;
}

.reply-pending{
  margin-top:8px;
  color:#996b00;
  background:#fff7df;
  border:1px solid #ffe0a3;
  border-radius:10px;
  padding:9px;
  font-size:13px;
}

.reply-item small{
  display:block;
  margin-top:7px;
  color:#777;
}

.empty-reply{
  color:#777;
  background:#f6f8f9;
  border-radius:10px;
  padding:12px;
  text-align:center;
}

.chat-float-btn{
  position:fixed;
  right:18px;
  bottom:92px;
  width:56px;
  height:56px;
  border:0;
  border-radius:50%;
  background:#fff;
  color:var(--primary);
  font-size:25px;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
  cursor:pointer;
  z-index:9997;
}

/* ---------------- Live Monitor ---------------- */
.monitor-wrap{
  max-width:1180px;
  margin:0 auto;
  padding:20px 14px;
}

.monitor-head{
  background:#fff;
  border-radius:16px;
  padding:18px 20px;
  box-shadow:0 12px 32px rgba(0,0,0,.10);
}

.monitor-head h1{
  margin:0 0 8px;
  color:var(--primary);
}

.monitor-login-card{
  max-width:420px;
}

.monitor-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#fff;
  border-radius:14px;
  padding:12px 14px;
  margin:14px 0;
  box-shadow:0 8px 24px rgba(0,0,0,.10);
}

.monitor-toolbar button{
  background:var(--primary);
  color:#fff;
  border:0;
  border-radius:10px;
  padding:10px 14px;
  font-weight:800;
  cursor:pointer;
}

.monitor-toolbar span{
  color:#666;
  font-size:14px;
}

.messages-list{
  display:grid;
  gap:12px;
}

.message-card{
  background:#fff;
  border-radius:16px;
  padding:15px;
  box-shadow:0 8px 24px rgba(0,0,0,.10);
  border-left:5px solid var(--accent);
}

.message-card.answered{
  border-left-color:var(--success);
}

.message-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px;
  align-items:center;
  color:#555;
}

.message-meta strong{
  color:var(--primary);
  font-size:17px;
}

.message-meta span,
.message-meta small{
  font-size:13px;
  color:#666;
}

.message-text{
  margin:12px 0;
  background:#f6f8f9;
  border-radius:12px;
  padding:12px;
  color:#222;
  line-height:1.5;
}

.admin-reply-show{
  background:#eafff1;
  border:1px solid #bdebcf;
  color:#064e3b;
  border-radius:12px;
  padding:12px;
  margin-bottom:10px;
  line-height:1.45;
}

.reply-form{
  display:flex;
  gap:10px;
  align-items:flex-start;
}

.reply-form textarea{
  flex:1;
  border:1px solid #d8dde2;
  border-radius:10px;
  padding:10px;
  font-size:15px;
  resize:vertical;
}

.reply-form button{
  background:var(--primary);
  color:#fff;
  border:0;
  border-radius:10px;
  padding:11px 14px;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}

.empty-monitor{
  background:#fff;
  border-radius:14px;
  padding:22px;
  text-align:center;
  color:#777;
  box-shadow:0 8px 24px rgba(0,0,0,.10);
}

/* ---------------- Report / Admin Basic ---------------- */
.report-body,
.admin-body{
  background:var(--bg);
}

.report-wrap{
  max-width:1200px;
  margin:30px auto;
  padding:0 15px;
}

.report-wrap h1,
.report-wrap h2{
  color:var(--primary);
}

.stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-bottom:20px;
}

.stats div{
  background:#fff;
  padding:18px;
  border-radius:12px;
  box-shadow:0 4px 15px rgba(0,0,0,.08);
}

.stats strong{
  display:block;
  font-size:30px;
  color:var(--primary);
}

.stats span{
  color:#555;
}

.table-wrap{
  overflow:auto;
  background:#fff;
  border-radius:12px;
  box-shadow:0 4px 15px rgba(0,0,0,.08);
}

table{
  border-collapse:collapse;
  width:100%;
  min-width:900px;
}

th,td{
  padding:10px;
  border-bottom:1px solid #eee;
  text-align:left;
  font-size:14px;
}

th{
  background:var(--primary);
  color:#fff;
}

.admin-card{
  max-width:720px;
  margin:20px auto;
  background:#fff;
  border-radius:18px;
  padding:22px;
  box-shadow:0 18px 45px rgba(0,0,0,.18);
}

.admin-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:15px;
}

.admin-head h1{
  margin:0;
  color:var(--primary);
}

.admin-head p{
  margin:6px 0 0;
  color:#666;
}

.admin-logout{
  background:var(--accent);
  color:var(--primary);
  text-decoration:none;
  padding:10px 14px;
  border-radius:9px;
  font-weight:700;
}

.admin-form label{
  display:block;
  margin:12px 0 6px;
  font-weight:700;
  color:var(--primary);
}

.admin-form input,
.admin-form textarea{
  width:100%;
  padding:13px;
  border:1px solid #ccc;
  border-radius:10px;
  font-size:16px;
}

.admin-form button{
  width:100%;
  margin-top:14px;
  padding:14px;
  border:0;
  border-radius:10px;
  background:var(--primary);
  color:#fff;
  font-weight:800;
  font-size:16px;
  cursor:pointer;
}

.recent-title{
  color:var(--primary);
  margin-top:24px;
}

.recent-notice-item{
  border:1px solid #eee;
  border-radius:12px;
  padding:12px;
  margin-top:10px;
  background:#fafafa;
}

/* ---------------- Advanced Dashboard ---------------- */
.dashboard-shell{
  display:flex;
  min-height:100vh;
  background:#f3f5f6;
}

.dashboard-sidebar{
  width:260px;
  background:var(--primary);
  color:#fff;
  padding:24px 18px;
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  overflow:auto;
}

.dash-logo{
  width:54px;
  height:54px;
  border-radius:16px;
  background:#fff;
  color:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  font-weight:900;
  margin-bottom:14px;
}

.dashboard-sidebar h2{
  margin:0 0 24px;
  font-size:22px;
}

.dashboard-sidebar a{
  display:block;
  color:#fff;
  text-decoration:none;
  padding:12px 14px;
  border-radius:10px;
  margin-bottom:7px;
  opacity:.94;
}

.dashboard-sidebar a:hover{
  background:rgba(255,255,255,.14);
}

.dashboard-sidebar .danger-link{
  background:#fff;
  color:var(--primary);
  font-weight:800;
  margin-top:18px;
}

.dashboard-main{
  margin-left:260px;
  width:calc(100% - 260px);
  padding:28px;
}

.dashboard-top{
  display:flex;
  justify-content:space-between;
  gap:15px;
  align-items:flex-start;
  margin-bottom:18px;
}

.dashboard-top h1{
  margin:0;
  color:var(--primary);
  font-size:32px;
}

.dashboard-top p{
  margin:6px 0 0;
  color:#666;
}

.dashboard-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.dash-btn{
  background:var(--primary);
  color:#fff;
  text-decoration:none;
  padding:11px 14px;
  border-radius:10px;
  font-weight:800;
}

.dash-btn.secondary{
  background:#fff;
  color:var(--primary);
  border:1px solid #ffd2bd;
}

.admin-stats{
  grid-template-columns:repeat(6,1fr);
}

.dashboard-card{
  background:#fff;
  border-radius:16px;
  padding:20px;
  margin-top:20px;
  box-shadow:0 8px 24px rgba(0,0,0,.07);
}

.section-head h2{
  margin:0;
  color:var(--primary);
}

.section-head p{
  margin:6px 0 16px;
  color:#666;
}

.import-form,
.filter-form{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.import-form input,
.filter-form input,
.filter-form select{
  padding:12px;
  border:1px solid #ccc;
  border-radius:10px;
  font-size:15px;
  background:#fff;
}

.import-form button,
.filter-form button{
  border:0;
  background:var(--primary);
  color:#fff;
  border-radius:10px;
  padding:13px 16px;
  font-weight:800;
  cursor:pointer;
}

.hint{
  color:#666;
  font-size:14px;
}

.clear-filter{
  color:var(--primary);
  text-decoration:none;
  font-weight:800;
}

.status-pill{
  display:inline-block;
  padding:5px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}

.success-pill{
  background:#eafff1;
  color:#056333;
}

.fail-pill{
  background:#ffecec;
  color:#c40000;
}

.login-admin-card{
  max-width:460px;
  margin-top:80px;
}

.mini-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}

.mini-grid div{
  background:#fff;
  border:1px solid #eee;
  border-radius:12px;
  padding:15px;
}

.mini-grid strong{
  display:block;
  font-size:24px;
  color:var(--primary);
}

.mini-grid span{
  color:#555;
}

.table-wrap table{
  min-width:1500px;
}

/* ---------------- Generic fallback for old/unclassed report pages ---------------- */
body:not(.live-body):not(.report-body):not(.admin-body) > h1,
body:not(.live-body):not(.report-body):not(.admin-body) > h2,
body:not(.live-body):not(.report-body):not(.admin-body) > p,
body:not(.live-body):not(.report-body):not(.admin-body) > form,
body:not(.live-body):not(.report-body):not(.admin-body) > a{
  margin-left:18px;
  margin-right:18px;
}

body:not(.live-body):not(.report-body):not(.admin-body) h1,
body:not(.live-body):not(.report-body):not(.admin-body) h2{
  color:var(--primary);
}

body:not(.live-body):not(.report-body):not(.admin-body) a{
  color:var(--primary);
  font-weight:700;
}

body:not(.live-body):not(.report-body):not(.admin-body) button,
body:not(.live-body):not(.report-body):not(.admin-body) input[type="submit"]{
  background:var(--primary);
  color:#fff;
  border:0;
  border-radius:8px;
  padding:8px 12px;
  font-weight:700;
}

/* ---------------- Responsive ---------------- */
@media(max-width:900px){
  .dashboard-shell{
    display:block;
  }

  .dashboard-sidebar{
    position:relative;
    width:100%;
    display:block;
  }

  .dashboard-main{
    margin-left:0;
    width:100%;
    padding:16px;
  }

  .dashboard-top{
    flex-direction:column;
  }

  .admin-stats{
    grid-template-columns:repeat(2,1fr);
  }

  .dashboard-sidebar a{
    display:inline-block;
    margin:4px;
  }

  .table-wrap{
    overflow-x:auto;
  }
}

@media(max-width:600px){
  .login-wrapper{
    align-items:flex-start;
    padding:42px 14px 18px;
  }

  .login-card{
    padding:24px 16px;
    border-radius:20px;
  }

  .login-card h1{
    font-size:24px;
  }

  .login-logo img,
  .login-card > img,
  .login-card img.logo{
    width:82px !important;
    height:82px !important;
    max-width:82px !important;
    max-height:82px !important;
  }

  .brand-badge{
    width:68px;
    height:68px;
    font-size:24px;
  }

  .live-header{
    flex-direction:row !important;
    justify-content:space-between !important;
    align-items:flex-start !important;
    padding:14px 16px !important;
    gap:10px !important;
  }

  .live-header-left,
  .live-header > div{
    flex:1 !important;
    min-width:0 !important;
  }

  .live-header h2{
    font-size:18px !important;
    line-height:1.2 !important;
    margin:0 !important;
  }

  .live-header p{
    display:none !important;
  }

  .logout-btn{
    padding:8px 12px !important;
    font-size:14px !important;
    border-radius:10px !important;
    white-space:nowrap !important;
    min-width:auto !important;
    height:auto !important;
    box-shadow:0 5px 12px rgba(0,0,0,.14) !important;
  }

  .video-container{
    margin-top:14px;
    padding:0 10px;
  }

  .video-box{
    border-radius:12px;
  }

  .note{
    font-size:15px !important;
    padding:0 10px;
  }

  .stats,
  .admin-stats,
  .mini-grid{
    grid-template-columns:1fr;
  }

  .notice-bell{
    right:14px;
    bottom:16px;
    width:54px;
    height:54px;
  }

  .notice-popup{
    right:14px;
    bottom:82px;
  }

  .chat-float-btn{
    right:14px;
    bottom:82px;
    width:54px;
    height:54px;
  }

  .student-qna-card{
    margin:16px 10px 78px;
    padding:14px;
    border-radius:14px;
  }

  .student-qna-head strong{
    font-size:18px;
  }

  .student-qna-head span{
    font-size:13px;
  }

  .student-qna-form button{
    width:100%;
    padding:13px;
  }

  .reply-form{
    flex-direction:column;
  }

  .reply-form button{
    width:100%;
  }

  .monitor-head{
    border-radius:14px;
  }

  .message-card{
    padding:13px;
  }

  .message-meta{
    display:block;
  }

  .message-meta span,
  .message-meta small{
    display:block;
    margin-top:4px;
  }

  .admin-body{
    padding:12px;
  }

  .admin-card{
    padding:18px;
  }

  .admin-head h1{
    font-size:24px;
  }

  .dashboard-main{
    padding:12px;
  }

  .dashboard-top h1{
    font-size:25px;
  }

  .dashboard-card{
    padding:15px;
  }

  .import-form,
  .filter-form{
    display:block;
  }

  .import-form input,
  .filter-form input,
  .filter-form select,
  .import-form button,
  .filter-form button{
    width:100%;
    margin-bottom:9px;
  }

  .dashboard-actions a{
    width:100%;
    text-align:center;
  }
  .student-poll-card{
    margin:16px 10px 0;
    padding:14px;
    border-radius:14px;
  }

  .student-poll-head strong{
    font-size:19px;
  }

  .poll-form h3{
    font-size:17px;
  }

  .poll-form button{
    width:100%;
  }

  .poll-options-grid{
    grid-template-columns:1fr;
  }

  .poll-admin-item{
    display:block;
  }

  .poll-admin-actions{
    margin-top:12px;
    min-width:0;
  }

  .poll-bar-label{
    display:block;
  }

  .poll-bar-label span{
    display:block;
    margin-top:4px;
  }

}


/* ------- Forced visible Poll + Q&A floating button fix ------- */
.webinar-interaction-area{
  width:100%;
  max-width:900px;
  margin:0 auto 90px;
  padding:0 14px;
}
.student-poll-card{
  display:block !important;
  background:linear-gradient(135deg,#ffffff,#fff4ee);
  border-radius:18px;
  box-shadow:0 12px 32px rgba(244,125,53,.16);
  padding:18px;
  margin:20px auto 0;
  max-width:850px;
  border:1px solid #ffd7c2;
}
.poll-empty{
  margin-top:12px;
  background:#f6f8f9;
  color:#777;
  border-radius:12px;
  padding:14px;
  text-align:center;
}
.live-pulse-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#eafff1;
  color:#056333;
  border:1px solid #bdebcf;
  border-radius:999px;
  padding:4px 9px;
  font-size:12px;
  font-weight:900;
  margin-right:6px;
}
.live-pulse-badge span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#0b8f60;
  display:inline-block;
  animation:livePulse 1.2s infinite;
}
@keyframes livePulse{
  0%{box-shadow:0 0 0 0 rgba(11,143,96,.45);}
  70%{box-shadow:0 0 0 8px rgba(11,143,96,0);}
  100%{box-shadow:0 0 0 0 rgba(11,143,96,0);}
}
.chat-float-btn{
  position:fixed !important;
  right:18px !important;
  bottom:92px !important;
  width:56px !important;
  height:56px !important;
  border:0 !important;
  border-radius:50% !important;
  background:#fff !important;
  color:var(--primary,#F47D35) !important;
  font-size:25px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-shadow:0 12px 30px rgba(0,0,0,.25) !important;
  cursor:pointer !important;
  z-index:10050 !important;
}
@media(max-width:600px){
  .webinar-interaction-area{
    padding:0 10px;
    margin-bottom:90px;
  }
  .student-qna-card{
    display:none !important;
    margin:16px 0 92px !important;
  }
  .student-qna-card.qna-open{
    display:block !important;
  }
  .student-poll-card{
    display:block !important;
    margin:16px 0 0 !important;
    padding:14px !important;
  }
  .chat-float-btn{
    right:14px !important;
    bottom:86px !important;
    width:54px !important;
    height:54px !important;
  }
  .notice-bell{
    right:14px !important;
    bottom:18px !important;
  }
}



/* -------- Compact Mobile Poll Header -------- */
.student-poll-head{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  margin-bottom:8px !important;
}

.student-poll-head > div{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
}

.student-poll-head strong{
  margin:0 !important;
  line-height:1.1 !important;
}

.student-poll-head span{
  margin-top:0 !important;
}

.live-pulse-badge{
  margin-right:0 !important;
}

@media(max-width:600px){
  .student-poll-card{
    padding:12px !important;
  }

  .student-poll-head{
    margin-bottom:6px !important;
  }

  .student-poll-head strong{
    font-size:22px !important;
  }

  .student-poll-head span{
    font-size:12px !important;
  }

  .live-pulse-badge{
    padding:3px 8px !important;
    font-size:12px !important;
  }

  .poll-form h3{
    margin:8px 0 10px !important;
    font-size:24px !important;
    line-height:1.25 !important;
  }

  .poll-options{
    gap:8px !important;
  }

  .poll-option{
    padding:10px 12px !important;
    margin:0 !important;
    min-height:auto !important;
  }

  .poll-form button{
    margin-top:10px !important;
    padding:12px !important;
  }
  
  .poll-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:8px;
}

.poll-title{
    font-size:18px;
    font-weight:700;
    color:#f47d35;
}

.live-badge{
    background:#eafaf1;
    color:#16a34a;
    border:1px solid #b7ebc6;
    border-radius:20px;
    padding:4px 10px;
    font-size:12px;
    font-weight:700;
    animation:pulse 1.5s infinite;
}
}


/* ===== Safe Compact Poll Mobile UI Fix ===== */
/* Added to keep Live Poll + LIVE badge in one row and fit submit button better on mobile */

.student-poll-head{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:8px !important;
  margin-bottom:4px !important;
}

.student-poll-head > div{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex-wrap:nowrap !important;
}

.student-poll-head strong{
  font-size:18px !important;
  line-height:1.1 !important;
  margin:0 !important;
  white-space:nowrap !important;
}

.live-pulse-badge{
  padding:2px 8px !important;
  font-size:11px !important;
  margin:0 !important;
  white-space:nowrap !important;
}

@media(max-width:600px){

  .student-poll-card{
    padding:10px 12px !important;
  }

  .student-poll-head{
    margin-bottom:4px !important;
  }

  .student-poll-head strong{
    font-size:18px !important;
  }

  .student-poll-head span{
    font-size:11px !important;
  }

  .poll-form h3{
    font-size:16px !important;
    line-height:1.28 !important;
    margin:6px 0 8px !important;
  }

  .poll-options{
    gap:7px !important;
  }

  .poll-option{
    padding:8px 10px !important;
    font-size:14px !important;
    border-radius:10px !important;
  }

  .poll-option input{
    margin-top:2px !important;
  }

  .poll-form button{
    margin-top:8px !important;
    padding:10px !important;
    font-size:14px !important;
    border-radius:10px !important;
  }
}



/* ===== Poll Auto Popup + Live Percentage Addon ===== */
.poll-auto-popup{
  position:fixed;
  right:18px;
  bottom:156px;
  width:340px;
  max-width:calc(100vw - 28px);
  background:#fff;
  border:1px solid #ffd7c2;
  border-radius:18px;
  box-shadow:0 18px 45px rgba(0,0,0,.22);
  padding:16px 16px 16px 14px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  z-index:10070;
  transform:translateY(18px);
  opacity:0;
  pointer-events:none;
  transition:.25s ease;
}

.poll-auto-popup.show{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.poll-auto-icon{
  width:44px;
  height:44px;
  border-radius:50%;
  background:var(--primary-light);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  flex:0 0 auto;
}

.poll-auto-popup strong{
  display:block;
  color:var(--primary);
  font-size:16px;
  margin-bottom:4px;
}

.poll-auto-popup p{
  margin:0 0 10px;
  color:#555;
  font-size:13px;
  line-height:1.35;
}

.poll-auto-popup button#pollAutoGoBtn{
  background:var(--primary);
  color:#fff;
  border:0;
  border-radius:10px;
  padding:9px 12px;
  font-weight:800;
  cursor:pointer;
}

.poll-auto-close{
  position:absolute;
  top:8px;
  right:8px;
  width:26px;
  height:26px;
  border-radius:50%;
  border:0;
  background:#fff1e8;
  color:var(--primary);
  font-size:18px;
  cursor:pointer;
}

.student-poll-live-result{
  margin-top:12px;
  background:#fff;
  border:1px solid #ffe0cf;
  border-radius:14px;
  padding:12px;
}

.poll-result-mini-title{
  color:var(--primary);
  font-weight:900;
  font-size:15px;
  margin-bottom:2px;
}

.poll-result-mini-sub{
  color:#666;
  font-size:12px;
  margin-bottom:10px;
}

.poll-mini-row{
  margin-top:9px;
}

.poll-mini-label{
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:#333;
  font-size:13px;
  line-height:1.3;
}

.poll-mini-label b{
  color:var(--primary);
  white-space:nowrap;
}

.poll-mini-track{
  height:8px;
  background:#fff1e8;
  border-radius:999px;
  overflow:hidden;
  margin-top:5px;
}

.poll-mini-fill{
  height:100%;
  background:linear-gradient(90deg,var(--primary),var(--primary-dark));
  border-radius:999px;
  transition:.3s ease;
}

.poll-mini-row small{
  display:block;
  margin-top:3px;
  color:#777;
  font-size:11px;
}

@media(max-width:600px){
  .poll-auto-popup{
    right:12px;
    bottom:150px;
    width:calc(100vw - 24px);
    padding:14px;
  }

  .student-poll-live-result{
    padding:10px;
  }
}
