/* ==========================================================================
   CareerXpress Admin Portal - Modern Glassmorphic UI & Dark Theme System
   ========================================================================== */

/* --- Custom Property Tokens --- */
:root {
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* HSL Tailored Theme Color Schemes - Minimalistic & Light */
  --bg-main: #f8fafc;
  --bg-sidebar: #ffffff;
  --primary-color: #6c5ce7;
  --primary-glow: rgba(108, 92, 231, 0.12);
  --accent-color: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.12);
  --teal-accent: #0ea5e9;
  
  --txt-primary: #0f172a;
  --txt-secondary: #475569;
  --txt-muted: #94a3b8;
  --txt-color: #0f172a;

  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-glow: rgba(108, 92, 231, 0.06);
  --card-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.02);

  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Base & Scrollbar Overrides --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--txt-primary);
  font-family: var(--font-primary);
  overflow-x: hidden;
  height: 100vh;
}

/* Custom Webkit Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--txt-muted);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* --- Layout Wrappers --- */
.layout-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 24px;
}

/* Glassmorphism System Utilities */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--card-shadow);
}

/* Glow Borders */
.glow-violet { border-color: rgba(108, 92, 231, 0.25); box-shadow: 0 10px 25px -5px rgba(108, 92, 231, 0.06), 0 1px 3px rgba(108, 92, 231, 0.02); }
.glow-teal { border-color: rgba(16, 185, 129, 0.25); box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.06), 0 1px 3px rgba(16, 185, 129, 0.02); }
.glow-blue { border-color: rgba(14, 165, 233, 0.25); box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.06), 0 1px 3px rgba(14, 165, 233, 0.02); }
.glow-orange { border-color: rgba(249, 115, 22, 0.25); box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.06), 0 1px 3px rgba(249, 115, 22, 0.02); }

/* --- Sidebar Navigation Panel --- */
.sidebar {
  width: 280px;
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-header {
  padding: 30px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.brand-icon {
  font-size: 32px;
  color: var(--primary-color);
  filter: drop-shadow(0 2px 8px var(--primary-glow));
}

.brand-info h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-info span {
  font-size: 11px;
  color: var(--txt-muted);
  font-weight: 500;
}

.sidebar-menu {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  color: var(--txt-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  transition: var(--transition-smooth);
  position: relative;
}

.menu-item:hover, .menu-item.active {
  color: var(--txt-primary);
  background: rgba(15, 23, 42, 0.03);
}

.menu-item.active {
  background: linear-gradient(90deg, rgba(108, 92, 231, 0.08) 0%, rgba(108, 92, 231, 0) 100%);
  border-left: 3px solid var(--primary-color);
}

.menu-item.active span:first-child {
  color: var(--primary-color);
  filter: drop-shadow(0 2px 4px var(--primary-glow));
}

.menu-item .badge {
  position: absolute;
  right: 16px;
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-profile .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 0 10px var(--primary-glow);
}

.profile-info h4 {
  font-size: 13px;
  font-weight: 600;
}

.profile-info span {
  font-size: 10px;
  color: var(--txt-muted);
}

/* --- Top Dashboard Bar --- */
.top-bar {
  padding: 16px 24px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-color: rgba(15, 23, 42, 0.06);
}

.page-title h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-title p {
  font-size: 12px;
  color: var(--txt-secondary);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.02);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  font-size: 12px;
  font-weight: 600;
}

/* Pulse Dot Animations */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.pulse-green {
  background: var(--accent-color);
  box-shadow: 0 0 0 var(--accent-glow);
  animation: pulse-green-anim 1.5s infinite;
}
@keyframes pulse-green-anim {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --- Dynamic Tab Switching Panels --- */
.tab-panel {
  display: none;
  animation: panel-fade 0.4s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes panel-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Stats Grid Widgets --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.card-icon.violet { background: rgba(108, 92, 231, 0.1); color: var(--primary-color); }
.card-icon.teal { background: rgba(0, 230, 118, 0.1); color: var(--accent-color); }
.card-icon.blue { background: rgba(0, 168, 204, 0.1); color: #00a8cc; }
.card-icon.orange { background: rgba(255, 126, 0, 0.1); color: #ff7e00; }

.card-data h3 {
  font-size: 11px;
  color: var(--txt-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.card-data h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 4px 0;
  letter-spacing: -0.5px;
}

.card-data span {
  font-size: 11px;
  color: var(--txt-muted);
}

/* --- Content Layout Rows --- */
.content-row {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.flex-1 { flex: 1; min-width: 300px; }
.flex-2 { flex: 2; min-width: 450px; }

.content-card {
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 16px;
}

.header-text h3 {
  font-size: 16px;
  font-weight: 700;
}

.header-text p {
  font-size: 11px;
  color: var(--txt-secondary);
}

.card-action-icon {
  color: var(--txt-muted);
}

/* --- Toppers bar Chart Components --- */
.district-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.chart-bar-row .bar-lbl {
  width: 120px;
  font-size: 12px;
  font-weight: 500;
  color: var(--txt-secondary);
}

.chart-bar-row .bar-track {
  flex: 1;
  height: 10px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.chart-bar-row .bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease-in-out;
}

.chart-bar-row .bar-val {
  width: 48px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* --- Visual Buttons & Badges --- */
.btn {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline-violet {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}
.btn-outline-violet:hover {
  background: var(--primary-color);
  color: white;
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid #ff3b30;
  color: #ff3b30;
}
.btn-outline-danger:hover {
  background: #ff3b30;
  color: white;
}

.btn-glass {
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid var(--glass-border);
  color: var(--txt-primary);
}
.btn-glass:hover {
  background: rgba(15, 23, 42, 0.05);
}

.btn-block {
  width: 100%;
}

.badge {
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}
.badge-accent { background: var(--accent-glow); color: var(--accent-color); }
.badge-teal { background: rgba(14, 165, 233, 0.15); color: var(--teal-accent); }

/* Text colors */
.txt-green { color: var(--accent-color); }
.txt-blue { color: var(--teal-accent); }

/* --- Exam Manager Form System --- */
.exam-columns {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.bg-dark-sim {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.06);
}

.tab-bar-container {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding-bottom: 8px;
}

.creator-tab {
  background: transparent;
  border: none;
  color: var(--txt-secondary);
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.creator-tab.active {
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary-color);
}

.creator-content-panel {
  display: none;
}
.creator-content-panel.active {
  display: block;
}

/* Form Styles */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 11px;
  color: var(--txt-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select, textarea {
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--txt-primary);
  font-family: var(--font-primary);
  font-size: 13px;
  transition: var(--transition-smooth);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.08);
  background: #ffffff;
}

.section-divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.06);
  margin: 24px 0;
}

/* Transliteration Switch Toggle */
.question-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.translit-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.02);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  font-size: 11px;
  font-weight: 600;
}

.translit-trigger span:first-child {
  color: var(--primary-color);
}

/* Switch UI Component */
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--txt-muted);
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px; width: 14px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: .4s;
}
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(14px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Options Grid Builder */
.question-edit-panel {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 24px;
}

.options-grid-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.option-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding-left: 16px;
}

.option-input-wrapper input {
  border: none;
  background: transparent;
  flex: 1;
  border-radius: 0;
}
.option-input-wrapper input:focus { box-shadow: none; background: transparent; }

.option-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
}

.margin-top-12 { margin-top: 12px; }
.margin-top-16 { margin-top: 16px; }
.margin-top-20 { margin-top: 20px; }

.panel-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.creator-action-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

/* --- Excel CSV Dropzone --- */
.csv-upload-box {
  border: 2px dashed rgba(108, 92, 231, 0.3);
  border-radius: 18px;
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.csv-upload-box:hover {
  border-color: var(--primary-color);
  background: rgba(108, 92, 231, 0.02);
}

.upload-icon {
  font-size: 48px;
  color: var(--primary-color);
}

.csv-template-card p {
  font-size: 12px;
  color: var(--txt-secondary);
  margin: 8px 0;
}

.code-box {
  background: #f1f5f9;
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #b45309;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

/* --- Syllabus Auditor & Mobile Preview --- */
.syllabus-audit-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.syllabus-progress-bar .progress-lbl {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}

.syllabus-progress-bar .progress-track {
  height: 6px;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.syllabus-progress-bar .progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: var(--transition-smooth);
}
.fill-violet { background: var(--primary-color); }
.fill-teal { background: var(--accent-color); }
.fill-blue { background: var(--teal-accent); }

/* Handset Mock Frame UI */
.mobile-frame-container {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

.phone-shell {
  width: 260px;
  height: 480px;
  background: #ffffff;
  border: 8px solid #e2e8f0;
  border-radius: 36px;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  position: relative;
}

.phone-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-size: 11px;
}

.phone-header {
  background: #f8fafc;
  padding: 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.phone-header span { font-size: 14px; }
.phone-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 140px;
}
.phone-title span:first-child {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.marking-lbl { font-size: 8px; color: var(--txt-secondary); }

.timer-badge {
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 8px;
}

.phone-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone-q-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  padding: 12px;
}

.phone-section-lbl {
  font-size: 8px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.phone-q-card h4 {
  font-weight: 600;
  color: var(--txt-primary);
  line-height: 1.4;
}

.phone-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.phone-opt-item {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.opt-prefix {
  width: 18px;
  height: 18px;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 8px;
}

.phone-footer {
  padding: 10px;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.btn-phone-prev, .btn-phone-next {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 8px;
}
.btn-phone-prev { background: transparent; border: 1px solid rgba(15, 23, 42, 0.1); color: var(--txt-secondary); }
.btn-phone-next { background: var(--primary-color); color: white; }

/* --- Users Directory Table --- */
.directory-container {
  padding-bottom: 24px;
}

.table-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding-left: 12px;
  width: 320px;
}

.search-input-wrapper input {
  border: none;
  background: transparent;
  flex: 1;
  border-radius: 0;
  padding: 10px;
}
.search-input-wrapper input:focus { box-shadow: none; background: transparent; }
.search-input-wrapper span { color: var(--txt-muted); }

.filter-controls {
  display: flex;
  gap: 12px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.user-table th {
  padding: 16px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--txt-secondary);
  font-weight: 600;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.user-table td {
  padding: 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.user-table tr:hover {
  background: rgba(15, 23, 42, 0.015);
}

.candidate-row-details h4 {
  font-size: 14px;
  font-weight: 600;
}
.candidate-row-details span {
  font-size: 11px;
  color: var(--txt-muted);
}

.syllabus-accuracy-gauges {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 180px;
}
.accuracy-row {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--txt-secondary);
}

.score-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-color);
}

/* --- Push notification BROADCASTER UI --- */
.queue-log-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
}

.log-item {
  padding: 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--txt-muted);
  font-weight: 600;
}

.log-item h4 {
  font-size: 13px;
  font-weight: 700;
}

.log-item p {
  font-size: 11px;
  color: var(--txt-secondary);
  line-height: 1.4;
}

/* --- Latest Notices System --- */
.notices-list-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice-item {
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notice-item-info h4 {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

/* --- Toast success message alerts --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}

.toast {
  background: #ffffff;
  border: 1.5px solid var(--accent-color);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  animation: toast-slide 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes toast-slide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast span:first-child {
  color: var(--accent-color);
}

.toast p {
  font-size: 13px;
  font-weight: 600;
}

/* --- Admin Login Overlay --- */
.login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: radial-gradient(circle at top right, rgba(108, 92, 231, 0.08), transparent 70%), var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: var(--transition-smooth);
}

.login-card {
  width: 420px;
  padding: 40px;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.brand-logo {
  width: 64px;
  height: 64px;
  background: var(--primary-color);
  color: white;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 20px;
  box-shadow: 0 10px 25px var(--primary-glow);
}

.brand-section {
  text-align: center;
  margin-bottom: 30px;
}

.brand-section h1 {
  font-size: 24px;
  font-weight: 800;
}

.brand-section p {
  font-size: 12px;
  color: var(--txt-secondary);
  margin-top: 4px;
}

.input-group {
  margin-bottom: 20px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.015);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding-left: 16px;
  margin-top: 8px;
}

.input-wrapper input {
  border: none;
  background: transparent;
  width: 100%;
}
.input-wrapper input:focus { box-shadow: none; background: transparent; }

.prefix-icon {
  color: var(--txt-muted);
}

.error-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.2);
  padding: 12px;
  border-radius: 10px;
  font-size: 11px;
  color: #ff3b30;
  font-weight: 600;
  margin-bottom: 20px;
}

.hide {
  display: none !important;
}

/* --- DB Connection Badge --- */
.db-status-badge {
  margin: 12px 24px 0 24px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
}
.status-dot.online {
  background: var(--accent-color);
  color: var(--accent-color);
}
.status-dot.offline {
  background: #ff3b30;
  color: #ff3b30;
}

.status-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--txt-muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-config-icon {
  background: none;
  border: none;
  color: var(--txt-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-config-icon:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--txt-color);
}

/* --- Dynamic Config Modal Overlay --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: var(--transition-smooth);
}

.modal-card {
  width: 520px;
  max-width: 100%;
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding-bottom: 20px;
}

.modal-header .material-icons-round {
  font-size: 28px;
}

.modal-header-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--txt-color);
}

.modal-header-text p {
  font-size: 12px;
  color: var(--txt-muted);
  margin-top: 4px;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--txt-muted);
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--txt-color);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  padding-top: 20px;
}

/* --- Interactive Scheduling Calendar Styles --- */
.calendar-widget-container {
  padding: 16px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
}

.calendar-weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--txt-secondary);
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day-cell {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 12px;
  min-height: 84px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease-in-out;
}

.calendar-day-cell:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  border-color: rgba(108, 92, 231, 0.2);
}

.calendar-day-cell.other-month {
  opacity: 0.35;
  background: rgba(15, 23, 42, 0.01);
}

.calendar-day-cell.today {
  border: 1.5px solid var(--primary-color);
  background: rgba(108, 92, 231, 0.02);
}

.calendar-day-cell.today .day-number {
  color: var(--primary-color);
  font-weight: 800;
}

.calendar-day-cell .day-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--txt-secondary);
  align-self: flex-end;
}

.calendar-events-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  flex-grow: 1;
  overflow-y: auto;
  max-height: 52px;
}

.calendar-event-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.calendar-event-badge.mock-event {
  background: rgba(108, 92, 231, 0.12);
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
}

.calendar-event-badge.daily-challenge {
  background: rgba(20, 184, 166, 0.12);
  color: var(--accent-color);
  border-left: 3px solid var(--accent-color);
}

/* --- Easy Text Importer Styles --- */
.monospaced-textarea {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
  line-height: 1.6;
  background: rgba(15, 23, 42, 0.02) !important;
  color: var(--txt-primary);
  border: 1px solid var(--glass-border);
}

.info-alert-card {
  padding: 20px;
  border-radius: 12px;
  background: rgba(108, 92, 231, 0.04);
  border: 1px solid rgba(108, 92, 231, 0.15);
  border-left: 5px solid var(--primary-color);
  margin-bottom: 24px;
}

.info-alert-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--txt-primary);
  margin: 0;
}

.info-alert-card p {
  font-size: 12.5px;
  color: var(--txt-secondary);
  margin-top: 6px;
  margin-bottom: 12px;
}

.instruction-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.instruction-list li {
  font-size: 12px;
  color: var(--txt-secondary);
  position: relative;
  padding-left: 18px;
  line-height: 1.5;
}

.instruction-list li::before {
  content: "•";
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 4px;
  font-size: 14px;
}

.instruction-list code {
  background: rgba(15, 23, 42, 0.05);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.text-import-table {
  width: 100%;
  border-collapse: collapse;
}

.text-import-table th {
  padding: 12px 8px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--txt-secondary);
  font-weight: 600;
  border-bottom: 2px solid var(--glass-border);
  background: rgba(15, 23, 42, 0.02);
  text-align: left;
}

.text-import-table td {
  padding: 6px;
  border-bottom: 1px solid var(--glass-border);
  vertical-align: middle;
}

.text-import-table textarea.grid-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  font-size: 12px;
  resize: vertical;
  min-height: 38px;
  font-family: var(--font-primary);
  line-height: 1.4;
  transition: var(--transition-smooth);
}

.text-import-table textarea.grid-input:focus {
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.1);
  outline: none;
}

.text-import-table select.grid-input, .text-import-table input.grid-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-primary);
  transition: var(--transition-smooth);
}

.text-import-table select.grid-input:focus, .text-import-table input.grid-input:focus {
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.1);
  outline: none;
}

.text-import-table tr.validation-error {
  background: rgba(239, 68, 68, 0.03);
}

.text-import-table tr.validation-error td {
  border-bottom: 1px solid rgba(239, 68, 68, 0.15);
}

.validation-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  margin-top: 4px;
}

.validation-badge.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.validation-badge.success {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
