.home-dashboard {
  --home-primary: #4663a9;
  --home-primary-dark: #334d8d;
  --home-teal: #23b195;
  --home-ink: #24324a;
  --home-muted: #6f7d94;
  --home-border: rgba(70, 99, 169, 0.13);
  margin: 0 auto;
  max-width: 1280px;
  padding: 8px 20px 36px;
}

.home-hero {
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 255, 255, 0.22) 0, rgba(255, 255, 255, 0.22) 90px, transparent 91px),
    radial-gradient(circle at 76% 105%, rgba(35, 177, 149, 0.28) 0, rgba(35, 177, 149, 0.28) 120px, transparent 121px),
    linear-gradient(125deg, #3d5797 0%, #506eb4 55%, #3d8fa2 100%);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(47, 70, 127, 0.2);
  color: #ffffff;
  margin-bottom: 28px;
  overflow: hidden;
  padding: 34px 38px;
  position: relative;
}

.home-hero::after {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
  height: 210px;
  position: absolute;
  right: -45px;
  top: -85px;
  width: 210px;
}

.home-hero__content {
  max-width: 720px;
  padding-right: 190px;
  position: relative;
  z-index: 1;
}

.home-hero__eyebrow {
  align-items: center;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0.13em;
  margin: 0 0 10px;
  opacity: 0.82;
  text-transform: uppercase;
}

.home-hero__eyebrow::before {
  background: #77ead3;
  border-radius: 999px;
  content: "";
  height: 7px;
  box-shadow: 0 0 0 5px rgba(119, 234, 211, 0.16);
  width: 7px;
}

.home-hero h1 {
  color: #ffffff;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 10px;
}

.home-hero__subtitle {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.home-hero__date {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  display: flex;
  font-size: 13px;
  gap: 9px;
  padding: 10px 14px;
  position: absolute;
  right: 34px;
  top: 34px;
  z-index: 2;
}

.home-section {
  margin-top: 28px;
}

.home-section__heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.home-section__heading h2 {
  color: var(--home-ink);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.home-section__heading p {
  color: var(--home-muted);
  font-size: 13px;
  margin: 0;
}

.home-action-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.home-action-card {
  background: #ffffff;
  border: 1px solid var(--home-border);
  border-radius: 19px;
  box-shadow: 0 10px 28px rgba(53, 72, 116, 0.07);
  color: var(--home-ink) !important;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  overflow: hidden;
  padding: 24px 24px 48px;
  position: relative;
  text-decoration: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-action-card::after {
  background: var(--card-accent, var(--home-primary));
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 24px;
  opacity: 0;
  position: absolute;
  right: 24px;
  top: 0;
  transform: scaleX(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.home-action-card:hover,
.home-action-card:focus {
  border-color: rgba(70, 99, 169, 0.3);
  box-shadow: 0 18px 38px rgba(53, 72, 116, 0.14);
  color: var(--home-ink) !important;
  outline: none;
  transform: translateY(-4px);
}

.home-action-card:hover::after,
.home-action-card:focus::after {
  opacity: 1;
  transform: scaleX(1);
}

.home-action-card__icon {
  align-items: center;
  background: linear-gradient(135deg, rgba(70, 99, 169, 0.14), rgba(70, 99, 169, 0.06));
  border-radius: 15px;
  color: var(--card-accent, var(--home-primary));
  display: flex;
  font-size: 24px;
  height: 52px;
  justify-content: center;
  margin-bottom: 22px;
  width: 52px;
}

.home-action-card__label {
  color: var(--card-accent, var(--home-primary));
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.home-action-card h3 {
  color: var(--home-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
}

.home-action-card p {
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.home-action-card__arrow {
  bottom: 24px;
  color: var(--card-accent, var(--home-primary));
  font-size: 14px;
  position: absolute;
  right: 24px;
  transition: transform 0.2s ease;
}

.home-action-card:hover .home-action-card__arrow {
  transform: translateX(4px);
}

.home-action-card--teal {
  --card-accent: #159a80;
}

.home-action-card--amber {
  --card-accent: #d38a20;
}

.home-action-card--rose {
  --card-accent: #c65f72;
}

.home-action-card--violet {
  --card-accent: #7759b3;
}

.home-date-toolbar {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--home-border);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(53, 72, 116, 0.07);
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr auto 1fr;
  margin-bottom: 20px;
  padding: 15px;
}

.home-date-toolbar__day {
  text-align: center;
}

.home-date-toolbar__day span {
  color: var(--home-muted);
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.home-date-toolbar__day strong {
  color: var(--home-ink);
  font-size: 22px;
}

.home-date-button {
  align-items: center;
  border-radius: 12px;
  color: var(--home-primary) !important;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.home-date-button:hover,
.home-date-button:focus {
  background: rgba(70, 99, 169, 0.09);
  outline: none;
}

.home-date-button--next {
  justify-self: end;
}

.home-count-badge {
  background: rgba(35, 177, 149, 0.11);
  border-radius: 999px;
  color: #148772;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
}

.home-appointments {
  display: grid;
  gap: 13px;
}

.home-appointment {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--home-border);
  border-radius: 17px;
  box-shadow: 0 8px 24px rgba(53, 72, 116, 0.06);
  cursor: pointer;
  display: grid;
  gap: 20px;
  grid-template-columns: 90px 1fr auto;
  min-height: 112px;
  overflow: hidden;
  padding: 16px 20px 16px 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-appointment:hover,
.home-appointment:focus {
  border-color: rgba(35, 177, 149, 0.45);
  box-shadow: 0 14px 30px rgba(53, 72, 116, 0.12);
  outline: none;
  transform: translateY(-2px);
}

.home-appointment__time {
  align-items: center;
  align-self: stretch;
  border-right: 1px solid rgba(35, 177, 149, 0.2);
  color: #148772;
  display: flex;
  flex-direction: column;
  font-size: 20px;
  font-weight: 700;
  justify-content: center;
}

.home-appointment__time i {
  font-size: 13px;
  margin-bottom: 5px;
  opacity: 0.7;
}

.home-appointment__patient {
  color: var(--home-ink);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}

.home-appointment__meta {
  color: var(--home-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px 18px;
}

.home-appointment__meta span {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.home-appointment__meta i {
  color: var(--home-primary);
  width: 14px;
}

.home-appointment__arrow {
  align-items: center;
  background: rgba(70, 99, 169, 0.08);
  border-radius: 50%;
  color: var(--home-primary);
  display: flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.home-empty-state {
  background: #ffffff;
  border: 1px dashed rgba(70, 99, 169, 0.25);
  border-radius: 20px;
  color: var(--home-muted);
  padding: 52px 24px;
  text-align: center;
}

.home-empty-state i {
  align-items: center;
  background: rgba(35, 177, 149, 0.1);
  border-radius: 50%;
  color: var(--home-teal);
  display: inline-flex;
  font-size: 26px;
  height: 64px;
  justify-content: center;
  margin-bottom: 14px;
  width: 64px;
}

.home-empty-state h3 {
  color: var(--home-ink);
  font-size: 18px;
  margin: 0 0 6px;
}

.home-empty-state p {
  margin: 0;
}

#refertoModal .modal-content {
  background-color: #f4f6fe;
  border: 1px solid #4663a9;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(30, 46, 84, 0.25);
  overflow: hidden;
}

#refertoModal .modal-header {
  background: linear-gradient(120deg, #4663a9, #5878bd);
  border: 0;
  color: #ffffff;
}

#refertoModal .modal-title {
  font-weight: 700;
}

#refertoModal .close {
  color: #ffffff;
  font-size: 30px;
  opacity: 0.85;
  text-shadow: none;
}

#refertoModal .modal-body,
#refertoModal .modal-footer {
  background-color: #f4f6fe;
}

#refertoModal .modal-body {
  font-size: 15px;
  padding: 24px;
}

#refertoModal .modal-footer {
  border-top-color: rgba(70, 99, 169, 0.12);
  text-align: center;
}

#refertoModal .btn-center-rounded {
  background-color: #4663a9;
  border: none;
  border-radius: 50px;
  color: #ffffff;
  font-weight: 700;
  padding: 10px 30px;
}

#refertoModal .list-group-item {
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  margin-bottom: 8px;
}

#refertoModal .btn-warning {
  border-radius: 30px;
}

#refertoModal .modal-dialog.modal-lg {
  max-width: 800px;
}

@media (max-width: 767px) {
  .home-dashboard {
    padding: 4px 12px 28px;
  }

  .home-hero {
    border-radius: 19px;
    padding: 28px 22px;
  }

  .home-hero h1 {
    font-size: 27px;
    padding-right: 0;
  }

  .home-hero__content {
    padding-right: 0;
  }

  .home-hero__date {
    display: none;
  }

  .home-action-grid {
    grid-template-columns: 1fr;
  }

  .home-action-card {
    min-height: 190px;
  }

  .home-date-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .home-date-toolbar__day {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .home-date-button {
    justify-content: center;
  }

  .home-date-button--next {
    justify-self: stretch;
  }

  .home-date-button__text {
    display: none;
  }

  .home-appointment {
    gap: 13px;
    grid-template-columns: 66px 1fr;
    padding-right: 14px;
  }

  .home-appointment__arrow {
    display: none;
  }

  .home-appointment__meta {
    display: grid;
    gap: 5px;
  }
}
