@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Sans+Bengali:wght@400;500;600;700&display=swap");

:root {
  --eh-bg: #f4f6f9;
  --eh-surface: #ffffff;
  --eh-text: #111827;
  --eh-text-secondary: #374151;
  --eh-muted: #4b5563;
  --eh-border: #e5e7eb;
  --eh-sidebar: #111827;
  --eh-sidebar-text: #f9fafb;
  --eh-sidebar-muted: #d1d5db;
  --eh-primary: #1d4ed8;
  --eh-primary-hover: #1e40af;
  --eh-primary-soft: #eff6ff;
  --eh-radius: 12px;
  --eh-font: "IBM Plex Sans", "Noto Sans Bengali", sans-serif;
}

html, body {
  font-family: var(--eh-font) !important;
  color: var(--eh-text) !important;
  font-size: 15px;
  line-height: 1.5;
}

body.bg-body-tertiary,
body.layout-fixed,
.app-main,
.app-content,
.content-wrapper {
  background: var(--eh-bg) !important;
  color: var(--eh-text) !important;
}

a {
  color: var(--eh-primary);
}

/* ========== LOGIN ========== */
body.login-page {
  min-height: 100vh;
  margin: 0;
  background: var(--eh-bg) !important;
  color: var(--eh-text) !important;
}

body.login-page .eh-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

body.login-page .eh-login-hero {
  display: none;
}

body.login-page .eh-login-panel {
  width: 100%;
  max-width: 440px;
}

body.login-page .login-box {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

body.login-page .login-logo {
  text-align: center;
  margin-bottom: 20px;
}

body.login-page .login-logo img {
  max-height: 48px;
  border-radius: 10px;
  margin-bottom: 10px;
}

body.login-page .login-logo a,
body.login-page .login-logo b {
  color: var(--eh-text) !important;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

body.login-page .card {
  border: 1px solid var(--eh-border) !important;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
  background: var(--eh-surface) !important;
}

body.login-page .login-card-body {
  padding: 28px 28px 24px !important;
  background: var(--eh-surface) !important;
  color: var(--eh-text) !important;
}

body.login-page .login-box-msg {
  text-align: left !important;
  color: var(--eh-text-secondary) !important;
  font-size: 15px;
  margin-bottom: 20px;
}

body.login-page .eh-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--eh-text) !important;
  margin-bottom: 6px;
}

body.login-page .input-group {
  margin-bottom: 16px !important;
}

body.login-page .form-control {
  min-height: 46px;
  border-radius: 8px 0 0 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: #fff !important;
  color: var(--eh-text) !important;
  font-size: 15px;
  box-shadow: none !important;
}

body.login-page .form-control::placeholder {
  color: #6b7280 !important;
  opacity: 1;
}

body.login-page .form-control:focus {
  border-color: var(--eh-primary) !important;
}

body.login-page .input-group-text {
  border-radius: 0 8px 8px 0 !important;
  border: 1px solid #cbd5e1 !important;
  background: #fff !important;
  color: var(--eh-text-secondary) !important;
}

body.login-page .btn,
body.login-page .btn-primary {
  min-height: 46px;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--eh-primary) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

body.login-page .btn:hover {
  background: var(--eh-primary-hover) !important;
  color: #ffffff !important;
}

body.login-page .callout,
body.login-page .callout-danger {
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2 !important;
  color: #991b1b !important;
}

body.login-page .eh-login-foot {
  margin-top: 16px;
  color: var(--eh-muted) !important;
  font-size: 13px;
  text-align: center;
}

/* ========== SIDEBAR ========== */
.app-sidebar,
.main-sidebar,
aside.app-sidebar,
.sidebar-wrapper {
  background: var(--eh-sidebar) !important;
  color: var(--eh-sidebar-text) !important;
  border-right: 0 !important;
}

.sidebar-brand,
.brand-link,
.app-sidebar .brand-link,
.sidebar-brand .brand-text,
.brand-text,
.sidebar-brand span,
.app-sidebar .nav-link,
.app-sidebar .nav-link p,
.app-sidebar .nav-link span,
.sidebar .nav-link,
.sidebar .nav-link p,
.nav-sidebar .nav-link,
.nav-treeview .nav-link {
  color: var(--eh-sidebar-text) !important;
}

.sidebar-brand,
.brand-link {
  background: #0b1220 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-weight: 700 !important;
}

.brand-image,
.sidebar-brand img,
img.brand-image {
  border-radius: 8px !important;
}

.app-sidebar .nav-link,
.sidebar .nav-link,
.nav-sidebar .nav-link {
  border-radius: 8px !important;
  margin: 2px 8px !important;
  color: var(--eh-sidebar-muted) !important;
  font-weight: 500;
}

.app-sidebar .nav-link:hover,
.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.app-sidebar .nav-link.active,
.sidebar .nav-link.active,
.app-sidebar .nav-item > .nav-link.active,
.nav-sidebar .nav-link.active {
  background: var(--eh-primary) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.app-sidebar .nav-header,
.nav-header {
  color: #93c5fd !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 16px 20px 8px !important;
}

.app-header.navbar,
nav.app-header {
  background: #ffffff !important;
  border-bottom: 1px solid var(--eh-border) !important;
  box-shadow: none;
}

.app-header,
.app-header .nav-link,
.app-header .navbar-nav .nav-link,
.app-header .form-control {
  color: var(--eh-text) !important;
}

.app-header .form-control {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
}

/* ========== DASHBOARD ========== */
.content-header h1,
.content-header .content-title,
.content-wrapper h1,
.app-content-header h3,
.app-content-header h1 {
  font-weight: 700 !important;
  color: var(--eh-text) !important;
}

.breadcrumb,
.breadcrumb-item,
.breadcrumb-item a {
  color: var(--eh-text-secondary) !important;
}

.card,
.eh-app-card,
.eh-recent {
  border: 1px solid var(--eh-border) !important;
  border-radius: var(--eh-radius) !important;
  box-shadow: none !important;
  background: var(--eh-surface) !important;
  color: var(--eh-text) !important;
}

.card-header,
.card-title,
.card-header h3,
.card-header h5 {
  background: #fff !important;
  border-bottom: 1px solid var(--eh-border) !important;
  font-weight: 650;
  color: var(--eh-text) !important;
}

.eh-dash-intro {
  background: #ffffff;
  color: var(--eh-text);
  border: 1px solid var(--eh-border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.eh-dash-intro h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--eh-text);
}

.eh-dash-intro p {
  margin: 0;
  color: var(--eh-text-secondary);
}

.eh-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 0 22px;
}

.eh-shortcut {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--eh-border);
  border-radius: 12px;
  padding: 18px 16px;
  text-decoration: none !important;
  color: var(--eh-text) !important;
  min-height: 118px;
}

.eh-shortcut:hover {
  border-color: #93c5fd;
  background: var(--eh-primary-soft);
}

.eh-shortcut i {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--eh-primary-soft);
  color: var(--eh-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.eh-shortcut strong {
  font-size: 16px;
  font-weight: 700;
}

.eh-shortcut span {
  color: var(--eh-muted);
  font-size: 13px;
}

.eh-model-list {
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
}

.eh-model-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px;
  border-top: 1px solid var(--eh-border);
}

.eh-model-list a {
  color: var(--eh-text) !important;
  font-weight: 600;
  text-decoration: none;
}

.eh-model-list a:hover {
  color: var(--eh-primary) !important;
}

.eh-model-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.eh-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.eh-app-card {
  padding: 8px 8px 12px;
  height: 100%;
}

.eh-app-card .eh-app-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.eh-app-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--eh-primary-soft);
  color: var(--eh-primary);
}

.eh-app-card h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--eh-text);
}

.eh-app-card td {
  border-color: var(--eh-border) !important;
  color: var(--eh-text) !important;
  padding: 10px 12px !important;
}

.eh-app-card a {
  color: var(--eh-text) !important;
  font-weight: 600;
  text-decoration: none;
}

.eh-app-card a:hover {
  color: var(--eh-primary) !important;
}

.eh-recent {
  padding: 20px;
  height: 100%;
}

.eh-recent h4,
.timeline-header,
.timeline-header a,
.timeline-body {
  color: var(--eh-text) !important;
}

.time,
.mini.quiet {
  color: var(--eh-muted) !important;
}

/* ========== TABLES / FORMS ========== */
.table,
.table td,
.table th,
#result_list,
#result_list td,
#result_list th {
  color: var(--eh-text) !important;
}

.table thead th,
#result_list thead th,
.change-list thead th {
  background: #f3f4f6 !important;
  color: var(--eh-text) !important;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--eh-border) !important;
}

#result_list tbody tr:hover {
  background: var(--eh-primary-soft) !important;
}

.object-tools .btn,
.object-tools a,
a.addlink,
.btn-success.addlink {
  background: var(--eh-primary) !important;
  border: 0 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

.btn-primary,
.submit-row input.default,
.submit-row input[type="submit"] {
  background: var(--eh-primary) !important;
  border-color: var(--eh-primary) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}

.btn-info,
.changelink,
a.changelink {
  background: #e5e7eb !important;
  color: var(--eh-text) !important;
  border: 0 !important;
}

.form-control,
.form-select,
select,
input[type="text"],
input[type="password"],
input[type="email"],
textarea {
  border-radius: 8px !important;
  color: var(--eh-text) !important;
  background: #fff !important;
  border-color: #cbd5e1 !important;
}

label,
.form-group label,
.aligned label,
.help,
.help-block,
p.help {
  color: var(--eh-text-secondary) !important;
}

fieldset.module h2,
.aligned h2,
.tab-content .card-header {
  background: transparent !important;
  color: var(--eh-text) !important;
  font-weight: 700 !important;
}

.alert,
.messagelist li,
.callout {
  border-radius: 8px !important;
  color: var(--eh-text) !important;
}

.alert-info,
.messagelist .info {
  background: var(--eh-primary-soft) !important;
  color: #1e3a8a !important;
  border: 1px solid #bfdbfe !important;
}

#changelist-filter,
#changelist-filter h2,
#changelist-filter h3,
#changelist-filter a {
  color: var(--eh-text) !important;
}

#changelist-filter {
  background: #fff;
  border: 1px solid var(--eh-border);
  border-radius: 12px;
  padding: 12px;
}

.app-footer,
.main-footer {
  background: transparent !important;
  border-top: 1px solid var(--eh-border) !important;
  color: var(--eh-muted) !important;
}

.eh-csv-card {
  border: 1px solid var(--eh-border);
  border-radius: 12px;
}

.eh-csv-parent {
  font-weight: 600;
  color: var(--eh-text);
}

.eh-csv-help {
  background: #f8fafc;
  border: 1px solid var(--eh-border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--eh-text-secondary);
}

.eh-csv-help ul {
  margin: 8px 0 12px;
  padding-left: 18px;
}

.eh-csv-help code {
  color: var(--eh-text);
  background: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--eh-border);
}

@media (max-width: 768px) {
  .eh-app-grid,
  .eh-shortcut-grid {
    grid-template-columns: 1fr;
  }
}

/* Compact MCQ question/option fields in admin forms */
body.app-mcq_preparation textarea,
body.app-mcq_preparation textarea.vLargeTextField,
body.app-mcq_preparation .inline-group textarea,
body.app-mcq_preparation .eh-compact-textarea {
  min-height: 2.75rem !important;
  height: auto !important;
  max-height: 12rem;
  resize: vertical;
  line-height: 1.45;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

body.app-mcq_preparation .form-row textarea {
  width: 100%;
  max-width: 100%;
}
