/* =========================================================
   Executive Ops Theme
   Staff/Admin App + Global Command Deck Identity
   ========================================================= */

/* Shell */

.eh-shell {
  min-height: 100vh;
  display: flex;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.08), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, var(--eh-bg) 100%);
}

.eh-sidebar {
  width: var(--eh-sidebar-width);
  background:
    linear-gradient(180deg, var(--eh-navy-950) 0%, var(--eh-navy-900) 52%, var(--eh-navy-850) 100%);
  color: #ffffff;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  padding: 1rem;
  overflow-y: auto;
}

.eh-main {
  margin-left: var(--eh-sidebar-width);
  width: calc(100% - var(--eh-sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.eh-content {
  padding: 1.5rem;
  flex: 1;
}

/* Header */

.eh-topbar {
  height: var(--eh-header-height);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--eh-border);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.eh-topbar-search {
  max-width: 640px;
  height: 46px;
  border-radius: var(--eh-radius-pill);
  border: 1px solid #dfeaf5;
  background: #f8fbff;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 1rem;
  color: var(--eh-muted);
}

.eh-topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  color: var(--eh-text);
  font-weight: 650;
}

.eh-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.eh-topbar-icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  border: 1px solid var(--eh-border);
  background: #ffffff;
  color: var(--eh-muted);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(15, 35, 60, 0.05);
}

.eh-notification-dot {
  position: absolute;
  top: -6px;
  right: -5px;
  background: var(--eh-red);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 950;
  border-radius: var(--eh-radius-pill);
  padding: 0.1rem 0.35rem;
}

.eh-user-menu {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  border: 1px solid var(--eh-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 35, 60, 0.05);
}

.eh-avatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--eh-blue), var(--eh-purple));
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 950;
}

.eh-user-name {
  font-size: 0.85rem;
  font-weight: 900;
}

.eh-user-role {
  color: var(--eh-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.eh-plan-chip {
  display: inline-flex;
  align-items: center;
  border-radius: var(--eh-radius-pill);
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 950;
}

.eh-plan-pro { background: var(--eh-soft-purple); color: #7c3aed; }
.eh-plan-basic { background: var(--eh-soft-blue); color: var(--eh-blue); }
.eh-plan-free { background: var(--eh-soft-amber); color: #d97706; }

/* Sidebar */

.eh-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
}

.eh-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--eh-teal), var(--eh-blue));
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  box-shadow: 0 14px 30px rgba(15, 111, 255, 0.22);
  overflow: hidden;
}

.eh-brand-mark .eh-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.eh-brand-title {
  font-weight: 950;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.eh-brand-subtitle {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
  font-weight: 700;
}

.eh-sidebar-section {
  margin: 1.1rem 0 0.4rem;
  padding: 0 0.65rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eh-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  margin-bottom: 0.25rem;
  transition: 0.16s ease;
}

.eh-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.eh-nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(15, 111, 255, 0.24));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.eh-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: #67e8f9;
}

/* Page Header */

.eh-page-header {
  position: relative;
  overflow: hidden;
  border-radius: var(--eh-radius-2xl);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(135deg, var(--eh-navy-900) 0%, var(--eh-navy-700) 58%, #0f766e 100%);
  box-shadow: var(--eh-shadow-command);
}

.eh-page-header::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -50px;
  top: -60px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}

.eh-page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: var(--eh-radius-pill);
  padding: 0.38rem 0.75rem;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eh-page-title {
  position: relative;
  z-index: 1;
  margin: 0.8rem 0 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 950;
  letter-spacing: -0.07em;
}

.eh-page-subtitle {
  position: relative;
  z-index: 1;
  margin: 0.45rem 0 0;
  max-width: 700px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

/* Dashboard Command Cards */

.command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.command-card {
  position: relative;
  overflow: hidden;
  min-height: 155px;
  border-radius: 28px;
  padding: 1.2rem;
  color: #ffffff;
  box-shadow: var(--eh-shadow-soft);
}

.command-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.command-card i {
  position: relative;
  z-index: 1;
  font-size: 1.65rem;
}

.command-value {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 1rem;
  font-size: 2.2rem;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.command-label {
  position: relative;
  z-index: 1;
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 850;
}

.command-teal { background: linear-gradient(135deg, #0f766e, var(--eh-teal)); }
.command-blue { background: linear-gradient(135deg, #1d4ed8, var(--eh-blue)); }
.command-purple { background: linear-gradient(135deg, #6d28d9, var(--eh-purple)); }
.command-red { background: linear-gradient(135deg, #b91c1c, var(--eh-red)); }
.command-green { background: linear-gradient(135deg, #15803d, var(--eh-green)); }
.command-amber { background: linear-gradient(135deg, #b45309, var(--eh-amber)); }

/* Ops Panels */

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ops-card {
  background: #ffffff;
  border: 1px solid var(--eh-border);
  border-radius: 28px;
  padding: 1.25rem;
  box-shadow: var(--eh-shadow-soft);
}

.ops-card h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.ops-list {
  display: grid;
  gap: 0.65rem;
}

.ops-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid var(--eh-border);
  color: var(--eh-text);
  font-weight: 800;
}

.ops-row span {
  color: var(--eh-muted);
  font-weight: 700;
}

.ops-pill {
  border-radius: var(--eh-radius-pill);
  padding: 0.35rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 950;
  background: var(--eh-soft-green);
  color: #16a34a;
  white-space: nowrap;
}

/* Responsive */

@media (max-width: 1199.98px) {
  .command-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-grid { grid-template-columns: 1fr; }
}

@media (max-width: 991.98px) {
  .eh-sidebar { display: none; }
  .eh-main { margin-left: 0; width: 100%; }
  .eh-topbar {
    grid-template-columns: 1fr;
    height: auto;
    padding: 0.9rem;
  }
  .eh-topbar-actions { justify-content: space-between; }
}

@media (max-width: 575.98px) {
  .eh-content { padding: 1rem; }
  .eh-page-header { padding: 1.25rem; border-radius: 26px; }
  .command-strip { grid-template-columns: 1fr; }
  .command-card { min-height: 135px; }
}

/* =========================================================
   Login Page — Tile-Based Interface
   ========================================================= */

.eh-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(20, 184, 166, 0.10), transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(15, 111, 255, 0.08), transparent 50%),
    var(--eh-bg);
}

.eh-login-container {
  width: 100%;
  max-width: 500px;
}

.eh-login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.eh-login-brand .eh-brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
}

.eh-login-brand-title {
  font-size: 1.6rem;
  font-weight: 950;
  letter-spacing: -0.05em;
  color: var(--eh-text);
}

.eh-login-brand-sub {
  color: var(--eh-muted);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

/* Expired banner */

.eh-login-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fffbe0;
  border: 1px solid #fde68a;
  border-radius: 18px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  animation: ehFadeIn 0.35s ease;
}

/* Tiles */

.eh-login-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.eh-login-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2.5rem 1.5rem;
  border-radius: 28px;
  border: 1px solid var(--eh-border);
  background: #ffffff;
  cursor: pointer;
  transition: 0.2s ease;
  box-shadow: var(--eh-shadow-soft);
  min-height: 200px;
}

.eh-login-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--eh-shadow-card);
}

/* ── Staff tile picker (Command Deck) ── */
.eh-staff-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 2px;
}
.eh-staff-tile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--eh-border);
  background: #ffffff;
  cursor: pointer;
  transition: 0.18s ease;
  text-align: left;
}
.eh-staff-tile:hover {
  border-color: var(--eh-primary);
  background: color-mix(in srgb, var(--eh-primary) 7%, #ffffff);
  transform: translateY(-2px);
  box-shadow: var(--eh-shadow-soft);
}
.eh-staff-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  background: linear-gradient(135deg, var(--eh-primary), var(--eh-primary-hover, var(--eh-primary)));
}
.eh-staff-meta { display: flex; flex-direction: column; min-width: 0; }
.eh-staff-name { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eh-staff-role { font-size: 0.76rem; color: var(--eh-text-muted, #64748b); }
@media (max-width: 520px) { .eh-staff-tiles { grid-template-columns: 1fr; } }

.eh-tile-staff:hover {
  border-color: var(--eh-blue);
  background: linear-gradient(135deg, #f0f9ff, #ffffff);
}

.eh-tile-patient:hover {
  border-color: var(--eh-teal);
  background: linear-gradient(135deg, #f0fdfa, #ffffff);
}

.eh-tile-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
}

.eh-tile-staff .eh-tile-icon {
  background: var(--eh-soft-blue);
  color: var(--eh-blue);
}

.eh-tile-patient .eh-tile-icon {
  background: var(--eh-soft-teal);
  color: #0f9f8f;
}

.eh-tile-label {
  font-size: 1.1rem;
  font-weight: 950;
  color: var(--eh-text);
}

.eh-tile-sub {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--eh-muted);
}

/* Form container */

.eh-login-form-container {
  background: #ffffff;
  border: 1px solid var(--eh-border);
  border-radius: 28px;
  padding: 1.75rem;
  box-shadow: var(--eh-shadow-soft);
  animation: ehFadeIn 0.25s ease;
}

.eh-form-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--eh-muted);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 1.25rem;
}

.eh-form-back:hover {
  color: var(--eh-text);
}

/* Restore toast */

.eh-restore-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--eh-teal);
  border-radius: 18px;
  padding: 1rem 1.5rem;
  box-shadow: 0 16px 48px rgba(0,0,0,0.14);
  font-weight: 800;
  color: var(--eh-text);
  animation: ehFadeIn 0.35s ease;
  transition: opacity 0.5s ease;
  max-width: 90vw;
}

.eh-restored-field {
  background: #fef9c3 !important;
  border-color: #facc15 !important;
  transition: background 0.3s ease;
}

/* Animation */

@keyframes ehFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
