:root {
  --ink: #10233d;
  --accent: #2b6cb0;
  --accent-2: #1f8a70;
  --surface: rgba(255, 255, 255, 0.92);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(43, 108, 176, 0.20), transparent 32%),
    radial-gradient(circle at top right, rgba(31, 138, 112, 0.18), transparent 28%),
    linear-gradient(180deg, #0b1120 0%, #12213c 32%, #f2f5fb 32%, #f2f5fb 100%);
  min-height: 100vh;
}

.nav-glass {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1030;
  background: rgba(9, 16, 32, 0.82);
  backdrop-filter: blur(12px);
  transition: padding 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-glass.nav-shrink,
.navbar.nav-shrink {
  background: rgba(9, 16, 32, 0.94);
  box-shadow: 0 10px 30px rgba(11, 17, 32, 0.22);
}

.nav-glass.nav-shrink .navbar-brand,
.navbar.nav-shrink .navbar-brand {
  font-size: 1.05rem;
}

.nav-glass.nav-shrink .navbar-nav .nav-link,
.navbar.nav-shrink .navbar-nav .nav-link {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.site-shell {
  min-height: calc(100vh - 140px);
  padding-top: 84px;
}

.hero-panel {
  padding-top: 1rem;
}

.feature-card,
.page-card,
.info-card,
.stat-card {
  background: var(--surface);
  border: 1px solid rgba(16, 35, 61, 0.08);
  border-radius: 1.25rem;
  box-shadow: 0 20px 60px rgba(11, 17, 32, 0.10);
}

.feature-card {
  color: var(--ink);
}

.hero-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(235,245,255,0.98));
  border: none;
}

.record-summary-card-link {
  cursor: pointer;
}

.record-summary-card-link:focus-visible {
  outline: 2px solid #4f8cff;
  outline-offset: 3px;
  border-radius: 0.65rem;
}

.record-summary-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.record-summary-card--active {
  box-shadow: 0 12px 32px rgba(79, 140, 255, 0.18);
  background: rgba(255, 255, 255, 1);
}

.record-summary-card-link:hover .record-summary-card {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(11, 17, 32, 0.12);
  background: rgba(255, 255, 255, 1);
}

.record-control-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(16, 35, 61, 0.12);
}

.btn-gradient-primary {
  background: linear-gradient(135deg, #4f8cff, #7b5cff);
  border: none;
  color: #fff;
}

.btn-gradient-primary:hover,
.btn-gradient-success:hover {
  transform: translateY(-1px);
}

.btn-gradient-success {
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  border: none;
  color: #fff;
}

.record-table-wrapper {
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(16, 35, 61, 0.08);
}

.record-table {
  min-width: 100%;
  background: #fff;
}

.record-table thead tr {
  background: rgba(15, 45, 90, 0.05);
}

.table-row-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.table-row-hover:hover {
  transform: translateX(6px);
  box-shadow: 0 16px 32px rgba(16, 35, 61, 0.10);
  background: rgba(246, 252, 255, 0.95);
}

.pagination-rounded .page-link {
  border-radius: 999px;
}

.pagination-rounded .active .page-link {
  background: #4f8cff;
  border-color: #4f8cff;
}

@media (max-width: 767px) {
  .hero-card {
    padding: 1.5rem;
  }
}

.mini-card {
  padding: 1rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #eef4ff, #edf8f4);
  text-align: center;
  font-weight: 600;
}

.info-card,
.page-card {
  padding: 1.5rem;
  color: var(--ink);
}

.stat-card {
  padding: 1.25rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  color: #53627a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

footer {
  color: rgba(255, 255, 255, 0.76);
}

.portal-nav-brand-img {
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.portal-nav-brand-fallback {
  width: 44px;
  height: 44px;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.35rem;
}

.portal-nav-brand-title {
  max-width: min(280px, 46vw);
}

.portal-nav-brand-tagline {
  max-width: min(280px, 46vw);
  font-size: 0.75rem !important;
}

.portal-nav-patient-photo {
  object-fit: cover;
  border: 2px solid rgba(125, 200, 255, 0.45);
}

.portal-nav-patient-photo--placeholder {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.site-shell--patient {
  min-height: calc(100vh - 140px);
}

.patient-portal-outer {
  width: min(1420px, 94vw);
  margin-inline: auto;
}

.patient-portal-grid {
  display: grid;
  grid-template-columns: minmax(300px, 26%) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: stretch;
  min-height: min(900px, 90vh);
}

.patient-portal-sidebar {
  min-height: min(880px, 88vh);
}

.patient-portal-sidebar.portal-sidebar .sidebar-menu {
  flex: 1 1 auto;
}

@media (max-width: 1024px) {
  .patient-portal-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .patient-portal-sidebar {
    min-height: 0;
  }
}

.marketing-card--lift {
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.marketing-card--lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(15, 35, 55, 0.14);
}

.marketing-hero {
  min-height: 220px;
}

.marketing-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.6s ease;
}

.marketing-hero:hover .marketing-hero__bg {
  transform: scale(1.06);
}

.marketing-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 40, 85, 0.88), rgba(79, 140, 255, 0.45));
}

.marketing-hero__overlay--violet {
  background: linear-gradient(120deg, rgba(55, 20, 85, 0.88), rgba(123, 92, 255, 0.5));
}

.marketing-hero__overlay--teal {
  background: linear-gradient(120deg, rgba(10, 55, 55, 0.88), rgba(34, 197, 94, 0.45));
}

.marketing-card {
  border-radius: 1.15rem;
  border: 1px solid rgba(16, 35, 61, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 36px rgba(16, 35, 61, 0.06);
}

.marketing-brand-logo {
  max-height: 120px;
  max-width: 220px;
  object-fit: contain;
}

.marketing-icon-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e8f1ff, #f0fdf9);
  border: 1px solid rgba(79, 140, 255, 0.2);
}

.marketing-detail-tile {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  background: rgba(247, 250, 255, 0.95);
  border: 1px solid rgba(16, 35, 61, 0.06);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.marketing-detail-tile:hover {
  background: #fff;
  border-color: rgba(79, 140, 255, 0.25);
  transform: translateX(4px);
}

.marketing-detail-tile__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.marketing-service-card {
  border-radius: 1.15rem;
  padding: 1.5rem 1.35rem;
  border: 1px solid rgba(16, 35, 61, 0.07);
  background: #fff;
  position: relative;
  overflow: hidden;
}

.marketing-service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  opacity: 0.85;
  transition: height 0.25s ease;
}

.marketing-service-card:hover::before {
  height: 6px;
}

.marketing-service-card__icon-wrap {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.tone-teal::before {
  background: linear-gradient(90deg, #0d9488, #22d3ee);
}

.tone-teal .marketing-service-card__icon-wrap {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
}

.tone-indigo::before {
  background: linear-gradient(90deg, #4f46e5, #818cf8);
}

.tone-indigo .marketing-service-card__icon-wrap {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
}

.tone-rose::before {
  background: linear-gradient(90deg, #e11d48, #fb7185);
}

.tone-rose .marketing-service-card__icon-wrap {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
}

.tone-amber::before {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.tone-amber .marketing-service-card__icon-wrap {
  background: linear-gradient(135deg, #d97706, #eab308);
}

.tone-sky::before {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.tone-sky .marketing-service-card__icon-wrap {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
}

.tone-violet::before {
  background: linear-gradient(90deg, #7c3aed, #c084fc);
}

.tone-violet .marketing-service-card__icon-wrap {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.marketing-btn-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.marketing-btn-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.overview-stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.15rem;
  padding: 1.35rem 1.25rem;
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 14px 36px rgba(16, 35, 61, 0.08);
}

.overview-stat-card__icon {
  position: absolute;
  right: 0.85rem;
  top: 0.85rem;
  font-size: 1.5rem;
  opacity: 0.35;
}

.overview-stat-card__value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.overview-stat-card__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  opacity: 0.85;
}

.overview-stat--patients {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
}

.overview-stat--appts {
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
  color: #14532d;
}

.overview-stat--staff {
  background: linear-gradient(145deg, #faf5ff 0%, #ede9fe 100%);
  color: #4c1d95;
}

.overview-stat--revenue {
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  color: #78350f;
}

.dp-stat-inquiries {
  background: linear-gradient(145deg, #f0f9ff 0%, #e0e7ff 100%);
  color: #312e81;
}

.marketing-hero__overlay--doctor {
  background: linear-gradient(130deg, rgba(12, 45, 88, 0.92), rgba(79, 140, 255, 0.55));
}

.dp-panel-shadow {
  box-shadow: 0 14px 40px rgba(16, 35, 61, 0.08);
  border-radius: 0.75rem;
  border: 1px solid rgba(16, 35, 61, 0.06);
}

/* Chatbot widget */
.chatbot-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1080;
}

.chatbot-toggle {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.chatbot-panel {
  width: min(360px, calc(100vw - 2rem));
  height: 480px;
  margin-bottom: 0.75rem;
  background: #fff;
  border-radius: 0.9rem;
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.2);
  border: 1px solid rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  background: #eff6ff;
  border-bottom: 1px solid rgba(37, 99, 235, 0.18);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  background: #f8fafc;
}

.chatbot-msg {
  max-width: 85%;
  padding: 0.5rem 0.65rem;
  border-radius: 0.7rem;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  line-height: 1.35;
}

.chatbot-msg.user {
  margin-left: auto;
  background: #dbeafe;
  color: #1e3a8a;
}

.chatbot-msg.bot {
  margin-right: auto;
  background: #e2e8f0;
  color: #0f172a;
}

.chatbot-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
}

.dp-action-card {
  padding: 1.35rem 1.25rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(16, 35, 61, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--ink);
}

.dp-action-card__icon {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  margin-bottom: 0.85rem;
  color: #fff;
}

.dp-action-card__title {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: #10233d;
}

.dp-action-card__desc {
  font-size: 0.88rem;
  color: #64748b;
  flex-grow: 1;
}

.dp-action-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: #2563eb;
}

.dp-tone-blue .dp-action-card__icon {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.dp-tone-teal .dp-action-card__icon {
  background: linear-gradient(135deg, #0d9488, #2dd4bf);
}

.dp-tone-indigo .dp-action-card__icon {
  background: linear-gradient(135deg, #4f46e5, #818cf8);
}

.dp-tone-violet .dp-action-card__icon {
  background: linear-gradient(135deg, #7c3aed, #c084fc);
}

.dp-tone-rose .dp-action-card__icon {
  background: linear-gradient(135deg, #e11d48, #fb7185);
}

.dp-tone-emerald .dp-action-card__icon {
  background: linear-gradient(135deg, #059669, #34d399);
}

.dp-tone-amber .dp-action-card__icon {
  background: linear-gradient(135deg, #d97706, #fbbf24);
}

.dp-list-rounded {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(16, 35, 61, 0.07);
}

.dp-inquiry-row {
  transition: background 0.2s ease;
}

.dp-inquiry-row:hover {
  background: rgba(79, 140, 255, 0.06);
}

.dp-table-rounded {
  border-radius: 0.75rem;
  border: 1px solid rgba(16, 35, 61, 0.07);
  overflow: hidden;
}

.dp-table-head {
  background: linear-gradient(90deg, #1e3a5f, #2b6cb0);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dp-table-head th {
  border: none;
  padding: 0.85rem 1rem;
}

.dp-table-row:hover {
  background: rgba(246, 252, 255, 0.95);
}

.empty-state {
  text-align: center;
  border-radius: 0.85rem;
  border: 1px dashed rgba(16, 35, 61, 0.15);
  background: rgba(255, 255, 255, 0.65);
}

.empty-state__title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.workspace-crud-table thead tr {
  background: linear-gradient(90deg, #1a2744, #2f4f8f);
  color: #fff;
}

.workspace-crud-table thead th {
  border: none;
}

.workspace-table-row {
  transition: background 0.2s ease;
}

.workspace-table-row:hover {
  background: rgba(79, 140, 255, 0.06);
}

.workspace-signup-head {
  background: linear-gradient(125deg, #1e3a5f 0%, #4f8cff 55%, #6366f1 100%);
}

.workspace-search-group {
  max-width: 220px;
}

/* ---------- Global responsive hardening ---------- */
img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
}

.workspace-crud-shell,
.patient-portal-outer,
.marketing-hero,
.page-card,
.info-card,
.feature-card {
  min-width: 0;
}

@media (max-width: 1199.98px) {
  .marketing-hero .display-6 {
    font-size: 2rem;
  }

  .workspace-search-group {
    max-width: 320px;
  }
}

@media (max-width: 991.98px) {
  .site-shell {
    padding-top: 78px;
  }

  .navbar .container,
  .navbar .container-fluid {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .page-card,
  .info-card,
  .feature-card {
    padding: 1.1rem;
    border-radius: 1rem;
  }

  .workspace-search-group {
    max-width: 100%;
    width: 100%;
  }

  .workspace-search-group .form-control {
    min-width: 0;
  }

  .overview-stat-card {
    min-height: 116px;
  }

  .dp-action-card {
    padding: 1.05rem 0.95rem;
  }
}

@media (max-width: 767.98px) {
  .site-shell {
    padding-top: 74px;
  }

  .portal-nav-brand-title,
  .portal-nav-brand-tagline {
    max-width: 42vw;
  }

  .marketing-hero {
    border-radius: 0.9rem !important;
    min-height: 180px;
  }

  .marketing-hero .display-6 {
    font-size: 1.55rem;
  }

  .marketing-hero .lead {
    font-size: 0.95rem;
  }

  .workspace-crud-shell {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }

  .workspace-crud-table table,
  .dp-table-rounded table {
    min-width: 700px;
  }

  .workspace-crud-table .btn,
  .dp-table-rounded .btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.74rem;
  }

  .overview-stat-card__value {
    font-size: 1.55rem;
  }

  .chatbot-widget {
    right: 0.6rem;
    bottom: 0.6rem;
  }
}

@media (max-width: 575.98px) {
  .site-shell {
    padding-top: 70px;
  }

  .portal-nav-brand-fallback,
  .portal-nav-brand-img {
    width: 38px;
    height: 38px;
  }

  .portal-nav-brand-title {
    font-size: 0.92rem;
    max-width: 40vw;
  }

  .portal-nav-brand-tagline {
    display: none;
  }

  .page-card,
  .info-card,
  .feature-card {
    padding: 0.9rem;
  }

  .overview-stat-card {
    min-height: 104px;
    padding: 1rem 0.9rem;
  }

  .overview-stat-card__icon {
    font-size: 1.2rem;
  }

  .overview-stat-card__value {
    font-size: 1.35rem;
  }

  .overview-stat-card__label {
    font-size: 0.68rem;
  }

  .dp-action-card__title {
    font-size: 0.96rem;
  }

  .dp-action-card__desc {
    font-size: 0.82rem;
  }
}
