/* ==========================================================================
   Shifa Healthcare Platform — Modern App-Like Design System & Navigation Shell
   Works on Desktop Browsers, Mobile Viewports, and native Android/iOS WebViews
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Modern Clean White/Light Login Experience (Healthcare & Clinical Portal)
   -------------------------------------------------------------------------- */
.shifa-login-page {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 80, 216, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.04) 0px, transparent 50%);
  color: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: hidden;
  font-family: var(--font-base, 'Cairo', 'Inter', sans-serif);
}

.shifa-login-container {
  width: 100%;
  max-width: 1120px;
  margin: auto;
  padding: 2rem 1.25rem;
}

/* Desktop Split Layout */
.shifa-login-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 992px) {
  .shifa-login-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
  }
}

/* Left Showcase Panel (Brand & Healthcare Features) */
.shifa-brand-showcase {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.shifa-brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.shifa-brand-emblem {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0050d8 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.4rem;
  box-shadow: 0 4px 14px rgba(0, 80, 216, 0.25);
}

.shifa-brand-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
  line-height: 1;
}

.shifa-brand-tagline {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.shifa-brand-description {
  color: #475569;
  font-size: 1rem;
  line-height: 1.6;
}

/* Feature Showcase Cards/Pills */
.shifa-feature-pills {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.shifa-pill-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.9rem 1.15rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.shifa-pill-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.shifa-pill-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eff6ff;
  color: #0050d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.shifa-pill-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.shifa-pill-sub {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 400;
}

/* Security Trust Seal */
.shifa-trust-seal {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  font-size: 0.82rem;
  font-weight: 600;
  width: fit-content;
}

/* Right Side: Clean White Login Card (PayPal-inspired cleanliness & trust) */
.shifa-login-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2.5rem 2.25rem;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.shifa-login-header {
  margin-bottom: 1.75rem;
  text-align: start;
}

.shifa-login-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.shifa-login-subtitle {
  font-size: 0.88rem;
  color: #64748b;
}

/* Form Controls & Inputs */
.shifa-input-group {
  margin-bottom: 1.25rem;
}

.shifa-input-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.45rem;
}

.shifa-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.shifa-input-icon {
  position: absolute;
  color: #94a3b8;
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
}

[dir="rtl"] .shifa-input-icon {
  right: 14px;
}

[dir="ltr"] .shifa-input-icon {
  left: 14px;
}

.shifa-input {
  width: 100%;
  min-height: 48px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}

[dir="rtl"] .shifa-input {
  padding: 10px 42px 10px 42px;
}

[dir="ltr"] .shifa-input {
  padding: 10px 42px 10px 42px;
}

.shifa-input::placeholder {
  color: #94a3b8;
}

.shifa-input:focus {
  border-color: #0050d8;
  box-shadow: 0 0 0 3px rgba(0, 80, 216, 0.12);
  background: #ffffff;
}

.shifa-pw-toggle {
  position: absolute;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  padding: 8px;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  transition: color 0.15s ease;
}

[dir="rtl"] .shifa-pw-toggle {
  left: 8px;
}

[dir="ltr"] .shifa-pw-toggle {
  right: 8px;
}

.shifa-pw-toggle:hover {
  color: #0050d8;
}

/* Primary Polished Button */
.shifa-btn-primary {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0050d8;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 80, 216, 0.28);
  transition: all 0.18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.shifa-btn-primary:hover:not(:disabled) {
  background: #003bb5;
  box-shadow: 0 6px 18px rgba(0, 80, 216, 0.35);
  transform: translateY(-1px);
}

.shifa-btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.shifa-btn-primary:disabled {
  background: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Language Switcher Pill in Top Bar */
.shifa-lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.shifa-lang-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Mobile Adjustments for Login */
@media (max-width: 991.98px) {
  .shifa-login-container {
    padding: 1.25rem 1rem;
  }
  .shifa-brand-showcase {
    text-align: center;
    align-items: center;
    gap: 1.25rem;
  }
  .shifa-feature-pills {
    display: none; /* Keep mobile clean and focused on auth */
  }
  .shifa-login-card {
    padding: 2rem 1.5rem;
    border-radius: 16px;
    max-width: 100%;
  }
  .shifa-brand-tagline {
    font-size: 1.35rem;
  }
}

/* --------------------------------------------------------------------------
   2. App-Style Shell & Navigation (Desktop & Mobile WebView)
   -------------------------------------------------------------------------- */

/* In-App Top Header Bar */
.shifa-app-topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.65rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.shifa-app-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid #e2e8f0;
}

.shifa-app-back-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Mobile Native Bottom Navigation Bar */
.shifa-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid #e2e8f0;
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

@media (min-width: 768px) {
  .shifa-bottom-nav {
    display: none !important; /* On desktop, standard header/sidebar navigation is used */
  }
}

.shifa-bottom-nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 2px;
  color: #64748b;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  transition: all 0.15s ease;
  min-height: 48px;
  border-radius: 8px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.shifa-bottom-nav-item i {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.shifa-bottom-nav-item.active {
  color: #0050d8;
  font-weight: 700;
}

.shifa-bottom-nav-item.active i {
  color: #0050d8;
}

.shifa-bottom-nav-item:active {
  transform: scale(0.92);
}

/* Add clearance to body when bottom nav is active on mobile */
@media (max-width: 767.98px) {
  body.shifa-has-bottom-nav {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* --------------------------------------------------------------------------
   3. Patient Profile & Support Hub
   -------------------------------------------------------------------------- */
.shifa-profile-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.shifa-profile-card:hover {
  box-shadow: 0 8px 30px -4px rgba(15, 23, 42, 0.08);
}

.shifa-profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0050d8 0%, #0284c7 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 80, 216, 0.25);
  flex-shrink: 0;
}

.shifa-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 576px) {
  .shifa-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

.shifa-info-item {
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.shifa-info-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shifa-info-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.shifa-contact-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: #0f172a;
  transition: all 0.2s ease;
  min-height: 56px;
}

.shifa-contact-card:hover {
  border-color: #0050d8;
  background: #f8fbff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 80, 216, 0.08);
  color: #0050d8;
}

.shifa-contact-card:active {
  transform: scale(0.98);
}

.shifa-contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eff6ff;
  color: #0050d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.shifa-map-frame {
  width: 100%;
  height: 340px;
  border: 0;
  border-radius: 14px;
}

@media (max-width: 575.98px) {
  .shifa-map-frame {
    height: 260px;
  }
}
