:root {
  --doctor-navy: #10153a;
  --doctor-navy-2: #151b47;
  --doctor-purple: #6d5ce7;
  --doctor-cyan: #57c7dc;
  --doctor-bg: #f5f5f5;
  --doctor-ink: #555762;
  --doctor-line: #e5e5e8;
  --doctor-muted: #8b8d98;
  --doctor-shadow: 0 15px 36px rgba(16, 21, 58, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--doctor-ink);
  background: var(--doctor-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.doctor-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(144deg, rgba(255, 255, 255, 0.54) 0 22%, transparent 22% 100%),
    linear-gradient(328deg, rgba(255, 255, 255, 0.48) 0 18%, transparent 18% 100%),
    #d9dde9;
}

.doctor-login-card {
  width: min(1120px, 92vw);
  min-height: 580px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  box-shadow: var(--doctor-shadow);
}

.doctor-login-visual {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: 56px;
  background: #f7f8fc;
  color: #0d0f18;
}

.doctor-login-visual h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0;
}

.doctor-illustration {
  position: relative;
  width: 390px;
  height: 260px;
}

.doctor-building {
  position: absolute;
  inset: 10px 42px auto;
  color: rgba(16, 21, 58, 0.05);
  font-size: 9rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.doctor-desk {
  position: absolute;
  left: 82px;
  right: 48px;
  bottom: 54px;
  height: 88px;
  background: #e8ebf7;
  border: 5px solid #fff;
  box-shadow: 0 8px 0 rgba(109, 92, 231, 0.16);
}

.doctor-people span {
  position: absolute;
  bottom: 55px;
  width: 48px;
  height: 96px;
  border-radius: 28px 28px 6px 6px;
  background: #6d5ce7;
}

.doctor-people span::before {
  content: "";
  position: absolute;
  left: 12px;
  top: -22px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0b7ba;
}

.doctor-people span:nth-child(1) {
  left: 42px;
  height: 130px;
  background: #39406c;
}

.doctor-people span:nth-child(2) {
  left: 144px;
  height: 82px;
  background: #f0b7ba;
}

.doctor-people span:nth-child(3) {
  left: 226px;
  height: 112px;
  background: #8f83ee;
}

.doctor-people span:nth-child(4) {
  left: 314px;
  height: 126px;
  background: #39406c;
}

.doctor-login-form {
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 64px;
  color: #dfe2ff;
  background: var(--doctor-navy);
}

.doctor-login-form h2 {
  margin: 0 0 2px;
  color: #fff;
  font-size: 1.8rem;
}

.doctor-login-form p {
  margin: 0 0 12px;
  font-size: 1.14rem;
}

.doctor-input {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  border: 2px solid var(--doctor-purple);
  border-radius: 6px;
  background: #282d56;
}

.doctor-input input {
  width: 100%;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
}

.doctor-input input::placeholder {
  color: #d8d9e8;
}

.doctor-login-options,
.doctor-register-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.doctor-login-options button,
.doctor-register-actions button {
  color: var(--doctor-purple);
  border: 0;
  background: transparent;
}

.doctor-primary-login {
  justify-self: end;
  min-width: 130px;
  padding: 14px 22px;
  color: #fff;
  border: 0;
  border-radius: 7px;
  background: var(--doctor-purple);
  font-size: 1.1rem;
}

.doctor-register-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  color: #c6c8e6;
}

.doctor-register-divider::before,
.doctor-register-divider::after {
  content: "";
  height: 1px;
  background: #343a6b;
}

.doctor-register-actions button:first-child {
  padding: 12px 22px;
  border: 1px solid var(--doctor-purple);
  border-radius: 7px;
}

.doctor-help-link {
  color: #ffac4b !important;
  font-weight: 700;
  font-size: 1.08rem;
}

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

.doctor-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 10px;
  overflow-y: auto;
  color: #d9d9e8;
  background: var(--doctor-navy);
}

.doctor-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
  color: #8a79ff;
  text-decoration: none;
}

.doctor-mark {
  width: 33px;
  height: 27px;
  display: inline-block;
  clip-path: polygon(0 0, 42% 0, 50% 30%, 62% 0, 100% 0, 54% 100%);
  background: linear-gradient(135deg, #8d7cff, #5b4bd8);
}

.doctor-target {
  width: 22px;
  height: 22px;
  margin-left: auto;
  border: 3px solid #7869ed;
  border-radius: 50%;
}

.doctor-nav,
.doctor-subnav {
  display: grid;
  gap: 6px;
}

.doctor-nav-item,
.doctor-subnav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  color: inherit;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  white-space: normal;
}

.doctor-nav-item b {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.doctor-nav-item.is-active,
.doctor-subnav button.is-active {
  color: #fff;
  background: var(--doctor-purple);
  box-shadow: 0 7px 18px rgba(109, 92, 231, 0.32);
}

.doctor-nav-group.is-open .doctor-nav-item b {
  transform: rotate(90deg);
}

.doctor-subnav {
  display: none;
  padding: 2px 0 4px 36px;
}

.doctor-nav-group.is-open .doctor-subnav {
  display: grid;
}

.doctor-subnav button {
  min-height: 32px;
  padding: 8px 10px;
  line-height: 1.25;
}

.doctor-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--doctor-bg);
}

.doctor-page {
  flex: 1;
  padding: 28px 30px 72px;
}

.doctor-side-link {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  padding: 10px 12px;
  color: #dfe1f2;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
}

.doctor-side-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.doctor-side-link b {
  transition: transform 0.2s ease;
}

.doctor-side-link:hover,
.doctor-side-link.active {
  color: #fff;
  background: rgba(109, 92, 231, 0.88);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.doctor-side-link.active b {
  transform: rotate(90deg);
}

.doctor-submenu {
  display: none;
  gap: 5px;
  margin: 2px 0 12px;
  padding-left: 34px;
}

.doctor-submenu.open {
  display: grid;
}

.doctor-submenu .doctor-side-link {
  min-height: 34px;
  display: flex;
  margin-bottom: 0;
  padding: 8px 10px;
  color: #cfd3ee;
  font-size: 0.8rem;
  font-weight: 650;
}

.doctor-submenu .doctor-side-link span {
  overflow-wrap: normal;
  word-break: normal;
}

.doctor-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.doctor-top-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.doctor-portal-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--doctor-line);
  border-radius: 6px;
  background: #fff;
}

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

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

.doctor-language {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.doctor-flag {
  font-size: 1.25rem;
}

.doctor-icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--doctor-ink);
  border: 0;
  background: transparent;
}

.doctor-bell span {
  position: absolute;
  top: -2px;
  right: -1px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--doctor-purple);
  font-size: 0.9rem;
}

.doctor-profile-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--doctor-ink);
  border: 0;
  background: transparent;
  text-align: right;
}

.doctor-profile-trigger strong,
.doctor-profile-trigger small {
  display: block;
}

.doctor-profile-trigger strong {
  font-size: 1.05rem;
}

.doctor-profile-trigger small {
  color: #777;
}

.doctor-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: #c64ea1;
  font-size: 0.55rem;
  line-height: 1;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.doctor-profile-menu {
  position: absolute;
  top: 56px;
  right: 0;
  width: 180px;
  padding: 8px;
  border: 1px solid var(--doctor-line);
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--doctor-shadow);
}

.doctor-profile-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  color: var(--doctor-ink);
  border: 0;
  border-bottom: 1px solid var(--doctor-line);
  background: transparent;
  text-align: left;
}

.doctor-profile-menu button:last-child {
  border-bottom: 0;
}

.doctor-content {
  flex: 1;
  padding: 30px 26px 64px;
}

.doctor-section-label {
  margin: 0 0 20px;
  color: #777;
  font-weight: 700;
}

.doctor-stats-card,
.doctor-card {
  border-radius: 5px;
  background: #fff;
  box-shadow: var(--doctor-shadow);
}

.doctor-stats-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px;
  padding: 58px 56px;
}

.doctor-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.doctor-stat strong {
  display: block;
  color: #2d2e35;
  font-size: 2rem;
}

.doctor-stat span {
  display: block;
  margin-top: 4px;
  color: #777;
  font-size: 1.1rem;
}

.doctor-stat i {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-style: normal;
}

.doctor-stat i.purple {
  color: var(--doctor-purple);
  background: #eeeaff;
}

.doctor-stat i.green {
  color: #55c784;
  background: #e8f8ec;
}

.doctor-stat i.red {
  color: #f16968;
  background: #fde8e8;
}

.doctor-stat i.orange {
  color: #ff9b43;
  background: #fff0e3;
}

.doctor-card {
  padding: 34px 36px;
  overflow-x: auto;
}

.doctor-card h2 {
  margin: 0 0 26px;
  color: #3f4149;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.doctor-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 120px;
  align-items: end;
  gap: 20px;
  margin-bottom: 70px;
}

.doctor-discount-filter-row {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
  margin-bottom: 56px;
}

.doctor-filter-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.doctor-filter-row.two {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 92px;
  margin-bottom: 28px;
}

.doctor-field {
  display: grid;
  gap: 6px;
  color: #686a75;
  font-size: 0.9rem;
}

.doctor-field input,
.doctor-field select,
.doctor-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: #666;
  border: 1px solid #d9d9dd;
  border-radius: 4px;
  outline-color: var(--doctor-purple);
  background: #fff;
}

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

.doctor-field small {
  color: #777;
}

.doctor-wide {
  grid-column: 1 / -1;
}

.doctor-cyan-button,
.doctor-reset-button,
.doctor-view-button,
.doctor-download-button {
  min-height: 38px;
  padding: 9px 20px;
  color: #fff;
  border: 0;
  border-radius: 5px;
  font-weight: 700;
}

.doctor-cyan-button,
.doctor-view-button {
  background: var(--doctor-cyan);
}

.doctor-reset-button {
  background: #df5757;
}

.doctor-download-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--doctor-purple);
}

.doctor-view-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 15px;
  font-weight: 500;
  white-space: nowrap;
}

.doctor-report-heading {
  margin-bottom: 22px;
  text-align: center;
}

.doctor-report-heading h3,
.doctor-report-heading p {
  margin: 0;
}

.doctor-report-heading h3 {
  color: #5e5f65;
}

.doctor-report-meta {
  max-width: 700px;
  margin: 0 0 18px 60px;
}

.doctor-report-title {
  margin: 0 0 28px;
  color: #555;
  text-align: center;
  font-size: 0.95rem;
}

.doctor-bordered-table,
.doctor-list-table {
  width: 100%;
  border-collapse: collapse;
  color: #63656c;
  font-size: 0.88rem;
}

.doctor-bordered-table {
  max-width: 1160px;
  border: 2px solid #1d1d1d;
}

.doctor-bordered-table th,
.doctor-bordered-table td {
  padding: 11px 12px;
  border: 2px solid #1d1d1d;
  text-align: center;
}

.doctor-bordered-table th {
  color: #555;
}

.doctor-bordered-table tfoot td {
  font-weight: 800;
  text-align: right;
  background: #f7f7f8;
}

.doctor-bordered-table tfoot td:last-child {
  text-align: center;
}

.doctor-list-table th,
.doctor-list-table td {
  padding: 12px 14px;
  border: 0;
  text-align: left;
  vertical-align: middle;
}

.doctor-list-table th {
  color: #5e6068;
  background: #fff;
}

.doctor-list-table tbody tr:nth-child(odd) {
  background: #f0f0f1;
}

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

.doctor-list-table td {
  overflow-wrap: anywhere;
}

.procedure-template-card {
  overflow: visible;
}

.procedure-template-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.procedure-template-heading h2 {
  margin-bottom: 6px;
}

.procedure-template-heading p {
  margin: 0;
  color: var(--doctor-muted);
}

.procedure-template-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  gap: 24px;
  align-items: start;
}

.procedure-template-list,
.procedure-template-editor {
  min-width: 0;
}

.procedure-template-controls,
.procedure-template-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.65fr);
  gap: 14px;
  margin-bottom: 16px;
}

.procedure-template-table {
  border: 1px solid var(--doctor-line);
}

.procedure-template-table tbody tr.selected {
  background: #eeecff;
  box-shadow: inset 4px 0 0 var(--doctor-purple);
}

.procedure-template-table td b {
  color: #3f4149;
}

.procedure-template-editor {
  padding: 22px;
  border: 1px solid var(--doctor-line);
  border-radius: 5px;
  background: #fbfbfd;
}

.procedure-editor-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.procedure-editor-title span:first-child {
  color: var(--doctor-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.procedure-editor-title h3 {
  margin: 4px 0;
  color: #30323b;
  font-size: 1rem;
  letter-spacing: 0;
}

.procedure-editor-title small,
.procedure-saved-templates small {
  color: var(--doctor-muted);
}

.procedure-status-pill {
  flex: 0 0 auto;
  min-width: 88px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
}

.procedure-status-pill.active {
  background: #55c784;
}

.procedure-status-pill.inactive {
  background: #8b8d98;
}

.procedure-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--doctor-line);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: #fff;
}

.procedure-editor-toolbar button {
  min-width: 34px;
  min-height: 32px;
  padding: 5px 10px;
  color: #4c4f59;
  border: 1px solid #dcdde2;
  border-radius: 4px;
  background: #f7f7f9;
  font-weight: 700;
}

.procedure-rich-editor {
  min-height: 250px;
  max-height: 420px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--doctor-line);
  border-radius: 0 0 5px 5px;
  background: #fff;
  color: #383a42;
  line-height: 1.6;
  outline-color: var(--doctor-purple);
}

.procedure-rich-editor p {
  margin: 0 0 12px;
}

.procedure-template-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.procedure-wide-filter {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) 120px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--doctor-line);
  border-radius: 6px;
  background: #fafbff;
}

.procedure-table-controls {
  display: grid;
  grid-template-columns: minmax(130px, 180px) minmax(240px, 1fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.procedure-table-controls .doctor-field {
  gap: 5px;
}

.procedure-action-table {
  min-width: 1120px;
}

.procedure-icon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  min-width: 218px;
}

.procedure-icon-button {
  flex: 0 0 36px;
  width: 36px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border: 0;
  border-radius: 6px;
  background: var(--doctor-cyan);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.procedure-icon-button:nth-child(1) {
  background: var(--doctor-purple);
}

.procedure-icon-button:nth-child(2) {
  background: #34a7c2;
}

.procedure-icon-button:disabled {
  color: #8e93a3;
  background: #e5e8ef;
  cursor: not-allowed;
}

.procedure-icon-button span {
  display: block;
}

.procedure-hidden-upload {
  display: none;
}

.procedure-pdf-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: #4f5260;
  border: 1px solid var(--doctor-line);
  border-radius: 5px;
  background: #f7f8fc;
  font-size: 0.78rem;
  font-weight: 800;
}

.procedure-pendingResults-table {
  min-width: 1120px;
}

.procedure-pendingResults-table th:first-child,
.procedure-pendingResults-table td:first-child {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

.procedure-pendingResults-table th:nth-child(2),
.procedure-pendingResults-table td:nth-child(2) {
  width: 112px;
}

.procedure-pendingResults-table th:nth-child(3),
.procedure-pendingResults-table td:nth-child(3) {
  width: 170px;
}

.procedure-pendingResults-table th:nth-child(4),
.procedure-pendingResults-table td:nth-child(4) {
  width: 138px;
}

.procedure-pendingResults-table th:nth-child(5),
.procedure-pendingResults-table td:nth-child(5) {
  width: 240px;
}

.procedure-pendingResults-table th:nth-child(6),
.procedure-pendingResults-table td:nth-child(6) {
  width: 130px;
}

.procedure-pendingResults-table th:nth-child(7),
.procedure-pendingResults-table td:nth-child(7) {
  width: 142px;
}

.procedure-pendingResults-table th:nth-child(8),
.procedure-pendingResults-table td:nth-child(8) {
  width: 248px;
}

.procedure-template-button,
.procedure-confirm-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  color: #fff;
  border: 0;
  border-radius: 5px;
  background: var(--doctor-purple);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.procedure-confirm-button {
  background: var(--doctor-cyan);
}

.procedure-print {
  margin-top: 18px;
}

.procedure-report-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 42px 64px;
  color: #24262b;
  background: #fff;
  box-shadow: var(--doctor-shadow);
}

.procedure-report-page h2,
.procedure-report-page h3 {
  overflow-wrap: anywhere;
}

.procedure-saved-templates {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--doctor-line);
}

.procedure-saved-templates h3 {
  margin: 0 0 12px;
  color: #3f4149;
  font-size: 0.92rem;
}

.procedure-saved-templates p {
  margin: 0;
  color: var(--doctor-muted);
}

.procedure-template-saved-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px;
  color: var(--doctor-ink);
  border: 1px solid var(--doctor-line);
  border-radius: 5px;
  background: #fff;
  text-align: left;
}

.procedure-template-saved-item.active {
  border-color: rgba(109, 92, 231, 0.55);
  background: #f4f2ff;
}

.procedure-template-saved-item b,
.procedure-template-saved-item small {
  display: block;
}

.procedure-workflow-card {
  overflow: visible;
}

.procedure-submission-card {
  max-width: 1180px;
}

.procedure-submission-form {
  display: grid;
  gap: 22px;
}

.procedure-form-section {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--doctor-line);
  border-radius: 7px;
  background: #fbfbfd;
}

.procedure-form-section h3 {
  margin: 0;
  color: #3f4149;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0;
}

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

.procedure-info-grid input[readonly] {
  color: #4b4e58;
  background: #f4f6fb;
}

.procedure-submission-editor {
  min-height: 320px;
}

.doctor-page > .doctor-section-label {
  margin-bottom: 22px;
  color: #6b6d77;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.doctor-page .doctor-card {
  margin-bottom: 22px;
}

.doctor-page .doctor-card > h2 {
  font-size: 1.15rem;
  font-weight: 850;
}

.procedure-workflow-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.procedure-workflow-heading h2 {
  margin-bottom: 6px;
}

.procedure-workflow-heading p {
  margin: 0;
  color: var(--doctor-muted);
}

.procedure-workflow-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(430px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.procedure-workflow-list,
.procedure-workflow-editor {
  min-width: 0;
}

.procedure-workflow-table {
  border: 1px solid var(--doctor-line);
}

.doctor-page .doctor-list-table {
  table-layout: fixed;
}

.doctor-page .doctor-list-table th,
.doctor-page .doctor-list-table td {
  padding: 11px 12px;
}

.procedure-workflow-table tbody tr.selected {
  background: #eeecff;
  box-shadow: inset 4px 0 0 var(--doctor-purple);
}

.procedure-workflow-table td small {
  display: block;
  margin-top: 4px;
  color: var(--doctor-muted);
  font-size: 0.74rem;
}

.procedure-worklist-cards {
  display: grid;
  gap: 12px;
  max-height: 640px;
  overflow-y: auto;
  padding-right: 4px;
}

.procedure-worklist-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--doctor-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 21, 58, 0.06);
}

.procedure-worklist-card.selected {
  border-color: rgba(109, 92, 231, 0.65);
  background: #f3f1ff;
  box-shadow: inset 4px 0 0 var(--doctor-purple), 0 10px 22px rgba(109, 92, 231, 0.12);
}

.procedure-worklist-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--doctor-purple), var(--doctor-cyan));
  font-weight: 900;
}

.procedure-worklist-main {
  min-width: 0;
}

.procedure-worklist-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.procedure-worklist-top strong {
  color: #30323a;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.procedure-worklist-top span {
  flex: 0 0 auto;
  color: var(--doctor-cyan);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.procedure-worklist-main p {
  margin: 5px 0 8px;
  color: #696b75;
  font-size: 0.82rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.procedure-worklist-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.procedure-worklist-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef1f7;
  color: #6a6d78;
  font-size: 0.7rem;
  font-weight: 800;
}

.procedure-worklist-status {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.procedure-worklist-status .doctor-view-button {
  min-width: 72px;
}

.procedure-empty-state {
  padding: 22px;
  border: 1px dashed var(--doctor-line);
  border-radius: 7px;
  color: var(--doctor-muted);
  background: #fff;
  font-weight: 800;
  text-align: center;
}

.procedure-workflow-editor {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--doctor-line);
  border-radius: 5px;
  background: #fbfbfd;
}

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

.procedure-existing-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.procedure-existing-files span,
.procedure-existing-files p {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--doctor-line);
  border-radius: 5px;
  background: #fff;
  color: #4b4e58;
  font-size: 0.78rem;
  font-weight: 700;
}

.procedure-existing-files span {
  display: grid;
  gap: 5px;
  min-width: 190px;
}

.procedure-existing-files small {
  display: block;
  color: var(--doctor-muted);
  font-weight: 600;
}

.procedure-upload-progress {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--doctor-line);
  border-radius: 5px;
  background: #fff;
  color: #4b4e58;
  font-size: 0.8rem;
  font-weight: 700;
}

.procedure-upload-progress div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ecf4;
}

.procedure-upload-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--doctor-purple), var(--doctor-cyan));
  transition: width 0.18s ease;
}

.procedure-upload-remove {
  width: fit-content;
  border: 0;
  background: transparent;
  color: #c0392b;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.procedure-audit-panel {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--doctor-line);
}

.procedure-audit-panel h3 {
  margin: 0 0 4px;
  color: #3f4149;
  font-size: 0.92rem;
}

.procedure-audit-panel p {
  margin: 0;
  padding: 9px 10px;
  border-radius: 5px;
  background: #fff;
  color: #3f4149;
  font-size: 0.8rem;
}

.procedure-audit-panel span {
  display: block;
  margin-top: 3px;
  color: var(--doctor-muted);
  font-size: 0.72rem;
}

.doctor-compact-card {
  max-width: none;
}

.doctor-compact-card .doctor-list-table {
  max-width: 700px;
}

.doctor-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: #fff;
  border-radius: 4px;
  font-weight: 700;
}

.doctor-chip.pending {
  background: var(--doctor-cyan);
}

.doctor-chip.warning {
  background: #ff9b43;
}

.doctor-chip.resolved {
  background: #55c784;
}

.doctor-request-form,
.doctor-complaint-form {
  max-width: 1320px;
}

.doctor-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 28px 110px;
}

.doctor-upload-row {
  display: flex;
  align-items: end;
  gap: 180px;
  margin: 46px 0 26px;
}

.doctor-file-field {
  display: grid;
  gap: 8px;
}

.doctor-upload-row p {
  margin: 0;
  color: #777;
}

.doctor-form-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.doctor-complaint-form {
  margin-bottom: 60px;
}

.doctor-complaint-form .doctor-form-grid {
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) auto;
  align-items: end;
  gap: 20px;
}

.doctor-complaints-table {
  max-width: 720px;
}

.doctor-preview-card {
  padding: 22px 0 24px;
  overflow-x: auto;
}

.doctor-preview-card h2 {
  margin-left: 22px;
}

.doctor-report-paper {
  width: min(980px, calc(100vw - 394px));
  min-height: auto;
  margin: 0 auto;
  padding: 32px 72px 72px;
  color: #24262b;
  background: #fff;
  box-shadow: -22px 0 24px -26px rgba(0, 0, 0, 0.8), 22px 0 24px -26px rgba(0, 0, 0, 0.8);
  overflow: visible;
  word-break: break-word;
}

.doctor-report-paper h3 {
  margin: 0 0 22px;
  font-size: 1.45rem;
}

.doctor-report-paper hr {
  margin: 34px 0 18px;
  border: 0;
  border-top: 4px double #222;
}

.doctor-report-paper h4 {
  margin: 0 0 20px;
  font-size: 1.45rem;
  text-decoration: underline;
}

.doctor-report-paper p,
.doctor-report-body {
  font-size: 1.35rem;
  line-height: 1.35;
}

.doctor-report-body {
  display: block;
  max-width: 100%;
  white-space: normal;
}

.doctor-report-body p,
.doctor-report-body div,
.doctor-report-body li {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.doctor-report-body table {
  width: 100%;
  border-collapse: collapse;
}

.doctor-report-body img {
  max-width: 100%;
  height: auto;
}

.doctor-documentation p {
  max-width: 780px;
  line-height: 1.7;
}

.doctor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 26px 24px;
  color: #777;
}

.doctor-footer strong,
.doctor-footer b {
  color: var(--doctor-purple);
}

@media (max-width: 1100px) {
  .doctor-login-card,
  .doctor-shell,
  .doctor-stats-card,
  .doctor-form-grid,
  .doctor-complaint-form .doctor-form-grid {
    grid-template-columns: 1fr;
  }

  .doctor-sidebar {
    position: static;
    height: auto;
  }

  .doctor-filter-row,
  .doctor-filter-row.two,
  .procedure-wide-filter,
  .procedure-table-controls {
    grid-template-columns: 1fr;
  }

  .procedure-template-layout,
  .procedure-workflow-layout,
  .procedure-info-grid,
  .procedure-template-controls,
  .procedure-template-form-grid,
  .procedure-workflow-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .doctor-login-page,
  .doctor-content {
    padding: 16px;
  }

  .doctor-login-form,
  .doctor-login-visual,
  .doctor-card,
  .doctor-stats-card {
    padding: 24px;
  }

  .doctor-topbar,
  .doctor-footer {
    flex-wrap: wrap;
  }

  .procedure-template-heading,
  .procedure-editor-title,
  .procedure-template-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .doctor-upload-row,
  .doctor-form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .doctor-report-paper {
    width: 100%;
    padding: 24px;
  }

  .doctor-page {
    padding: 16px;
  }

  .doctor-side-link {
    grid-template-columns: 22px minmax(0, 1fr) auto;
  }

  .procedure-worklist-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .procedure-worklist-status {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-items: start;
  }

  .procedure-report-page {
    padding: 24px;
  }
}
