/* Production-only doctor dashboard refinement. Loaded after the main app stylesheet. */
main.app-shell.staff-shell:has(.doctor-dashboard) {
  width: min(100% - 32px, 1280px);
  max-width: 1280px;
  padding-bottom: 48px;
}

.staff-shell .doctor-dashboard {
  gap: 22px;
}

.staff-shell .doctor-dashboard-header {
  gap: 22px;
  padding: 30px;
  border: 1px solid #dbe7f2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(13, 59, 102, 0.07);
}

.staff-shell .doctor-dashboard-heading {
  align-items: flex-end;
}

.staff-shell .doctor-dashboard-heading .section-title h2 {
  margin: 3px 0 5px;
  color: #0d365e;
  font-size: 1.75rem;
  line-height: 1.35;
}

.staff-shell .doctor-dashboard-heading .section-title p {
  color: #607a94;
  font-size: 1rem;
  line-height: 1.8;
}

.staff-shell .doctor-dashboard-eyebrow {
  color: #1470be;
  font-size: 0.82rem;
}

.staff-shell .doctor-selector {
  min-width: 300px;
}

.staff-shell .doctor-selector select,
.staff-shell .doctor-appointment-filters input,
.staff-shell .doctor-appointment-filters select,
.staff-shell .doctor-clinic-form input,
.staff-shell .doctor-clinic-form select,
.staff-shell .doctor-clinic-form textarea,
.staff-shell .working-period input,
.staff-shell .exception-form input,
.staff-shell .exception-form select,
.staff-shell .exception-form textarea {
  min-height: 48px;
  border-color: #cad9e8;
  background: #ffffff;
  font-size: 0.96rem;
}

.staff-shell .doctor-dashboard-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 19px 20px;
  border: 1px solid #dce8f3;
  border-radius: 10px;
  background: #f3f8fd;
}

.staff-shell .doctor-profile-initial {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: #0d416f;
  font-size: 1.45rem;
}

.staff-shell .doctor-dashboard-profile h3 {
  margin-bottom: 5px;
  font-size: 1.16rem;
}

.staff-shell .doctor-dashboard-profile p {
  font-size: 0.94rem;
}

.staff-shell .doctor-profile-statuses {
  margin-right: auto;
}

.staff-shell .doctor-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin: 0;
}

.staff-shell .doctor-kpis > button,
.staff-shell .doctor-kpis > div {
  min-height: 106px;
  padding: 18px;
  border: 1px solid #dce7f1;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(13, 59, 102, 0.04);
  text-align: right;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.staff-shell .doctor-kpis > button:hover {
  transform: translateY(-2px);
  border-color: #9fc4e6;
}

.staff-shell .doctor-kpis > button.active {
  border-color: #8dbde6;
  background: #edf7ff;
  box-shadow: 0 6px 18px rgba(20, 112, 190, 0.1);
}

.staff-shell .doctor-kpis strong {
  font-size: 1.65rem;
  line-height: 1;
}

.staff-shell .doctor-dashboard-tabs {
  position: sticky;
  top: 12px;
  z-index: 20;
  padding: 7px;
  border: 1px solid #d9e6f2;
  background: #edf4fb;
  box-shadow: 0 8px 20px rgba(13, 59, 102, 0.06);
}

.staff-shell .doctor-dashboard-tabs button {
  min-height: 50px;
  font-size: 0.98rem;
}

.staff-shell .doctor-dashboard-tabs button.active {
  background: #176fba;
}

.staff-shell .doctor-appointments-panel,
.staff-shell .doctor-settings-panel {
  padding: 30px;
  border: 1px solid #dbe7f2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(13, 59, 102, 0.05);
}

.staff-shell .doctor-section-heading {
  margin-bottom: 22px;
}

.staff-shell .doctor-section-heading h2 {
  color: #0d365e;
  font-size: 1.45rem;
  line-height: 1.4;
}

.staff-shell .doctor-section-heading p {
  color: #627c95;
  font-size: 0.96rem;
}

.staff-shell .doctor-date-shortcuts {
  padding: 4px;
  border-radius: 9px;
  background: #f0f5fa;
}

.staff-shell .doctor-date-shortcuts button {
  min-height: 42px;
  background: transparent;
}

.staff-shell .doctor-date-shortcuts button.active {
  color: #ffffff;
  background: #176fba;
}

.staff-shell .doctor-appointment-filters {
  grid-template-columns: minmax(300px, 1.6fr) minmax(190px, 0.8fr) minmax(190px, 0.8fr);
  gap: 14px;
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 10px;
  background: #f6f9fc;
}

.staff-shell .doctor-appointment-filters label,
.staff-shell .doctor-clinic-form label,
.staff-shell .working-period label,
.staff-shell .exception-form label {
  color: #244b70;
  font-size: 0.9rem;
  font-weight: 800;
}

.staff-shell .doctor-appointments-wrap {
  overflow: hidden;
  border: 1px solid #dfe8f1;
  border-radius: 10px;
  background: #ffffff;
}

.staff-shell .doctor-appointments-table {
  margin: 0;
}

.staff-shell .doctor-appointments-table thead {
  background: #edf4fb;
}

.staff-shell .doctor-appointments-table th {
  color: #244b70;
  padding: 15px 16px;
  font-size: 0.9rem;
}

.staff-shell .doctor-appointments-table td {
  padding: 16px;
  font-size: 0.94rem;
}

.staff-shell .doctor-appointments-table .empty-state {
  min-height: 190px;
  padding: 34px 20px;
  border: 0;
  background: #fbfdff;
}

.staff-shell .doctor-clinic-form {
  gap: 18px;
}

.staff-shell .doctor-clinic-form textarea {
  min-height: 130px;
}

.staff-shell .doctor-form-actions {
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid #e4ebf2;
}

.staff-shell .doctor-form-actions button {
  min-height: 48px;
  min-width: 190px;
}

.staff-shell .doctor-hours-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.staff-shell .working-day {
  margin: 0;
  padding: 18px;
  border: 1px solid #dfe8f1;
  border-radius: 10px;
  background: #fbfdff;
}

.staff-shell .working-day-header {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4ebf2;
}

.staff-shell .working-day-header strong {
  color: #123f68;
  font-size: 1rem;
}

.staff-shell .working-day-header button {
  min-height: 40px;
}

.staff-shell .working-periods {
  gap: 12px;
}

.staff-shell .working-period {
  gap: 12px;
  padding: 12px;
  border-radius: 9px;
  background: #ffffff;
}

.staff-shell .schedule-exceptions {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid #dfe8f1;
}

.staff-shell .exception-form {
  gap: 14px;
  padding: 18px;
  border-radius: 10px;
  background: #f6f9fc;
}

.staff-shell .exception-list {
  margin-top: 16px;
}

@media (max-width: 980px) {
  main.app-shell.staff-shell:has(.doctor-dashboard) {
    width: min(100% - 24px, 1280px);
  }

  .staff-shell .doctor-dashboard-heading {
    align-items: flex-start;
  }

  .staff-shell .doctor-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-shell .doctor-appointment-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-shell .doctor-appointment-filters > :first-child {
    grid-column: 1 / -1;
  }

  .staff-shell .doctor-hours-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  main.app-shell.staff-shell:has(.doctor-dashboard) {
    width: min(100% - 16px, 1280px);
    padding-bottom: 28px;
  }

  .staff-shell .doctor-dashboard {
    gap: 13px;
  }

  .staff-shell .doctor-dashboard-header,
  .staff-shell .doctor-appointments-panel,
  .staff-shell .doctor-settings-panel {
    padding: 17px;
    border-radius: 10px;
  }

  .staff-shell .doctor-dashboard-heading,
  .staff-shell .doctor-dashboard-profile,
  .staff-shell .doctor-section-heading {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
  }

  .staff-shell .doctor-dashboard-heading .section-title h2 {
    font-size: 1.45rem;
  }

  .staff-shell .doctor-selector {
    width: 100%;
    min-width: 0;
  }

  .staff-shell .doctor-dashboard-profile {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .staff-shell .doctor-profile-statuses {
    grid-column: 1 / -1;
    margin: 0;
  }

  .staff-shell .doctor-kpis {
    gap: 8px;
  }

  .staff-shell .doctor-kpis > button,
  .staff-shell .doctor-kpis > div {
    min-height: 92px;
    padding: 13px;
  }

  .staff-shell .doctor-kpis strong {
    font-size: 1.4rem;
  }

  .staff-shell .doctor-dashboard-tabs {
    position: static;
    gap: 4px;
    padding: 5px;
  }

  .staff-shell .doctor-dashboard-tabs button {
    min-height: 48px;
    padding: 6px 8px;
    font-size: 0.84rem;
  }

  .staff-shell .doctor-section-heading h2 {
    font-size: 1.25rem;
  }

  .staff-shell .doctor-date-shortcuts {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .staff-shell .doctor-date-shortcuts button {
    padding: 0 8px;
  }

  .staff-shell .doctor-appointment-filters {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .staff-shell .doctor-appointment-filters > :first-child {
    grid-column: auto;
  }

  .staff-shell .doctor-clinic-form {
    grid-template-columns: 1fr;
  }

  .staff-shell .doctor-clinic-form .doctor-form-wide,
  .staff-shell .doctor-clinic-form .doctor-form-actions {
    grid-column: auto;
  }

  .staff-shell .doctor-form-actions button {
    width: 100%;
    min-width: 0;
  }

  .staff-shell .working-day {
    padding: 14px;
  }

  .staff-shell .working-period {
    grid-template-columns: 1fr;
  }

  .staff-shell .exception-form {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .staff-shell .schedule-exceptions {
    margin-top: 22px;
    padding-top: 22px;
  }
}


/* Mobile usability audit 2026-07-26 */
@media (max-width: 640px) {
  .staff-shell .doctor-dashboard-tabs {
    overflow-x: hidden;
    scrollbar-width: none;
  }

  .staff-shell .doctor-dashboard-tabs::-webkit-scrollbar {
    display: none;
  }

  .staff-shell .doctor-dashboard-tabs button {
    min-width: 0;
  }

  .staff-shell .doctor-appointment-filters input[type="date"],
  .staff-shell .exception-form input[type="date"] {
    direction: ltr;
    text-align: right;
    min-width: 0;
  }
}

/* Native date field direction override */
@media (max-width: 640px) {
  .staff-shell .doctor-appointment-filters input[type="date"],
  .staff-shell .exception-form input[type="date"] {
    direction: ltr !important;
    text-align: right !important;
  }
}


/* Doctor dashboard UX refinement, layered over the verified production CSS. */

main.app-shell.staff-shell:has(.doctor-dashboard) {
  width: min(100% - 28px, 1320px);
  max-width: 1320px;
}

.staff-shell .doctor-dashboard {
  gap: 16px;
}

.staff-shell .doctor-dashboard-header {
  gap: 16px;
  padding: 24px;
  border-color: #dfe9f2;
  box-shadow: 0 8px 24px rgba(13, 59, 102, 0.055);
}

.staff-shell .doctor-dashboard-heading .section-title h2 {
  margin-block: 2px 3px;
  font-size: 1.6rem;
}

.staff-shell .doctor-dashboard-heading .section-title p {
  max-width: 720px;
  font-size: 0.94rem;
  line-height: 1.7;
}

.staff-shell .doctor-dashboard-profile {
  min-height: 78px;
  padding: 14px 16px;
  border-color: #e1eaf2;
  background: #f6fafe;
}

.staff-shell .doctor-profile-initial {
  width: 52px;
  height: 52px;
  font-size: 1.3rem;
}

.staff-shell .doctor-kpis {
  gap: 10px;
}

.staff-shell .doctor-kpis > button,
.staff-shell .doctor-kpis > div {
  min-height: 92px;
  padding: 14px 16px;
  box-shadow: none;
}

.staff-shell .doctor-kpis > button:hover {
  box-shadow: 0 7px 18px rgba(13, 59, 102, 0.07);
}

.staff-shell .doctor-kpis strong {
  font-size: 1.5rem;
}

.staff-shell .next-appointment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  align-items: center;
  padding: 13px 16px;
  border: 1px solid #cfe1ef;
  border-radius: 10px;
  background: #f0f8ff;
}

.staff-shell .next-appointment strong {
  color: #0d416f;
}

.staff-shell .next-appointment span {
  color: #526f8b;
}

.staff-shell .doctor-dashboard-tabs {
  top: 8px;
  padding: 5px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(13, 59, 102, 0.055);
}

.staff-shell .doctor-dashboard-tabs button {
  min-height: 46px;
}

.staff-shell .doctor-appointments-panel,
.staff-shell .doctor-settings-panel {
  padding: 26px;
  box-shadow: 0 8px 22px rgba(13, 59, 102, 0.045);
}

.staff-shell .doctor-section-heading {
  margin-bottom: 18px;
}

.staff-shell .doctor-section-heading h2 {
  font-size: 1.35rem;
}

.staff-shell .doctor-appointment-filters {
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
}

.staff-shell .doctor-appointments-table tbody tr {
  transition: background-color 150ms ease;
}

.staff-shell .doctor-appointments-table tbody tr:hover {
  background: #f8fbfe;
}

.staff-shell .doctor-appointments-table td,
.staff-shell .doctor-appointments-table th {
  padding-block: 14px;
}

.staff-shell .doctor-clinic-form {
  gap: 14px 18px;
}

.staff-shell .doctor-clinic-form textarea {
  min-height: 112px;
}

.staff-shell .doctor-form-actions {
  padding-top: 14px;
}

.staff-shell .doctor-hours-list {
  gap: 12px;
}

.staff-shell .working-day {
  padding: 15px;
}

.staff-shell .working-day-header {
  margin-bottom: 11px;
  padding-bottom: 10px;
}

.staff-shell .working-period {
  gap: 10px;
  padding: 10px;
}

.staff-shell .schedule-exceptions {
  margin-top: 24px;
  padding-top: 24px;
}

.staff-shell .exception-form {
  padding: 15px;
}

.staff-shell .doctor-dashboard button:focus-visible,
.staff-shell .doctor-dashboard input:focus-visible,
.staff-shell .doctor-dashboard select:focus-visible,
.staff-shell .doctor-dashboard textarea:focus-visible {
  outline: 3px solid rgba(37, 133, 211, 0.3);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  main.app-shell.staff-shell:has(.doctor-dashboard) {
    width: min(100% - 20px, 1320px);
  }

  .staff-shell .doctor-dashboard,
  .staff-shell .doctor-dashboard > *,
  .staff-shell .doctor-dashboard-header > *,
  .staff-shell .doctor-appointments-panel > *,
  .staff-shell .doctor-settings-panel > * {
    min-width: 0;
  }

  .staff-shell .doctor-appointments-wrap {
    max-width: 100%;
    overflow-x: auto;
  }

  .staff-shell .doctor-dashboard-header {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  main.app-shell.staff-shell:has(.doctor-dashboard) {
    width: min(100% - 12px, 1320px);
    padding-bottom: 24px;
  }

  .staff-shell .doctor-dashboard {
    gap: 10px;
  }

  .staff-shell .doctor-dashboard-header,
  .staff-shell .doctor-appointments-panel,
  .staff-shell .doctor-settings-panel {
    padding: 14px;
  }

  .staff-shell .doctor-dashboard-heading {
    gap: 10px;
  }

  .staff-shell .doctor-dashboard-heading .section-title h2 {
    font-size: 1.35rem;
  }

  .staff-shell .doctor-dashboard-heading .section-title p {
    font-size: 0.88rem;
    line-height: 1.65;
  }

  .staff-shell .doctor-dashboard-profile {
    gap: 10px;
    min-height: 0;
    padding: 12px;
  }

  .staff-shell .doctor-profile-initial {
    width: 46px;
    height: 46px;
  }

  .staff-shell .doctor-dashboard-profile h3 {
    font-size: 1rem;
  }

  .staff-shell .doctor-dashboard-profile p {
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .staff-shell .doctor-profile-statuses {
    gap: 5px;
  }

  .staff-shell .doctor-kpis {
    gap: 7px;
  }

  .staff-shell .doctor-kpis > button,
  .staff-shell .doctor-kpis > div {
    min-height: 84px;
    padding: 11px;
  }

  .staff-shell .doctor-kpis strong {
    font-size: 1.3rem;
  }

  .staff-shell .next-appointment {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .staff-shell .doctor-dashboard-tabs {
    margin: 0;
    border-radius: 10px;
  }

  .staff-shell .doctor-dashboard-tabs button {
    min-height: 46px;
    padding-inline: 6px;
    font-size: 0.8rem;
  }

  .staff-shell .doctor-date-shortcuts button,
  .staff-shell .working-day-header button {
    min-height: 44px;
  }

  .staff-shell .doctor-section-heading {
    gap: 11px;
    margin-bottom: 14px;
  }

  .staff-shell .doctor-section-heading h2 {
    font-size: 1.18rem;
  }

  .staff-shell .doctor-section-heading p {
    font-size: 0.86rem;
  }

  .staff-shell .doctor-date-shortcuts {
    gap: 4px;
  }

  .staff-shell .doctor-appointment-filters {
    gap: 10px;
    margin-bottom: 14px;
    padding: 11px;
  }

  .staff-shell .doctor-appointment-filters input,
  .staff-shell .doctor-appointment-filters select,
  .staff-shell .doctor-clinic-form input,
  .staff-shell .doctor-clinic-form select,
  .staff-shell .working-period input,
  .staff-shell .exception-form input,
  .staff-shell .exception-form select {
    min-height: 46px;
  }

  .staff-shell .doctor-appointments-table tr {
    margin-bottom: 9px;
  }

  .staff-shell .doctor-form-actions {
    padding-top: 12px;
  }

  .staff-shell .working-day {
    padding: 12px;
  }

  .staff-shell .working-period {
    gap: 8px;
    padding: 9px;
  }

  .staff-shell .schedule-exceptions {
    margin-top: 18px;
    padding-top: 18px;
  }

  .staff-shell .exception-form {
    padding: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .staff-shell .doctor-dashboard *,
  .staff-shell .doctor-dashboard *::before,
  .staff-shell .doctor-dashboard *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
