:root {
  --primary: #0d6efd;
  --primary-dark: #0a58ca;
  --sidebar-w: 250px;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #f4f6fb;
  color: #33384a;
}

/* ---------------- Navbar ---------------- */
.app-navbar {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  padding: .6rem 0;
  z-index: 1030;
}
.app-navbar .navbar-brand { color: #fff; }
.app-navbar .btn-link { text-decoration: none; }

/* ---------------- Layout ---------------- */
.app-wrapper { display: flex; min-height: calc(100vh - 62px); }
.app-sidebar {
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid #e9ecef;
  min-height: calc(100vh - 62px);
  position: sticky;
  top: 62px;
  align-self: flex-start;
}
.app-content { flex: 1; padding: 24px; min-width: 0; }

.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-radius: 10px; margin-bottom: 4px;
  color: #495166; text-decoration: none; font-weight: 500; font-size: .93rem;
  transition: all .15s ease;
}
.side-link i { font-size: 1.1rem; width: 20px; text-align: center; }
.side-link:hover { background: #eef3ff; color: var(--primary); }
.side-link.active { background: var(--primary); color: #fff; }

@media (max-width: 991px) {
  .app-sidebar {
    position: fixed; left: -260px; top: 62px; height: calc(100vh - 62px);
    box-shadow: 4px 0 20px rgba(0,0,0,.08); transition: left .25s ease; z-index: 1045;
  }
  .app-sidebar.show { left: 0; }
  .app-content { padding: 16px; }
}
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 62px 0 0 0;
  background: rgba(15,18,32,.45);
  z-index: 1039;
}
.sidebar-backdrop.show { display: block; }

/* ---------------- Cards / Widgets ---------------- */
.stat-card {
  border: none; border-radius: 16px; color: #fff; padding: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.stat-card h2 { font-weight: 700; margin: 0; }
.stat-card .icon-circle {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.bg-grad-blue { background: linear-gradient(135deg,#0d6efd,#3b8bff); }
.bg-grad-amber { background: linear-gradient(135deg,#f59f00,#ffc078); }
.bg-grad-green { background: linear-gradient(135deg,#2b8a3e,#69db7c); }
.bg-grad-red { background: linear-gradient(135deg,#c92a2a,#ff8787); }
.bg-grad-purple { background: linear-gradient(135deg,#6741d9,#9775fa); }

.card { border: none; border-radius: 16px; box-shadow: 0 4px 18px rgba(0,0,0,.05); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f5; border-radius: 16px 16px 0 0 !important; font-weight: 600; }

.slot-btn {
  border: 1px solid #d0d7e5; background: #fff; border-radius: 10px; padding: 8px 6px;
  font-size: .85rem; font-weight: 500; transition: all .15s;
}
.slot-btn:hover { border-color: var(--primary); color: var(--primary); }
.slot-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.auth-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,#0d6efd 0%,#6741d9 100%); padding: 20px;
}
.auth-card { max-width: 420px; width: 100%; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }

.receipt-box { max-width: 480px; margin: auto; border: 2px dashed #0d6efd; border-radius: 16px; padding: 24px; background: #fff; }

#notifList .notif-item { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; font-size: .85rem; }
#notifList .notif-item.unread { background: #eef5ff; }

.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; background: #f8f9fc; }

/* ---------------- Welcome Banner (user dashboards) ---------------- */
.welcome-banner {
  background: linear-gradient(135deg,#0d6efd 0%,#6741d9 100%);
  border-radius: 18px;
  padding: 24px 26px;
  box-shadow: 0 10px 30px rgba(13,110,253,.18);
}
.welcome-avatar {
  width: 56px; height: 56px; min-width: 56px; border-radius: 16px;
  background: rgba(255,255,255,.18); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
@media (max-width: 575px) {
  .welcome-banner { padding: 20px; border-radius: 14px; }
  .welcome-avatar { width: 46px; height: 46px; min-width: 46px; font-size: 1.3rem; }
}

/* ---------------- Quick Action Cards ---------------- */
.quick-action-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-radius: 14px; padding: 18px;
  text-decoration: none; color: inherit; height: 100%;
  box-shadow: 0 4px 16px rgba(0,0,0,.05); transition: all .18s ease;
  border: 1px solid #eef0f5;
}
.quick-action-card:hover {
  transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.09); color: inherit;
}
.qa-icon {
  width: 46px; height: 46px; min-width: 46px; border-radius: 12px; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

/* ---------------- Mobile appointment list (card-style rows) ---------------- */
.appt-mobile-item {
  padding: 14px 18px; border-bottom: 1px solid #f0f1f5;
}
.appt-mobile-item:last-child { border-bottom: none; }
