/* ================================================================
 * 📄 File: style-dashboard.css
 * 📍 Path: /assets/css/style-dashboard.css
 * 🎯 Purpose: Responsive dashboard with sidebar toggle
 * ================================================================ */

:root {
  --mcqxam-primary: #0073aa;
  --mcqxam-accent: #f1c40f;
  --mcqxam-bg: #f6f7f9;
  --mcqxam-dark: #1c1e21;
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 58px;
  --header-height: 40px;
  --footer-height: 40px;
}

/* ================================================================
   🌍 Base Layout
   ================================================================ */
html, body {
  height: 100%;
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--mcqxam-bg);
  color: #333;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* ================================================================
   🧱 Header (Dashboard Fixed Header)
   ================================================================ */
.mcqxam-header-dash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: linear-gradient(90deg, #003973 0%, #0098aa 35%, #4bd2be 70%, #f1c40f 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 1200;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.mcqxam-header-dash-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 14px;
}

.mcqxam-toggle-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.mcqxam-toggle-btn:hover { transform: scale(1.1); }

.mcqxam-site-name {
  margin-left: 0px;
  font-weight: 700;
  text-decoration: none;
  font-size: 18px;
  letter-spacing: 0.5px;
  
  text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #f1c40f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mcqxam-header-right .mcqxam-header-icon,
.mcqxam-header-right a.mcqxam-header-icon {
  font-size: 18px;
  margin-left: 10px;
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}
.mcqxam-header-right a.mcqxam-header-icon:hover {
  color: var(--mcqxam-accent);
}

/* ================================================================
   🧭 Root Layout (Sidebar + Main Area)
   ================================================================ */
.mcqxam-dashboard-root {
  display: flex;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  margin-top: var(--header-height);
  margin-bottom: var(--footer-height);
}

/* ================================================================
   📚 Sidebar
   ================================================================ */
.mcqxam-sidebar {
  width: var(--sidebar-width);
  background: #fff;
  border-right: 1px solid #e6e9ec;
  box-shadow: 1px 0 4px rgba(0,0,0,0.05);
  transition: width 0.25s ease, transform 0.25s ease;
  overflow-y: auto;
}
.mcqxam-sidebar-inner {
  padding: 10px;
}

.mcqxam-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mcqxam-sidebar-list li { margin-bottom: 5px; }

.mcqxam-sidebar-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mcqxam-primary);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}

.mcqxam-sidebar-list a:hover {
  background: rgba(0, 115, 170, 0.08);
  color: var(--mcqxam-dark);
}

.mcqxam-sidebar-list a.active {
  background: var(--mcqxam-accent);
  color: #000;
  font-weight: 600;
}

.si { font-size: 18px; }

/* ===== Collapsed State ===== */
body.mcqxam-sidebar-collapsed .mcqxam-sidebar {
  width: var(--sidebar-collapsed-width);
}
body.mcqxam-sidebar-collapsed .mcqxam-sidebar-list a .stext {
  display: none;
}

/* ================================================================
   🧾 Main Area
   ================================================================ */
.mcqxam-main-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--mcqxam-bg);
}

.mcqxam-main-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.mcqxam-page-header h1 {
  font-size: 20px;
  margin: 6px 0;
  color: var(--mcqxam-primary);
}
.mcqxam-page-header .muted {
  color: #666;
  font-size: 13px;
  margin-bottom: 10px;
}

/* ================================================================
   🪣 Dashboard Cards
   ================================================================ */
.mcqxam-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.card.small {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card.small:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.card-icon {
  font-size: 30px;
  margin-bottom: 6px;
}
.card.small h3 {
  margin: 6px 0;
  font-size: 15px;
  color: var(--mcqxam-primary);
}
.card.small p {
  color: #444;
  font-size: 13px;
  margin-bottom: 10px;
}

/* ================================================================
   🚪 Login CTA
   ================================================================ */
.mcqxam-login-cta {
  text-align: center;
  margin-top: 18px;
}
.mcqxam-login-cta .btn {
  background: var(--mcqxam-accent);
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  color: #000;
  transition: background 0.2s ease;
}
.mcqxam-login-cta .btn:hover {
  background: #f5d25b;
}

/* ================================================================
   ⚓ Footer
   ================================================================ */
.mcqxam-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-height);
  background: var(--mcqxam-accent);
  background: linear-gradient(90deg, #003973 0%, #0098aa 35%, #4bd2be 70%, #f1c40f 100%);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
  z-index: 1300;
}

/* ================================================================
   📱 Mobile Offcanvas Sidebar
   ================================================================ */
.mcqxam-sidebar.offcanvas {
  position: fixed;
  top: var(--header-height);
  left: -240px;
  width: var(--sidebar-width);
  height: calc(100% - var(--header-height));
  background: #fff;
  border-right: 1px solid #e6e9ec;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
  transition: left 0.3s ease;
  z-index: 1400;
}

/* Visible when toggled */
body.mcqxam-sidebar-open .mcqxam-sidebar.offcanvas {
  left: 0;
  top: 0;
  height: 100vh;
}

/* Dark overlay */
.overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1300;
}

body.mcqxam-sidebar-open .overlay {
  opacity: 1;
  visibility: visible;
}

/* ================================================================
   🧩 Anti-blur Patch (for mobile transition safety)
   ================================================================ */
html, body, .mcqxam-dashboard-root, .mcqxam-main-area {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  transform: none !important;
  will-change: auto !important;
  contain: layout paint !important;
  isolation: isolate !important;
}
