:root {
  --cda-green: #007d36;
  --cda-green-dark: #064c30;
  --cda-green-soft: #dff4ea;
  --cda-ink: #103f33;
  --cda-muted: #75808a;
  --cda-border: #cfd7dd;
  --cda-danger: #a32636;
  --surface: rgba(255, 255, 255, 0.94);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cda-ink);
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f7fbfa;
}

button,
input,
select {
  font: inherit;
}

.app-shell,
.app-shell main {
  min-height: 100vh;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center end;
  padding: 32px clamp(24px, 5vw, 80px);
  background: #0879cf url("../images/login-salud-ocupacional.png") left center / cover no-repeat;
}

.login-card {
  width: min(100%, 520px);
  padding: 30px 52px 54px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(28, 77, 67, 0.17);
}

.login-logo {
  display: block;
  width: 208px;
  height: auto;
  margin: 0 auto 14px;
}

.login-card h1 {
  margin: 0 0 36px;
  color: var(--cda-green-dark);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.field-group {
  margin-bottom: 26px;
}

.field-group label {
  display: block;
  margin: 0 0 8px 14px;
  color: #0f4036;
  font-size: 18px;
  font-weight: 700;
}

.input-shell {
  display: grid;
  grid-template-columns: 52px 1fr 56px;
  align-items: center;
  min-height: 66px;
  border: 1px solid var(--cda-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(16, 63, 51, 0.06);
}

.input-shell:focus-within {
  border-color: var(--cda-green);
  box-shadow: 0 0 0 4px rgba(0, 125, 54, 0.13);
}

.field-icon {
  display: grid;
  width: 52px;
  place-items: center;
  color: var(--cda-green);
}

.field-icon svg,
.password-toggle svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.login-input {
  width: 100%;
  min-width: 0;
  height: 64px;
  border: 0;
  outline: 0;
  color: #243d39;
  background: transparent;
  font-size: 20px;
  font-weight: 500;
}

.login-input::placeholder {
  color: var(--cda-muted);
  opacity: 1;
}

select.login-input {
  color: var(--cda-muted);
  appearance: none;
}

.password-toggle {
  display: grid;
  width: 56px;
  height: 64px;
  place-items: center;
  border: 0;
  color: var(--cda-green-dark);
  background: transparent;
  cursor: pointer;
}

.password-toggle:focus-visible {
  outline: 3px solid rgba(0, 125, 54, 0.28);
  outline-offset: -7px;
}

.login-button {
  width: 100%;
  min-height: 66px;
  margin-top: 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #039645, #007536);
  box-shadow: 0 12px 20px rgba(0, 118, 54, 0.2);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.login-button:hover {
  background: linear-gradient(180deg, #02a44b, #006f32);
}

.login-button:focus-visible {
  outline: 4px solid rgba(0, 125, 54, 0.25);
  outline-offset: 3px;
}

.validation-summary {
  margin: -18px 0 20px;
  color: var(--cda-danger);
  font-weight: 600;
}

.validation-summary ul {
  margin: 0;
  padding-left: 20px;
}

.field-validation {
  display: block;
  min-height: 22px;
  margin: 6px 0 0 14px;
  color: var(--cda-danger);
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 760px) {
  .login-page {
    place-items: center;
    padding: 24px 16px;
    background-position: 56% center;
  }

  .login-card {
    padding: 26px 22px 34px;
  }

  .login-logo {
    width: 166px;
  }

  .login-card h1 {
    margin-bottom: 28px;
    font-size: 24px;
  }

  .field-group label {
    margin-left: 6px;
    font-size: 16px;
  }

  .input-shell {
    grid-template-columns: 46px 1fr 48px;
    min-height: 58px;
  }

  .field-icon,
  .password-toggle {
    width: 46px;
  }

  .field-icon svg,
  .password-toggle svg {
    width: 26px;
    height: 26px;
  }

  .login-input,
  .password-toggle {
    height: 56px;
  }

  .login-input {
    font-size: 16px;
  }

  .login-button {
    min-height: 58px;
    font-size: 18px;
  }
}

.clinical-app {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 254px 1fr;
  color: #172a24;
  background:
    radial-gradient(circle at 100% 100%, rgba(0, 125, 54, 0.12), transparent 24%),
    linear-gradient(180deg, #f8fbfa, #eef5f2);
}

.clinical-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: 106px 0 24px;
  background:
    linear-gradient(180deg, rgba(0, 96, 53, 0.95), rgba(7, 67, 48, 0.98)),
    var(--cda-green-dark);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
  display: grid;
}

.sidebar-nav > [hidden] {
  display: none;
}

.sidebar-link,
.logout-link {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  min-height: 62px;
  padding: 0 24px 0 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.sidebar-link:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-link.active,
.sidebar-link:hover,
.logout-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.nav-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.logout-link {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.clinical-main {
  min-width: 0;
}

.clinical-topbar {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  color: #fff;
  background:
    linear-gradient(90deg, #006b38, #058848 55%, #006235),
    var(--cda-green);
  box-shadow: 0 4px 14px rgba(10, 73, 50, 0.26);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-folder {
  display: grid;
  width: 88px;
  height: 60px;
  place-items: center;
  color: #007d36;
}

.brand-folder svg {
  width: 88px;
  height: 60px;
}

.brand-folder path:first-child {
  fill: #edf6f1;
}

.brand-folder path:last-child {
  fill: #007d36;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.icon-button {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  color: #fff;
  background: transparent;
}

.icon-button svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.badge {
  position: absolute;
  right: 4px;
  top: 3px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #d63d4f;
  color: #fff;
  font-size: 11px;
  line-height: 17px;
  text-align: center;
}

.topbar-divider {
  width: 1px;
  height: 42px;
  background: rgba(255, 255, 255, 0.24);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.user-menu svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.avatar,
.patient-avatar {
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #0f9a53, #046f3a);
  font-weight: 800;
}

.avatar {
  width: 56px;
  height: 56px;
  border: 3px solid rgba(255, 255, 255, 0.52);
}

.clinical-content {
  padding: 28px 32px 30px;
}

.section-title {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.section-title::after {
  height: 1px;
  background: #ccd7d2;
  content: "";
}

.section-title h1,
.section-title h2 {
  margin: 0;
  color: #0a4e35;
  font-size: 25px;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr)) 194px;
  gap: 24px;
  align-items: end;
  padding: 22px;
  border: 1px solid #d8e0dd;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 22px rgba(31, 71, 61, 0.12);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #164d38;
  font-size: 16px;
  font-weight: 800;
}

.filter-panel select,
.search-field,
.search-field input {
  width: 100%;
  min-width: 0;
}

.filter-panel select,
.search-field {
  height: 44px;
  border: 1px solid #bac8c3;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 2px 5px rgba(20, 62, 51, 0.1);
}

.filter-panel select {
  padding: 0 16px;
  color: #1d2c29;
  font-size: 17px;
}

.search-field {
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
}

.search-field input {
  height: 42px;
  border: 0;
  padding: 0 14px;
  outline: 0;
  color: #1d2c29;
  background: transparent;
  font-size: 17px;
}

.search-field svg {
  width: 26px;
  height: 26px;
  fill: #0a4e35;
}

.filter-panel button {
  height: 54px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(180deg, #07984c, #006f38);
  box-shadow: 0 5px 10px rgba(0, 111, 56, 0.2);
  font-size: 22px;
  font-weight: 800;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 26px 0 18px;
}

.metric-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  min-height: 124px;
  align-items: center;
  overflow: hidden;
  padding: 24px 28px;
  border-radius: 4px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(19, 66, 54, 0.14);
}

.metric-card::after {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 3px, transparent 3.5px);
  background-size: 28px 28px;
  content: "";
  opacity: 0.55;
}

.metric-card > * {
  position: relative;
  z-index: 1;
}

.metric-patients {
  background: linear-gradient(135deg, #008f6d, #00723c);
}

.metric-served {
  background: linear-gradient(135deg, #16a05a, #078043);
}

.metric-pending {
  background: linear-gradient(135deg, #d84453, #b72839);
}

.metric-icon svg {
  width: 48px;
  height: 48px;
  fill: currentColor;
}

.metric-card h2 {
  margin: 0 0 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.32);
  font-size: 21px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  font-size: 44px;
  line-height: 1;
}

.table-heading {
  margin-top: 4px;
}

.patients-panel {
  overflow: hidden;
  border: 1px solid #d5dedb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(31, 71, 61, 0.12);
}

.table-wrap {
  overflow-x: auto;
}

.patients-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
  color: #14231f;
  font-size: 17px;
}

.patients-table th,
.patients-table td {
  height: 48px;
  padding: 0 22px;
  border-bottom: 1px solid #dbe3e0;
  text-align: left;
  white-space: nowrap;
}

.patients-table th {
  color: #123f2f;
  background: #edf4f1;
  font-size: 16px;
  font-weight: 800;
}

.patients-table tbody tr:nth-child(even) {
  background: #f7faf9;
}

.patient-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.patient-avatar {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.view-button {
  display: inline-grid;
  grid-template-columns: 22px auto;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  height: 34px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(180deg, #078f49, #006b38);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.view-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.pagination-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px;
}

.pagination-bar a,
.pagination-bar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  color: #0b4e35;
  background: #e9f0ed;
  font-weight: 800;
  text-decoration: none;
}

.pagination-bar a.active {
  color: #fff;
  background: #007d36;
}

.pagination-bar span.disabled {
  color: #8aa79a;
  cursor: default;
}

.report-preview-page {
  min-height: 100vh;
  background: #eef5f1;
}

.report-preview-header {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 86px;
  padding: 16px 28px;
  color: #fff;
  background: linear-gradient(90deg, #0b5132, #087f39);
  box-shadow: 0 4px 14px rgb(0 0 0 / 18%);
}

.report-preview-header p {
  margin: 0 0 2px;
  font-weight: 700;
  letter-spacing: .02em;
}

.report-preview-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.report-back-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  color: #0b5132;
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.report-viewer-shell {
  height: calc(100vh - 86px);
  padding: 14px;
}

@media (max-width: 1100px) {
  .clinical-app {
    grid-template-columns: 84px 1fr;
  }

  .clinical-sidebar {
    padding-top: 86px;
  }

  .sidebar-link,
  .logout-link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
    font-size: 0;
  }

  .filter-panel {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .filter-panel button {
    grid-column: span 2;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .clinical-app {
    display: block;
  }

  .clinical-sidebar {
    position: static;
    height: auto;
    padding: 0;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
  }

  .logout-link {
    display: none;
  }

  .sidebar-link {
    min-width: 76px;
    min-height: 58px;
  }

  .clinical-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
  }

  .brand-lockup {
    font-size: 24px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .clinical-content {
    padding: 20px 14px;
  }

  .section-title {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .filter-panel button {
    grid-column: auto;
  }

  .metric-card {
    padding: 20px;
  }
}

/* Expediente modern refresh */
.clinical-app {
  grid-template-columns: 238px minmax(0, 1fr);
  color: #12362d;
  background:
    linear-gradient(135deg, rgba(0, 125, 54, 0.06), transparent 34%),
    linear-gradient(180deg, #f8fbfa 0%, #edf5f1 100%);
}

.clinical-sidebar {
  padding: 92px 12px 22px;
  background:
    linear-gradient(180deg, #075638 0%, #064c30 58%, #043821 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 8px 0 24px rgba(8, 53, 36, 0.18);
}

.sidebar-nav {
  gap: 8px;
}

.sidebar-link,
.logout-link {
  grid-template-columns: 36px 1fr;
  min-height: 50px;
  margin: 0;
  padding: 0 14px 0 18px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-link:last-child,
.logout-link {
  border: 0;
}

.sidebar-link.active,
.sidebar-link:hover,
.logout-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  transform: translateX(2px);
}

.sidebar-link.active {
  box-shadow: inset 3px 0 0 #8ee3ad;
}

.nav-icon,
.nav-icon svg {
  width: 24px;
  height: 24px;
}

.sidebar-group,
.sidebar-submenu {
  display: grid;
  gap: 4px;
}

.sidebar-sublink {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  min-height: 42px;
  align-items: center;
  gap: 10px;
  margin-left: 18px;
  padding: 6px 10px 6px 14px;
  border-left: 2px solid rgba(142, 227, 173, 0.45);
  border-radius: 0 8px 8px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.sidebar-sublink:hover,
.sidebar-sublink:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.sidebar-sublink:focus-visible {
  outline: 2px solid #8ee3ad;
  outline-offset: 2px;
}

.submenu-icon,
.submenu-icon svg {
  width: 20px;
  height: 20px;
}

.submenu-icon {
  display: grid;
  place-items: center;
}

.submenu-icon svg {
  fill: currentColor;
}

.clinical-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 76px;
  padding: 0 30px;
  color: #0b4e35;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(0, 98, 53, 0.14);
  box-shadow: 0 10px 28px rgba(15, 75, 55, 0.12);
  backdrop-filter: blur(10px);
}

.brand-lockup {
  gap: 14px;
  font-size: 26px;
  color: #0b4e35;
}

.brand-folder {
  width: 70px;
  height: 48px;
  border: 1px solid rgba(0, 125, 54, 0.18);
  border-radius: 8px;
  background: #f3faf6;
  box-shadow: 0 8px 18px rgba(0, 98, 53, 0.12);
}

.brand-folder svg {
  width: 62px;
  height: 42px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 125, 54, 0.14);
  border-radius: 8px;
  color: #0b5b3a;
  background: #f4faf7;
}

.icon-button:hover {
  background: #e8f6ee;
}

.topbar-divider {
  background: rgba(0, 98, 53, 0.18);
}

.user-menu {
  color: #0b4e35;
  font-size: 16px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-color: rgba(0, 125, 54, 0.2);
}

.clinical-content {
  padding: 28px 30px 34px;
}

.section-title {
  margin-bottom: 14px;
}

.section-title::after {
  background: linear-gradient(90deg, rgba(0, 125, 54, 0.24), rgba(0, 125, 54, 0.04));
}

.section-title h1,
.section-title h2 {
  color: #063f2a;
  font-size: 24px;
}

.filter-panel {
  grid-template-columns: repeat(5, minmax(130px, 1fr)) 160px;
  gap: 18px;
  padding: 18px;
  border-color: rgba(0, 98, 53, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(23, 70, 55, 0.1);
}

.filter-panel label {
  gap: 7px;
  font-size: 14px;
}

.filter-panel select,
.search-field {
  height: 46px;
  border-color: #c4d4ce;
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 4px 12px rgba(21, 69, 53, 0.06);
}

.filter-panel select:focus,
.search-field:focus-within {
  border-color: #078f49;
  box-shadow: 0 0 0 3px rgba(0, 125, 54, 0.13);
  outline: 0;
}

.date-filter-field select {
  height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-right: 4px;
}

.date-filter-field select:focus {
  box-shadow: none;
}

.date-filter-field svg {
  pointer-events: none;
}

.patient-filter-field input {
  width: 100%;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0 42px 0 14px;
  outline: 0;
}

.patient-filter-field svg {
  pointer-events: none;
}

.filter-panel select,
.search-field input {
  font-size: 16px;
  font-weight: 700;
}

.filter-panel button {
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0a9b51, #007d36);
  box-shadow: 0 10px 18px rgba(0, 111, 56, 0.2);
  font-size: 18px;
}

.filter-panel button:hover,
.view-button:hover {
  filter: brightness(1.04);
}

.metrics-grid {
  gap: 18px;
  margin: 24px 0 18px;
}

.metrics-grid.metrics-single {
  grid-template-columns: minmax(280px, 1fr);
}

.metric-card {
  grid-template-columns: 48px 1fr;
  min-height: 112px;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  box-shadow: 0 16px 28px rgba(19, 66, 54, 0.14);
}

.metric-card::after {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 54%);
  opacity: 1;
}

.metric-patients {
  background: linear-gradient(135deg, #008b67, #006f3a);
}

.metric-served {
  background: linear-gradient(135deg, #11a35a, #047e41);
}

.metric-pending {
  background: linear-gradient(135deg, #d34350, #af2637);
}

.metric-icon svg {
  width: 42px;
  height: 42px;
}

.metric-card h2 {
  margin-bottom: 10px;
  padding-bottom: 10px;
  font-size: 18px;
}

.metric-card strong {
  font-size: 40px;
}

.patients-panel {
  border-color: rgba(0, 98, 53, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(23, 70, 55, 0.1);
}

.patients-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 16px;
}

.patients-table th,
.patients-table td {
  height: 52px;
  padding: 0 20px;
  border-bottom-color: #e1e9e5;
}

.patients-table th {
  color: #0b4e35;
  background: #eef6f2;
  font-size: 14px;
  text-transform: uppercase;
}

.patients-table tbody tr:nth-child(even) {
  background: #fafdfb;
}

.patients-table tbody tr:hover {
  background: #edf8f2;
}

.patients-table .empty-results {
  height: 96px;
  color: #557068;
  text-align: center;
}

.patient-avatar {
  width: 32px;
  height: 32px;
  box-shadow: 0 6px 12px rgba(0, 111, 56, 0.16);
}

.view-button {
  min-width: 82px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0a9b51, #00723b);
  font-size: 15px;
}

.pagination-bar {
  gap: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.pagination-bar a,
.pagination-bar span {
  min-width: 34px;
  height: 30px;
  border: 1px solid #d6e4de;
  border-radius: 8px;
  background: #f1f7f4;
}

.pagination-bar a:hover {
  color: #064c30;
  background: #e3f3ea;
}

.pagination-bar a.active {
  border-color: #007d36;
  background: #007d36;
}

@media (max-width: 1100px) {
  .clinical-app {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .clinical-sidebar {
    padding: 82px 8px 18px;
  }

  .sidebar-link,
  .logout-link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
    font-size: 0;
  }

  .sidebar-link.active {
    box-shadow: inset 0 -3px 0 #8ee3ad;
  }

  .sidebar-sublink {
    grid-template-columns: 1fr;
    min-height: 50px;
    justify-items: center;
    margin-left: 0;
    padding: 0;
    border-left: 0;
    font-size: 0;
  }

  .filter-panel {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .filter-panel button {
    grid-column: span 2;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .clinical-app {
    display: block;
  }

  .clinical-sidebar {
    position: static;
    height: auto;
    padding: 8px;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .logout-link {
    display: none;
  }

  .sidebar-link {
    min-width: 66px;
    min-height: 52px;
  }

  .sidebar-group {
    grid-template-columns: repeat(2, 66px);
    gap: 8px;
  }

  .sidebar-submenu {
    display: contents;
  }

  .sidebar-sublink {
    min-width: 66px;
    min-height: 52px;
  }

  .clinical-topbar {
    position: static;
    gap: 14px;
    padding: 16px;
  }

  .brand-lockup {
    font-size: 22px;
  }

  .clinical-content {
    padding: 18px 12px 24px;
  }

  .section-title {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .filter-panel button {
    grid-column: auto;
  }

  .metric-card {
    min-height: 104px;
    padding: 18px;
  }
}

.logout-form {
  margin: 0;
}

.logout-form .logout-link {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.logout-form .logout-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  outline: 2px solid #8ee3ad;
  outline-offset: 2px;
}
