:root { 
  --primary-blue: #0056b3; 
  --bg-color: #f4f7f6; 
  --card-bg: #ffffff; 
  --text-main: #2c3e50; 
  --text-muted: #5c6873; 
  --danger: #e74c3c; 
  --accent: #17a2b8;
  --footer-bg: #03264a;
}

/* =========================================================
   GLOBAL RESET & PREVENT HORIZONTAL SCROLL
   ========================================================= */
html, body {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip; 
  margin: 0;
  padding: 0;
}

*, *::before, *::after {
  box-sizing: border-box; 
}

body { 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
  background-color: var(--bg-color); 
  padding-top: 70px;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center; 
}

.app-container {
  flex: 1 1 auto;
  display: flex;
  width: 100%;
  max-width: 100vw;
  justify-content: center; 
}

/* =========================================================
   TOP NAVIGATION BAR
   ========================================================= */
.navbar { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  max-width: 100vw;
  background: #ffffff; 
  border-bottom: 1px solid #e1e4e8; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.03); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 10px 3vw; 
  z-index: 1000;
}

.navbar-left { 
  display: flex; 
  align-items: center; 
  gap: 15px; 
  cursor: pointer; 
  transition: transform 0.2s;
  flex-shrink: 0;
}
.navbar-left:hover { transform: scale(0.98); }
.navbar-left h1 { font-size: 22px; margin: 0; font-weight: 700; white-space: nowrap; letter-spacing: 0.5px; color: var(--primary-blue);}

.navbar-right { 
  display: flex; 
  align-items: center; 
  gap: 15px; 
  flex: 1; 
  justify-content: flex-end;
}

/* Fluid Search Bar */
.search-container { 
  position: relative; 
  flex: 1;
  max-width: 600px;
  min-width: 150px; 
  margin-right: 15px;
}
.search-container input { width: 100%; padding: 10px 40px 10px 20px; border: 1px solid transparent; border-radius: 30px; font-size: 14px; outline: none; background-color: #f0f2f5; color: #333; transition: 0.3s;}
.search-container input::placeholder { color: #888; }
.search-container input:focus { background-color: #fff; border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1); }
.search-container i { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: #888; transition: 0.2s; font-size: 16px;}
.search-container input:focus + i { color: var(--primary-blue); }

.nav-btn { color: var(--primary-blue); background: #f0f2f5; border: none; padding: 10px 20px; border-radius: 30px; cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; transition: 0.3s; white-space: nowrap; flex-shrink: 0;}
.nav-btn:hover { background: #e2e8f0; color: #004494;}

/* Notification Bell transparent style */
.nav-btn.notif-bell {
  background: transparent !important;
  box-shadow: none;
  padding: 5px !important;
}
.nav-btn.notif-bell:hover {
  transform: scale(1.1);
  color: #004494;
}

.text-nav {
  background: transparent !important;
  border-radius: 0 !important;
  padding: 10px 5px !important;
  margin: 0 5px;
  color: var(--text-main);
  border-bottom: 3px solid transparent;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: 0.3s;
}
.text-nav:hover {
  color: var(--primary-blue);
  background: transparent !important;
}
.text-nav.active-nav {
  border-bottom: 3px solid var(--primary-blue);
  color: var(--primary-blue);
}

.doubt-badge { background-color: var(--danger); color: white; border-radius: 50%; padding: 2px 7px; font-size: 11px; font-weight: bold; display: none; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* =========================================================
   PAGE VIEWS & LAYOUTS 
   ========================================================= */
.page-view { 
  display: none; 
  width: 100%;
  max-width: 1400px; 
  padding: 15px 3vw;
  animation: fadeIn 0.3s ease-in-out; 
  flex-direction: column; 
  min-height: 100vh;
}
.page-view.active { display: flex; }

.page-view.home-layout {
  flex-direction: column; 
  align-items: stretch;
  gap: 8px;
}
.page-view.home-layout.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================================
   TOP CATEGORY BAR
   ========================================================= */
.sidebar { 
  width: 100%; 
  flex-shrink: 0;
  background: #ffffff; 
  padding: 10px 25px; 
  border-radius: 12px; 
  position: sticky; 
  top: 70px;
  z-index: 900;
  display: flex;
  flex-direction: row; 
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
  margin-top: 0; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.03); 
}
.sidebar h3 { 
  display: block; 
  color: var(--primary-blue);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.category-scroll-container { 
  width: 100%; 
  overflow-x: auto; 
  -webkit-overflow-scrolling: touch; 
  scrollbar-width: none; 
}
.category-scroll-container::-webkit-scrollbar { display: none; }

.category-list { 
  list-style: none; 
  padding: 5px 0; 
  margin: 0; 
  display: flex; 
  flex-direction: row; 
  gap: 8px; 
}

.category-item { 
  display: flex; 
  flex-direction: row; 
  align-items: center; 
  padding: 8px 16px; 
  background: #f8fafc; 
  border-radius: 30px; 
  cursor: pointer; 
  transition: 0.2s; 
  color: #000000; 
  font-size: 14px; 
  font-weight: 600; 
  border: 1px solid transparent;
  white-space: nowrap;
}
.category-item:hover { background: #e2e8f0; color: #000000; }
.category-item.active { background: #111827; color: #ffffff; }

.cat-left { display: flex; align-items: center; gap: 8px; }
.cat-icon { font-size: 14px; }
.cat-meta { display: flex; align-items: center; }
.cat-count { background: #f0f2f5; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: bold; margin-left: 8px; color: #4a5568;}
.category-item.active .cat-count { background: #fff; color: var(--primary-blue); }

.content-area { flex: 1; min-width: 0; width: 100%; }

/* =========================================================
   CARDS & DASHBOARDS
   ========================================================= */
.card { background: var(--card-bg); border: 1px solid #edf2f7; border-radius: 12px; padding: 20px 30px; margin-bottom: 10px; position: relative; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column;}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.06); }

.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; flex-wrap: wrap; gap: 10px; }
.category { font-size: 11px; font-weight: 700; color: var(--primary-blue); background-color: #e6f0fa; padding: 6px 14px; border-radius: 20px; display: inline-block; text-transform: uppercase; letter-spacing: 0.5px; margin: 0;}

.card-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.verify-badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; cursor: pointer; transition: 0.2s; display: inline-flex; align-items: center; gap: 5px; background: #e6fffa; color: #2f855a; border: 1px solid #9ae6b4; }
.verify-badge:hover { background: #c6f6d5; }
.verify-badge.unverified { background: #f8fafc; color: #a0aec0; border: 1px solid #e2e8f0; }
.verify-badge.unverified:hover { background: #edf2f7; }
.entry-date { font-size: 12px; color: #a0aec0; font-weight: 600; display: flex; align-items: center; gap: 5px; background: #f8fafc; padding: 4px 10px; border-radius: 20px;}
.delete-entry, .edit-entry { cursor: pointer; color: #cbd5e0; transition: 0.2s; font-size: 16px; display: none;}
.delete-entry:hover { color: var(--danger); }
.edit-entry:hover { color: var(--primary-blue); }

.question { font-size: 20px; font-weight: 700; color: var(--text-main); margin-bottom: 12px; line-height: 1.3; text-align: left;} 

.answer-content { font-size: 15px; color: var(--text-muted); line-height: 1.7; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-align: justify;}
.answer-content p { margin-top: 0; margin-bottom: 12px; }
.answer-content a { color: var(--primary-blue); text-decoration: none; font-weight: 600; }
.answer-content a:hover { text-decoration: underline; }
.answer-content ul, .answer-content ol { margin-top: 0; padding-left: 20px; }

@media (min-width: 769px) { .answer-content { -webkit-line-clamp: 10; } }
@media (max-width: 768px) { .answer-content { -webkit-line-clamp: 15; } }
.answer-content.expanded { -webkit-line-clamp: unset !important; }

.tags-container { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; margin-top: 10px; border-top: 1px dashed #e2e8f0; -webkit-overflow-scrolling: touch; scrollbar-width: none; align-items: center; }
.tags-container::-webkit-scrollbar { display: none; }
.tag-pill { background-color: #e6f2ff; color: #0056b3; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid #cce5ff; flex-shrink: 0; box-shadow: 0 1px 2px rgba(0,0,0,0.02);}

.doubt-answer-text { font-size: 14px; color: var(--text-main); white-space: pre-wrap; text-align: justify; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 769px) { .doubt-answer-text { -webkit-line-clamp: 10; } }
@media (max-width: 768px) { .doubt-answer-text { -webkit-line-clamp: 15; } }
.doubt-answer-text.expanded { -webkit-line-clamp: unset !important; }

.read-more-btn { color: var(--primary-blue); cursor: pointer; font-size: 14px; font-weight: 600; display: inline-block; margin-top: 10px; align-self: flex-start;}

.dashboard-container { background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); width: 100%; border: 1px solid #edf2f7; margin: 0 auto;}
.dashboard-header { border-bottom: 2px solid #edf2f7; padding-bottom: 15px; margin-bottom: 25px; color: var(--primary-blue); font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;}

.dashboard-header-files { flex-direction: column; align-items: stretch; border-bottom: none; padding-bottom: 0; margin-bottom: 25px; }
.file-header-top { display: flex; justify-content: space-between; align-items: center; width: 100%; border-bottom: 2px solid #edf2f7; padding-bottom: 15px; margin-bottom: 15px; }
.file-search-container { width: 100%; position: relative; display: block; }
.file-search-input { width: 100%; padding: 12px 40px 12px 20px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; outline: none; background: #f8fafc; transition: 0.3s;}
.file-search-input:focus { background-color: #fff; border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1); }
.file-search-container i { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: #888; transition: 0.2s; font-size: 16px; }
.file-search-input:focus + i { color: var(--primary-blue); }

.modern-input { width: 100%; padding: 14px 16px; border: 1px solid #e2e8f0; border-radius: 8px; font-family: inherit; font-size: 15px; background-color: #f8fafc; transition: 0.2s; color: var(--text-main);}
.modern-input:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1); background-color: #fff; }
.form-group { margin-bottom: 20px; width: 100%;}
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #4a5568;}

.format-toolbar { display: flex; gap: 5px; margin-bottom: 5px; background: #f0f2f5; padding: 5px; border-radius: 6px; border: 1px solid #e2e8f0; flex-wrap: wrap;}
.format-btn { border: none; background: transparent; cursor: pointer; padding: 5px 8px; border-radius: 4px; color: var(--text-muted); transition: 0.2s; font-size: 13px;}
.format-btn:hover { background: #e2e8f0; color: var(--primary-blue); }

.submit-btn { width: 100%; padding: 16px; background: var(--primary-blue); color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 16px; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 10px rgba(0, 86, 179, 0.2);}
.submit-btn:hover { background: #004494; transform: translateY(-1px); box-shadow: 0 6px 15px rgba(0, 86, 179, 0.3);}
.submit-btn-accent { background: var(--accent); box-shadow: 0 4px 10px rgba(23, 162, 184, 0.2);}
.submit-btn-accent:hover { background: #138496; box-shadow: 0 6px 15px rgba(23, 162, 184, 0.3);}

/* =========================================================
   DOUBTS, TABLES & ADMIN UI
   ========================================================= */
.doubt-tabs { display: flex; gap: 30px; border-bottom: 2px solid #edf2f7; margin-bottom: 20px; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;}
.doubt-tabs::-webkit-scrollbar { display: none; }
.doubt-tab { padding: 10px 15px; font-weight: 700; color: #a0aec0; cursor: pointer; transition: 0.2s; position: relative; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; text-align: center; white-space: nowrap;}
.doubt-tab-count { font-size: 24px; font-weight: 800; display: block; margin-bottom: 4px; color: inherit; }
.doubt-tab.active { color: var(--primary-blue); }
.doubt-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 3px; background: var(--primary-blue); border-radius: 3px 3px 0 0; }

.doubt-list { list-style: none; padding: 0; margin: 0; }
.doubt-item { padding: 20px; border: 1px solid #edf2f7; border-radius: 10px; margin-bottom: 15px; background-color: #ffffff; transition: 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.02);}
.doubt-item:hover { border-color: #cbd5e0; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.doubt-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; border-bottom: 1px solid #edf2f7; padding-bottom: 8px; flex-wrap: wrap; gap: 10px; }
.doubt-meta-info { display: flex; flex-direction: row; gap: 15px; align-items: center;}
.doubt-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.doubt-question-text { font-size: 16px; font-weight: 700; color: var(--text-main); line-height: 1.4; margin-bottom: 8px; text-align: justify; } 

.delete-doubt { color: var(--danger); cursor: pointer; display: none; padding: 8px; background: #fff5f5; border-radius: 6px; transition: 0.2s; }
.delete-doubt:hover { background: #fed7d7; }
.resolve-doubt-btn { font-size: 12px; font-weight: 600; padding: 6px 12px; background: var(--primary-blue); color: white; border-radius: 20px; cursor: pointer; transition: 0.2s; border:none; display: inline-flex; align-items: center; gap: 5px;}
.resolve-doubt-btn:hover { background: #004494; filter: brightness(0.9); }
.resolve-box { display: none; margin-top: 15px; padding-top: 15px; border-top: 1px dashed #e2e8f0; width: 100%;}

.pagination-container { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 25px; flex-wrap: wrap; width: 100%;}
.page-btn { padding: 8px 14px; border: 1px solid #edf2f7; background: #fff; color: var(--text-main); border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.2s; font-size: 13px;}
.page-btn.active { background: var(--primary-blue); color: white; border-color: var(--primary-blue); }
.page-btn:hover:not(.active):not(:disabled) { background: #f0f2f5; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; width: 100%;}
.file-card { background: #fff; border: 1px solid #edf2f7; border-radius: 12px; padding: 20px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; transition: 0.2s; position: relative; height: 165px; box-sizing: border-box;}
.file-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); border-color: #cbd5e0;}
.file-icon { font-size: 35px; color: #e74c3c; margin-top: 5px; flex-shrink: 0;}
.file-name { font-size: 12px; font-weight: 600; color: var(--text-main); word-break: break-word; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex-grow: 1;}
.download-btn { background: #f0f2f5; color: var(--primary-blue); border: none; padding: 6px 15px; border-radius: 20px; font-size: 11px; font-weight: bold; cursor: pointer; transition: 0.2s; text-decoration: none; display: inline-block; width: 90%; white-space: nowrap; margin-top: auto; flex-shrink: 0;}
.download-btn:hover { background: var(--primary-blue); color: white;}
.admin-del-file { position: absolute; top: 8px; right: 8px; color: #cbd5e0; font-size: 14px; cursor: pointer; display: none; transition: 0.2s; z-index: 10; }
.admin-del-file:hover { color: var(--danger); }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin-bottom: 30px; width: 100%;}
.stat-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; text-align: center;}
.stat-card i { font-size: 28px; color: var(--primary-blue); margin-bottom: 10px;}
.stat-num { font-size: 26px; font-weight: 800; color: var(--text-main); margin-bottom: 5px;}
.stat-label { font-size: 12px; font-weight: 700; color: #a0aec0; text-transform: uppercase; letter-spacing: 0.5px;}

.admin-section { background: #ffffff; border: 1px solid #edf2f7; border-radius: 12px; padding: 25px; margin-bottom: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); width: 100%; overflow: hidden;}
.admin-section-header { font-size: 16px; font-weight: 700; color: var(--primary-blue); margin-bottom: 15px; border-bottom: 2px solid #f0f2f5; padding-bottom: 10px; display: flex; align-items: center; gap: 8px;}

.leaderboard-table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; }
.leaderboard-table th { background: #f0f2f5; color: var(--text-muted); font-size: 12px; padding: 10px; text-transform: uppercase; }
.leaderboard-table td { padding: 12px 10px; border-bottom: 1px solid #edf2f7; font-size: 14px; font-weight: 500; color: var(--text-main);}
.rank-badge { background: #fff3cd; color: #2f855a; font-weight: bold; padding: 4px 10px; border-radius: 12px; font-size: 12px;}

.data-table-wrapper { width: 100%; overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 8px; -webkit-overflow-scrolling: touch;}
.data-table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 13px; }
.data-table th { background: #f8fafc; padding: 12px 10px; color: var(--text-muted); text-align: left; border-bottom: 2px solid #edf2f7;}
.data-table td { padding: 12px 10px; border-bottom: 1px solid #edf2f7; text-align: left; vertical-align: middle;}
.data-table .q-col { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--primary-blue);}
.data-table .cat-col { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.action-icons { display: flex; gap: 12px; align-items: center; }
.action-icons i { cursor: pointer; padding: 5px; color: #a0aec0; transition: 0.2s; font-size: 15px;}
.action-icons i:hover { color: var(--primary-blue); }
.action-icons .fa-trash:hover { color: var(--danger); }

.settings-list { list-style: none; padding: 0; margin: 0; max-height: 200px; overflow-y: auto; border: 1px solid #edf2f7; border-radius: 8px; margin-bottom: 10px; width: 100%;}
.settings-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; border-bottom: 1px solid #f0f2f5; font-size: 13px; font-weight: 500;}
.settings-list li:last-child { border-bottom: none; }
.settings-actions { display: flex; gap: 15px;}
.settings-actions i { cursor: pointer; color: #cbd5e0; transition: 0.2s; }
.settings-actions .fa-edit:hover { color: var(--primary-blue); }
.settings-actions .fa-trash:hover { color: var(--danger); }

.notif-item { padding: 15px; border-bottom: 1px solid #edf2f7; display: flex; flex-direction: column; gap: 5px; }
.notif-item:last-child { border-bottom: none; }
.notif-date { font-size: 11px; color: #a0aec0; font-weight: 600; }
.notif-text { font-size: 14px; color: var(--text-main); line-height: 1.4; }

#appToast { visibility: hidden; min-width: 250px; background-color: #333; color: #fff; text-align: center; border-radius: 30px; padding: 14px 20px; position: fixed; z-index: 3000; left: 50%; bottom: 30px; transform: translateX(-50%); font-size: 14px; font-weight: 600; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
#appToast.show { visibility: visible; animation: fadein 0.3s, fadeout 0.3s 2.7s; }
@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }
@keyframes fadeout { from {bottom: 30px; opacity: 1;} to {bottom: 0; opacity: 0;} }

/* =========================================================
   FOOTER (UPDATED LEFT/RIGHT LAYOUT)
   ========================================================= */
/* =========================================================
   FOOTER (UPDATED LEFT/RIGHT LAYOUT)
   ========================================================= */
.app-footer {
  background-color: var(--footer-bg);
  color: #9ca3af;
  padding: 40px 3vw 20px 3vw;
  font-size: 14px;
  font-weight: 500;
  border-top: 1px solid #091f3e;
  width: 100%;
  flex-shrink: 0;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* New Flexbox Row for Logo and Important Links */
.footer-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
  flex-wrap: wrap;
  gap: 20px;
}

/* Left Alignment for Logo and Title */
.footer-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.footer-left img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  margin-bottom: 12px;
}

.footer-left h2 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Right Alignment for ESIC & Helpline Links */
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.important-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.important-link i {
  color: var(--accent);
  font-size: 15px;
}

.important-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  color: #ffffff;
}

/* Install App Button Styling */
.install-btn {
  background: linear-gradient(135deg, #0056b3 0%, #17a2b8 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 86, 179, 0.3);
  font-size: 14px;
}

.install-btn i {
  color: #ffffff !important; /* Make icon white to match text */
  font-size: 16px;
}

.install-btn:hover {
  background: linear-gradient(135deg, #004494 0%, #138496 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 86, 179, 0.4);
}

.app-footer .footer-divider {
  width: 100%;
  max-width: 1200px;
  height: 1px;
  background-color: #3c587f;
  margin: 30px 0 20px 0;
}

/* Bottom Copyright & Policy Links */
.app-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  flex-wrap: wrap; 
  gap: 15px;
}

.app-footer p {
  margin: 0;
  font-size: 13px;
  text-align: left;
}

.app-footer .footer-links {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 0;
}

.app-footer a { 
  color: #9ca3af; 
  text-decoration: none; 
  transition: 0.15s ease; 
}

.app-footer a:hover:not(.important-link) { 
  color: #ffffff; 
  text-decoration: underline; 
}

/* Responsive Stacking for Mobile Screens */
@media (max-width: 768px) {
  .footer-top-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-left {
    align-items: center;
    text-align: center;
    margin-bottom: 10px;
  }
  
  .footer-right {
    align-items: stretch;
    width: 100%;
  }
  
  .important-link {
    justify-content: center;
    width: 100%;
  }
  
  .app-footer .footer-bottom {
    justify-content: center;
    flex-direction: column;
    text-align: center;
  }
  
  .app-footer p {
    text-align: center;
  }
  
  .app-footer .footer-links {
    justify-content: center;
  }
}


.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background-color: #fff; box-shadow: 0 -4px 15px rgba(0,0,0,0.05); z-index: 1000; justify-content: space-around; padding: 10px 0; border-top: 1px solid #eaeaea; padding-bottom: env(safe-area-inset-bottom, 10px); }
.bottom-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #a0aec0; font-size: 11px; gap: 5px; cursor: pointer; flex: 1; font-weight: 600; transition: color 0.2s;}
.bottom-nav-item i { font-size: 22px; margin-bottom: 2px;}
.bottom-nav-item.active { color: var(--primary-blue); }

/* =========================================================
   RESPONSIVE DESIGN: MOBILE SCREENS
   ========================================================= */
@media (max-width: 768px) {
  body { 
      padding-top: 65px !important; 
      padding-bottom: 80px; 
  } 
  
  .navbar { 
      padding: 10px 15px; 
      height: 65px !important; 
      overflow: hidden;
  }
  
  .navbar-left h1 { display: none; } 
  
  .navbar-left img, .navbar-left svg { 
      width: 40px !important; 
      height: 40px !important; 
  } 
  
  .desktop-only-btn { display: none !important; }
  .bottom-nav { display: flex; }
  
  .page-view { padding: 15px; }
  .dashboard-container { padding: 20px; }
  .dashboard-header { font-size: 20px; }
  
  .page-view.home-layout.active { 
      padding-top: 0 !important; 
      margin-top: 0 !important;
      flex-direction: column; 
      gap: 10px;
  }  
  
  /* Mobile Top Bar Adjustments - FIXED IN PLACE */
  .sidebar { 
      width: 100%; 
      left: 0;
      margin: 0 !important; 
      position: fixed !important; 
      top: 65px !important; 
      padding: 10px 15px; 
      background: #ffffff; 
      z-index: 900; 
      border-radius: 0; 
      border-bottom: 1px solid #e1e4e8; 
  }
  
  .content-area {
      margin-top: 60px; 
  }
  
  .sidebar h3 { 
      display: none !important; 
  }

  .category-scroll-container {
      padding: 0;
  }

  .category-list { 
      padding: 0; 
      margin: 0;
      gap: 8px; 
      display: flex;
  }
  
  .category-item { 
      flex-direction: row; 
      padding: 6px 14px; 
      border-radius: 20px; 
      gap: 0;
  }
  
  .cat-name { 
      font-size: 13px; 
      margin: 0; 
      white-space: nowrap; 
      text-align: center; 
  }

  .file-grid { grid-template-columns: repeat(3, 1fr); gap: 4px 8px; }
  .file-card { padding: 12px 5px; gap: 6px; height: 125px; }
  .file-name { font-size: 10px; line-height: 1.2; -webkit-line-clamp: 2; text-align: center; }
  .download-btn { padding: 5px; font-size: 10px; width: 95%; }
  
  .doubt-tabs { gap: 10px; padding-bottom: 5px; }
  .doubt-tab { padding: 8px 10px; font-size: 11px; flex-shrink: 0; }
  
  .admin-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  
  .app-footer { display: none !important; }
  
  #appToast { bottom: 90px; }
  @keyframes fadein { from {bottom: 60px; opacity: 0;} to {bottom: 90px; opacity: 1;} }
  @keyframes fadeout { from {bottom: 90px; opacity: 1;} to {bottom: 60px; opacity: 0;} }
}

/* =========================================================
   RESPONSIVE DESIGN: TABLETS & SMALL DESKTOPS
   ========================================================= */
@media (max-width: 1150px) and (min-width: 769px) {
    .navbar-right { gap: 5px; }
    .nav-btn.desktop-only-btn span { display: none; } 
    .nav-btn.desktop-only-btn { padding: 10px; width: 40px; justify-content: center; } 
    .search-container { max-width: 250px; } 
}

/* =========================================================
   MODALS & OVERLAYS
   ========================================================= */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-content { background: white; padding: 35px; border-radius: 16px; width: 320px; max-width: 90%; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.2); text-align: center; max-height: 90vh; overflow-y: auto;}
.modal-content.wide { width: 600px; text-align: left; }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 24px; cursor: pointer; color: #a0aec0; transition: 0.2s; z-index: 10;}
.close-btn:hover { color: var(--danger); }

.va-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 130%; 
    left: 50%;
    transform: translateX(-50%);
    background-color: #2d3748;
    color: #fff;
    text-align: center;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1100; /* Increased to 1100 to stay above the 900 sidebar */
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    pointer-events: none;
}
.va-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #2d3748 transparent transparent transparent;
}
.va-tooltip.show { visibility: visible; opacity: 1; bottom: 150%; }

/* =========================================================
   AUTO-SUGGEST DROPDOWN STYLES
   ========================================================= */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px; 
    overflow-y: auto;
    z-index: 2000;
}

.suggestions-list li {
    padding: 12px 15px;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestions-list li i {
    color: #a0aec0;
    font-size: 13px;
}

.suggestions-list li:last-child {
    border-bottom: none;
}

.suggestions-list li:hover {
    background: #f8fafc;
    color: var(--primary-blue);
}

#appToast {
    z-index: 100000 !important; 
}

/* ========================================================== */
/* STANDALONE Q&A STYLES                                      */
/* ========================================================== */
.floating-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: var(--primary-blue);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.4);
    font-size: 24px;
    cursor: pointer;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.floating-btn:hover {
    transform: scale(1.1) translateY(-2px);
    background: #004494;
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.5);
}

@media (min-width: 769px) {
    .floating-btn { bottom: 40px; right: 40px; }
}

.sqna-wide {
    width: 1400px !important; 
    max-width: 98vw !important; 
    height: 100vh !important; 
    display: flex;
    flex-direction: column;
}

.sqna-list-item {
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 15px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.sqna-ans-box {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #e2e8f0;
}

.sqna-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    margin-left: 12px;
    font-size: 14px;
    transition: color 0.2s;
}

.sqna-action-btn:hover { color: var(--primary-blue); }
.sqna-action-btn.delete:hover { color: var(--danger); }

.sqna-pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1px;
    padding: 10px ;
    margin-top: 10px 0;
    border-top: 1px solid #edf2f7;
}

.sqna-page-btn {
    background: white;
    border: 1px solid #cbd5e0;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.2s;
}

.sqna-page-btn:hover:not(:disabled) { background: #edf2f7; }
.sqna-page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.sqna-analytics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.sqna-analytics-table th, .sqna-analytics-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.sqna-analytics-table th {
    background: #f8fafc;
    color: #4a5568;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

.sqna-tooltip-container {
    position: relative;
    display: inline-flex;
}

.sqna-tooltip-container .sqna-tooltip-text {
    visibility: hidden;
    width: max-content;
    background-color: #2d3748;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    position: absolute;
    z-index: 10;
    bottom: 125%; 
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.sqna-tooltip-container .sqna-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #2d3748 transparent transparent transparent;
}

.sqna-tooltip-container:hover .sqna-tooltip-text {
    visibility: visible;
    opacity: 1;
}
/* =========================================================
   NEWS-STYLE BLOG LIST LAYOUT
   ========================================================= */
.blog-list-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #edf2f7;
    cursor: pointer;
    transition: background-color 0.2s;
    align-items: flex-start;
}
.blog-list-item:hover {
    background-color: #f8fafc;
}
.blog-thumbnail {
    width: 240px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background-color: #f0f2f5;
    border: 1px solid #e2e8f0;
}
.blog-list-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-list-category {
    color: #991b1b; /* News-style dark red */
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.blog-list-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 10px 0;
    line-height: 1.3;
}
.blog-list-snippet {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Forces text to exactly 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-list-author {
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: auto;
}

@media (max-width: 768px) {
    .blog-list-item {
        flex-direction: column;
        gap: 12px;
    }
    .blog-thumbnail {
        width: 100%;
        height: 200px;
    }
}
/* Hide the top navbar mobile profile button on desktop screens */
.mobile-profile-btn {
    display: none !important;
}

/* =========================================================
   MOBILE-SPECIFIC NAVBAR ADJUSTMENTS
   ========================================================= */
@media (max-width: 768px) {
    /* 1. Hide the old Profile item from the bottom navigation bar */
    #navProfile {
        display: none !important;
    }
    
    /* 2. Control the right side of the navbar (Search + Icons) */
    .navbar-right {
        gap: 4px !important; 
        margin-left: 15px; 
        justify-content: flex-end; 
        flex: 1;
    }
    
    /* 3. INCREASED SEARCH BAR LENGTH */
    .search-container {
        flex: 1;
        max-width: 250px; /* Increased from 180px to make it longer */
        margin-right: 2px;
    }

    /* 4. Show the new settings icon and remove the gray circle */
    .mobile-profile-btn {
        display: inline-flex !important;
        background: transparent !important; 
        box-shadow: none !important;
        border: none !important;
        width: auto !important;
        height: auto !important;
        padding: 5px 8px !important;
        color: #4a5568 !important; 
        font-size: 20px !important;
        margin-left: 0 !important; 
    }
}
/* ========================================================== */
/* FLOATING ACTION MENU & ANIMATIONS                          */
/* ========================================================== */

.floating-menu {
    position: fixed;
    bottom: 160px; 
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1499;
    pointer-events: none; 
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-menu.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.floating-menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    cursor: pointer;
}

.fm-label {
    /* Removed the hardcoded background and text color to let inline styles take over */
    padding: 8px 16px;
    border-radius: 20px; /* Increased border-radius for the pill shape */
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}
.fm-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.floating-menu-item:hover .fm-icon {
    transform: scale(1.1);
}

#standaloneAddQnaBtn {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#standaloneAddQnaBtn.menu-open {
    background: var(--danger); 
    transform: rotate(135deg); 
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

@media (min-width: 769px) {
    .floating-menu { 
        bottom: 110px; 
        right: 45px; 
    }
}


/* ========================================================== */
/* STANDARD ACADEMIC QUIZ LAYOUT (NO BOXES)                   */
/* ========================================================== */
/* ========================================================== */
/* STANDARD ACADEMIC QUIZ LAYOUT (FIXED ALIGNMENT)            */
/* ========================================================== */

.quiz-take-block-minimal {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid #edf2f7;
    text-align: left; /* Forces left align */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.quiz-take-block-minimal:last-child {
    border-bottom: none;
    margin-bottom: 10px;
}

.quiz-take-question-minimal {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
    text-align: left;
    width: 100%;
}

.quiz-take-question-minimal span {
    color: var(--accent);
    font-weight: 800;
    min-width: 20px; /* Keeps all text perfectly aligned next to the number */
}

.quiz-options-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 30px; /* Indents options under the question text */
    width: 100%;
    align-items: flex-start; /* Stops the centering issue */
}

.quiz-option-label-minimal {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    font-size: 15px;
    color: #4a5568;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
    width: 100%;
    text-align: left;
}

.quiz-option-label-minimal:hover {
    background: #f8fafc;
}

.quiz-option-label-minimal input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.3);
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0; /* Prevents the radio dot from shrinking on long answers */
}
/* ========================================================== */
/* MASTER ANALYTICS DASHBOARD LAYOUT                          */
/* ========================================================== */

.ma-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ma-kpi-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.ma-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Leaderboard takes 2/3, Health takes 1/3 */
    gap: 25px;
    align-items: start;
}

.ma-section-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.ma-section-header {
    background: #f8fafc;
    padding: 15px 20px;
    font-weight: 800;
    font-size: 14px;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ma-agent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #edf2f7;
    transition: background 0.2s;
    cursor: pointer;
}

.ma-agent-row:hover {
    background: #ebf8ff; /* Highlight row on hover to indicate it is clickable */
}
.ma-agent-row:last-child {
    border-bottom: none;
}
/* ========================================================== */
/* ESIC ONE: LEAVE CALENDAR STYLES                            */
/* ========================================================== */

/* Desktop: 3 Months per Row */
.calendar-scroll-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.cal-month {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    background: #fafaf9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.cal-month-title { text-align: center; font-weight: 800; margin-bottom: 12px; color: #2d3748; font-size: 15px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 13px; }
.cal-day-header { font-weight: 800; color: #a0aec0; padding-bottom: 5px; font-size: 11px; text-transform: uppercase; }
.cal-day { padding: 6px 0; border-radius: 6px; color: #4a5568; transition: 0.2s; font-weight: 500; }
.cal-day.empty { background: transparent; }
.cal-day.weekend { color: #a0aec0; }
.cal-day.taken { background: #fed7d7; color: #c53030; font-weight: 800; border: 1px solid #fc8181; box-shadow: 0 2px 5px rgba(245, 101, 101, 0.3); }

/* Mobile: Swipeable 1 Month per view */
@media (max-width: 800px) {
    .calendar-scroll-container {
        display: flex; 
        overflow-x: auto;
        scroll-snap-type: x mandatory; 
        padding-bottom: 10px;
    }
    .cal-month {
        min-width: 100%; 
        scroll-snap-align: start; 
    }
    /* Custom Scrollbar for Mobile */
    .calendar-scroll-container::-webkit-scrollbar { height: 6px; }
    .calendar-scroll-container::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 10px; }
}
/* ========================================================== */
/* ESIC ONE: VERTICAL SCROLLING FIX                           */
/* ========================================================== */

/* Allow the main dashboard and tabs to scroll vertically */
#esicOneDashboardView,
.e1-tab-content,
.e1-admin-tab-content {
    overflow-y: auto !important;
    overflow-x: hidden;
}

/* Add padding to the bottom so the calendar doesn't hug the screen edge */
#esicOneDashboardView {
    padding-bottom: 50px !important;
    max-height: calc(100vh - 80px); /* Prevents it from pushing past your app header */
}

/* Custom Modern Scrollbar for the Dashboard */
#esicOneDashboardView::-webkit-scrollbar {
    width: 6px;
}
#esicOneDashboardView::-webkit-scrollbar-track {
    background: transparent; 
}
#esicOneDashboardView::-webkit-scrollbar-thumb {
    background: #cbd5e0; 
    border-radius: 10px;
}
#esicOneDashboardView::-webkit-scrollbar-thumb:hover {
    background: #a0aec0; 
}
/* ========================================================== */
/* ESIC ONE: LEAVE CALENDAR BADGES & LEGEND                   */
/* ========================================================== */

/* Make dates perfectly round for the circles */
.cal-day { 
    height: 32px; 
    width: 32px; 
    margin: 0 auto; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%;
}

/* Green Circle for Annual Leave (AL) */
.cal-day.type-al { 
    background: #48bb78; 
    color: white; 
    box-shadow: 0 2px 6px rgba(72,187,120,0.4); 
    font-weight: 800; 
    border: none;
}

/* Orange Circle for Comp Off (CO) */
.cal-day.type-co { 
    background: #ed8936; 
    color: white; 
    box-shadow: 0 2px 6px rgba(237,137,54,0.4); 
    font-weight: 800; 
    border: none;
}

.leave-legend {
    display: flex;
    gap: 15px;
    font-size: 13px;
    font-weight: 600;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-color.al { color: #48bb78; }
.legend-color.co { color: #ed8936; }
/* ========================================================== */
/* ESIC ONE: SITTING POSITION GRID                            */
/* ========================================================== */

/* Forces exactly 5 equal columns */
.sitting-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 10px;
}

/* Desk Design */
.desk-slot {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 15px 5px;
    text-align: center;
    transition: 0.2s;
    cursor: pointer;
}
.desk-slot:hover {
    transform: translateY(-2px);
    border-color: #a0aec0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.desk-slot i {
    font-size: 32px;
    color: #a0aec0;
    margin-bottom: 8px;
}

.desk-slot div {
    font-size: 12px;
    font-weight: 800;
    color: #4a5568;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Occupied vs Empty Colors */
.desk-slot.occupied {
    background: #ebf8ff;
    border: 2px solid #63b3ed;
}
.desk-slot.occupied i {
    color: #3182ce;
}
.desk-slot.occupied div {
    color: #2b6cb0;
}

.desk-slot.empty i { opacity: 0.5; }

/* Make it responsive for mobile phones (3 rows or 2 rows) */
@media (max-width: 800px) {
    .sitting-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 500px) {
    .sitting-grid { grid-template-columns: repeat(2, 1fr); }
}