/*
  NextJS Admin Dashboard inspired theme layer (CSS-only).
  Goal: modernize UI without changing Blade structure or JS hooks.
*/

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");

:root {
  --eh-font-sans: "Outfit", "Nunito Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";

  --eh-gray-25: #fcfcfd;
  --eh-gray-50: #f9fafb;
  --eh-gray-100: #f2f4f7;
  --eh-gray-200: #e4e7ec;
  --eh-gray-300: #d0d5dd;
  --eh-gray-400: #98a2b3;
  --eh-gray-500: #667085;
  --eh-gray-600: #475467;
  --eh-gray-700: #344054;
  --eh-gray-800: #1d2939;
  --eh-gray-900: #101828;

  --eh-brand-50: #ecf3ff;
  --eh-brand-100: #dde9ff;
  --eh-brand-300: #9cb9ff;
  --eh-brand-500: #465fff;
  --eh-brand-600: #3641f5;
  --eh-brand-950: #161950;

  --eh-success-500: #12b76a;
  --eh-warning-500: #f79009;
  --eh-purple-500: #7a5af8;

  --eh-shadow-xs: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
  --eh-shadow-sm: 0px 1px 3px 0px rgba(16, 24, 40, 0.1),
    0px 1px 2px 0px rgba(16, 24, 40, 0.06);
  --eh-shadow-md: 0px 4px 8px -2px rgba(16, 24, 40, 0.1),
    0px 2px 4px -2px rgba(16, 24, 40, 0.06);

  --eh-radius-lg: 12px;
  --eh-radius-md: 10px;

  --eh-icon-default: url("../../next-admin/icons/horizontal-dots.svg");
}

/* Dashboard stat cards (professional) */
.eh-stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px !important;
  border: 1px solid var(--eh-gray-200) !important;
  box-shadow: none !important;
  background: #fff !important;
}

.eh-stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 6px;
  background: var(--eh-brand-500);
}

.eh-stat-card.eh-stat--success::before { background: var(--eh-success-500); }
.eh-stat-card.eh-stat--warning::before { background: var(--eh-warning-500); }
.eh-stat-card.eh-stat--purple::before { background: var(--eh-purple-500); }

.eh-stat-body {
  position: relative;
  padding-left: 18px; /* room for accent bar */
}

.eh-stat-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--eh-gray-500);
  margin: 0 0 6px 0;
}

.eh-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--eh-gray-900);
  margin: 0;
  line-height: 1.1;
}

.eh-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--eh-brand-50);
  color: var(--eh-brand-500);
  border: 1px solid rgba(70, 95, 255, 0.15);
}

.eh-stat--success .eh-stat-icon {
  background: rgba(18, 183, 106, 0.10);
  color: var(--eh-success-500);
  border-color: rgba(18, 183, 106, 0.20);
}

.eh-stat--warning .eh-stat-icon {
  background: rgba(247, 144, 9, 0.10);
  color: var(--eh-warning-500);
  border-color: rgba(247, 144, 9, 0.20);
}

.eh-stat--purple .eh-stat-icon {
  background: rgba(122, 90, 248, 0.10);
  color: var(--eh-purple-500);
  border-color: rgba(122, 90, 248, 0.20);
}

.eh-stat-icon i.typcn {
  width: 22px;
  height: 22px;
}

/* Neutralize legacy gradient cards if still present */
.eh-stat-card.bg-1,
.eh-stat-card.bg-2,
.eh-stat-card.bg-3,
.eh-stat-card.bg-4 {
  background: #fff !important;
}

/* Base */
body {
  font-family: var(--eh-font-sans) !important;
  background: var(--eh-gray-50) !important;
  color: var(--eh-gray-900);
}

/* SVG icon button (header) */
.eh-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--eh-gray-200);
  background: #fff;
  color: var(--eh-gray-600);
}

.eh-icon-btn:hover {
  background: var(--eh-gray-50);
  color: var(--eh-gray-800);
}

.eh-icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Replace Typicons with template SVGs (mask) */
.eh-admin i.typcn {
  display: inline-block !important;
  width: 20px;
  height: 20px;
  color: currentColor;
  background-color: currentColor;
  -webkit-mask: var(--eh-icon, var(--eh-icon-default)) no-repeat center / contain;
  mask: var(--eh-icon, var(--eh-icon-default)) no-repeat center / contain;
  vertical-align: -4px;
}

.eh-admin i.typcn:before {
  content: "" !important;
}

.eh-admin i.typcn-home-outline { --eh-icon: url("../../next-admin/icons/grid.svg"); }
.eh-admin i.typcn-user-outline { --eh-icon: url("../../next-admin/icons/user-circle.svg"); }
.eh-admin i.typcn-user-add-outline { --eh-icon: url("../../next-admin/icons/user-circle.svg"); }
.eh-admin i.typcn-group-outline { --eh-icon: url("../../next-admin/icons/group.svg"); }
.eh-admin i.typcn-th-list-outline { --eh-icon: url("../../next-admin/icons/list.svg"); }
.eh-admin i.typcn-th-large-outline { --eh-icon: url("../../next-admin/icons/table.svg"); }
.eh-admin i.typcn-waves-outline { --eh-icon: url("../../next-admin/icons/pie-chart.svg"); }
.eh-admin i.typcn-point-of-interest { --eh-icon: url("../../next-admin/icons/box-cube.svg"); }
.eh-admin i.typcn-cog-outline { --eh-icon: url("../../next-admin/icons/page.svg"); }
.eh-admin i.typcn-key-outline { --eh-icon: url("../../next-admin/icons/lock.svg"); }
.eh-admin i.typcn-zoom-outline { --eh-icon: url("../../next-admin/icons/search.svg"); }
.eh-admin i.typcn-th-menu-outline { --eh-icon: url("../../next-admin/icons/horizontal-dots.svg"); }
.eh-admin i.typcn-adjust-brightness { --eh-icon: url("../../next-admin/icons/grid.svg"); }
.eh-admin i.typcn-thumbs-ok { --eh-icon: url("../../next-admin/icons/check-circle.svg"); }
.eh-admin i.typcn-th-large { --eh-icon: url("../../next-admin/icons/table.svg"); }
.eh-admin i.typcn-calculator { --eh-icon: url("../../next-admin/icons/pie-chart.svg"); }

a {
  color: var(--eh-brand-600);
}

a:hover,
a:focus {
  color: var(--eh-brand-500);
}

/* Layout: Sidebar + Header sizing (match template proportions) */
.sidebar {
  min-width: 290px !important;
  max-width: 290px !important;
  border-right: 1px solid var(--eh-gray-200) !important;
  box-shadow: none !important;
  background: #fff !important;
  padding-left: 20px;
  padding-right: 20px;
}

/* Sidebar search (removed from Blade, but keep hidden if any legacy remains) */
.sidebar-form {
  display: none !important;
}

/* Mobile offcanvas sidebar + backdrop (template-like) */
.eh-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 24, 40, 0.5);
}

@media (max-width: 1023px) {
  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-110%);
    transition: transform 0.25s ease;
    z-index: 50;
  }
  .fixed .sidebar + .content-wrapper {
    margin-left: 0 !important;
  }
  .fixed .navbar-custom-menu.navbar {
    left: 0 !important;
  }
  body.eh-mobile-open .sidebar {
    transform: translateX(0);
  }
  body.eh-mobile-open .eh-backdrop {
    display: block;
  }
}

.sidebar-header,
.sidebar-icon-header {
  border-bottom: 1px solid var(--eh-gray-200) !important;
}

.sidebar-header {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.sidebar-header .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-header .sidebar-brand img {
  width: auto !important;
  height: 32px !important;
  max-width: 100% !important;
  object-fit: contain;
}

/* Hospital sidebar uses `.sidebar-logo` / `.sidebar-fav` with `w-100` in markup */
.sidebar-header img.sidebar-logo,
.sidebar-header img.sidebar-fav {
  width: auto !important;
  height: 32px !important;
}

.sidebar-body {
  padding-top: 16px;
}

@media (min-width: 768px) {
  .fixed .sidebar + .content-wrapper {
    margin-left: 290px !important;
  }

  .fixed .navbar-custom-menu.navbar {
    left: 290px !important;
  }

  .sidebar-collapse .sidebar {
    min-width: 90px !important;
    max-width: 90px !important;
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Collapsed sidebar top area: icon-only and centered (prevents logo stretching) */
  .sidebar-collapse .sidebar-header {
    justify-content: center !important;
  }
  .sidebar-collapse .sidebar-header .sidebar-brand {
    justify-content: center !important;
    width: 100%;
  }

  /* Hide profile block in collapsed icon-only mode to prevent distortion */
  .sidebar-collapse .profile-element {
    display: none !important;
  }
  /* Show it again when hover-expanded */
  .sidebar-collapse_hover .profile-element {
    display: flex !important;
  }

  .sidebar-collapse_hover .sidebar {
    min-width: 290px !important;
    max-width: 290px !important;
  }

  .fixed.sidebar-collapse .sidebar + .content-wrapper {
    margin-left: 90px !important;
  }

  .fixed.sidebar-collapse .navbar-custom-menu.navbar {
    left: 90px !important;
  }

  .fixed.sidebar-collapse_hover .navbar-custom-menu.navbar {
    left: 290px !important;
  }
}

/* Collapsed sidebar: center icons and avoid clipping */
@media (min-width: 768px) {
  .sidebar-collapse .sidebar-nav ul.metismenu > li > a {
    justify-content: center !important;
    padding: 10px !important;
    gap: 0 !important;
    font-size: 0 !important; /* hide text nodes like "Dashboard" */
  }

  .sidebar-collapse .sidebar-nav ul.metismenu > li > a i.typcn {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    flex: 0 0 22px !important;
  }

  /* Hide submenu + arrows in collapsed icon-only mode */
  .sidebar-collapse .sidebar-nav .nav-second-level {
    display: none !important;
  }
  .sidebar-collapse .sidebar-nav .has-arrow::after {
    display: none !important;
  }

  /* When hover-expand is active: show text, but DO NOT auto-open submenus */
  .sidebar-collapse_hover .sidebar-nav ul.metismenu > li > a {
    font-size: 14px !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 10px 12px !important;
  }

  /* keep icon size stable on hover-expand */
  .sidebar-collapse_hover .sidebar-nav ul.metismenu > li > a i.typcn {
    width: 22px !important;
    height: 22px !important;
    flex: 0 0 22px !important;
  }

  /* submenus stay closed unless metisMenu adds .mm-show */
  .sidebar-collapse_hover .sidebar-nav .nav-second-level {
    display: none !important;
  }
  .sidebar-collapse_hover .sidebar-nav .nav-second-level.mm-show {
    display: block !important;
  }

  /* show arrows (so user can click to expand), but only when hover-expanded */
  .sidebar-collapse_hover .sidebar-nav .has-arrow::after {
    display: inline-block !important;
  }
}

/* Defensive: prevent legacy icon font-size rules from affecting our masked icons */
.eh-admin .sidebar-nav ul li a i.typcn {
  font-size: 0 !important;
  line-height: 0 !important;
}

/* Topbar */
.navbar-custom-menu.navbar {
  background: #fff !important;
  border-bottom: 1px solid var(--eh-gray-200) !important;
  box-shadow: none !important;
  position: relative !important;
  z-index: 100;
}

.navbar-custom-menu .sidebar-toggle-icon {
  color: var(--eh-gray-600) !important;
}

/* Header (NextJS-like) */
.eh-header {
  padding: 0 16px !important;
  position: relative;
  width: 100%;
}

.eh-header-inner {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eh-header .sidebar-toggle-icon {
  border: 1px solid var(--eh-gray-200) !important;
  border-radius: 10px;
  background: var(--eh-gray-50) !important;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.eh-header .sidebar-toggle-icon span,
.eh-header .sidebar-toggle-icon span:before,
.eh-header .sidebar-toggle-icon span:after {
  background: var(--eh-gray-700) !important;
}

/* Fix hamburger alignment so it doesn't overlap the border */
.eh-header .sidebar-toggle-icon span {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 18px !important;
  height: 2px !important;
}

.eh-header .sidebar-toggle-icon span:before,
.eh-header .sidebar-toggle-icon span:after {
  left: 0 !important;
  right: auto !important;
  width: 18px !important;
  height: 2px !important;
}

.eh-header .sidebar-toggle-icon span:before {
  top: -6px !important;
}

.eh-header .sidebar-toggle-icon span:after {
  bottom: -6px !important;
}

.eh-search {
  max-width: 520px;
  margin: 0 auto;
}

.eh-search .eh-search-input {
  padding-left: 40px !important;
  padding-right: 64px !important;
  height: 44px;
  background: #fff !important;
}

.eh-search .eh-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--eh-gray-500);
  pointer-events: none;
}

.eh-search .eh-search-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.eh-search .eh-search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--eh-gray-200);
  background: var(--eh-gray-50);
  color: var(--eh-gray-500);
  border-radius: 8px;
  font-size: 12px;
  padding: 4px 8px;
  line-height: 1;
}

/* Sidebar: profile block */
.profile-element {
  padding: 12px 16px !important;
  margin: 12px 12px 8px 12px !important;
  border: 1px solid var(--eh-gray-200) !important;
  border-radius: var(--eh-radius-lg) !important;
  background: var(--eh-gray-25) !important;
}

.profile-element .profile-text h6 {
  color: var(--eh-gray-900) !important;
  font-weight: 600 !important;
}

.profile-element .profile-text span {
  color: var(--eh-gray-500) !important;
}

/* Sidebar: search */
.sidebar-form .search__inner {
  border-radius: var(--eh-radius-lg) !important;
  border: 1px solid var(--eh-gray-200) !important;
  background: #fff !important;
  margin: 0 12px 10px 12px !important;
  box-shadow: none !important;
}

.sidebar-form .search__text {
  font-family: var(--eh-font-sans) !important;
}

/* Sidebar: Menu items */
.sidebar-nav ul.metismenu > li > a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 12px !important; /* closer to template */
  border-radius: 12px !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  color: var(--eh-gray-700) !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-nav ul.metismenu > li > a:hover {
  background: var(--eh-gray-100) !important;
  color: var(--eh-gray-800) !important;
  box-shadow: none !important;
}

.sidebar-nav ul.metismenu > li > a:hover i {
  color: var(--eh-gray-700) !important;
}

.sidebar-nav ul.metismenu > li.mm-active > a {
  background: var(--eh-brand-50) !important;
  color: var(--eh-brand-500) !important;
  box-shadow: none !important; /* remove "elevation" */
  border: 0 !important;
}

.sidebar-nav ul.metismenu > li > a i {
  color: var(--eh-gray-500) !important;
}

.sidebar-nav ul.metismenu > li.mm-active > a i {
  color: var(--eh-brand-500) !important;
}

/* Hard override legacy theme "active menu" elevation */
.eh-admin .sidebar-nav ul li.mm-active > a,
.eh-admin .sidebar-nav ul li.mm-active > a:hover,
.eh-admin .sidebar-nav ul li.mm-active > a:focus {
  background: var(--eh-brand-50) !important;
  color: var(--eh-brand-500) !important;
  box-shadow: none !important;
  border: 0 !important;
}

.eh-admin .sidebar-nav ul li.mm-active > a i {
  color: var(--eh-brand-500) !important;
}

.sidebar-nav .nav-second-level {
  margin: 6px 0 10px 36px !important;
  padding-left: 0 !important;
}

/* Third-level (nested) submenu alignment */
.sidebar-nav .nav-second-level .nav-second-level {
  margin: 6px 0 8px 16px !important;
  padding-left: 0 !important;
}

/* Reduce dot + adjust spacing for deeper nesting so it doesn't overlap */
.sidebar-nav ul li .nav-second-level .nav-second-level li:before {
  left: 10px;
  width: 5px;
  height: 5px;
  background: var(--eh-gray-300);
}

.sidebar-nav .nav-second-level .nav-second-level > li > a {
  padding: 8px 12px 8px 28px !important;
  font-size: 13px !important;
}

/* Dedicated 3rd level class used by Investigation Profiles */
.sidebar-nav .nav-third-level {
  margin: 6px 0 8px 16px !important;
  padding-left: 0 !important;
}

.sidebar-nav ul li .nav-third-level li {
  position: relative;
}

.sidebar-nav ul li .nav-third-level li:before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--eh-gray-300);
}

.sidebar-nav .nav-third-level > li > a {
  border-radius: var(--eh-radius-md) !important;
  padding: 9px 12px 9px 32px !important; /* match 2nd-level vertical spacing */
  color: var(--eh-gray-600) !important;
  font-weight: 500 !important;
  background: transparent !important;
  display: block;
  line-height: 1.25 !important;
}

.sidebar-nav .nav-third-level > li > a:hover {
  background: var(--eh-gray-100) !important;
  color: var(--eh-gray-800) !important;
}

/* Add a little vertical rhythm between 3rd-level items (prevents "overlap" feel) */
.sidebar-nav .nav-third-level > li {
  margin: 2px 0;
}

.sidebar-nav ul li .nav-third-level li:hover:before {
  background: var(--eh-gray-700);
}

.sidebar-nav ul li .nav-third-level li.mm-active > a:not(.has-arrow) {
  background: var(--eh-brand-50) !important;
  color: var(--eh-brand-500) !important;
  font-weight: 600 !important;
}

.sidebar-nav ul li .nav-third-level li.mm-active:before {
  background: var(--eh-brand-500);
}

/*
 * Investigation Profiles: the 2nd-level "profile name" rows are expandable (metisMenu toggles `.mm-active`).
 * They should NOT look like a selected/current page item unless a leaf link is active.
 */
.sidebar-nav .nav-second-level > li.mm-active > a.has-arrow {
  background: transparent !important;
  color: var(--eh-gray-700) !important;
  font-weight: 500 !important;
}

.sidebar-nav .nav-second-level > li.mm-active > a.has-arrow:hover {
  background: var(--eh-gray-100) !important;
  color: var(--eh-gray-800) !important;
}

/* Submenu dot + spacing (override legacy theme) */
.sidebar-nav ul li .nav-second-level li {
  position: relative;
}

.sidebar-nav ul li .nav-second-level li:before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--eh-gray-400);
}

.sidebar-nav .nav-second-level > li > a {
  border-radius: var(--eh-radius-md) !important;
  padding: 9px 12px 9px 32px !important; /* make room for dot */
  color: var(--eh-gray-600) !important;
  font-weight: 500 !important;
}

.sidebar-nav .nav-second-level > li > a:hover {
  background: var(--eh-gray-100) !important;
  color: var(--eh-gray-800) !important;
}

.sidebar-nav ul li .nav-second-level li:hover:before {
  background: var(--eh-gray-700);
}

.sidebar-nav ul li .nav-second-level li.mm-active > a {
  background: var(--eh-brand-50) !important;
  color: var(--eh-brand-500) !important;
  font-weight: 600 !important;
}

.sidebar-nav ul li .nav-second-level li.mm-active:before {
  background: var(--eh-brand-500);
}

.sidebar-nav ul li.mm-active ul li.mm-active a {
  background: var(--eh-brand-50) !important;
  color: var(--eh-brand-500) !important;
  font-weight: 600 !important;
}

/* Wrapper for admin layout */
.eh-admin-wrapper {
  display: flex;
  min-height: 100vh;
}

.eh-admin-wrapper .sidebar {
  flex-shrink: 0;
}

.eh-admin-wrapper .content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Content area spacing */
.content-wrapper {
  background: var(--eh-gray-50) !important;
}

.main-content {
  padding: 16px !important;
  display: flex;
  flex-direction: column;
  flex: 1;
}

@media (min-width: 768px) {
  .main-content {
    padding: 24px !important;
  }
}

.eh-page-content {
  width: 100%;
  max-width: 1536px;
  margin-left: auto;
  margin-right: auto;
  flex: 1;
}

/* Footer positioning */
.footer-content {
  margin-top: auto;
  padding: 16px 24px;
  background: #fff;
  border-top: 1px solid var(--eh-gray-200);
}

.footer-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--eh-gray-600);
}

/* Ensure proper layout flow */
.eh-main-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Body content wrapper for pages */
.body-content {
  width: 100%;
  padding: 0;
}

/* Card styling improvements */
.card {
  border-radius: var(--eh-radius-lg) !important;
  border: 1px solid var(--eh-gray-200) !important;
  box-shadow: var(--eh-shadow-sm) !important;
  background: #fff !important;
}

.card-header {
  background: #fff !important;
  border-bottom: 1px solid var(--eh-gray-200) !important;
  padding: 16px 20px !important;
}

.card-body {
  padding: 20px !important;
}

/* Auth/public pages (layouts/app) */
.eh-auth {
  background: var(--eh-gray-50) !important;
}

.eh-auth .navbar {
  box-shadow: none !important;
}

.eh-auth .card {
  border-radius: 16px !important;
}

/* Auth template layout (split screen like NextJS template) */
.eh-auth-template {
  min-height: 100vh;
  background: #fff;
  color: var(--eh-gray-900);
}

.eh-auth-layout {
  position: relative;
  padding: 24px;
  background: #fff;
}

.eh-auth-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - 48px);
  justify-content: center;
}

.eh-auth-left {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

.eh-auth-right {
  display: none;
  flex: 1;
}

@media (min-width: 1024px) {
  .eh-auth-layout {
    padding: 0;
  }
  .eh-auth-shell {
    flex-direction: row;
    min-height: 100vh;
  }
  .eh-auth-left {
    flex: 0 0 50%;
    padding: 0;
  }
  .eh-auth-right {
    display: grid;
    flex: 0 0 50%;
    background: var(--eh-brand-950);
    align-items: center;
    position: relative;
    overflow: hidden;
  }
}

.eh-auth-right-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.eh-auth-illustration {
  width: 100%;
  max-width: 720px;
  height: auto;
  object-fit: contain;
  filter: none !important;
}

/* Right panel grid/brand removed in favor of an illustration */
.eh-auth-grid { display: none !important; }

.eh-auth-grid-top {
  top: 0;
  right: 0;
}

.eh-auth-grid-bottom {
  bottom: 0;
  left: 0;
  transform: rotate(180deg);
}

/* Right panel brand removed */
.eh-auth-brand { display: none !important; }

.eh-auth-brand-logo img {
  width: 231px;
  height: auto;
}

.eh-auth-brand-text {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

.eh-auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

.eh-auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--eh-gray-500);
  text-decoration: none;
}

.eh-auth-back:hover {
  color: var(--eh-gray-700);
}

.eh-auth-title {
  margin: 0 0 6px 0;
  font-weight: 600;
  color: var(--eh-gray-900);
}

.eh-auth-subtitle {
  margin: 0 0 0 0;
  font-size: 14px;
  color: var(--eh-gray-500);
}

.eh-auth-social {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 576px) {
  .eh-auth-social {
    grid-template-columns: 1fr 1fr;
  }
}

.eh-auth-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--eh-gray-100);
  color: var(--eh-gray-700);
}

.eh-auth-social-btn:hover {
  background: var(--eh-gray-200);
  color: var(--eh-gray-800);
}

.eh-auth-divider {
  position: relative;
  padding: 16px 0;
  text-align: center;
}

.eh-auth-divider:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--eh-gray-200);
}

.eh-auth-divider span {
  position: relative;
  padding: 6px 14px;
  background: #fff;
  color: var(--eh-gray-400);
  font-size: 14px;
}

.eh-auth-field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--eh-gray-700);
  margin-bottom: 8px;
}

.eh-auth-input {
  height: 44px;
}

.eh-auth-password-wrap {
  position: relative;
}

.eh-auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--eh-gray-500);
  padding: 4px;
}

.eh-auth-password-toggle:hover {
  color: var(--eh-gray-700);
}

.eh-auth-password-toggle svg {
  width: 20px;
  height: 20px;
}

.eh-auth-primary-btn {
  height: 44px;
  border-radius: 10px !important;
  font-weight: 600 !important;
  background: var(--eh-brand-500) !important;
  border-color: var(--eh-brand-500) !important;
}

.eh-auth-primary-btn:hover {
  background: var(--eh-brand-600) !important;
  border-color: var(--eh-brand-600) !important;
}

/* Cards / panels (bootstrap compatible) */
.card,
.panel,
.panel-default,
.ibox,
.box,
.widget,
.white-box {
  border-radius: var(--eh-radius-lg) !important;
  border: 1px solid var(--eh-gray-200) !important;
  box-shadow: none !important;
}

/* Tables */
.table,
table.dataTable {
  color: var(--eh-gray-800) !important;
}

.table thead th,
table.dataTable thead th {
  background: var(--eh-gray-50) !important;
  color: var(--eh-gray-500) !important;
  text-transform: uppercase;
  font-size: 12px !important;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--eh-gray-200) !important;
}

/* Forms */
.form-control,
select.form-control,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  border-radius: var(--eh-radius-md) !important;
  border: 1px solid var(--eh-gray-200) !important;
  box-shadow: none !important;
}

.form-control:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default .select2-selection--single:focus {
  border-color: var(--eh-brand-300) !important;
  box-shadow: none !important;
}

/* Buttons */
.btn {
  border-radius: var(--eh-radius-md) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.btn:focus,
.btn.focus {
  box-shadow: none !important;
  outline: 0;
}

.btn-primary,
.btn-success {
  background-color: var(--eh-brand-500) !important;
  border-color: var(--eh-brand-500) !important;
}

.btn-primary:hover,
.btn-success:hover {
  background-color: var(--eh-brand-600) !important;
  border-color: var(--eh-brand-600) !important;
}

.btn-outline-primary {
  color: var(--eh-brand-500) !important;
  border-color: var(--eh-gray-200) !important;
}

.btn-outline-primary:hover {
  background: var(--eh-brand-50) !important;
  border-color: var(--eh-brand-100) !important;
  color: var(--eh-brand-500) !important;
}

/* Printing: keep print views clean and avoid layout chrome */
@media print {
  body {
    background: #fff !important;
  }

  .sidebar,
  .navbar-custom-menu,
  .footer-content,
  .overlay,
  #toTop,
  .page-loader-wrapper {
    display: none !important;
  }

  .fixed .sidebar + .content-wrapper,
  .fixed.sidebar-collapse .sidebar + .content-wrapper {
    margin-left: 0 !important;
    margin-top: 0 !important;
  }

  .content-wrapper {
    box-shadow: none !important;
  }

  .card,
  .panel,
  .panel-default,
  .ibox,
  .box,
  .widget,
  .white-box {
    box-shadow: none !important;
  }
}


