:root {
  --blue: #0057a8;
  --blue-dark: #004f9e;
  --blue-soft: #e8f4ff;
  --text: #202124;
  --muted: #70737b;
  --line: #e8e8e8;
  --line-strong: #d7d9dd;
  --header: #f4f4f4;
  --surface: #ffffff;
  --page: #fbfbfb;
  --danger: #e12727;
  --danger-soft: #fff0f0;
  --warning: #ef7b00;
  --warning-soft: #fff3df;
  --success: #198754;
  --success-soft: #dff7e9;
  --info: #006fb8;
  --info-soft: #dff2ff;
  --shadow: 0 24px 48px rgba(18, 23, 34, 0.15);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  padding: 48px 24px;
  place-items: center;
}

.login-panel {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-copy {
  margin-bottom: 24px;
  color: var(--muted);
}

.login-fields {
  display: grid;
  gap: 14px;
}

.login-fields label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
}

.login-fields input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

.login-fields input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
  outline: none;
}

.login-error {
  margin-top: 14px;
}

.login-submit {
  width: 100%;
  margin-top: 20px;
  justify-content: center;
}

.app-shell {
  min-height: 100vh;
  padding: 48px 56px;
}

.workspace {
  width: min(100%, 1840px);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-header,
.section-title-row,
.form-header,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-title-row {
  align-items: flex-start;
}

.app-header {
  justify-content: flex-end;
  margin-bottom: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.header-refresh-button {
  min-height: 48px;
  box-shadow: 0 8px 18px rgba(18, 23, 34, 0.06);
}

.logout-button {
  margin-left: auto;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  font-weight: 800;
}

h2 {
  margin-bottom: 4px;
  font-size: 26px;
  font-weight: 800;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
  font-weight: 800;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
}

.section-title-row p,
.form-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.sync-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.sync-panel span:not(.sync-dot) {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px var(--success-soft);
}

.sync-dot.is-refreshing {
  background: var(--blue);
  box-shadow: 0 0 0 5px var(--blue-soft);
}

.sync-dot.is-stale {
  background: var(--warning);
  box-shadow: 0 0 0 5px var(--warning-soft);
}

.sync-dot.is-error {
  background: var(--danger);
  box-shadow: 0 0 0 5px var(--danger-soft);
}

.reception-sync-panel,
.doctor-sync-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
}

.reception-sync-panel {
  max-width: 520px;
}

.doctor-sync-panel {
  max-width: 560px;
}

.sync-summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 58px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 18px rgba(18, 23, 34, 0.05);
}

.sync-summary .sync-dot {
  flex: 0 0 auto;
  margin-top: 20px;
}

.sync-copy {
  min-width: 0;
}

.sync-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.sync-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  white-space: nowrap;
}

.sync-summary strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}

.sync-summary span:not(.sync-dot):not(.sync-status-badge):not(.sync-label) {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.sync-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.sync-status-badge.is-refreshing {
  background: var(--blue-soft);
  color: var(--blue);
}

.sync-status-badge.is-stale {
  background: var(--warning-soft);
  color: var(--warning);
}

.sync-status-badge.is-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.reception-sync-alert {
  margin-bottom: 14px;
}

.notification-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(18, 23, 34, 0.06);
}

.notification-trigger:hover {
  border-color: rgba(0, 87, 168, 0.35);
  color: var(--blue);
}

.notification-trigger svg {
  width: 18px;
  height: 18px;
}

.reception-notifications {
  margin: 18px 0;
}

.compact-title-row {
  margin-top: 0;
}

.role-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 1840px);
  margin: 0 auto 14px;
  padding: 0 2px;
}

.role-switcher-label {
  margin-right: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.role-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(18, 23, 34, 0.06);
}

.role-button.is-active {
  border-color: rgba(0, 87, 168, 0.35);
  background: var(--blue);
  color: #fff;
}

.role-button:hover {
  border-color: rgba(0, 87, 168, 0.35);
  color: var(--blue);
}

.role-button.is-active:hover {
  color: #fff;
}

.role-count {
  min-width: 22px;
  height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
}

.role-button.is-active .role-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.status-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f8fa;
}

.status-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.status-tab span {
  min-width: 22px;
  height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.status-tab.is-active {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--blue);
  box-shadow: 0 5px 12px rgba(18, 23, 34, 0.08);
}

.status-tab.is-active span {
  background: var(--blue-soft);
  color: var(--blue);
}

.table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

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

.data-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
}

.data-table th {
  height: 40px;
  padding: 10px 12px;
  background: var(--header);
  text-align: left;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.data-table th span {
  color: #6f737b;
  font-weight: 500;
}

.data-table td {
  min-height: 38px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14px;
}

.data-table tr:hover td {
  background: #fcfcfc;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:focus-visible td {
  outline: 2px solid rgba(0, 87, 168, 0.45);
  outline-offset: -2px;
}

.filter-row th {
  height: 48px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.filter-row input {
  width: 100%;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
}

.filter-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #2f3338;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: #2f3338;
  font-size: 12px;
  font-weight: 800;
}

.row-action.is-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.filter-button svg,
.icon-button svg,
.row-action svg,
.role-button svg,
.primary-button svg,
.secondary-button svg,
.danger-button svg,
.back-link svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.row-action:hover,
.icon-button:hover {
  background: #f1f4f8;
}

.row-action.is-primary:hover {
  background: var(--blue-dark);
}

.row-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.declaration-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: #4d535b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.chip-orange {
  background: var(--warning-soft);
  color: #e76500;
}

.chip-green {
  background: var(--success-soft);
  color: var(--success);
}

.chip-blue {
  background: var(--info-soft);
  color: var(--info);
}

.chip-red {
  background: var(--danger-soft);
  color: var(--danger);
}

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

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

.table-footer {
  padding: 12px 14px 20px;
}

.scroll-hint {
  width: 90px;
  height: 8px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #f2f2f2;
}

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

.pagination button {
  min-width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: #5c6470;
}

.pagination .is-active {
  border-color: var(--blue);
  color: var(--blue);
}

.page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-color: var(--line-strong) !important;
  border-radius: var(--radius) !important;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
}

.primary-button {
  background: var(--blue);
  color: #fff;
}

.primary-button:hover {
  background: var(--blue-dark);
}

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

.danger-button {
  background: var(--danger-soft);
  color: var(--danger);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin: 8px 0 18px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
}

.form-header {
  margin-bottom: 26px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(27, 34, 44, 0.34);
}

.modal-panel {
  width: min(1040px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 26px 60px rgba(18, 23, 34, 0.24);
}

.notifications-modal {
  width: min(1160px, 100%);
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 18px;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  font-size: 20px;
  margin-bottom: 2px;
}

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

.modal-body {
  display: grid;
  gap: 8px;
  padding: 10px 18px;
}

.modal-actions {
  border-top: 1px solid var(--line);
}

.compact-card {
  padding-bottom: 10px;
}

.modal-summary {
  grid-template-columns: 1.15fr 0.9fr 0.9fr;
  gap: 10px;
}

.assignment-summary-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.9fr 1fr 0.8fr 0.9fr;
  gap: 8px;
}

.assignment-summary-grid div {
  display: grid;
  gap: 2px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.assignment-summary-grid .wide {
  grid-column: span 2;
}

.assignment-summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.assignment-summary-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.modal-panel .form-card {
  padding: 10px 14px;
}

.modal-panel .form-card header {
  margin-bottom: 8px;
}

.modal-panel h3 {
  font-size: 16px;
}

.modal-panel .collapse {
  width: 24px;
  height: 24px;
  font-size: 18px;
}

.modal-panel label,
.modal-panel .field-label {
  gap: 4px;
  font-size: 13px;
}

.modal-panel input {
  min-height: 32px;
  padding: 6px 10px;
}

.modal-panel .privacy-note,
.modal-panel .alert {
  margin-top: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.assignment-summary .privacy-note {
  margin-top: 8px;
  padding: 7px 9px;
}

.modal-panel .privacy-note svg,
.modal-panel .alert svg {
  width: 16px;
  height: 16px;
}

.identifier-badge {
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfb;
}

.identifier-badge span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.identifier-badge strong {
  font-size: 14px;
  font-weight: 800;
}

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

.doctor-detail-grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  align-items: start;
}

.doctor-detail-grid .medicine-section {
  grid-row: span 2;
}

.form-card,
.timeline-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.form-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 16px;
}

.card-heading {
  display: grid;
  gap: 4px;
}

.card-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.section-counter {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(0, 87, 168, 0.22);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.collapse {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #6f737b;
  font-size: 24px;
}

.field-grid {
  display: grid;
  gap: 16px;
}

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

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label,
.field-label {
  display: grid;
  gap: 7px;
  font-weight: 500;
}

.field-label {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

label b,
.field-label b {
  color: var(--danger);
}

input,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 9px 12px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 168, 0.12);
}

input[readonly],
textarea[readonly] {
  background: #fbfbfb;
}

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

.full-field {
  margin-top: 16px;
}

.privacy-note,
.alert,
.validation-message {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  padding: 12px;
  border-radius: var(--radius);
}

.privacy-note {
  background: #f7f8fa;
  color: var(--muted);
}

.privacy-note svg,
.alert svg,
.validation-message svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.alert.is-warning {
  background: var(--warning-soft);
  color: #7a4a00;
}

.validation-message {
  background: var(--danger-soft);
  color: var(--danger);
}

.slot-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.assignment-planner {
  display: grid;
  gap: 12px;
}

.day-list,
.slot-list,
.doctor-list,
.medicine-list {
  display: grid;
  gap: 10px;
}

.date-picker-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.soft-shadow {
  background: #fff;
  box-shadow: 0 8px 18px rgba(18, 23, 34, 0.1);
}

.assignment-planner .day-list {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 0 2px 4px;
  gap: 8px;
}

.date-chip {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 64px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.date-chip span {
  color: var(--muted);
  font-size: 12px;
}

.date-chip strong {
  font-size: 16px;
}

.date-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.date-chip.is-selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.date-chip.is-selected span,
.date-chip.is-selected small {
  color: #e7f3ff;
}

.date-chip.is-empty {
  cursor: not-allowed;
  border-style: dashed;
  background: #fafafa;
  color: #a2a6ad;
}

.date-chip.is-empty span,
.date-chip.is-empty small {
  color: #a2a6ad;
}

.assignment-planner .slot-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.assignment-planner .doctor-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.doctor-choice {
  display: grid;
  gap: 3px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
}

.doctor-choice strong {
  font-weight: 800;
}

.doctor-choice span {
  color: var(--muted);
  font-size: 12px;
}

.doctor-choice:hover,
.doctor-choice.is-selected {
  border-color: var(--blue);
  background: #f8fbff;
}

.term-card {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
}

.term-card strong {
  font-size: 16px;
  font-weight: 800;
}

.term-card span {
  font-weight: 700;
}

.term-card small {
  color: var(--muted);
  font-size: 12px;
}

.term-card:hover,
.term-card.is-selected {
  border-color: var(--blue);
  background: #f8fbff;
}

.selected-term-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #f4f4f4;
}

.selected-term-card div {
  display: grid;
  gap: 3px;
}

.selected-term-card span,
.selected-term-card small {
  color: var(--muted);
}

.choice-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
}

.choice-card:hover,
.choice-card.is-selected {
  border-color: var(--blue);
  background: #f8fbff;
}

.choice-card strong,
.medicine-card strong {
  font-weight: 800;
}

.choice-card span {
  color: var(--muted);
}

.medicine-list {
  gap: 12px;
}

.medicine-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--success);
  border-radius: var(--radius);
  background: #fbfffd;
  text-align: left;
}

.medicine-number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(25, 135, 84, 0.22);
  border-radius: 999px;
  background: var(--success-soft);
  color: #12623c;
  font-size: 13px;
  font-weight: 800;
}

.medicine-body {
  display: grid;
  gap: 9px;
  min-width: 0;
}

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

.medicine-title-row strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.3;
}

.medicine-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef3f1;
  color: #365348;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.medicine-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.medicine-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #3f4650;
  font-size: 13px;
  font-weight: 700;
}

.reject-inline-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(225, 39, 39, 0.22);
  border-radius: var(--radius);
  background: var(--danger-soft);
}

.reject-inline-panel textarea {
  background: #fff;
}

.empty-inline {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

.form-actions {
  margin-top: 28px;
}

.empty-state {
  display: none;
  justify-items: center;
  gap: 8px;
  padding: 52px;
  color: var(--muted);
}

.empty-state.is-visible {
  display: grid;
}

.empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--blue);
}

.broker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.7fr);
  gap: 18px;
}

.notification-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.data-table tr.unread-row td:first-child {
  box-shadow: inset 4px 0 0 var(--blue);
}

.data-table tr.unread-row td {
  background: #f8fbff;
}

.compact-table {
  min-width: 820px;
}

.timeline-card h3 {
  margin-bottom: 16px;
}

.timeline-card ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.timeline-card li {
  padding-left: 4px;
}

.toast {
  position: fixed;
  right: 30px;
  bottom: 30px;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #1f2937;
  color: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1000px) {
  .app-shell {
    padding: 20px;
  }

  .role-switcher {
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .role-switcher-label {
    display: none;
  }

  .role-button {
    flex: 0 0 auto;
  }

  .workspace {
    padding: 18px;
  }

  .app-header,
  .section-title-row,
  .form-header,
  .form-actions,
  .slot-layout,
  .broker-grid,
  .doctor-detail-grid,
  .notification-layout {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .reception-sync-panel,
  .doctor-sync-panel {
    align-items: stretch;
    flex-direction: column;
    max-width: none;
    width: 100%;
  }

  .sync-summary {
    width: 100%;
  }

  .header-actions,
  .header-refresh-button,
  .notification-trigger {
    width: 100%;
  }

  .sync-summary {
    align-items: flex-start;
  }

  .sync-main {
    flex-wrap: wrap;
    white-space: normal;
  }

  .field-grid.two,
  .field-grid.three,
  .modal-summary,
  .assignment-summary-grid,
  .assignment-planner .day-list,
  .assignment-planner .doctor-list,
  .assignment-planner .slot-list,
  .selected-term-card {
    grid-template-columns: 1fr;
  }

  .medicine-section header {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-header-actions {
    justify-content: space-between;
    width: 100%;
  }

  .medicine-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .medicine-number {
    width: 32px;
    height: 32px;
  }

  .medicine-title-row {
    flex-direction: column;
    gap: 7px;
  }

}
