body {
  font-family: Vazirmatn, IRANSansX, Tahoma, sans-serif;
  background: #f5f7fb;
}

.app-sidebar {
  min-height: 100vh;
  background: linear-gradient(180deg, #13253d 0%, #0e1b2f 100%);
  color: #c8d1e0;
}

.app-sidebar .brand {
  border-bottom: 1px solid #253246;
}

.app-sidebar a {
  color: #c8d1e0;
  text-decoration: none;
  display: block;
  padding: 0.62rem 0.85rem;
  border-radius: 0.7rem;
  margin: 0.2rem 0;
  transition: all 0.15s ease;
}

.app-sidebar a.active,
.app-sidebar a:hover {
  background: #00a5d8;
  color: #fff;
}

.app-main {
  padding: 1.25rem;
}

.card-soft {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(15, 27, 47, 0.08);
}

.login-bg {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 165, 216, 0.15), transparent 32%),
    radial-gradient(circle at 80% 15%, rgba(11, 99, 180, 0.12), transparent 30%),
    linear-gradient(120deg, #e7fbff 0%, #fffdf4 55%, #eef5ff 100%);
}

.login-bg-animated {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-bg-animated span {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.22;
  animation: floatBlob 12s ease-in-out infinite;
}

.login-bg-animated span:nth-child(1) { width: 240px; height: 240px; background: #7ee7ff; top: -40px; right: 8%; animation-delay: 0s; }
.login-bg-animated span:nth-child(2) { width: 180px; height: 180px; background: #8fc5ff; top: 55%; right: -60px; animation-delay: 1.5s; }
.login-bg-animated span:nth-child(3) { width: 210px; height: 210px; background: #9feabf; bottom: -70px; left: 8%; animation-delay: 3s; }
.login-bg-animated span:nth-child(4) { width: 150px; height: 150px; background: #d9c4ff; top: 20%; left: -45px; animation-delay: 4.5s; }

@keyframes floatBlob {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  50% { transform: translateY(-18px) translateX(10px) scale(1.06); }
}

.login-card {
  border: 1px solid rgba(0, 165, 216, 0.2);
  border-top: 5px solid #00a5d8 !important;
  border-radius: 1.1rem;
  box-shadow: 0 14px 38px rgba(16, 64, 95, 0.15);
  backdrop-filter: blur(2px);
  position: relative;
  z-index: 2;
}

.login-title {
  color: #0f2741;
  letter-spacing: 0.2px;
}

.login-subtitle {
  color: #5f6f86;
}

.login-form .form-label {
  font-weight: 700;
  color: #15324f;
}

.login-form .form-control {
  min-height: 46px;
  border-radius: 0.7rem;
  border-color: #d5e4f4;
}

.login-form .form-control:focus {
  border-color: #00a5d8;
  box-shadow: 0 0 0 0.18rem rgba(0, 165, 216, 0.16);
}

.captcha-box {
  border: 1px solid #cfe2f6;
  border-radius: 0.8rem;
  background: linear-gradient(180deg, #f7fbff 0%, #f3f8ff 100%);
  padding: 0.4rem;
}

.captcha-image {
  height: 58px;
  width: 100%;
  object-fit: contain;
  border-radius: 0.65rem;
  border: 1px solid #b9d3ec;
  background: #fff;
  cursor: pointer;
}

.captcha-refresh {
  min-width: 44px;
  min-height: 44px;
  border-radius: 0.65rem;
  font-size: 1.05rem;
}

.btn-login {
  min-height: 48px;
  font-size: 1.2rem;
  font-weight: 800;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #00b8ec 0%, #0098cb 100%);
  border: none;
}

.btn-login:hover {
  background: linear-gradient(135deg, #00aee0 0%, #008fbe 100%);
}

.table thead th {
  white-space: nowrap;
}

.chart-fixed {
  position: relative;
  height: 280px;
}

.chart-fixed-lg {
  height: 340px;
}

#patientsTableWrap {
  transition: opacity .2s ease;
}

/* Mobile top bar + drawer (shown only < lg via d-lg-none / .show) */
.app-topbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(180deg, #13253d 0%, #0e1b2f 100%);
  color: #fff;
  padding: 0.55rem 0.9rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.app-topbar-title { font-weight: 700; font-size: 1.05rem; }
.app-hamburger {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 0.5rem;
  width: 42px;
  height: 42px;
  cursor: pointer;
}
.app-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1035;
}
.app-overlay.show { display: block; }

@media (max-width: 991px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 82%;
    max-width: 300px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 1040;
    overflow-y: auto;
    box-shadow: -6px 0 24px rgba(0, 0, 0, 0.28);
  }
  .app-sidebar.open { transform: translateX(0); }
  .app-main {
    padding: 0.9rem;
  }
  .card-soft {
    border-radius: 10px;
  }
  .chart-fixed,
  .chart-fixed-lg {
    height: 260px;
  }
  .login-card {
    border-radius: 0.95rem;
  }
  /* comfortable tap targets on phones */
  .btn-sm { padding: 0.28rem 0.55rem; }
  .app-sidebar nav a { padding: 0.75rem 0.85rem; }
}
