/* Targeted vacation UI refinements, 2026-09-05. */

/* Account page: desktop uses two independent vertical stacks. This avoids the
 * shared CSS Grid row height that previously pushed the theme card far down. */
@media (min-width: 981px) {
  .account-page > .account-left-column {
    grid-column: 1;
  }

  .account-page > .account-right-column {
    grid-column: 2;
  }
}

.account-page > .account-left-column,
.account-page > .account-right-column {
  display: grid;
  min-width: 0;
  gap: 20px;
  align-content: start;
}

.account-page > .account-left-column > .admin-section {
  min-width: 0;
  margin: 0;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff, #fbfefd);
  border: 1px solid var(--account-border);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 111, 105, 0.07);
}

.account-page > .account-left-column > .admin-section h2 {
  color: #184743;
}

@media (max-width: 980px) {
  .account-page > .account-left-column,
  .account-page > .account-right-column {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .account-page > .account-left-column > .admin-section {
    padding: 18px;
    border-radius: 16px;
  }
}

html[data-theme="dark"] .account-page > .account-left-column > .admin-section {
  background: var(--theme-surface);
  border-color: var(--theme-border);
  box-shadow: var(--theme-shadow);
}

html[data-theme="dark"] .account-page > .account-left-column > .admin-section h2 {
  color: var(--theme-text);
}

/* Returned vacation wishes: do not keep the old light-yellow surface in the
 * dark theme. Specificity and stylesheet order are sufficient here. */
html[data-theme="dark"] .account-vacation-card .vacation-admin-comment {
  color: var(--theme-text);
  background:
    color-mix(
      in srgb,
      var(--theme-warning) 10%,
      var(--theme-surface)
    );
  border-color:
    color-mix(
      in srgb,
      var(--theme-warning) 42%,
      var(--theme-border)
    );
}

html[data-theme="dark"] .account-vacation-card .vacation-admin-comment strong {
  color: var(--theme-warning);
}

html[data-theme="dark"] .account-vacation-card .vacation-admin-comment p {
  color: var(--theme-text-secondary);
}

/* Management page: the outer admin section is enough; the filter itself
 * should not look like a second card nested inside it. */
.admin-section > .vacation-admin-filter {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Public schedule now has year + subdivision + department + action. */
.vacation-public-filter {
  grid-template-columns:
    minmax(135px, 0.42fr)
    minmax(220px, 0.86fr)
    minmax(300px, 1.35fr)
    auto !important;
  align-items: end !important;
}

.vacation-public-filter > .form-group,
.vacation-public-filter > .form-actions {
  min-width: 0;
  margin: 0 !important;
}

.vacation-public-filter > .form-actions {
  align-self: end !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.vacation-public-filter > .form-actions .btn {
  min-height: 48px;
  height: 48px;
  white-space: nowrap;
}

/* Legend and reminder share one quiet horizontal strip. */
.vacation-public-legend-row {
  display: flex;
  margin: 10px 0 14px;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  flex-wrap: wrap;
}

.vacation-public-legend-row .vacation-schedule-legend {
  margin: 0 !important;
}

.vacation-public-reminder {
  margin: 0;
  color: var(--muted, var(--theme-text-muted, #7b8794));
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.74;
}

.vacation-public-reminder a {
  color: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.vacation-public-reminder a:hover,
.vacation-public-reminder a:focus-visible {
  color: var(--theme-primary, #2aa889);
  opacity: 1;
}

@media (max-width: 1050px) {
  .vacation-public-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .vacation-public-filter > .form-actions {
    align-self: end !important;
  }
}

@media (max-width: 640px) {
  .vacation-public-filter {
    grid-template-columns: 1fr !important;
  }

  .vacation-public-filter > .form-actions,
  .vacation-public-filter > .form-actions .btn {
    width: 100%;
  }

  .vacation-public-legend-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Dashboard follow-up: keep card borders visually even. The short accent rail
 * from the previous visual-polish pass is removed without changing card sizes,
 * borders or the dashboard grid. */
.dashboard-page .dashboard-card::before {
  display: none;
}

/* Latest algorithms use ordinary bullets. The previous outlined rectangle
 * looked like a missing image glyph. */
.dashboard-quick-algorithm-link::before {
  content: "•";
  top: 3px;
  left: 7px;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: var(--dashboard-info);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

/* Patient-accounting counters start at the same top line even when one label
 * wraps to two lines. */
.dashboard-quick-card--patients .dashboard-quick-metric {
  flex-direction: column;
  justify-content: flex-start;
}

.dashboard-quick-card--patients .dashboard-quick-metric strong {
  order: -1;
  line-height: 1.05;
}
