:root {
  --navy: #071c3a;
  --blue: #123f7a;
  --purple: #7b3ff2;
  --purple-soft: #efe9ff;
  --cyan: #5fd6d2;
  --green: #35b779;
  --red: #d84d64;
  --ink: #132238;
  --muted: #66768c;
  --line: #dce5f2;
  --panel: #ffffff;
  --bg: #f5f8fc;
  --shadow: 0 20px 55px rgba(7, 28, 58, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 10%, rgba(123, 63, 242, 0.1), transparent 26rem),
    linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  overflow-y: auto;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(123, 63, 242, 0.22), transparent 34%),
    linear-gradient(180deg, #061832 0%, #0a2348 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  color: inherit;
  text-decoration: none;
}

.brand strong {
  display: block;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.68);
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff, #e8e1ff);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.brand-mark svg {
  width: 32px;
  height: 32px;
}

.brand-mark rect {
  fill: var(--purple);
}

.brand-mark path {
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-width: 4;
}

.role-panel {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.role-panel label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.role-panel select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: #10213c;
  border: 0;
  border-radius: 7px;
  background: #fff;
}

.module-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.76);
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.nav-item svg,
.icon-button svg,
.search-box svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-item.active,
.nav-item:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-item:disabled {
  color: rgba(255, 255, 255, 0.35);
  cursor: not-allowed;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-parent .chevron {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  transition: transform 160ms ease;
}

.nav-group.open .chevron {
  transform: rotate(180deg);
}

.submenu {
  display: grid;
  gap: 4px;
  margin-left: 42px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.submenu-item {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.68);
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.submenu-item.active,
.submenu-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.lock {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
}

.workspace {
  min-width: 0;
  padding: 24px clamp(16px, 3vw, 36px) 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  line-height: 1.1;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 63, 122, 0.06);
}

.portal-links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.portal-links a.active,
.portal-links a:hover {
  color: #fff;
  background: var(--purple);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(38vw, 420px);
  min-width: 240px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 63, 122, 0.06);
}

.search-box svg {
  width: 19px;
  height: 19px;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
}

.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  border: 0;
  border-radius: 7px;
  background: var(--blue);
  font-weight: 850;
  white-space: nowrap;
}

.search-button:hover {
  background: var(--purple);
}

.search-button.compact {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--blue);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.hero-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 24px;
  min-height: 236px;
  margin-bottom: 18px;
  padding: clamp(22px, 3vw, 34px);
  overflow: hidden;
  color: #fff;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(95, 214, 210, 0.18), transparent 34%),
    linear-gradient(135deg, #071c3a, #163e80 54%, #6f3de0);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-copy h2 {
  margin: 14px 0 10px;
  font-size: clamp(1.8rem, 3.2vw, 3.4rem);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 62ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.02rem;
  line-height: 1.6;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  color: #d8fffd;
  border: 1px solid rgba(95, 214, 210, 0.42);
  border-radius: 999px;
  background: rgba(4, 19, 40, 0.28);
  font-size: 0.8rem;
  font-weight: 800;
}

.status-pill.success {
  color: #0b6b3f;
  border-color: rgba(27, 164, 93, 0.28);
  background: #e7f8ef;
}

.status-pill.warning {
  color: #8a5b04;
  border-color: rgba(230, 166, 41, 0.28);
  background: #fff6dc;
}

.status-pill.danger {
  color: #9d2525;
  border-color: rgba(221, 77, 77, 0.28);
  background: #fde7e7;
}

.scan-visual {
  position: relative;
  min-height: 172px;
}

.pulse-ring {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}

.scan-card {
  position: absolute;
  right: 16px;
  bottom: 18px;
  display: grid;
  gap: 2px;
  width: min(210px, 80%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.scan-card span {
  color: var(--cyan);
  font-weight: 900;
}

.scan-card strong {
  font-size: 2.2rem;
}

.scan-card small {
  color: rgba(255, 255, 255, 0.72);
}

.scan-lines {
  position: absolute;
  left: 10%;
  top: 26px;
  width: 58%;
  height: 4px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 38px rgba(255, 255, 255, 0.3), 0 76px rgba(255, 255, 255, 0.2);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card,
.content-panel,
.mini-card,
.form-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 26px rgba(18, 63, 122, 0.06);
}

.kpi-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
}

.kpi-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi-value {
  color: var(--navy);
  font-size: 2rem;
  font-weight: 900;
}

.kpi-trend {
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
}

.content-panel {
  min-height: 420px;
  padding: clamp(16px, 2vw, 24px);
}

.module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.module-header h2 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 1.35rem;
}

.module-header p {
  margin: 0;
  color: var(--muted);
}

.access-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  color: var(--blue);
  border-radius: 999px;
  background: #e8f0fb;
  font-size: 0.82rem;
  font-weight: 800;
}

.module-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
}

.form-card,
.mini-card {
  padding: 16px;
}

.form-card h3,
.mini-card h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 1rem;
}

.record-form {
  display: grid;
  gap: 12px;
}

.test-category-form-card {
  max-width: 760px;
}

.patient-profile-card {
  max-width: 1280px;
}

.patient-profile-card h3 {
  margin-bottom: 24px;
}

.patient-profile-form {
  display: grid;
  gap: 22px;
}

.patient-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 18px 20px;
}

.patient-wide-field {
  grid-column: span 2;
}

.patient-actions {
  justify-content: flex-end;
}

.patient-management-table {
  min-width: 1180px;
}

.patient-management-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.appointment-header {
  align-items: flex-start;
}

.appointment-card,
.appointment-worklist-card {
  display: grid;
  gap: 20px;
}

.appointment-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.appointment-title-row h3 {
  margin: 0;
  color: #18223a;
  font-size: 1rem;
  font-weight: 900;
}

.appointment-title-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.branch-switcher {
  display: grid;
  gap: 6px;
  min-width: 240px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.appointment-form {
  display: grid;
  gap: 18px;
}

.appointment-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 18px 20px;
}

.appointment-notes-field {
  grid-column: span 2;
}

.appointment-actions {
  justify-content: flex-end;
}

.worklist-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
}

.worklist-lane {
  min-height: 160px;
  padding: 12px;
  border: 1px solid #e4ebf6;
  border-radius: 8px;
  background: #f8fbff;
}

.worklist-lane h4 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  color: #17213b;
  font-size: 0.82rem;
  font-weight: 900;
}

.worklist-lane h4 span {
  color: var(--purple);
}

.worklist-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e1e8f3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(17, 32, 64, 0.06);
}

.worklist-card + .worklist-card {
  margin-top: 10px;
}

.worklist-card strong,
.worklist-card small,
.worklist-card p {
  display: block;
}

.worklist-card strong {
  color: #17213b;
  font-size: 0.88rem;
}

.worklist-card small,
.worklist-note {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.35;
}

.worklist-card p {
  margin: 0;
  color: #27324a;
  font-size: 0.82rem;
  font-weight: 800;
}

.worklist-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.worklist-meta select {
  min-width: 130px;
  padding: 7px 8px;
  font-size: 0.78rem;
}

.empty-lane {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.appointment-table-wrap {
  margin-top: 2px;
}

.appointment-table {
  min-width: 980px;
}

.sub-test-form-card {
  padding: clamp(18px, 3vw, 34px);
}

.doctor-form-card {
  padding: clamp(18px, 3vw, 34px);
}

.corporate-form-card {
  padding: clamp(18px, 3vw, 34px);
}

.referral-form-card {
  padding: clamp(18px, 3vw, 34px);
}

.report-filter-card {
  margin-bottom: 18px;
}

.report-filter-form {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  align-items: end;
}

.invoice-report-card {
  position: relative;
  padding: clamp(18px, 3vw, 34px);
}

.invoice-report-card h3 {
  margin-bottom: 18px;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.upload-branch-header {
  margin-bottom: 16px;
}

.upload-report-card {
  position: relative;
  min-height: 560px;
  padding: clamp(18px, 3vw, 34px);
}

.upload-report-card h3 {
  margin: 0 0 18px;
  color: #333741;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.upload-report-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin: 0 52px 16px 0;
}

.upload-submit-button {
  min-width: 96px;
  min-height: 40px;
}

.upload-toolbar {
  margin: 10px 0 20px;
}

.upload-report-table {
  min-width: 1120px;
}

.upload-report-table th,
.upload-report-table td {
  white-space: nowrap;
}

.upload-download-button {
  min-width: 92px;
  min-height: 32px;
  background: var(--purple);
}

.expense-branch-header {
  margin-bottom: 16px;
}

.expense-add-card,
.expense-manage-card {
  padding: clamp(18px, 3vw, 34px);
}

.expense-add-card {
  min-height: 560px;
}

.expense-add-card h3,
.expense-manage-card h3 {
  margin: 0 0 18px;
  color: #333741;
  font-size: 1rem;
  font-weight: 900;
}

.expense-manage-card h3 {
  text-transform: uppercase;
}

.expense-add-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 540px);
  justify-content: center;
  gap: 16px;
  min-height: 460px;
}

.expense-add-form textarea {
  min-height: 70px;
}

.expense-save-button {
  position: absolute;
  right: 0;
  bottom: 0;
  min-width: 112px;
}

.expense-search-row {
  max-width: 940px;
}

.expense-date-label {
  margin-left: 96px;
}

.expense-toolbar {
  margin: 26px 0 0;
}

.expense-table {
  min-width: 1540px;
}

.expense-table th,
.expense-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.expense-table th:nth-child(7),
.expense-table td:nth-child(7) {
  min-width: 440px;
  white-space: normal;
}

.expense-manage-card .stats-grid.compact {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin: 0 0 22px;
}

.expense-manage-card .stats-grid.compact > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.expense-manage-card .stats-grid.compact strong,
.expense-manage-card .stats-grid.compact span {
  display: block;
}

.expense-manage-card .stats-grid.compact strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.expense-manage-card .stats-grid.compact span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.expense-print-button {
  min-width: 104px;
  min-height: 42px;
  line-height: 1.1;
  background: var(--purple);
}

.expense-claim-card {
  min-height: 760px;
  padding: clamp(28px, 3.5vw, 48px);
  color: #626670;
}

.expense-claim-card h3 {
  margin: 0 0 8px;
  color: #333741;
  font-size: 1.18rem;
  font-weight: 900;
}

.expense-claim-card h3 span {
  color: #50545d;
  font-size: 1rem;
}

.expense-claim-header {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px) 1fr;
  align-items: start;
  margin: 10px 0 56px;
  text-align: center;
}

.expense-claim-brand {
  display: grid;
  gap: 2px;
  font-size: 0.82rem;
  font-weight: 750;
}

.expense-claim-brand strong {
  color: #565a62;
  font-size: 0.94rem;
}

.expense-claim-brand p {
  margin: 24px 0 0;
}

.expense-claim-meta {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 52px;
  font-size: 0.86rem;
  font-weight: 750;
}

.expense-claim-meta p {
  margin: 0 0 4px;
}

.expense-claim-meta > div:last-child {
  text-align: right;
}

.expense-claim-wrap {
  overflow-x: auto;
}

.expense-claim-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.expense-claim-table th,
.expense-claim-table td {
  padding: 16px 12px;
  border: 2px solid #222;
  text-align: left;
}

.expense-claim-table th {
  font-weight: 900;
}

.expense-claim-table tbody tr:first-child {
  background: #f5f5f6;
}

.expense-claim-description {
  height: 44px;
  text-align: center !important;
}

.expense-claim-signatures {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 120px;
  font-size: 0.86rem;
  font-weight: 750;
}

.expense-claim-signatures > div {
  width: min(240px, 40%);
}

.expense-claim-signatures span {
  display: block;
  width: 180px;
  max-width: 100%;
  margin-bottom: 8px;
  border-top: 1px dotted #777;
}

.expense-claim-signatures p {
  margin: 2px 0;
}

.expense-claim-signatures > div:last-child {
  text-align: left;
}

.expense-claim-print {
  min-width: 108px;
  min-height: 40px;
  margin-top: 88px;
  background: var(--purple);
}

.report-window-actions {
  position: absolute;
  top: 18px;
  right: 20px;
  display: inline-flex;
  gap: 12px;
  color: var(--muted);
  font-weight: 900;
}

.daily-report-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 18px 26px;
  align-items: end;
}

.custom-report-filters,
.corporate-report-filters {
  display: grid;
  gap: 18px 26px;
  align-items: end;
}

.custom-report-filters {
  grid-template-columns: minmax(140px, 0.75fr) minmax(140px, 0.75fr) minmax(220px, 1.15fr) minmax(180px, 0.9fr) minmax(220px, 1.1fr);
}

.corporate-report-filters {
  grid-template-columns: minmax(140px, 0.75fr) minmax(140px, 0.75fr) minmax(220px, 1.1fr) minmax(300px, 1.6fr);
}

.procedure-commission-card {
  min-height: 272px;
  padding: clamp(20px, 3vw, 34px);
}

.referral-commission-card {
  position: relative;
  min-height: 300px;
  padding: clamp(20px, 3vw, 34px);
}

.test-performance-card {
  position: relative;
  min-height: 260px;
  padding: clamp(20px, 3vw, 34px);
}

.procedure-commission-card h3 {
  margin-bottom: 40px;
  font-size: 1.1rem;
  letter-spacing: 0;
}

.referral-commission-card h3 {
  margin-bottom: 24px;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.test-performance-card h3 {
  margin-bottom: 32px;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.referral-commission-card h4 {
  margin: 0 0 18px;
  color: #3b3f47;
  font-size: 1rem;
}

.procedure-commission-filters {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(180px, 0.9fr) minmax(280px, 1.25fr) auto;
  gap: 24px 28px;
  align-items: end;
}

.referral-commission-filters {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(160px, 0.8fr) minmax(220px, 1.25fr) minmax(260px, 1.5fr) auto;
  gap: 22px 26px;
  align-items: end;
}

.test-performance-filters {
  display: grid;
  grid-template-columns: minmax(140px, 0.75fr) minmax(140px, 0.75fr) minmax(220px, 1.1fr) minmax(260px, 1.25fr) auto;
  gap: 22px 26px;
  align-items: end;
}

.report-view-button {
  grid-column: 4;
  justify-self: end;
  width: 150px;
  min-height: 44px;
  color: #fff;
  background: var(--cyan);
}

.procedure-report-button {
  grid-column: auto;
  margin-bottom: 2px;
}

.custom-report-button,
.corporate-report-button {
  justify-self: end;
  margin-top: 20px;
}

.custom-report-button {
  grid-column: 5;
}

.corporate-report-button {
  grid-column: 4;
}

.custom-invoice-table {
  min-width: 1420px;
}

.corporate-invoice-table {
  min-width: 1240px;
}

.corporate-print-header {
  position: relative;
  margin-top: 58px;
}

.corporate-print-header .printed-date {
  position: absolute;
  right: 0;
  top: 78px;
}

.referral-report-button {
  width: 120px;
  min-height: 58px;
  color: #fff;
  background: var(--cyan);
}

.performance-report-button {
  width: 150px;
  min-height: 44px;
  color: #fff;
  background: var(--cyan);
}

.print-button {
  display: block;
  min-width: 112px;
  min-height: 42px;
  margin: 84px auto 0;
  color: #071c3a;
  border: 0;
  border-radius: 7px;
  background: #5fc879;
  font-weight: 850;
}

.report-print-button {
  margin-top: 44px;
}

.print-report-header {
  margin: 52px 0 28px;
  color: #60636d;
  text-align: center;
}

.print-report-header h2 {
  margin: 0 0 6px;
  color: #64676f;
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
}

.print-report-header h4 {
  margin: 18px 0 8px;
  color: #2f3238;
  font-size: 1rem;
}

.print-report-header p {
  margin: 4px 0;
  font-size: 0.82rem;
  font-weight: 700;
}

.invoice-report-wrap {
  overflow-x: auto;
}

.invoice-report-table {
  min-width: 1280px;
  border-collapse: collapse;
  color: #666a73;
  font-size: 0.78rem;
}

.invoice-report-table th,
.invoice-report-table td {
  border: 2px solid #222;
  padding: 14px 12px;
  vertical-align: top;
}

.invoice-report-table th {
  color: #5d6068;
  background: #fff;
  font-weight: 900;
}

.invoice-report-table tbody tr:nth-child(odd) {
  background: #f5f5f6;
}

.invoice-report-table .report-total-row {
  background: #f5f5f6;
  font-weight: 900;
}

.invoice-report-table .report-total-row td {
  border-top-width: 3px;
}

.invoice-report-table .test-details-cell {
  min-width: 360px;
  line-height: 1.8;
}

.doctor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 24px clamp(24px, 4vw, 52px);
}

.corporate-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 24px clamp(24px, 4vw, 52px);
}

.referral-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 24px clamp(24px, 4vw, 52px);
}

.doctor-form h3 {
  grid-column: 1 / -1;
}

.doctor-form .doctor-actions,
.corporate-form .corporate-actions,
.referral-form .referral-actions {
  grid-column: 1 / -1;
}

.sub-test-form {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(22px, 5vw, 64px);
  align-items: start;
}

.sub-test-fields {
  display: grid;
  gap: 18px;
}

.sub-test-doctors {
  position: sticky;
  top: 24px;
}

.required-star {
  color: var(--red);
}

.choice-group {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 750;
}

.choice-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4a5568;
}

.inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.choice-group input {
  width: 22px;
  height: 22px;
  accent-color: var(--purple);
}

.choice-group.compact {
  gap: 6px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  outline: 0;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.procedure-doctor-picker {
  position: relative;
  display: grid;
  gap: 6px;
}

.procedure-doctor-picker > label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.multi-select-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.multi-select-control:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123, 63, 242, 0.12);
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doctor-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 8px;
  color: var(--blue);
  border-radius: 999px;
  background: #e8f0fb;
  font-size: 0.78rem;
  font-weight: 850;
}

.doctor-chip button {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  padding: 0;
  color: var(--blue);
  border: 0;
  border-radius: 50%;
  background: rgba(18, 63, 122, 0.12);
  line-height: 1;
}

.multi-select-control input {
  flex: 1 1 260px;
  min-width: 190px;
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  outline: 0;
}

.multi-select-dropdown {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 10px;
  max-height: 340px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 42px rgba(7, 28, 58, 0.16);
}

.invoice-doctor-dropdown {
  position: static;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: none;
}

.multi-select-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doctor-options {
  display: grid;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
}

.doctor-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f8fbff;
  text-align: left;
}

.doctor-option:hover,
.doctor-option.selected {
  border-color: #c8d8f0;
  background: #eef5ff;
}

.doctor-option strong,
.doctor-option small,
.doctor-option em {
  display: block;
}

.doctor-option small {
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
}

.doctor-option em {
  color: var(--purple);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.no-options {
  padding: 16px;
  color: var(--muted);
  border-radius: 7px;
  background: #f8fbff;
  text-align: center;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 850;
}

.primary-button {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.save-button {
  min-width: 132px;
  background: #35b779;
}

.save-button:hover {
  background: #2ea36b;
}

.secondary-button {
  color: var(--blue);
  border: 1px solid var(--line);
  background: #fff;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: #273a54;
  font-size: 0.92rem;
}

.category-table {
  min-width: 760px;
}

.doctor-table {
  min-width: 1360px;
}

.sub-test-table {
  min-width: 1180px;
}

.sub-test-table tbody tr:nth-child(even) {
  background: #f7f7f8;
}

.sub-test-table th:first-child,
.sub-test-table td:first-child {
  width: 52px;
}

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

.doctor-table th:first-child,
.doctor-table td:first-child {
  width: 52px;
}

.doctor-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.doctor-table-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.export-buttons {
  display: inline-flex;
  overflow: hidden;
  border-radius: 7px;
}

.export-buttons button {
  min-height: 34px;
  padding: 0 18px;
  color: #fff;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  background: #aeb8c4;
  font-weight: 800;
}

.export-buttons button:last-child {
  border-right: 0;
}

.table-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.table-search label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.table-search input {
  width: min(260px, 34vw);
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
}

.import-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  color: #fff;
  border-radius: 7px;
  background: var(--purple);
  font-size: 0.82rem;
  font-weight: 900;
  overflow: hidden;
}

.import-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.doctor-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  color: #fff;
  border: 0;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.doctor-action.view,
.doctor-action.edit {
  background: #53c7db;
}

.doctor-action.activate,
.doctor-action.delete {
  background: #df5b58;
}

.doctor-action.referral-status {
  background: #f5a04f;
}

.doctor-action.app {
  min-width: 138px;
  background: #6d5ce7;
}

.doctor-action.not-registered {
  background: #8d96a8;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.settings-branch-header {
  margin-bottom: 16px;
}

.settings-form-card,
.settings-listing-card {
  min-height: 0;
}

.settings-form-card h3,
.settings-listing-card h3 {
  margin: 0 0 10px;
  color: #252936;
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: 0;
}

.settings-user-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  max-width: 980px;
}

.settings-user-form textarea {
  min-height: 84px;
}

.settings-edit-user-card {
  min-height: 760px;
  padding: 28px 36px;
}

.settings-edit-user-card h3 {
  margin: 0 0 24px;
  color: #252936;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.settings-edit-user-form {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(340px, 520px);
  justify-content: center;
  align-items: start;
  gap: 42px;
}

.settings-edit-fields {
  display: grid;
  gap: 12px;
}

.settings-edit-fields textarea {
  min-height: 86px;
}

.settings-permissions-panel {
  color: #5f6270;
  font-size: 0.82rem;
  line-height: 1.25;
}

.settings-permissions-panel h4 {
  margin: 0 0 6px;
  color: #252936;
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0;
}

.settings-permissions-panel strong {
  display: block;
  margin-bottom: 2px;
  color: #5f6270;
  font-weight: 900;
}

.settings-permissions-panel ul {
  margin: 0;
  padding-left: 18px;
}

.settings-permissions-panel li {
  margin: 2px 0;
}

.settings-permission-options {
  display: grid;
  gap: 1px;
  margin: 1px 0 0;
}

.settings-permission-options label {
  display: block;
  min-height: 0;
  color: #5f6270;
}

.settings-permission-options input {
  width: 12px;
  height: 12px;
  margin: 0 2px 0 0;
  accent-color: var(--brand-purple);
}

.settings-edit-save {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 106px;
  margin-top: 16px;
}

.settings-radio-group {
  gap: 2px;
}

.settings-radio-group label {
  min-height: auto;
  padding: 0;
}

.settings-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.plain-reset {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.settings-save-button {
  min-width: 86px;
}

.settings-listing-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.settings-add-button {
  min-width: 62px;
  background: #5dc476;
}

.settings-table th,
.settings-table td {
  white-space: nowrap;
}

.user-image-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #eef1f6;
  color: var(--muted);
  font-weight: 900;
}

.settings-region-table {
  width: min(760px, 100%);
}

.settings-small-code {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.company-settings-form {
  max-width: 980px;
}

.settings-logo-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo-preview {
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafb;
  color: #53c7db;
  font-size: 1.1rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 4px #fff;
}

.delete-image-button {
  align-self: center;
}

.company-actions {
  justify-content: flex-end;
}

.invoice-branch-header {
  margin-bottom: 16px;
}

.invoice-entry-card {
  padding: 36px 40px;
}

.invoice-entry-card h3 {
  margin: 0 0 44px;
  color: #2c2f36;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.invoice-entry-form {
  display: grid;
  gap: 38px;
}

.invoice-entry-form h4 {
  margin: 0 0 -10px;
  color: #333741;
  font-size: 0.9rem;
  font-weight: 900;
}

.invoice-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 34px 72px;
  align-items: start;
}

.invoice-stacked-fields {
  display: grid;
  gap: 18px;
}

.invoice-entry-form input[readonly] {
  background: #f5f5f0;
}

.invoice-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.invoice-inline-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
}

.invoice-inline-check strong {
  font-weight: 800;
}

.invoice-add-test {
  justify-self: end;
  min-width: 104px;
}

.invoice-empty-test-list {
  margin: -10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.invoice-item-panel {
  display: grid;
  gap: 12px;
  margin-top: -12px;
}

.invoice-item-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.invoice-total-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #e6ecf6;
  border-radius: 8px;
  background: #f8fbff;
  color: #27324a;
  font-size: 0.86rem;
  font-weight: 800;
}

.invoice-total-strip strong {
  color: var(--navy);
}

.invoice-payment-row {
  align-items: end;
}

.invoice-mixed-payment-fields {
  display: none;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 16px;
}

.invoice-mixed-payment-fields.is-visible {
  display: grid;
}

.payment-breakdown {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.invoice-generate-button {
  justify-self: end;
  min-width: 148px;
}

.invoice-listing-table td:nth-child(5) {
  min-width: 260px;
  white-space: normal;
}

.frontdesk-report-card,
.transaction-card {
  padding: 28px;
}

.frontdesk-report-card h3,
.transaction-card h3 {
  margin: 0 0 12px;
  color: #333741;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.frontdesk-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr) auto;
  gap: 18px;
  align-items: end;
}

.frontdesk-view-button {
  min-width: 120px;
  min-height: 42px;
}

.frontdesk-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
}

.frontdesk-print-header {
  margin-top: 0;
  text-align: center;
}

.frontdesk-print-header .print-button {
  margin-top: 2px;
}

.transaction-search-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 120px;
  max-width: 940px;
  margin: 10px 0 10px;
}

.transaction-search-row input {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px 0 0 4px;
  color: var(--muted);
  outline: 0;
}

.transaction-search-row button {
  min-height: 42px;
  border: 0;
  border-radius: 0 4px 4px 0;
  background: var(--purple);
  color: #fff;
  font-weight: 900;
}

.transaction-date {
  margin: 0 0 10px 96px;
  color: #42a447;
  font-size: 0.88rem;
  font-weight: 900;
}

.transaction-table th,
.transaction-table td {
  white-space: nowrap;
}

.table-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #f0f1f4;
}

.pagination button,
.page-ellipsis {
  display: inline-grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  padding: 0 12px;
  color: #616575;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 900;
}

.pagination button.active {
  color: #fff;
  background: var(--purple);
}

.pagination button:disabled {
  color: #a4a9b6;
  cursor: not-allowed;
}

.category-table th:first-child,
.category-table td:first-child {
  width: 52px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.text-button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--blue);
  border: 1px solid #cddcf0;
  border-radius: 7px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 850;
}

.text-button:hover {
  border-color: var(--blue);
  background: #f3f7ff;
}

.text-button.danger {
  color: var(--red);
  border-color: #ffd0d8;
}

.text-button.danger:hover {
  border-color: var(--red);
  background: #fff4f6;
}

.muted-text {
  color: var(--muted);
}

.linked-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 2px 4px 2px 0;
  padding: 0 8px;
  color: var(--blue);
  border-radius: 999px;
  background: #e8f0fb;
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.linked-chip.empty {
  color: var(--muted);
  background: #eef2f7;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  color: #0f6b4d;
  border-radius: 999px;
  background: #ddf7ed;
  font-size: 0.75rem;
  font-weight: 900;
}

.chip.warning {
  color: #8a5a00;
  background: #fff3d4;
}

.chip.danger {
  color: #a3293e;
  background: #ffe4e9;
}

.chip.purple {
  color: #6030c0;
  background: var(--purple-soft);
}

.workflow-stage-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.workflow-stage-summary article {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.workflow-stage-summary strong {
  display: block;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
}

.workflow-stage-summary span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.workflow-filter-card {
  margin-bottom: 16px;
}

.workflow-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
}

.workflow-filter-actions {
  display: flex;
  align-items: flex-end;
}

.workflow-feedback-card {
  margin-bottom: 16px;
  border-left: 4px solid var(--purple);
}

.workflow-feedback-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.workflow-feedback-form .wide,
.workflow-feedback-form .form-actions {
  grid-column: 1 / -1;
}

.workflow-table {
  min-width: 1480px;
}

.workflow-table td strong,
.workflow-table td small {
  display: block;
}

.workflow-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.workflow-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 330px;
}

.workflow-action-row .doctor-action {
  min-height: 30px;
  padding: 0 9px;
}

.workflow-action-row .doctor-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.workflow-status-only {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f7fb;
  font-size: 0.78rem;
  font-weight: 900;
}

.study-upload-card {
  margin-bottom: 16px;
}

.study-upload-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.study-upload-form .wide {
  grid-column: 1 / -1;
}

.study-upload-readonly {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}

.study-upload-readonly div {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.study-upload-readonly span,
.study-upload-readonly strong {
  display: block;
}

.study-upload-readonly span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.study-upload-readonly strong {
  margin-top: 7px;
  color: var(--ink);
  font-size: 0.88rem;
}

.study-upload-progress {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #53c7db;
  transition: width 0.2s ease;
}

.study-upload-progress strong,
.study-upload-progress small,
.study-upload-progress em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.study-preview-card {
  margin-bottom: 16px;
}

.study-preview-image-wrap {
  display: grid;
  place-items: center;
  min-height: 420px;
  max-height: 72vh;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
}

.study-preview-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.study-preview-frame {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workflow-target-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border-left: 4px solid var(--purple);
}

.workflow-target-card p {
  margin: 6px 0;
  color: var(--muted);
  font-weight: 800;
}

.workflow-target-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.public-feedback-card {
  max-width: 820px;
  margin: 24px auto;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.quick-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
}

.quick-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.role-matrix {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
}

.role-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #f7faff;
}

.role-line strong {
  color: var(--navy);
}

.role-line span {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.report-dashboard {
  display: grid;
  gap: 18px;
}

.report-dashboard h2 {
  margin: 0 0 2px;
  color: #656b78;
  font-size: 1.2rem;
  font-weight: 800;
}

.report-dashboard h3 {
  margin: 0;
  color: #333741;
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.report-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.report-dashboard-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.report-dashboard-card strong {
  display: block;
  color: #252a33;
  font-size: 1.15rem;
  font-weight: 900;
}

.report-dashboard-card span {
  display: block;
  margin-top: 3px;
  color: #707786;
  font-size: 0.92rem;
  font-weight: 700;
}

.report-dashboard-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: var(--purple);
  background: var(--purple-soft);
}

.report-dashboard-icon svg {
  width: 18px;
  height: 18px;
}

.report-dashboard-icon.rose {
  color: #ef6a72;
  background: #fde8eb;
}

.report-dashboard-icon.green {
  color: #51c878;
  background: #e4f8ea;
}

.report-dashboard-icon.plain {
  display: none;
}

.report-dashboard-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 22px;
}

.report-dashboard-panel {
  min-height: 300px;
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.report-dashboard-panel h4 {
  margin: 0;
  color: #333741;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 78px;
  height: 78px;
  margin-bottom: 12px;
}

.empty-state circle {
  fill: #eef5ff;
}

.empty-state path {
  fill: none;
  stroke: var(--purple);
  stroke-linecap: round;
  stroke-width: 8;
}

.empty-state h3 {
  margin: 0 0 6px;
  color: var(--navy);
}

.empty-state p {
  margin: 0;
}

.denied {
  display: grid;
  min-height: 360px;
  place-items: center;
  text-align: center;
}

.denied > div {
  max-width: 520px;
}

.denied h2 {
  margin: 0 0 10px;
  color: var(--navy);
}

.denied p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 238px minmax(0, 1fr);
  }

  .kpi-grid,
  .quick-grid,
  .report-dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-grid,
  .sub-test-form,
  .doctor-form,
  .corporate-form,
  .referral-form,
  .invoice-two-col,
  .expense-add-form,
  .frontdesk-filter-row,
  .report-filter-form,
  .daily-report-filters,
  .custom-report-filters,
  .corporate-report-filters,
  .procedure-commission-filters,
  .referral-commission-filters,
  .test-performance-filters,
  .upload-report-filters,
  .patient-form-grid,
  .appointment-form-grid,
  .worklist-status-grid,
  .dashboard-layout,
  .hero-band {
    grid-template-columns: 1fr;
  }

  .patient-wide-field,
  .appointment-notes-field {
    grid-column: auto;
  }

  .appointment-title-row {
    display: grid;
  }

  .report-dashboard-panels {
    grid-template-columns: 1fr;
  }

  .workflow-filter-grid,
  .workflow-feedback-form,
  .study-upload-form,
  .study-upload-readonly {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sub-test-doctors {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
  }

  .module-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar,
  .module-header {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .search-box {
    width: 100%;
    min-width: 0;
  }

  .search-button,
  .table-search,
  .table-search label,
  .table-search input {
    width: 100%;
  }

  .field-row,
  .kpi-grid,
  .quick-grid,
  .report-dashboard-kpis,
  .report-dashboard-panels {
    grid-template-columns: 1fr;
  }

  .workflow-filter-grid,
  .workflow-feedback-form,
  .study-upload-form,
  .study-upload-readonly {
    grid-template-columns: 1fr;
  }

  .doctor-table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .doctor-table-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination {
    justify-content: center;
    overflow-x: auto;
  }

  .table-search,
  .table-search input {
    width: 100%;
  }
}
