:root {
  --background: #e3f0e2;
  --foreground: #062b38;
  --muted: #4e737c;
  --border: #d7e4dc;
  --surface: #ffffff;
  --surface-soft: #e0ecde;
  --primary: #2c6975;
  --primary-2: #68b2a0;
  --mint: #cdedc9;
  --danger: #dc2626;
  --warning: #b45309;
  --orange: #f97316;
  --blue: #2563eb;
  --violet: #7c3aed;
  --focus-ring: 0 0 0 3px rgba(104, 178, 160, 0.24);
  --focus-shadow: 0 8px 18px rgba(44, 105, 117, 0.1);
  --shadow: 0 2px 8px rgba(18, 63, 72, 0.12);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, Arial, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
}

:where(a, button, .btn, [role="button"], input, select, textarea) {
  -webkit-tap-highlight-color: transparent;
}

:where(button, .btn, .ghost-button, .icon-button, .notification-button, a.btn):focus-visible {
  outline: 3px solid rgba(104, 178, 160, 0.24);
  outline-offset: 2px;
}

:where(input:not([type="hidden"]), select, textarea) {
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

:where(input:not([type="hidden"]), select, textarea):focus {
  border-color: var(--primary-2);
  background: #fff;
  box-shadow: var(--focus-ring), var(--focus-shadow);
  outline: none;
}

:where(input:not([type="hidden"]), select, textarea):focus-visible {
  outline: 2px solid rgba(44, 105, 117, 0.18);
  outline-offset: 1px;
}

:where(label):focus-within {
  color: var(--primary);
}

:where(input[readonly], textarea[readonly]):focus {
  border-color: #8bb9ae;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar-toggle,
.sidebar-close,
.sidebar-backdrop {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 220px;
  height: 100vh;
  height: 100dvh;
  padding: 20px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(205, 240, 200, 0.42) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  background: #2c7079;
  color: #fff;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar::-webkit-scrollbar-thumb {
  border: 2px solid #2c7079;
  border-radius: 999px;
  background: rgba(205, 240, 200, 0.42);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(205, 240, 200, 0.64);
}

.sidebar-backdrop[hidden] {
  display: none;
}

.brand,
.public-brand,
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo,
.brand img,
.public-brand img,
.auth-brand img {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fff;
}

.brand img,
.public-brand img,
.auth-brand img {
  object-fit: contain;
  padding: 3px;
}

.brand {
  padding: 0 6px 18px;
  flex: 0 0 auto;
}

.brand-logo,
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.brand strong {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.05;
}

.brand strong,
.brand small,
.auth-brand strong,
.auth-brand small {
  display: block;
}

.brand small,
.auth-brand small {
  margin-top: 2px;
  color: var(--mint);
  font-size: 12px;
}

.brand small {
  margin: 0 0 2px;
  color: #8ad0bd;
  font-size: 12px;
  font-weight: 500;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  flex: 0 0 auto;
}

.sidebar-nav a,
.logout-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 7px;
  color: #cdf0c8;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.logout-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar svg,
.logout-link svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logout-link {
  margin-top: auto;
  color: #ff8b8b;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding-top: 14px;
  flex: 0 0 auto;
}

.logout-link:hover,
.logout-link:focus-visible {
  background: rgba(239, 68, 68, 0.16);
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.16);
  color: #fff;
  transform: translateX(3px);
}

.logout-link:focus-visible {
  outline: 2px solid rgba(255, 205, 205, 0.75);
  outline-offset: 2px;
}

.logout-link svg {
  transition: transform 180ms ease;
}

.logout-link:hover svg,
.logout-link:focus-visible svg {
  transform: translateX(2px);
}

.main-content {
  flex: 1;
  min-width: 0;
  padding: 22px;
}

.main-content > section + section,
.main-content > section + form,
.main-content > form + section,
.main-content > .panel + .panel {
  margin-top: 18px;
}

.main-content > .dashboard-stat-modal {
  margin: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  margin: -22px -22px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 22px;
  box-shadow: 0 1px 5px rgba(18, 63, 72, 0.09);
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Plus Jakarta Sans", Inter, Arial, sans-serif;
  letter-spacing: 0;
}

.topbar h1 {
  margin-bottom: 0;
  color: #062b38;
  font-size: 18px;
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.icon-button::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 15px auto 0;
  border-radius: 50%;
  background: var(--primary-2);
  box-shadow: 0 0 0 5px var(--surface-soft);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.dashboard-page {
  background: var(--background);
}

.dashboard-topbar {
  margin-bottom: 20px;
}

.notification-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.notification-button:hover,
.notification-button[aria-expanded="true"] {
  background: #e8f4ed;
  color: #15505b;
}

.notification-button:active {
  transform: scale(0.96);
}

.notification-button svg,
.dashboard-avatar svg,
.dashboard-alert svg,
.dashboard-stat-icon svg,
.expiry-list svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-button span {
  position: absolute;
  right: 1px;
  top: 1px;
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.notification-button span[hidden] {
  display: none;
}

.notification-popover {
  position: fixed;
  top: 58px;
  right: 22px;
  z-index: 80;
  width: min(380px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #cfe2d6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 64, 74, 0.18);
  transform-origin: top right;
  animation: notificationIn 180ms ease both;
}

.notification-popover[hidden] {
  display: none;
}

.notification-popover-header,
.notification-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #f5fbf7;
}

.notification-popover-header {
  border-bottom: 1px solid #dcebe2;
}

.notification-popover-header strong {
  display: block;
  color: #062b38;
  font-size: 14px;
  font-weight: 600;
}

.notification-popover-header span,
.notification-popover-footer span {
  display: block;
  margin-top: 3px;
  color: #52727a;
  font-size: 12px;
  font-weight: 400;
}

.notification-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid #d4e5dc;
  border-radius: 8px;
  background: #fff;
  color: #2c6975;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.notification-close:hover {
  background: #e8f4ed;
}

.notification-close:active {
  transform: scale(0.96);
}

.notification-list {
  display: grid;
  gap: 0;
  max-height: 390px;
  overflow-y: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf4ef;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.notification-item-icon svg,
.notification-close svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-danger .notification-item-icon {
  background: #fee2e2;
  color: #dc2626;
}

.notification-warning .notification-item-icon {
  background: #fef3c7;
  color: #b45309;
}

.notification-notice .notification-item-icon {
  background: #dbeafe;
  color: #2563eb;
}

.notification-success .notification-item-icon {
  background: #dcfce7;
  color: #15803d;
}

.notification-item-copy {
  min-width: 0;
}

.notification-item-copy strong {
  display: block;
  color: #062b38;
  font-size: 13px;
  font-weight: 600;
}

.notification-item-copy p,
.notification-item-copy small {
  display: block;
  margin: 4px 0 0;
  color: #4e737c;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.notification-item-copy a,
.notification-popover-footer a {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: #1f6672;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.notification-item-copy a:hover,
.notification-popover-footer a:hover {
  text-decoration: underline;
}

.notification-popover-footer {
  border-top: 1px solid #dcebe2;
}

@keyframes notificationIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 1px solid var(--border);
  padding-left: 14px;
}

.dashboard-avatar {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--primary);
}

.dashboard-user strong,
.dashboard-user small {
  display: block;
}

.dashboard-user strong {
  color: #062b38;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
}

.dashboard-user small {
  width: max-content;
  margin-top: 3px;
  margin-left: auto;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--blue);
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
}

.dashboard-user small.role-topbar-badge {
  font-weight: 600;
}

.dashboard-user small.role-nurse {
  background: #dbeafe;
  color: var(--blue);
}

.dashboard-user small.role-bhw {
  background: #dcfce7;
  color: #15803d;
}

.dashboard-user small.role-midwife {
  background: #ede9fe;
  color: var(--violet);
}

.dashboard-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #dc0000;
  padding: 12px 16px;
  font-size: 14px;
}

.dashboard-alert strong {
  font-weight: 700;
}

.dashboard-alert svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.dashboard-alert.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.dashboard-alert.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc0000;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.dashboard-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 94px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.dashboard-stat-card:hover {
  border-color: #b8d8c4;
  box-shadow: 0 12px 28px rgba(18, 63, 72, 0.13);
  transform: translateY(-2px);
}

.dashboard-stat-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 105, 117, 0.18), var(--shadow);
  outline: none;
}

.dashboard-stat-card:active {
  transform: translateY(0);
}

.dashboard-stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #fff;
}

.dashboard-stat-icon svg {
  width: 20px;
  height: 20px;
}

.dashboard-stat-card span:not(.dashboard-stat-icon),
.dashboard-stat-card strong,
.dashboard-stat-card small {
  display: block;
}

.dashboard-stat-card span:not(.dashboard-stat-icon) {
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.dashboard-stat-card strong {
  margin: 3px 0 4px;
  color: #062b38;
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
}

.dashboard-stat-card small {
  color: var(--primary);
  font-size: 12px;
  line-height: 1.35;
}

.stat-tone-teal .dashboard-stat-icon {
  background: var(--primary);
}
.stat-tone-blue .dashboard-stat-icon {
  background: var(--blue);
}
.stat-tone-amber .dashboard-stat-icon {
  background: #f59e0b;
}
.stat-tone-slate .dashboard-stat-icon {
  background: #64748b;
}
.stat-tone-orange .dashboard-stat-icon {
  background: var(--orange);
}
.stat-tone-red .dashboard-stat-icon {
  background: #e60012;
}
.stat-tone-violet .dashboard-stat-icon {
  background: var(--violet);
}
.stat-tone-green .dashboard-stat-icon {
  background: #0d9488;
}

.dashboard-stat-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
}

.dashboard-stat-modal[hidden] {
  display: none;
}

.dashboard-stat-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 31, 39, 0.42);
  backdrop-filter: blur(5px);
  animation: dashboard-stat-modal-fade 180ms ease-out;
}

.dashboard-stat-modal-panel {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 32px));
  max-height: min(82vh, 720px);
  overflow: hidden;
  border: 1px solid #d7e4dc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 63, 72, 0.26);
  animation: dashboard-stat-modal-rise 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dashboard-stat-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
}

.dashboard-stat-modal-header span {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.dashboard-stat-modal-header h2 {
  margin: 0;
  color: #062b38;
  font-size: 17px;
  font-weight: 600;
}

.dashboard-stat-modal-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 0;
  border-radius: 8px;
  background: #eef8ef;
  color: var(--primary);
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.dashboard-stat-modal-close:hover,
.dashboard-stat-modal-close:focus-visible {
  background: var(--primary);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.dashboard-stat-modal-close svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-stat-modal-summary {
  display: grid;
  gap: 5px;
  border-bottom: 1px solid var(--border);
  background: #f8fbf9;
  padding: 16px 20px;
}

.dashboard-stat-modal-summary strong {
  color: #062b38;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.dashboard-stat-modal-summary small {
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
}

.dashboard-stat-breakdown-list {
  display: grid;
  gap: 10px;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  padding: 16px 20px 20px;
}

.dashboard-stat-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 12px 13px;
}

.dashboard-stat-breakdown-row strong,
.dashboard-stat-breakdown-row small,
.dashboard-stat-breakdown-row em {
  display: block;
}

.dashboard-stat-breakdown-row strong {
  color: #062b38;
  font-size: 13px;
  font-weight: 600;
}

.dashboard-stat-breakdown-row small {
  margin-top: 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.dashboard-stat-breakdown-row em {
  width: max-content;
  margin-top: 7px;
  border-radius: 999px;
  background: #eef8ef;
  color: var(--primary);
  padding: 3px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.dashboard-stat-breakdown-row > span {
  color: #062b38;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.dashboard-stat-breakdown-empty {
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #f8fbf9;
  color: var(--primary);
  padding: 18px;
  text-align: center;
  font-size: 13px;
}

body.has-open-modal {
  overflow: hidden;
}

@keyframes dashboard-stat-modal-fade {
  from {
    opacity: 0;
  }
}

@keyframes dashboard-stat-modal-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.dashboard-chart-grid,
.dashboard-bottom-grid {
  display: grid;
  gap: 16px;
}

.dashboard-chart-grid {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.98fr);
  margin-bottom: 22px;
}

.dashboard-bottom-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(360px, 1fr);
}

.dashboard-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.dashboard-panel h2 {
  margin-bottom: 18px;
  color: #062b38;
  font-size: 14px;
  font-weight: 700;
}

.issuance-panel {
  min-height: 318px;
}

.line-chart {
  position: relative;
  height: 250px;
}

.line-chart canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.category-panel {
  min-height: 318px;
}

.donut-chart {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 10px auto 16px;
}

.donut-chart canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.category-list {
  display: grid;
  gap: 8px;
}

.category-list p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  color: var(--primary);
  font-size: 12px;
}

.category-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.category-list i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--dot);
}

.category-list strong {
  color: #062b38;
  font-weight: 700;
}

.weekly-panel,
.fast-panel,
.expiry-panel {
  min-height: 360px;
}

.weekly-bars {
  position: relative;
  height: 180px;
  margin-top: 8px;
}

.weekly-bars canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.fast-list {
  display: grid;
  gap: 12px;
}

.fast-row p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: #062b38;
  font-size: 12px;
}

.fast-row strong {
  color: var(--primary);
  font-weight: 500;
}

.fast-row > div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #d6f1cf;
}

.fast-row > div span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #68b2a0;
}

.dashboard-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-panel-title h2 {
  margin-bottom: 0;
}

.dashboard-panel-title span {
  color: var(--primary);
  font-size: 12px;
}

.expiry-list {
  display: grid;
  gap: 10px;
}

.expiry-list article {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  padding: 10px;
}

.expiry-list svg {
  width: 15px;
  height: 15px;
  color: var(--danger);
}

.expiry-list strong,
.expiry-list small {
  display: block;
}

.expiry-list strong {
  color: #062b38;
  font-size: 12px;
  font-weight: 700;
}

.expiry-list small {
  margin-top: 2px;
  color: var(--primary);
  font-size: 12px;
}

.expiry-list article > span {
  border: 1px solid #fca5a5;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--danger);
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 500;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: end;
  min-height: 245px;
  padding: 32px;
  border-radius: 20px;
  background: linear-gradient(135deg, #2c6975 0%, #1b7b72 55%, #0f5f91 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.dashboard-hero .section-kicker {
  color: var(--mint);
}

.dashboard-hero h2 {
  max-width: 780px;
  margin-bottom: 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.04;
}

.dashboard-hero p:not(.section-kicker) {
  max-width: 700px;
  color: #e0f7f1;
  line-height: 1.7;
}

.hero-mini-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.11);
}

.hero-mini-panel span,
.hero-mini-panel small {
  display: block;
  color: #d8f0ea;
  font-size: 12px;
  font-weight: 700;
}

.hero-mini-panel strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 24px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.stat-card,
.panel,
.public-table-card,
.auth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  color: var(--primary);
  font-size: 31px;
  line-height: 1;
}

.tone-blue strong {
  color: var(--blue);
}
.tone-amber strong {
  color: var(--warning);
}
.tone-red strong {
  color: var(--danger);
}
.tone-orange strong {
  color: var(--orange);
}
.tone-violet strong {
  color: var(--violet);
}
.tone-green strong {
  color: #15803d;
}

.stat-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-header h2 {
  margin-bottom: 5px;
  font-size: 20px;
}

.panel-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.priority-list {
  display: grid;
  gap: 10px;
}

.priority-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f9fcfa;
}

.priority-row strong,
.priority-row span {
  display: block;
}

.priority-row div > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.status-available {
  background: var(--mint);
  color: var(--primary);
}

.status-low {
  background: #fef3c7;
  color: var(--warning);
}

.status-out,
.status-expired {
  background: #fee2e2;
  color: var(--danger);
}

.status-muted {
  background: #eef2f7;
  color: #64748b;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 12px;
  height: 235px;
  padding: 12px 4px 4px;
}

.bar-chart span {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: var(--h);
  min-height: 42px;
  border-radius: 11px 11px 7px 7px;
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
}

.bar-chart b {
  position: absolute;
  bottom: -28px;
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 680px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  font-size: 14px;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.table-wrap th,
.table-wrap td {
  min-width: 0;
}

.medicine-name-cell {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap .medicine-name-cell {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.long-text-tooltip {
  position: fixed;
  z-index: 1200;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid rgba(7, 82, 99, 0.18);
  border-radius: 8px;
  background: #062b38;
  box-shadow: 0 14px 30px rgba(6, 43, 56, 0.22);
  color: #fff;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.long-text-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.public-body {
  background: #dfeee0;
  color: #073544;
}

.auth-body {
  background: linear-gradient(135deg, #dfeee0 0%, #eef6f2 58%, #ffffff 100%);
}

.public-body .btn {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 11px;
  padding: 0 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

[data-loading-button] {
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

[data-loading-button].is-loading,
button.is-loading,
[data-loading-button]:disabled {
  cursor: wait;
  opacity: 0.72;
  pointer-events: none;
}

.button-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: button-spin 0.65s linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-soft {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--primary);
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 59px;
  padding: 0 max(22px, calc((100vw - 1070px) / 2));
  border-bottom: 1px solid rgba(18, 63, 72, 0.12);
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(18, 63, 72, 0.08);
}

.public-brand {
  color: #183d45;
  font-weight: 500;
}

.public-brand img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  padding: 1px;
}

.public-brand small,
.public-brand strong {
  display: block;
  letter-spacing: 0;
}

.public-brand small {
  color: #2c6975;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.public-brand strong {
  margin-top: 2px;
  color: #1d3440;
  font-size: 14px;
  font-weight: 600;
}

.public-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #2c6975;
  font-size: 12px;
}

.public-login-btn {
  border: 0;
  background: #286b76;
  color: #fff;
  box-shadow: 0 5px 12px rgba(18, 63, 72, 0.16);
}

.public-login-btn svg,
.public-hero-btn svg,
.login-note svg {
  width: 15px;
  height: 15px;
  margin-right: 8px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-page {
  min-height: 100vh;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  gap: 36px;
  align-items: center;
  min-height: 480px;
  padding: 68px max(22px, calc((100vw - 1070px) / 2)) 82px;
  background: linear-gradient(135deg, #2b737d 0%, #357f86 48%, #69b9a5 100%);
  color: #fff;
}

.landing-copy {
  max-width: 480px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #d9f7d2;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
}

.public-stat-icon,
.shortcut-icon,
.resident-note > svg {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.hero-chip svg {
  width: 14px;
  height: 14px;
  color: #d9f7d2;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-copy h1 {
  max-width: 420px;
  margin-bottom: 16px;
  color: #fff;
  font-size: clamp(32px, 4vw, 39px);
  font-weight: 600;
  line-height: 1.08;
}

.landing-copy h1 span {
  display: block;
  color: #cdf0c8;
}

.landing-copy > p:not(.hero-chip):not(.login-note) {
  max-width: 430px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.public-hero-btn {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.login-note {
  display: flex;
  align-items: center;
  margin: 18px 0 0;
  color: #d9f7d2;
  font-size: 12px;
}

.public-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.public-stats article {
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.public-stats strong {
  display: block;
}

.public-stat-icon {
  width: 21px;
  height: 21px;
  margin-bottom: 14px;
  color: #cdf0c8;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-box .public-stat-icon {
  color: #8ec5ff;
}

.stat-low .public-stat-icon {
  color: #facc15;
}

.stat-out .public-stat-icon {
  color: #ff8a80;
}

.public-stats strong {
  margin-bottom: 5px;
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
}

.public-stats small {
  color: #d9f7d2;
  font-size: 12px;
  font-weight: 600;
}

.public-section {
  max-width: 1070px;
  margin: 0 auto;
  padding: 0 22px;
}

.public-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.public-shortcut {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 102px;
  border: 1px solid #cfe1d5;
  border-radius: 10px;
  background: #fff;
  color: #10475a;
  padding: 16px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(18, 63, 72, 0.1);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.public-shortcut:hover,
.public-shortcut:focus-visible {
  border-color: #68b2a0;
  box-shadow: 0 10px 22px rgba(18, 63, 72, 0.13);
  outline: none;
  transform: translateY(-2px);
}

.public-shortcut.announcement-card {
  border-color: #bfdbfe;
}

.public-shortcut.calendar-card {
  border-color: #f4c95d;
}

.shortcut-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: 12px;
  border-radius: 8px;
  background: #e3f0e9;
  color: #2c6975;
}

.public-shortcut.announcement-card .shortcut-icon {
  background: #eef4ff;
  color: #1155ee;
}

.public-shortcut.calendar-card .shortcut-icon {
  background: #fff6e6;
  color: #c2410c;
}

.shortcut-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-shortcut small,
.public-shortcut strong,
.public-shortcut em {
  display: block;
}

.public-shortcut small {
  margin-bottom: 3px;
  color: #2c6975;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
}

.public-shortcut strong {
  color: #0d5d73;
  font-size: 20px;
  font-weight: 600;
}

.public-shortcut.announcement-card strong {
  color: #1155ee;
}

.public-shortcut.calendar-card strong {
  color: #c2410c;
}

.public-shortcut em {
  margin-top: 8px;
  color: #2d6871;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
}

.public-medicines {
  padding-top: 26px;
  padding-bottom: 58px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 5px;
  color: #092b38;
  font-size: 20px;
  font-weight: 600;
}

.section-heading p:not(.section-kicker) {
  color: #2c6975;
  font-size: 13px;
}

.public-table-card {
  overflow: hidden;
  border-radius: 10px;
}

.public-filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid #d4e2dc;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 2px 7px rgba(18, 63, 72, 0.1);
}

.public-search {
  position: relative;
}

.public-search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: #5a8e93;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
}

.public-filter-bar input,
.public-filter-bar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #bcd0c7;
  border-radius: 7px;
  background: #e4efe6;
  color: #174855;
  padding: 0 12px;
  font-size: 14px;
}

.public-filter-bar input {
  padding-left: 36px;
}

.public-filter-bar small {
  color: #2c6975;
  font-size: 12px;
  white-space: nowrap;
}

.public-table-scroll {
  max-height: 442px;
  overflow: auto;
  scrollbar-color: #8bb9ae #eef6f2;
  scrollbar-width: thin;
}

.public-table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.public-table-scroll::-webkit-scrollbar-track {
  background: #eef6f2;
}

.public-table-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #eef6f2;
  border-radius: 999px;
  background: #8bb9ae;
}

.public-table-scroll::-webkit-scrollbar-thumb:hover {
  background: #68a899;
}

.public-medicine-table {
  min-width: 860px;
}

.public-medicine-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef6f2;
  color: #2c6975;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.public-medicine-table td {
  color: #174855;
  font-size: 14px;
}

.public-medicine-table .medicine-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  color: #092b38;
  font-weight: 600;
  white-space: normal;
}

.medicine-row-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #dceee2;
  color: #2c6975;
}

.medicine-row-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stock-number {
  color: #0b5e72;
  font-size: 16px;
  font-weight: 600;
}

.public-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border);
  background: #fbfdfb;
  padding: 12px 16px;
}

.public-pagination[hidden] {
  display: none;
}

.public-pagination span {
  color: #2c6975;
  font-size: 12px;
}

.public-page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.public-page-button,
.public-page-number {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid #c8ddd4;
  border-radius: 8px;
  background: #fff;
  color: #2c6975;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.public-page-button:hover:not(:disabled),
.public-page-number:hover {
  border-color: #68b2a0;
  background: #e8f4ed;
  box-shadow: 0 8px 16px rgba(18, 63, 72, 0.1);
  transform: translateY(-1px);
}

.public-page-button:active:not(:disabled),
.public-page-number:active {
  transform: translateY(0);
}

.public-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.public-page-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-page-number[aria-current="page"] {
  border-color: #2c6975;
  background: #2c6975;
  color: #fff;
}

.public-table-note {
  margin: 0;
  border-top: 1px solid var(--border);
  background: #eef6f2;
  color: #2c6975;
  padding: 12px 20px;
  font-size: 12px;
}

.resident-note {
  display: flex;
  gap: 12px;
  margin-top: 64px;
  padding: 0 2px;
  color: #2c6975;
}

.resident-note > svg {
  width: 20px;
  height: 20px;
  color: #2c6975;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.resident-note strong {
  display: block;
  margin-bottom: 5px;
  color: #092b38;
  font-size: 14px;
  font-weight: 600;
}

.resident-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.public-feedback-section {
  padding-top: 4px;
  padding-bottom: 58px;
}

.public-feedback-card {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
  gap: 24px;
  border: 1px solid #cfe1d5;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(18, 63, 72, 0.12);
  padding: 24px;
}

.public-feedback-copy h2 {
  margin-bottom: 10px;
  color: #092b38;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.public-feedback-copy p:not(.section-kicker) {
  margin-bottom: 18px;
  color: #2c6975;
  font-size: 14px;
  line-height: 1.6;
}

.public-feedback-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-feedback-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: #174855;
  font-size: 13px;
  line-height: 1.5;
}

.public-feedback-list svg {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #e7f7ef;
  color: #1d7f67;
  padding: 6px;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-feedback-form {
  display: grid;
  gap: 14px;
}

.public-feedback-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.public-feedback-form label {
  display: grid;
  gap: 7px;
  color: #174855;
  font-size: 12px;
  font-weight: 600;
}

.public-feedback-form label small {
  color: #5f7f83;
  font-size: 11px;
  font-weight: 400;
}

.public-feedback-form input,
.public-feedback-form select,
.public-feedback-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #bcd0c7;
  border-radius: 8px;
  background: #f7fbf8;
  color: #174855;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 400;
}

.public-feedback-form textarea {
  min-height: 128px;
  padding-top: 11px;
  resize: vertical;
  line-height: 1.5;
}

.public-feedback-wide {
  grid-column: 1 / -1;
}

.public-feedback-status {
  margin: 0;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.public-feedback-status.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.public-feedback-submit {
  justify-self: end;
  min-height: 44px;
  border-color: #1f6672;
  background: #1f6672;
  cursor: pointer;
}

.public-feedback-submit:hover:not(:disabled) {
  background: #174f59;
  box-shadow: 0 10px 18px rgba(18, 63, 72, 0.14);
}

.public-feedback-submit svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.resident-feedback-page {
  background: var(--background);
}

.resident-feedback-page svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.resident-feedback-stats {
  margin-bottom: 20px;
}

.resident-feedback-toolbar {
  margin-bottom: 20px;
  padding: 18px;
}

.resident-feedback-filter-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.35fr) minmax(160px, 0.4fr) auto;
  gap: 12px;
  align-items: end;
}

.resident-feedback-filter-form label {
  display: grid;
  gap: 7px;
  color: #2c6975;
  font-size: 12px;
  font-weight: 600;
}

.resident-feedback-filter-form input,
.resident-feedback-filter-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d7e4dc;
  border-radius: 8px;
  background: #fbfdfc;
  color: #073544;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 400;
}

.resident-feedback-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.resident-feedback-filter-actions .btn,
.resident-feedback-filter-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.resident-feedback-reset {
  border: 1px solid #d7e4dc;
  text-decoration: none;
}

.resident-feedback-list {
  display: grid;
  gap: 14px;
}

.resident-feedback-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.resident-feedback-card-header,
.resident-feedback-title-row,
.resident-feedback-meta,
.resident-feedback-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resident-feedback-card-header {
  justify-content: space-between;
  gap: 16px;
}

.resident-feedback-card-header p {
  margin: 5px 0 0;
  color: #52717b;
  font-size: 12px;
  line-height: 1.35;
}

.resident-feedback-title-row {
  flex-wrap: wrap;
}

.resident-feedback-title-row h2 {
  margin: 0;
  color: #062b38;
  font-size: 15px;
  font-weight: 600;
}

.resident-feedback-rating {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 600;
}

.resident-feedback-rating svg {
  width: 15px;
  height: 15px;
}

.resident-feedback-meta {
  flex-wrap: wrap;
  color: #52717b;
  font-size: 12px;
}

.resident-feedback-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
}

.feedback-type-comment {
  background: #e0f2fe;
  color: #0369a1;
}

.feedback-type-suggestion {
  background: #dcfce7;
  color: #15803d;
}

.feedback-type-concern {
  background: #fee2e2;
  color: #b91c1c;
}

.feedback-type-appreciation {
  background: #ede9fe;
  color: #6d28d9;
}

.resident-feedback-message {
  margin: 0;
  color: #174855;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
}

.resident-feedback-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  border-top: 1px solid #e3eee8;
  padding-top: 14px;
}

.resident-feedback-actions form {
  margin: 0;
}

.resident-feedback-actions .btn,
.resident-feedback-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.resident-feedback-actions .ghost-button {
  border: 1px solid #d7e4dc;
  background: #fff;
  color: var(--primary);
}

.resident-feedback-actions .ghost-button:hover,
.resident-feedback-actions .ghost-button:focus-visible {
  border-color: var(--primary-2);
  background: #eef8ef;
  color: #073544;
  outline: none;
  transform: translateY(-1px);
}

.resident-feedback-actions .danger-action {
  border-color: #fecaca;
  color: var(--danger);
}

.resident-feedback-actions .danger-action:hover,
.resident-feedback-actions .danger-action:focus-visible {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.resident-feedback-empty {
  padding: 24px;
  color: var(--primary);
  text-align: center;
  font-size: 13px;
}

.public-info-page {
  min-height: 100vh;
  background: #dfeee0;
}

.public-page-heading {
  padding-top: 34px;
  padding-bottom: 18px;
}

.public-page-heading h1 {
  margin-bottom: 8px;
  color: #092b38;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 600;
  line-height: 1.12;
}

.public-page-heading p:not(.section-kicker) {
  max-width: 620px;
  color: #2c6975;
  font-size: 15px;
  line-height: 1.55;
}

.public-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #2c6975;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.public-back-link svg {
  width: 16px;
  height: 16px;
}

.public-feed-toolbar {
  margin-bottom: 14px;
}

.public-filter-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 220px);
  gap: 12px;
  align-items: end;
  border: 1px solid #dbe7e1;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  padding: 12px;
}

.public-filter-card label {
  display: grid;
  gap: 6px;
  color: #446973;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.public-filter-card input,
.public-filter-card select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d7e4dc;
  border-radius: 8px;
  background: #fff;
  color: #174855;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
}

.public-filter-card input::placeholder {
  color: #7b969e;
  font-weight: 400;
}

.public-feed-list {
  padding-bottom: 56px;
}

.public-info-page .announcement-card,
.public-info-page .activity-card {
  box-shadow: 0 2px 7px rgba(18, 63, 72, 0.1);
}

.public-info-page .public-announcement-card {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  border: 1px solid #d7e4dc;
  background: #fff;
  padding: 22px 24px 22px 22px;
}

.public-info-page .public-announcement-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #2c6975;
  content: "";
}

.public-info-page .public-announcement-card[data-priority="High"]::before {
  background: #dc2626;
}

.public-info-page .public-announcement-card[data-priority="Medium"]::before {
  background: #f59e0b;
}

.public-notice-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #e3f0e9;
  color: #2c6975;
}

.public-announcement-card[data-priority="High"] .public-notice-icon {
  background: #fee2e2;
  color: #dc2626;
}

.public-announcement-card[data-priority="Medium"] .public-notice-icon {
  background: #fef3c7;
  color: #b45309;
}

.public-card-eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  color: #2c6975;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.public-card-eyebrow span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.public-card-eyebrow svg,
.public-detail-grid svg {
  width: 14px;
  height: 14px;
}

.public-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.public-detail-grid div {
  min-width: 0;
  border: 1px solid #d7e4dc;
  border-radius: 8px;
  background: #f8fbf9;
  padding: 10px 12px;
}

.public-detail-grid dt {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  color: #5d7584;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.public-detail-grid dd {
  margin: 0;
  color: #092b38;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.public-info-page.calendar-activities-page .public-activity-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  border-radius: 0;
  padding: 22px 24px;
}

.public-info-page.calendar-activities-page .public-activity-date {
  width: auto;
  min-height: 108px;
  border-radius: 10px;
  background: #2c6975;
  color: #fff;
}

.public-info-page.calendar-activities-page .public-activity-date strong {
  font-size: 34px;
  font-weight: 700;
}

.public-info-page.calendar-activities-page .public-activity-date span {
  color: #d9f7d2;
  font-size: 13px;
}

.public-activity-details {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-empty-state {
  border: 1px solid #d4e2dc;
  border-radius: 10px;
  background: #fff;
  color: #2c6975;
  padding: 28px;
  text-align: center;
  font-size: 14px;
  box-shadow: 0 2px 7px rgba(18, 63, 72, 0.1);
}

@media (max-width: 640px) {
  .public-filter-card {
    grid-template-columns: 1fr;
  }

  .public-info-page .public-announcement-card,
  .public-info-page.calendar-activities-page .public-activity-card,
  .public-detail-grid,
  .public-activity-details {
    grid-template-columns: 1fr;
  }

  .public-info-page.calendar-activities-page .public-activity-date {
    width: 78px;
    min-height: 78px;
  }
}

.public-footer {
  margin-top: 30px;
  background: #2b737d;
  color: #eaffef;
}

.public-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.9fr) minmax(
      260px,
      0.9fr
    );
  gap: 56px;
  max-width: 1070px;
  margin: 0 auto;
  padding: 40px 22px 36px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #fff;
  padding: 2px;
}

.footer-brand strong,
.footer-brand small {
  display: block;
}

.footer-brand strong {
  font-size: 14px;
  font-weight: 600;
}

.footer-brand small {
  margin-top: 2px;
  color: #bdf0c6;
  font-size: 12px;
}

.public-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.public-footer p,
.public-footer dt,
.public-footer dd {
  margin: 0;
  color: #d9f7d2;
  font-size: 12px;
  line-height: 1.55;
}

.public-footer section > p {
  margin-top: 6px;
}

.public-footer dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.public-footer dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
}

.public-footer dd {
  color: #80d7bd;
}

.footer-copy {
  grid-column: 1 / -1;
  margin-top: 20px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 24px;
  color: #eaffef !important;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(100%, 410px);
  border-radius: 12px;
  padding: 26px;
  box-shadow: 0 14px 34px rgba(18, 63, 72, 0.1);
}

.auth-brand {
  color: #183d45;
}

.auth-brand img {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 2px;
}

.auth-brand strong {
  margin-top: 2px;
  color: #1d3440;
  font-size: 14px;
  font-weight: 600;
}

.auth-brand small {
  color: #2c6975;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.auth-back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin-top: 22px;
  border: 1px solid #c8d9d1;
  border-radius: 8px;
  background: #f7fbf8;
  padding: 0 12px;
  color: #2c6975;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.auth-back-button:hover,
.auth-back-button:focus-visible {
  border-color: #68b2a0;
  background: #e8f4ed;
  color: #1f6672;
  transform: translateY(-1px);
}

.auth-back-button:focus-visible {
  outline: 3px solid rgba(104, 178, 160, 0.2);
  outline-offset: 2px;
}

.auth-back-button svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-heading {
  margin-top: 30px;
}

.auth-heading h1 {
  margin-bottom: 8px;
  color: #092b38;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.18;
}

.auth-heading p:not(.section-kicker),
.future-note {
  color: #527078;
  font-size: 13px;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: #2c6975;
  font-size: 12px;
  font-weight: 600;
}

.auth-form input,
.auth-form select {
  min-height: 41px;
  border: 1px solid #c8d9d1;
  border-radius: 8px;
  background: #f7fbf8;
  padding: 0 12px;
  color: #173f49;
  font-size: 14px;
  font-weight: 400;
}

.auth-email-input,
.password-field input {
  font-weight: 400;
}

.auth-form input::placeholder {
  color: #8aa0a4;
  font-weight: 400;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: #68b2a0;
  outline: 3px solid rgba(104, 178, 160, 0.18);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #527078;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #e8f4ed;
  color: #1f6672;
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(104, 178, 160, 0.32);
  outline-offset: 1px;
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.96);
}

.password-toggle svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle svg[hidden] {
  display: none;
}

.password-toggle .password-eye-off {
  display: none;
}

.password-toggle.is-showing-password .password-eye {
  display: none;
}

.password-toggle.is-showing-password .password-eye-off {
  display: block;
}

.auth-form button {
  cursor: pointer;
  min-height: 41px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.auth-form .password-toggle {
  min-height: 32px;
  padding: 0;
  font-weight: 400;
}

.future-note {
  margin: 15px 0 0;
}

.auth-error-note {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  padding: 9px 11px;
  color: #dc2626;
  font-weight: 500;
}

.inventory-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.medicine-inventory-page .inventory-toolbar {
  align-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.toolbar-main {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(145px, auto));
  gap: 12px;
  flex: 1;
}

.medicine-inventory-page .toolbar-main {
  grid-template-columns: minmax(280px, 1fr) 150px 122px 116px;
  align-items: center;
}

.toolbar-main label,
.demo-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.toolbar-main input,
.toolbar-main select,
.demo-form input,
.demo-form select,
.demo-form textarea {
  min-width: 0;
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbf9;
  padding: 0 12px;
  color: var(--foreground);
  text-overflow: ellipsis;
  text-transform: none;
}

.demo-form .password-field input {
  padding-right: 46px;
}

.demo-form .password-toggle {
  min-height: 32px;
  padding: 0;
}

.medicine-inventory-page .toolbar-main input,
.medicine-inventory-page .toolbar-main select {
  min-height: 35px;
  border-color: #d7e4dc;
  border-radius: 7px;
  background: #fff;
  color: #174855;
  font-size: 14px;
  font-weight: 400;
}

.medicine-inventory-page .toolbar-main input::placeholder {
  color: #6b7a82;
  font-weight: 400;
}

.inventory-search-field {
  position: relative;
}

.inventory-search-field svg {
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: var(--primary);
  pointer-events: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
}

.inventory-search-field input {
  position: relative;
  padding-left: 40px !important;
}

.inventory-add-btn {
  gap: 8px;
  min-height: 35px;
  border-radius: 7px;
  background: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.inventory-toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.inventory-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 35px;
  border: 1px solid #d7e4dc;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
}

.inventory-view-button {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 27px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #376474;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.inventory-view-button:hover {
  background: #eef8ef;
  color: var(--primary);
  transform: translateY(-1px);
}

.inventory-view-button.is-active {
  background: var(--primary);
  color: #fff;
}

.inventory-add-btn svg,
.inventory-view-button svg,
.card-actions svg,
.medicine-card-panel-header svg,
.inventory-counter svg,
.medicine-card-visual .status svg,
.expired-flag svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.demo-form textarea {
  min-height: auto;
  padding-top: 10px;
  resize: vertical;
}

.inventory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.medicine-inventory-page .inventory-summary {
  gap: 12px;
}

.inventory-summary article {
  min-height: 98px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.medicine-inventory-page .inventory-summary article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  min-height: 76px;
  border-radius: 10px;
  padding: 14px;
}

.inventory-counter svg {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  padding: 9px;
  color: #fff;
}

.counter-total svg {
  background: var(--primary);
}
.counter-available svg {
  background: #15803d;
}
.counter-low svg {
  background: #f59e0b;
}
.counter-out svg {
  background: var(--danger);
}

.inventory-summary span,
.inventory-summary strong {
  display: block;
}

.inventory-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.medicine-inventory-page .inventory-summary span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.inventory-summary strong {
  margin-top: 10px;
  color: var(--primary);
  font-size: 30px;
  line-height: 1;
}

.medicine-inventory-page .inventory-summary strong {
  margin-top: 3px;
  color: #062b38;
  font-size: 24px;
  font-weight: 600;
}

.future-note-inline {
  align-self: flex-start;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.ghost-button {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  font-weight: 800;
  padding: 0 12px;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.ghost-button:hover {
  background: #eef8ef;
  color: #073544;
  transform: translateY(-1px);
}

.close-panel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.close-panel-button svg {
  width: 17px;
  height: 17px;
}

.demo-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.medicine-inventory-page #add-medicine-panel {
  margin-bottom: 4px;
  padding: 18px 20px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 9px rgba(18, 63, 72, 0.08);
}

.medicine-inventory-page .medicine-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 31, 39, 0.34);
  backdrop-filter: blur(4px);
  animation: medicine-modal-fade 180ms ease-out;
}

.medicine-inventory-page .medicine-edit-overlay[hidden] {
  display: none;
}

.medicine-inventory-page .medicine-edit-panel {
  width: min(760px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  overflow-y: auto;
  padding: 18px 20px 20px;
  border-radius: 10px;
  box-shadow: 0 20px 58px rgba(18, 63, 72, 0.22);
  animation: medicine-modal-rise 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.medicine-inventory-page
  #add-medicine-panel:not([hidden])
  + .medicine-card-panel {
  margin-top: 4px;
}

.medicine-inventory-page #add-medicine-panel .panel-header,
.medicine-inventory-page .medicine-edit-panel .panel-header {
  align-items: center;
  margin-bottom: 12px;
}

.medicine-inventory-page #add-medicine-panel .panel-header h2,
.medicine-inventory-page .medicine-edit-panel .panel-header h2 {
  margin-bottom: 4px;
  color: #062b38;
  font-size: 19px;
  font-weight: 600;
}

.medicine-inventory-page #add-medicine-panel .panel-header p,
.medicine-inventory-page .medicine-edit-panel .panel-header p {
  color: #52717b;
  font-size: 13px;
  font-weight: 400;
}

.medicine-inventory-page .medicine-category-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.medicine-inventory-page .medicine-category-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #376474;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.medicine-inventory-page .medicine-add-category-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  border: 1px solid #b8d8c4;
  border-radius: 7px;
  background: #eef8ef;
  color: var(--primary);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.medicine-inventory-page .medicine-add-category-button:hover,
.medicine-inventory-page .medicine-add-category-button:focus-visible {
  border-color: var(--primary-2);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(44, 105, 117, 0.12);
  color: #073544;
  outline: none;
  transform: translateY(-1px);
}

.medicine-inventory-page .medicine-add-category-button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.medicine-inventory-page #add-medicine-panel .demo-form,
.medicine-inventory-page .medicine-edit-panel .demo-form {
  gap: 10px 12px;
}

.medicine-inventory-page .medicine-form-section {
  min-width: 0;
  margin: 0;
  border: 1px solid #d7e4dc;
  border-radius: 10px;
  background: #f8fcfa;
  padding: 14px;
}

.medicine-inventory-page .medicine-form-section legend {
  margin-left: -2px;
  color: #062b38;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 600;
}

.medicine-inventory-page .medicine-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.medicine-inventory-page #add-medicine-panel .demo-form label,
.medicine-inventory-page .medicine-edit-panel .demo-form label {
  gap: 6px;
  color: #376474;
  font-size: 11px;
  font-weight: 500;
}

.medicine-inventory-page #add-medicine-panel .demo-form input,
.medicine-inventory-page #add-medicine-panel .demo-form select,
.medicine-inventory-page #add-medicine-panel .demo-form textarea,
.medicine-inventory-page .medicine-edit-panel .demo-form input,
.medicine-inventory-page .medicine-edit-panel .demo-form select,
.medicine-inventory-page .medicine-edit-panel .demo-form textarea {
  min-height: 38px;
  border-color: #d7e4dc;
  border-radius: 7px;
  background: #fbfdfc;
  color: #073544;
  font-size: 13px;
  font-weight: 400;
}

.medicine-inventory-page #add-medicine-panel .demo-form input::placeholder,
.medicine-inventory-page #add-medicine-panel .demo-form textarea::placeholder,
.medicine-inventory-page .medicine-edit-panel .demo-form input::placeholder,
.medicine-inventory-page .medicine-edit-panel .demo-form textarea::placeholder {
  color: #6f8087;
  font-weight: 400;
}

.medicine-inventory-page
  .medicine-file-field
  input[type="file"] {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  line-height: 1;
}

.medicine-inventory-page
  .medicine-file-field
  input[type="file"]::file-selector-button {
  height: 24px;
  margin: 0 8px 0 0;
  border: 1px solid #b8ccc5;
  border-radius: 5px;
  background: #fff;
  color: #073544;
  font: inherit;
  font-size: 12px;
}

.medicine-inventory-page .medicine-file-field small {
  color: #6c9698;
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
}

.medicine-inventory-page .medicine-form-warning {
  color: var(--danger);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
}

.medicine-inventory-page #add-medicine-panel .demo-form .btn,
.medicine-inventory-page .medicine-edit-panel .demo-form .btn {
  min-height: 38px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.medicine-inventory-page .medicine-category-modal {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 22px;
}

.medicine-inventory-page .medicine-category-modal[hidden] {
  display: none;
}

.medicine-inventory-page .medicine-category-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 31, 39, 0.48);
  backdrop-filter: blur(4px);
  animation: medicine-modal-fade 180ms ease-out;
}

.medicine-inventory-page .medicine-category-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  max-height: min(88vh, 760px);
  overflow: hidden auto;
  border: 1px solid #d7e4dc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 62px rgba(18, 63, 72, 0.25);
  animation: medicine-modal-rise 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.medicine-inventory-page .medicine-category-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  padding: 16px 18px;
}

.medicine-inventory-page .medicine-category-modal-header h2 {
  margin-bottom: 3px;
  color: #062b38;
  font-size: 16px;
  font-weight: 600;
}

.medicine-inventory-page .medicine-category-modal-header p {
  margin-bottom: 0;
  color: #52717b;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.medicine-inventory-page .medicine-category-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid #d7e4dc;
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.medicine-inventory-page .medicine-category-close:hover,
.medicine-inventory-page .medicine-category-close:focus-visible {
  border-color: var(--primary-2);
  background: #eef8ef;
  color: #073544;
  outline: none;
  transform: translateY(-1px);
}

.medicine-inventory-page .medicine-category-close svg,
.medicine-inventory-page .close-panel-button svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.medicine-inventory-page .medicine-management-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  border: 1px solid #d7e4dc;
  border-radius: 10px;
  background: #fbfdfc;
  padding: 14px;
}

.medicine-inventory-page .medicine-category-dialog > .medicine-management-card {
  margin: 16px;
}

.medicine-inventory-page .medicine-management-card h3 {
  margin: 0;
  color: #062b38;
  font-size: 14px;
  font-weight: 600;
}

.medicine-inventory-page .medicine-management-form {
  display: grid;
  gap: 9px;
  border-top: 1px solid #e3eee8;
  padding-top: 12px;
}

.medicine-inventory-page .medicine-management-card h3 + .medicine-management-form {
  border-top: 0;
  padding-top: 0;
}

.medicine-inventory-page .medicine-management-danger {
  background: #fffafa;
  border-radius: 8px;
  padding: 12px;
}

.medicine-inventory-page .medicine-category-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.medicine-inventory-page .medicine-category-remove-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: #f8fbf9;
  padding: 16px 18px 18px;
}

.medicine-inventory-page .medicine-category-form label,
.medicine-inventory-page .medicine-category-remove-form label,
.medicine-inventory-page .medicine-management-form label {
  display: grid;
  gap: 7px;
  color: #376474;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.medicine-inventory-page .medicine-category-form input,
.medicine-inventory-page .medicine-category-remove-form select,
.medicine-inventory-page .medicine-management-form input,
.medicine-inventory-page .medicine-management-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d7e4dc;
  border-radius: 8px;
  background: #fbfdfc;
  color: #073544;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
}

.medicine-inventory-page .medicine-category-remove-form small,
.medicine-inventory-page .medicine-management-form small {
  color: #6f8087;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
}

.medicine-inventory-page .medicine-category-feedback {
  margin: 0 16px 16px;
  border-radius: 8px;
  background: #eef8ef;
  color: var(--primary);
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.medicine-inventory-page .medicine-category-feedback.is-error {
  background: #fef2f2;
  color: var(--danger);
}

.medicine-inventory-page .medicine-category-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.medicine-inventory-page .medicine-category-actions .btn {
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.medicine-inventory-page .medicine-category-remove-form .btn,
.medicine-inventory-page .medicine-management-form .btn {
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.medicine-inventory-page .danger-outline {
  border-color: #fecaca;
  background: #fff;
  color: var(--danger);
}

.medicine-inventory-page .danger-outline:hover,
.medicine-inventory-page .danger-outline:focus-visible {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
  outline: none;
}

@keyframes medicine-modal-fade {
  from {
    opacity: 0;
  }
}

@keyframes medicine-modal-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.demo-form .full {
  grid-column: 1 / -1;
}

.demo-form .span-2 {
  grid-column: span 2;
}

.stock-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stock-form-panel {
  margin-bottom: 20px;
}

.stock-page {
  background: var(--background);
}

.stock-page svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stock-counter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stock-counter-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  column-gap: 13px;
  min-height: 82px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.stock-counter-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
}

.stock-counter-in .stock-counter-icon {
  background: #68b2a0;
}

.stock-counter-out .stock-counter-icon {
  background: #ef4444;
}

.stock-counter-total .stock-counter-icon {
  background: var(--primary);
}

.stock-counter-user .stock-counter-icon {
  background: #f59e0b;
}

.stock-counter-card span:not(.stock-counter-icon),
.stock-counter-card strong,
.stock-counter-card small {
  display: block;
}

.stock-counter-card span:not(.stock-counter-icon) {
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.stock-counter-card strong {
  margin-top: 3px;
  color: #062b38;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
}

.stock-counter-card small {
  margin-top: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
}

.stock-transaction-panel {
  padding: 22px;
  border-radius: 10px;
}

.stock-section-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #d9e8df;
  color: #062b38;
}

.stock-section-title svg {
  color: var(--primary);
}

.stock-section-title h2 {
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 700;
}

.stock-page .stock-form {
  align-items: end;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  width: 100%;
}

.stock-page .stock-form .stock-field {
  min-width: 0;
}

.stock-page .stock-form .stock-medicine-field,
.stock-page .stock-form .stock-remarks-field {
  grid-column: 1 / -1;
}

.stock-page .stock-form .stock-submit-button {
  grid-column: 2;
  justify-self: stretch;
  width: 100%;
  min-width: min(100%, 320px);
}

.stock-page .stock-form label,
.stock-page .transaction-type {
  gap: 8px;
  color: #062b38;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.stock-page .stock-form label[hidden] {
  display: none !important;
}

.stock-label-text {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.stock-page .stock-form label b,
.stock-page .transaction-type b {
  color: #2c6975;
}

.stock-page .stock-form label small {
  margin-top: 9px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.stock-page .stock-form input,
.stock-page .stock-form select,
.stock-page .stock-form textarea {
  width: 100%;
  min-height: 40px;
  border-color: #bdd4c2;
  border-radius: 7px;
  background: #e5f1e4;
  color: #073544;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 400;
}

.stock-page .stock-form input::placeholder {
  color: #879d9b;
}

.stock-page .stock-form .stock-native-select {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.medicine-picker {
  position: relative;
  width: 100%;
}

.medicine-picker-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 66px;
  border: 1px solid #9fc9b0;
  border-radius: 9px;
  background: #f8fffb;
  color: #073544;
  cursor: pointer;
  padding: 10px 11px 10px 14px;
  text-align: left;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.medicine-picker-button:hover {
  border-color: #68b2a0;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(44, 105, 117, 0.1);
}

.medicine-picker.is-open .medicine-picker-button,
.medicine-picker-button:focus-visible {
  border-color: #2c6975;
  box-shadow: 0 0 0 3px rgba(88, 190, 172, 0.2);
  outline: 0;
}

.medicine-picker-selected {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.medicine-picker-selected strong,
.medicine-picker-selected small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.medicine-picker-selected strong {
  color: #062b38;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.stock-page .stock-form .medicine-picker-selected small {
  color: #2c6975;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
}

.medicine-picker-chevron {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e5f1e4;
  color: #2c6975;
  transition: transform 180ms ease;
}

.medicine-picker.is-open .medicine-picker-chevron {
  transform: rotate(180deg);
}

.medicine-picker-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: min(760px, 100%);
  max-height: min(480px, 70vh);
  overflow: hidden;
  border: 1px solid #b9d7c2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(6, 43, 56, 0.2);
}

.medicine-picker-search {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px !important;
  border-bottom: 1px solid #d9e8df;
  background: #f8fffb;
  padding: 12px !important;
}

.medicine-picker-search svg {
  color: #2c6975;
}

.stock-page .stock-form .medicine-picker-search input {
  min-height: 44px;
  border-color: #bdd4c2;
  background: #ffffff;
  font-size: 16px;
}

.medicine-picker-list {
  display: grid;
  gap: 8px;
  max-height: calc(min(480px, 70vh) - 70px);
  overflow-y: auto;
  padding: 10px;
  scrollbar-color: #9bbfbb #edf6f1;
  scrollbar-width: thin;
}

.medicine-picker-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  border: 1px solid #d7e4dc;
  border-radius: 10px;
  background: #fbfdfc;
  color: #073544;
  cursor: pointer;
  padding: 13px 14px;
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.medicine-picker-option:hover,
.medicine-picker-option.is-highlighted {
  border-color: #68b2a0;
  background: #eef8ef;
  box-shadow: 0 8px 18px rgba(44, 105, 117, 0.08);
}

.medicine-picker-option[aria-selected="true"] {
  border-color: #2c6975;
  background: #e5f1e4;
}

.medicine-picker-option-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.medicine-picker-option-main strong {
  color: #062b38;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.medicine-picker-option-main span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #245866;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.medicine-picker-option-main b {
  color: #062b38;
  font-weight: 600;
}

.stock-page .stock-form .medicine-picker-option-main b {
  color: #2c6975;
}

.medicine-picker-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 88px;
}

.medicine-picker-badge {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.medicine-picker-badge.warning {
  background: #fff7d6;
  color: #8a4b00;
}

.medicine-picker-badge.danger {
  background: #ffe8e8;
  color: #b91c1c;
}

.medicine-picker-empty {
  margin: 0;
  padding: 18px;
  color: #2c6975;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

@media (max-width: 640px) {
  .medicine-picker-button {
    grid-template-columns: minmax(0, 1fr) 36px;
    min-height: 66px;
    padding: 12px;
  }

  .medicine-picker-selected strong,
  .medicine-picker-option-main strong {
    font-size: 16px;
    line-height: 1.35;
  }

  .stock-page .stock-form .medicine-picker-selected small,
  .medicine-picker-option-main span {
    font-size: 14px;
  }

  .medicine-picker-panel {
    width: 100%;
    max-height: 62vh;
  }

  .medicine-picker-list {
    max-height: calc(62vh - 70px);
  }

  .medicine-picker-option {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 96px;
    gap: 10px;
    padding: 14px 12px;
  }

  .medicine-picker-badges {
    justify-content: flex-start;
    min-width: 0;
  }
}

.stock-page .transaction-type > div {
  gap: 8px;
}

.stock-page .transaction-type button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border-radius: 7px;
  background: var(--surface);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.stock-page .transaction-type .stock-type-in {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
}

.stock-page .transaction-type .stock-type-out {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
}

.stock-page .transaction-type .stock-type-in.is-active {
  border: 2px solid var(--primary);
  background: #e5f1e4;
}

.stock-page .transaction-type .stock-type-out.is-active {
  border: 2px solid #ff1f2d;
  background: #fff5f5;
  color: #dc2626;
}

.stock-page .stock-form .btn {
  min-height: 44px;
  align-self: end;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}

@media (min-width: 1021px) {
  .stock-page .stock-form {
    grid-template-columns: minmax(320px, 1.35fr) repeat(2, minmax(180px, 0.8fr));
  }

  .stock-page .stock-form .stock-medicine-field {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: stretch;
  }

  .stock-page .stock-form .stock-batch-field {
    grid-column: 2;
  }

  .stock-page .stock-form .stock-expiry-field {
    grid-column: 3;
  }

  .stock-page .stock-form .stock-quantity-field {
    grid-column: 2;
  }

  .stock-page .stock-form .stock-source-field {
    grid-column: 3;
  }

  .stock-page .stock-form .stock-remarks-field {
    grid-column: 1 / -1;
  }

  .stock-page .stock-form .stock-processed-field {
    grid-column: 1;
  }

  .stock-page .stock-form .stock-submit-button {
    grid-column: 2 / -1;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  .stock-transaction-panel {
    padding: 16px;
  }

  .stock-section-title {
    margin-bottom: 16px;
  }

  .stock-page .stock-form {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stock-page .stock-form .stock-field,
  .stock-page .stock-form .stock-submit-button {
    grid-column: 1 / -1;
  }
}

.stock-history-panel {
  overflow: hidden;
  padding: 0;
}

.stock-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
}

.stock-history-header h2 {
  margin-bottom: 0;
  color: #062b38;
  font-size: 15px;
  font-weight: 700;
}

.stock-history-header span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
}

.stock-history-table {
  min-width: 980px;
}

.stock-history-scroll {
  max-height: 430px;
  overflow: auto;
  scrollbar-color: #9bbfbb #edf6f1;
  scrollbar-width: thin;
}

.stock-history-scroll::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.stock-history-scroll::-webkit-scrollbar-track {
  background: #edf6f1;
}

.stock-history-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #edf6f1;
  border-radius: 999px;
  background: #9bbfbb;
}

.stock-history-table thead {
  background: #eff6f2;
}

.stock-history-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eff6f2;
}

.stock-history-table th {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.stock-history-table td {
  height: 43px;
  color: var(--primary);
  font-size: 12px;
  vertical-align: middle;
}

.stock-history-table tbody tr:last-child td {
  border-bottom: 0;
}

.stock-history-table td strong {
  color: #062b38;
  font-size: 13px;
  font-weight: 700;
}

.stock-history-table code {
  color: var(--primary);
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
}

.stock-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}

.stock-in-badge {
  background: #cdf0c8;
  color: #15803d;
}

.stock-out-badge {
  background: #fee2e2;
  color: #dc2626;
}

.stock-adjustment-badge {
  background: #e8eef4;
  color: #475569;
}

@media (max-width: 1020px) {
  .stock-counter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .issuance-counter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stock-counter-grid {
    grid-template-columns: 1fr;
  }

  .issuance-counter-grid {
    grid-template-columns: 1fr;
  }
}

.issuance-page {
  background: var(--background);
}

.issuance-page svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.issuance-counter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.issuance-counter-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  column-gap: 13px;
  min-height: 82px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.issuance-counter-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
}

.issuance-counter-records .issuance-counter-icon {
  background: var(--primary);
}

.issuance-counter-units .issuance-counter-icon {
  background: var(--blue);
}

.issuance-counter-recipients .issuance-counter-icon {
  background: var(--violet);
}

.issuance-counter-medicines .issuance-counter-icon {
  background: #15803d;
}

.issuance-counter-card span:not(.issuance-counter-icon),
.issuance-counter-card strong,
.issuance-counter-card small {
  display: block;
}

.issuance-counter-card span:not(.issuance-counter-icon) {
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.issuance-counter-card strong {
  margin-top: 3px;
  color: #062b38;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
}

.issuance-counter-card small {
  margin-top: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
}

.issuance-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
}

.issuance-form-panel {
  align-self: start;
}

.issuance-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-note {
  color: #6c7f86;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
}

.issuance-search {
  grid-template-columns: minmax(240px, 420px);
  margin-bottom: 14px;
}

.expiry-page svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.alert-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.alert-summary-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 104px;
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.alert-summary-card span:not(.alert-icon),
.alert-summary-card strong,
.alert-summary-card small {
  display: block;
}

.alert-summary-card span:not(.alert-icon) {
  font-size: 12px;
  font-weight: 500;
}

.alert-summary-card strong {
  margin-top: 5px;
  font-size: 29px;
  line-height: 1;
}

.alert-summary-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.alert-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #fff;
}

.alert-red {
  border-color: #fecaca;
  background: #fef2f2;
  color: var(--danger);
}

.alert-orange {
  border-color: #fed7aa;
  background: #fff7ed;
  color: var(--orange);
}

.alert-amber {
  border-color: #fde68a;
  background: #fffbeb;
  color: var(--warning);
}

.alert-slate {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.alert-red .alert-icon {
  background: var(--danger);
}
.alert-orange .alert-icon {
  background: var(--orange);
}
.alert-amber .alert-icon {
  background: #f59e0b;
}
.alert-slate .alert-icon {
  background: #64748b;
}

.alert-table-card {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.alert-table-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.alert-table-card h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.alert-table-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.alert-table-card header > span {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.alert-table-red header {
  background: #fff5f5;
}

.alert-table-orange header {
  background: #fff7ed;
}

.alert-table-amber header {
  background: #fffbeb;
}

.alert-table-slate header {
  background: #f8fafc;
}

.alert-table-red header > span {
  background: #fee2e2;
  color: var(--danger);
}

.alert-table-orange header > span {
  background: #ffedd5;
  color: var(--orange);
}

.alert-table-amber header > span {
  background: #fef3c7;
  color: var(--warning);
}

.alert-table-slate header > span {
  background: #e2e8f0;
  color: #64748b;
}

.expiry-email-form {
  margin: 0;
}

.expiry-email-form .btn {
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.medicine-request-form-page svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.medicine-request-back-button,
.medicine-request-page-print,
.medicine-request-page-download {
  gap: 8px;
  justify-content: center;
  min-width: 132px;
  line-height: 1;
}

.medicine-request-back-button svg,
.medicine-request-page-print svg,
.medicine-request-page-download svg,
.medicine-request-action-icon svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.medicine-request-action-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 16px;
  border: 1px solid #cfe1d5;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.medicine-request-action-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #e3f0e9;
  color: #2c6975;
}

.medicine-request-action-copy h2 {
  margin-bottom: 6px;
  color: #062b38;
  font-size: 18px;
  font-weight: 600;
}

.medicine-request-action-copy p:not(.section-kicker) {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.medicine-request-action-copy ul {
  display: grid;
  gap: 3px;
  margin: 0;
  color: #526b73;
  font-size: 12px;
  padding-left: 18px;
}

.medicine-request-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.medicine-request-action-buttons .btn {
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  white-space: nowrap;
}

.medicine-request-form-note {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  margin-bottom: 16px;
  border: 1px solid #cfe1d5;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.medicine-request-form-note h2 {
  margin-bottom: 6px;
  color: #062b38;
  font-size: 18px;
  font-weight: 600;
}

.medicine-request-form-note p:not(.section-kicker) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.medicine-request-form-panel {
  margin-bottom: 16px;
}

.medicine-request-paper {
  border: 1px solid #cbd9d3;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  padding: 18px;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

.request-form-title-block {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  text-align: center;
}

.request-form-title-block span {
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    #111827 0 7px,
    transparent 7px 9px
  );
}

.request-form-title-block strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.request-form-field-grid,
.request-form-total-grid,
.request-form-signoff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 22px;
}

.request-form-field-wide {
  grid-column: 1 / -1;
}

.request-form-field {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.request-form-field b,
.request-form-purpose b,
.request-form-signoff > b {
  flex: 0 0 auto;
  font-weight: 700;
  text-transform: uppercase;
}

.request-form-field span,
.request-form-purpose span {
  display: block;
  min-height: 18px;
  flex: 1 1 auto;
  border-bottom: 1px solid #111827;
}

.request-form-purpose {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 18px;
}

.request-form-table-wrap {
  overflow-x: auto;
  margin-bottom: 14px;
}

.request-form-table {
  min-width: 680px;
  border-collapse: collapse;
  font-family: inherit;
  font-size: 12px;
}

.request-form-table th,
.request-form-table td {
  border: 1px solid #111827;
  padding: 7px 8px;
}

.request-form-table th {
  background: #f3f4f6;
  color: #111827;
  font-weight: 700;
  text-align: center;
}

.request-form-table td {
  height: 34px;
}

.request-form-table th:first-child,
.request-form-table td:first-child {
  width: 38px;
  text-align: center;
}

.request-form-signoff {
  margin-top: 18px;
  border-top: 1px dashed #111827;
  padding-top: 12px;
}

.request-form-signoff > b {
  display: block;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .medicine-request-action-card,
  .medicine-request-form-note {
    grid-template-columns: 1fr;
  }

  .medicine-request-action-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .medicine-request-action-buttons .btn {
    width: 100%;
  }

  .request-form-field-grid,
  .request-form-total-grid,
  .request-form-signoff-grid {
    grid-template-columns: 1fr;
  }
}

.report-type-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}

.reports-page svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-type-card {
  min-height: 148px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  padding: 16px;
  text-align: left;
  box-shadow: 0 10px 24px rgba(44, 105, 117, 0.08);
}

.report-type-card.active {
  border-color: var(--primary-2);
  background: var(--surface-soft);
}

.report-type-card strong,
.report-type-card small {
  display: block;
}

.report-type-card strong {
  margin-top: 11px;
  font-size: 13px;
  line-height: 1.35;
}

.report-type-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.report-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
}

.report-tone-teal .report-icon {
  background: var(--primary);
}
.report-tone-amber .report-icon {
  background: #f59e0b;
}
.report-tone-red .report-icon {
  background: var(--danger);
}
.report-tone-blue .report-icon {
  background: var(--blue);
}
.report-tone-violet .report-icon {
  background: var(--violet);
}

.report-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 20px;
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
  gap: 12px;
  min-width: 0;
}

.report-filter-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-filter-grid label[hidden] {
  display: none;
}

.report-filter-grid input,
.report-filter-grid select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 0 10px;
  color: var(--foreground);
  text-transform: none;
}

.report-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 9px;
  min-width: 190px;
}

.report-actions .btn {
  width: 100%;
  min-height: 44px;
  white-space: nowrap;
}

.report-panel {
  display: none;
}

.report-panel.active {
  display: block;
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

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

.report-header-actions .btn,
.report-header-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.report-header-actions svg {
  width: 16px;
  height: 16px;
}

.report-header h2 {
  margin-bottom: 5px;
  font-size: 20px;
}

.report-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.report-chart {
  position: relative;
  height: 250px;
  margin-bottom: 34px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fbf9;
}

.report-chart canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.report-chart span {
  position: relative;
  display: flex;
  justify-content: center;
  height: var(--h);
  min-height: 42px;
  border-radius: 10px 10px 5px 5px;
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
}

.report-chart b {
  position: absolute;
  bottom: -24px;
  color: var(--muted);
  font-size: 12px;
}

.reports-page [data-report-panel="monthly"] table {
  min-width: 1040px;
}

.reports-page [data-report-panel="movement"] table {
  min-width: 900px;
}

.reports-page [data-report-panel="issuance"] table {
  min-width: 900px;
}

.monthly-usage-cards {
  display: grid;
  gap: 12px;
}

.monthly-usage-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfdfc;
  box-shadow: 0 8px 18px rgba(44, 105, 117, 0.06);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.monthly-usage-card:hover {
  border-color: rgba(88, 190, 172, 0.72);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(44, 105, 117, 0.1);
  transform: translateY(-1px);
}

.monthly-usage-card[open] {
  border-color: var(--primary-2);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(44, 105, 117, 0.12);
}

.monthly-usage-card summary {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 0.7fr) minmax(110px, 0.5fr) 38px;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  color: var(--foreground);
  touch-action: manipulation;
}

.monthly-usage-card summary::-webkit-details-marker {
  display: none;
}

.monthly-usage-card summary:focus-visible {
  outline: 3px solid rgba(88, 190, 172, 0.35);
  outline-offset: -3px;
}

.monthly-card-month,
.monthly-card-stat {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.monthly-card-month strong,
.monthly-card-stat strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.monthly-card-month small,
.monthly-card-stat small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: uppercase;
}

.monthly-card-month small {
  overflow-wrap: anywhere;
  text-transform: none;
}

.monthly-card-trend {
  justify-items: start;
}

.monthly-card-chevron {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--primary);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.monthly-usage-card:hover .monthly-card-chevron,
.monthly-usage-card[open] .monthly-card-chevron {
  border-color: rgba(88, 190, 172, 0.72);
  background: var(--surface-soft);
  color: var(--primary-2);
}

.monthly-usage-card[open] .monthly-card-chevron {
  transform: rotate(180deg);
}

.monthly-card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid var(--border);
  padding: 14px 16px 16px;
  animation: monthly-card-reveal 180ms ease-out;
}

.monthly-card-details section {
  min-width: 0;
  border: 1px solid #dfece5;
  border-radius: 9px;
  background: #f8fbf9;
  padding: 12px;
}

.monthly-card-details h3 {
  margin: 0 0 10px;
  color: #376474;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
}

.monthly-card-details p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.monthly-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.monthly-detail-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border-bottom: 1px solid #e3eee8;
  padding-bottom: 8px;
  color: var(--foreground);
  font-size: 13px;
  line-height: 1.4;
}

.monthly-detail-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.monthly-detail-list span {
  overflow-wrap: anywhere;
}

.monthly-detail-list strong {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

@keyframes monthly-card-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .monthly-usage-card,
  .monthly-card-chevron,
  .monthly-card-details {
    animation: none;
    transition: none;
  }
}

.monthly-report-list {
  display: block;
  max-width: 280px;
  color: var(--foreground);
  font-size: 13px;
  line-height: 1.45;
}

.monthly-print-table {
  display: none;
}

.monthly-print-summary {
  display: none;
}

.report-movement-scroll {
  max-height: 430px;
  overflow: auto;
  scrollbar-color: #9bbfbb #edf6f1;
  scrollbar-width: thin;
}

.report-movement-scroll::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.report-movement-scroll::-webkit-scrollbar-track {
  background: #edf6f1;
}

.report-movement-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #edf6f1;
  border-radius: 999px;
  background: #9bbfbb;
}

.report-movement-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.print-report-letterhead {
  display: none;
}

@media (max-width: 1180px) {
  .report-filters {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .report-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .report-filter-grid,
  .report-actions {
    grid-template-columns: 1fr;
  }

  .report-filters {
    padding: 16px;
  }

  .monthly-usage-card summary {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 10px;
  }

  .monthly-card-stat {
    grid-column: 1 / -1;
  }

  .monthly-card-chevron {
    grid-column: 2;
    grid-row: 1;
  }

  .monthly-card-details {
    grid-template-columns: 1fr;
  }
}

.announcement-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.announcements-page svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.announcement-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.announcement-stat-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  column-gap: 13px;
  min-height: 86px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.announcement-stat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
}

.stat-teal .announcement-stat-icon {
  background: var(--primary);
}

.stat-red .announcement-stat-icon {
  background: var(--danger);
}

.stat-orange .announcement-stat-icon {
  background: #f59e0b;
}

.stat-green .announcement-stat-icon {
  background: #15803d;
}

.announcement-stat-card span:not(.announcement-stat-icon),
.announcement-stat-card strong,
.announcement-stat-card small {
  display: block;
}

.announcement-stat-card span:not(.announcement-stat-icon) {
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}

.announcement-stat-card strong {
  margin-top: 3px;
  color: #062b38;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.announcement-stat-card small {
  margin-top: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
}

.announcement-new-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  white-space: nowrap;
}

.announcement-new-button svg {
  width: 16px;
  height: 16px;
}

.announcement-form-panel {
  margin-bottom: 20px;
}

.announcement-edit-panel {
  margin-top: -8px;
}

.announcement-form-panel[hidden] {
  display: none;
}

.announcement-list {
  display: grid;
  gap: 16px;
}

.main-content.announcements-page .announcement-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.announcement-content {
  min-width: 0;
}

.announcement-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 9px;
}

.announcement-title-row h2 {
  margin-bottom: 0;
  color: #062b38;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.main-content.announcements-page .announcement-card p {
  margin-bottom: 9px;
  color: var(--primary);
  font-size: 14px;
  line-height: 1.55;
}

.main-content.announcements-page .announcement-card small {
  color: var(--primary);
  font-size: 12px;
}

.priority-badge {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
}

.priority-high {
  background: #fee2e2;
  color: var(--danger);
}

.priority-medium {
  background: #fef3c7;
  color: var(--warning);
}

.priority-low {
  background: #dbeafe;
  color: var(--blue);
}

.announcement-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.announcement-actions form {
  margin: 0;
}

.announcement-icon-action {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.announcement-icon-action:hover {
  border-color: var(--border);
  background: var(--surface-soft);
}

.announcement-icon-action.danger-action {
  color: var(--danger);
}

.announcement-actions .announcement-icon-action {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid transparent;
  background: transparent;
  padding: 0;
  color: var(--primary);
}

.announcement-actions .announcement-icon-action:hover {
  border-color: var(--border);
  background: var(--surface-soft);
}

.announcement-actions .announcement-icon-action.danger-action {
  background: transparent;
  color: var(--danger);
}

.announcement-actions .announcement-icon-action.danger-action:hover {
  background: #fff0f0;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.calendar-activities-page svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calendar-action-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.calendar-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding-inline: 16px;
  white-space: nowrap;
}

.calendar-add-button svg {
  width: 16px;
  height: 16px;
}

.activity-form-panel {
  margin-bottom: 18px;
}

.activity-form-panel[hidden] {
  display: none;
}

.calendar-main {
  min-width: 0;
}

.calendar-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.calendar-stats {
  margin-bottom: 16px;
}

.activity-list {
  display: grid;
  gap: 14px;
}

.calendar-activities-page .activity-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 128px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px 24px 20px;
}

.activity-date {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--primary);
}

.activity-date strong,
.activity-date span {
  display: block;
}

.activity-date strong {
  font-size: 28px;
  line-height: 1;
}

.activity-date span {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-activities-page .activity-card-body {
  min-width: 0;
}

.calendar-activities-page .activity-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 10px;
}

.calendar-activities-page .activity-title-row h2 {
  margin-bottom: 0;
  color: #062b38;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.calendar-activities-page .activity-card p {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 14px;
  line-height: 1.55;
}

.calendar-activities-page .activity-meta {
  display: grid;
  grid-template-columns: minmax(170px, 0.48fr) minmax(220px, 1fr);
  gap: 12px;
  color: var(--primary);
  font-size: 12px;
}

.calendar-activities-page .activity-meta strong,
.calendar-activities-page .activity-meta span {
  display: block;
}

.calendar-activities-page .activity-meta strong {
  margin-bottom: 2px;
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
}

.calendar-activities-page .activity-badge {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
}

.activity-health {
  background: #d1fae5;
  color: #047857;
}

.activity-training {
  background: #dbeafe;
  color: var(--blue);
}

.activity-clinic {
  background: #e0e7ff;
  color: #4f46e5;
}

.activity-inventory {
  background: #fef3c7;
  color: var(--warning);
}

.activity-emergency {
  background: #fee2e2;
  color: var(--danger);
}

.activity-other {
  background: #e2e8f0;
  color: #64748b;
}

.activity-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.activity-actions form {
  margin: 0;
}

.activity-edit-panel {
  margin-top: -6px;
}

.calendar-side-panel {
  align-self: start;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.mini-calendar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.mini-calendar b {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbf9;
  color: var(--foreground);
  font-size: 13px;
}

.mini-calendar b.has-activity {
  border-color: var(--primary-2);
  background: var(--surface-soft);
  color: var(--primary);
}

.mini-calendar b.is-empty {
  visibility: hidden;
}

.calendar-legend {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calendar-legend i {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 999px;
}

.user-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.access-card header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
}

.access-card h2 {
  margin-bottom: 3px;
  font-size: 16px;
}

.access-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.role-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.role-icon::before,
.user-avatar::before,
.profile-avatar::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 13px 0 -5px currentColor;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.role-nurse {
  background: #dbeafe;
  color: var(--blue);
}

.role-bhw {
  background: #dcfce7;
  color: #15803d;
}

.role-midwife {
  background: #ede9fe;
  color: var(--violet);
}

.permissions-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.permissions-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.permissions-list li span {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.permission-allowed {
  color: var(--foreground);
}

.permission-allowed span {
  background: var(--mint);
}

.permission-allowed span::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 5px;
  height: 8px;
  border: solid var(--primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.permission-blocked {
  color: var(--muted);
}

.permission-blocked span {
  background: #e2e8f0;
}

.permission-blocked span::before,
.permission-blocked span::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 8px;
  height: 2px;
  border-radius: 99px;
  background: #94a3b8;
}

.permission-blocked span::before {
  transform: rotate(45deg);
}

.permission-blocked span::after {
  transform: rotate(-45deg);
}

.users-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.users-table-card {
  overflow: hidden;
  margin-bottom: 16px;
}

.users-table-header {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.current-user-row {
  background: rgba(205, 237, 201, 0.32);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell strong,
.user-cell small,
.profile-card strong,
.profile-card p {
  display: block;
}

.user-cell strong {
  font-size: 13px;
}

.user-cell small {
  margin-top: 3px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--mint);
  color: var(--primary);
}

.user-avatar::before {
  width: 10px;
  height: 10px;
  border-width: 1.8px;
  box-shadow: 0 10px 0 -4px currentColor;
}

.email-cell,
.access-summary {
  color: var(--muted);
  font-size: 13px;
}

.email-cell {
  font-family: Consolas, "Courier New", monospace;
}

.profile-card h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

.profile-card-body {
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 18px;
  background: var(--mint);
  color: var(--primary);
}

.profile-card strong {
  margin-bottom: 7px;
  font-size: 16px;
}

.profile-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.users-profile-page {
  gap: 16px;
}

.users-profile-page svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.users-profile-page .user-role-grid {
  margin-bottom: 18px;
}

.users-profile-page .access-card {
  min-height: 268px;
  padding: 20px;
}

.users-profile-page .access-card header {
  margin-bottom: 14px;
}

.users-profile-page .role-icon,
.users-profile-page .profile-avatar,
.users-profile-page .user-avatar {
  color: var(--primary);
}

.users-profile-page .role-icon::before,
.users-profile-page .user-avatar::before,
.users-profile-page .profile-avatar::before {
  content: none;
}

.users-profile-page .role-icon {
  border-radius: 9px;
}

.users-profile-page .role-icon svg {
  width: 18px;
  height: 18px;
}

.users-profile-page .role-icon.role-nurse {
  background: #eaf2ff;
  color: #2563eb;
}

.users-profile-page .role-icon.role-bhw {
  background: #dcfce7;
  color: #15803d;
}

.users-profile-page .role-icon.role-midwife {
  background: #f3e8ff;
  color: #9333ea;
}

.users-profile-page .permissions-list {
  gap: 7px;
}

.users-profile-page .permissions-list li {
  gap: 8px;
  font-size: 12px;
}

.users-profile-page .permissions-list li span {
  display: grid;
  place-items: center;
  background: transparent;
}

.users-profile-page .permissions-list li span::before,
.users-profile-page .permissions-list li span::after {
  content: none;
}

.users-profile-page .permissions-list svg {
  width: 14px;
  height: 14px;
}

.users-profile-page .permission-allowed span {
  color: #2c9a7b;
}

.users-profile-page .permission-blocked span {
  color: #b7c4d1;
}

.users-profile-page .user-form-panel {
  margin-top: 0;
  margin-bottom: 16px;
}

.users-profile-page .user-stats {
  margin-bottom: 16px;
}

.users-profile-page .user-edit-panel {
  margin-top: 16px;
}

.users-profile-page .user-form-panel[hidden] {
  display: none;
}

.users-profile-page .users-table-card {
  padding: 0;
}

.users-profile-page .users-table-header {
  align-items: center;
  padding: 15px 18px 14px;
}

.users-profile-page .users-table-header h2,
.users-profile-page .profile-card h2 {
  font-size: 14px;
  font-weight: 600;
}

.users-profile-page .user-add-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding-inline: 14px;
}

.users-profile-page .user-add-button svg {
  width: 14px;
  height: 14px;
}

.users-profile-page .table-wrap table {
  margin-bottom: 0;
}

.users-profile-page .table-wrap th,
.users-profile-page .table-wrap td {
  vertical-align: middle;
}

.users-profile-page .user-avatar {
  width: 30px;
  height: 30px;
}

.users-profile-page .user-avatar svg {
  width: 15px;
  height: 15px;
}

.users-profile-page .user-cell strong {
  font-weight: 600;
}

.users-profile-page .user-cell small {
  font-weight: 500;
}

.users-profile-page .table-actions {
  justify-content: flex-start;
  gap: 8px;
}

.users-profile-page .table-actions form {
  margin: 0;
}

.users-profile-page .table-actions .user-icon-action {
  display: grid;
  place-items: center;
  min-width: 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

.users-profile-page .table-actions .user-icon-action:hover {
  background: var(--surface-soft);
}

.users-profile-page .table-actions .user-icon-action.danger-action {
  background: transparent;
  color: var(--danger);
}

.users-profile-page .table-actions .user-icon-action.danger-action:hover {
  background: #fff0f0;
}

.users-profile-page .table-actions .user-icon-action svg {
  width: 15px;
  height: 15px;
}

.users-profile-page .profile-card {
  padding: 18px;
}

.users-profile-page .profile-card h2 {
  margin-bottom: 0;
}

.users-profile-page .profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.users-profile-page .profile-avatar svg {
  width: 24px;
  height: 24px;
}

.users-profile-page .profile-card strong {
  font-weight: 600;
}

.users-profile-page .profile-edit-card {
  max-width: 760px;
}

.users-profile-page .profile-edit-card .panel-header {
  margin-bottom: 16px;
}

.users-profile-page .profile-update-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.users-profile-page .profile-save-button {
  gap: 8px;
}

.users-profile-page .profile-save-button svg {
  width: 15px;
  height: 15px;
}

.demo-alert {
  margin-bottom: 16px;
  border-radius: 11px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
}

.success-alert {
  border: 1px solid var(--mint);
  background: #f0faf4;
  color: var(--primary);
}

.transaction-type {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.transaction-type > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.transaction-type button {
  min-height: 42px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.transaction-type .active-in {
  border: 2px solid var(--primary);
  background: var(--surface-soft);
  color: var(--primary);
}

.transaction-type .active-out {
  border: 2px solid #fca5a5;
  background: #fff5f5;
  color: var(--danger);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.medicine-inventory-page .inventory-grid {
  gap: 12px;
}

.medicine-inventory-page .inventory-grid.is-list {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
}

.medicine-card-panel .inventory-grid {
  padding: 16px;
}

.medicine-list-header {
  display: none;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-list-header {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(132px, 0.85fr) 80px 90px minmax(140px, 1fr) 96px;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid #cfe0d6;
  background: #eef6f2;
  padding: 0 12px;
  color: #075263;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-list-header > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.medicine-card-panel .empty-state {
  margin: 16px;
}

.medicine-card-panel {
  overflow: hidden;
  padding: 0;
}

.medicine-card-panel-header {
  align-items: center;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  background: #f3faf6;
  padding: 14px 16px;
}

.medicine-card-panel-header h2,
.medicine-card-panel-header span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.medicine-card-panel-header h2 {
  margin-bottom: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.medicine-card-panel-header > span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
}

.medicine-card-panel-header b {
  font-weight: 600;
}

.medicine-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(44, 105, 117, 0.08);
}

.medicine-inventory-page .medicine-card {
  border-color: #d7e4dc;
  border-radius: 10px;
  box-shadow: 0 2px 7px rgba(18, 63, 72, 0.1);
}

.medicine-inventory-page [data-inventory-item][hidden],
.medicine-inventory-page [data-inventory-item].is-filtered-out {
  display: none !important;
}

.medicine-inventory-page .medicine-card[data-state="inactive"] {
  border-color: #dbe4e8;
  background: #f8fafc;
  box-shadow: none;
}

.medicine-inventory-page .medicine-card[data-state="inactive"] .medicine-card-visual {
  opacity: 0.72;
}

.medicine-inventory-page .medicine-card[data-state="inactive"] .medicine-card-photo {
  filter: grayscale(1);
  opacity: 0.48;
}

.medicine-inventory-page .medicine-card[data-state="inactive"] .medicine-photo-shade {
  background: rgba(248, 250, 252, 0.42);
}

.medicine-inventory-page .medicine-card[data-state="inactive"] .medicine-card-body,
.medicine-inventory-page .medicine-card[data-state="inactive"] .medicine-title-row h3,
.medicine-inventory-page .medicine-card[data-state="inactive"] .medicine-description,
.medicine-inventory-page .medicine-card[data-state="inactive"] .medicine-meta-grid strong {
  color: #7a8b92;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-card {
  display: grid;
  grid-template-columns: 1fr;
  border: 0;
  border-bottom: 1px solid #d5e4db;
  border-radius: 0;
  box-shadow: none;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-card-visual {
  display: none;
}

.medicine-card-visual {
  position: relative;
  display: grid;
  min-height: 122px;
  place-items: center;
  padding: 34px 18px 24px;
  overflow: hidden;
}

.medicine-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.medicine-photo-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 38, 48, 0.12), rgba(4, 38, 48, 0.3));
}

.medicine-card-visual strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--title-color);
  font-size: clamp(22px, 2.1vw, 30px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.medicine-tone-blue {
  --title-color: #0867a0;
  background: #eef8ff;
}
.medicine-tone-expired-green {
  --title-color: #669198;
  background: #eef8ef;
}
.medicine-tone-inactive {
  --title-color: #8a9aa1;
  background: #f1f5f9;
}
.medicine-tone-cyan {
  --title-color: #4a9b96;
  background: #edfcfc;
}
.medicine-tone-rose {
  --title-color: #c94f56;
  background: #fff4f4;
}
.medicine-tone-lime {
  --title-color: #3f7415;
  background: #efffd0;
}
.medicine-tone-yellow {
  --title-color: #c97940;
  background: #fff6d5;
}
.medicine-tone-green {
  --title-color: #146c36;
  background: #effaf3;
}
.medicine-tone-violet {
  --title-color: #7c3aed;
  background: #f5f3ff;
}

.medicine-card-visual .status,
.expired-flag {
  position: absolute;
  top: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 21px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
}

.medicine-card-visual .status {
  left: 10px;
}

.expired-flag {
  right: 10px;
  background: linear-gradient(135deg, #fb2f46 0%, #dc172d 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 0 0 3px rgba(248, 113, 113, 0.18),
    0 0 18px rgba(239, 51, 64, 0.72),
    0 8px 18px rgba(127, 29, 29, 0.3);
  animation: expired-badge-glow 1.8s ease-in-out infinite;
}

.medicine-card-visual .status svg,
.expired-flag svg {
  width: 12px;
  height: 12px;
}

@keyframes expired-badge-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(248, 113, 113, 0.16),
      0 0 14px rgba(239, 51, 64, 0.62),
      0 8px 18px rgba(127, 29, 29, 0.28);
  }

  50% {
    box-shadow:
      0 0 0 5px rgba(248, 113, 113, 0.26),
      0 0 24px rgba(239, 51, 64, 0.88),
      0 10px 22px rgba(127, 29, 29, 0.34);
  }
}

@media (prefers-reduced-motion: reduce) {
  .expired-flag,
  .medicine-inventory-page .inventory-grid.is-list .medicine-list-status.status-expired {
    animation: none;
  }
}

.medicine-image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #eef6f2;
}

.medicine-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.medicine-image .status {
  position: absolute;
  top: 10px;
  left: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.medicine-card-body {
  min-width: 0;
  padding: 14px;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(132px, 0.85fr) 80px 90px minmax(140px, 1fr) 96px;
  gap: 0;
  align-items: center;
  min-height: 47px;
  padding: 0 12px;
}

.medicine-inventory-page .medicine-card-body {
  padding: 14px 12px 12px;
}

.medicine-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.medicine-title-row > div {
  min-width: 0;
}

.medicine-title-row h3 {
  min-width: 0;
  margin-bottom: 4px;
  font-size: 15px;
  line-height: 1.25;
}

.medicine-title-row h3 [data-card-name] {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
}

.medicine-list-status {
  display: none;
}

.medicine-inventory-page .medicine-title-row h3 {
  color: #062b38;
  font-size: 14px;
  font-weight: 700;
}

.medicine-title-row p,
.medicine-description {
  color: var(--muted);
  font-size: 13px;
}

.medicine-inventory-page .medicine-title-row p {
  color: var(--primary);
  font-size: 12px;
}

.medicine-description {
  min-height: 42px;
  margin-bottom: 12px;
  line-height: 1.55;
}

.medicine-inventory-page .medicine-description {
  min-height: 38px;
  color: #6c9698;
  font-size: 12px;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-description {
  display: none;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid {
  display: contents;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid div {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid div:nth-child(1) {
  grid-column: 3;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid div:nth-child(2) {
  grid-column: 4;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid div:nth-child(3) {
  grid-column: 2;
  grid-row: 1;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid div:nth-child(4) {
  grid-column: 5;
  grid-row: 1;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid span {
  display: none;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid strong {
  max-width: 100%;
  overflow: hidden;
  margin-top: 0;
  color: #075263;
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid div:nth-child(1) strong {
  color: #062b38;
  font-weight: 600;
}

.medicine-inventory-page .inventory-grid.is-list .card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  grid-column: 6;
  grid-row: 1;
  align-self: center;
  gap: 8px;
  max-width: none;
  margin-top: 0;
}

.medicine-inventory-page .inventory-grid.is-list .card-actions button {
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-title-row {
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-title-row h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  margin-bottom: 0;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-title-row h3 [data-card-name] {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-list-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 20px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-list-status.status-expired {
  background: linear-gradient(135deg, #fb2f46 0%, #dc172d 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 0 0 3px rgba(248, 113, 113, 0.16),
    0 0 16px rgba(239, 51, 64, 0.68),
    0 6px 14px rgba(127, 29, 29, 0.24);
  animation: expired-badge-glow 1.8s ease-in-out infinite;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-list-status svg {
  display: none;
}

.medicine-inventory-page .inventory-grid.is-list .medicine-title-row p {
  display: none;
}

.medicine-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.medicine-meta-grid div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbf9;
  padding: 9px;
}

.medicine-inventory-page .medicine-meta-grid {
  gap: 8px;
}

.medicine-inventory-page .medicine-meta-grid div {
  border-color: #d7e4dc;
  border-radius: 7px;
  background: #f8fcfa;
  padding: 10px;
}

.medicine-meta-grid .wide {
  grid-column: 1 / -1;
}

.medicine-meta-grid span,
.medicine-meta-grid strong,
.medicine-meta-grid small {
  display: block;
}

.medicine-meta-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.medicine-inventory-page .medicine-meta-grid span {
  color: #6c9698;
  font-size: 11px;
  font-weight: 700;
}

.medicine-meta-grid strong {
  overflow: hidden;
  margin-top: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.medicine-inventory-page .medicine-meta-grid strong {
  color: #062b38;
  font-size: 14px;
  font-weight: 700;
}

.medicine-meta-grid small {
  margin-top: 3px;
  color: var(--muted);
}

.medicine-inventory-page .medicine-meta-grid small {
  color: #6c9698;
  font-size: 12px;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.card-actions form {
  display: contents;
}

.card-actions button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--primary);
  cursor: pointer;
  font-weight: 800;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.medicine-inventory-page .card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 28px;
  border-radius: 7px;
  background: #dfeee0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.medicine-inventory-page .card-actions svg {
  width: 14px;
  height: 14px;
}

.medicine-inventory-page .card-actions .medicine-icon-action {
  width: auto;
  min-width: 76px;
  padding: 0;
}

.medicine-inventory-page .inventory-grid.is-list .card-actions .medicine-icon-action {
  width: 28px;
  min-width: 28px;
  min-height: 26px;
  padding: 0;
}

.medicine-inventory-page .inventory-grid.is-list .card-actions .medicine-icon-action span {
  display: none;
}

.medicine-inventory-page .card-actions button:hover {
  background: #cde5d3;
  transform: translateY(-1px);
}

.card-actions .danger-action {
  background: #fee2e2;
  color: var(--danger);
}

.medicine-inventory-page .card-actions .danger-action {
  background: #fff0f0;
  color: #ff1f2d;
}

.medicine-inventory-page .card-actions .danger-action:hover {
  background: #ffe0e0;
}

.inventory-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  background: #f8fbf9;
  padding: 12px 16px;
}

.inventory-pagination[hidden] {
  display: none;
}

.inventory-page-size {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #376474;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.inventory-page-size select {
  min-width: 70px;
  min-height: 34px;
  border: 1px solid #cfe0d6;
  border-radius: 8px;
  background: #fff;
  color: #075263;
  padding: 0 10px;
  font-size: 12px;
}

.inventory-pagination p {
  margin: 0;
  color: #2c6975;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
}

.inventory-page-actions,
.inventory-page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inventory-page-button,
.inventory-page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 34px;
  min-height: 34px;
  border: 1px solid #cfe0d6;
  border-radius: 8px;
  background: #fff;
  color: #2c6975;
  cursor: pointer;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.inventory-page-number {
  padding: 0;
}

.inventory-page-button:hover:not(:disabled),
.inventory-page-number:hover {
  border-color: #68b2a0;
  background: #eef8ef;
  box-shadow: 0 8px 16px rgba(18, 63, 72, 0.1);
  color: #073544;
  transform: translateY(-1px);
}

.inventory-page-button:active:not(:disabled),
.inventory-page-number:active {
  transform: translateY(0);
}

.inventory-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.inventory-page-button svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inventory-page-number[aria-current="page"] {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 31, 39, 0.36);
  backdrop-filter: blur(4px);
  animation: confirm-modal-fade 180ms ease-out;
}

.confirm-modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid #d7e4dc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(18, 63, 72, 0.24);
  padding: 18px;
  animation: confirm-modal-rise 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.confirm-modal-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff0f0;
  color: var(--danger);
}

.confirm-modal-icon svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.confirm-modal-copy h2 {
  margin-bottom: 5px;
  color: #062b38;
  font-size: 17px;
  font-weight: 600;
}

.confirm-modal-copy p {
  margin: 0;
  color: #52717b;
  font-size: 13px;
  line-height: 1.45;
}

.confirm-modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.confirm-modal-actions button {
  min-height: 34px;
  border-radius: 7px;
  padding: 0 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.confirm-modal-actions button:hover {
  transform: translateY(-1px);
}

.confirm-cancel-button {
  border: 1px solid #d7e4dc;
  background: #fff;
  color: var(--primary);
}

.confirm-cancel-button:hover {
  background: #eef8ef;
}

.confirm-submit-button {
  border: 1px solid var(--danger);
  background: var(--danger);
  color: #fff;
}

.confirm-submit-button:hover {
  border-color: #dc1f2a;
  background: #dc1f2a;
}

@keyframes confirm-modal-fade {
  from {
    opacity: 0;
  }
}

@keyframes confirm-modal-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.empty-state {
  margin-top: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #f8fbf9;
  color: var(--muted);
  padding: 32px;
  text-align: center;
  font-weight: 700;
}

.supplier-stats {
  margin-bottom: 16px;
}

.supplier-toolbar {
  grid-template-columns: minmax(240px, 1fr) minmax(160px, auto);
}

.supplier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.supplier-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.supplier-card-top {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.supplier-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--primary);
}

.supplier-icon svg {
  width: 21px;
  height: 21px;
}

.supplier-card h2 {
  margin-bottom: 4px;
  font-size: 16px;
  line-height: 1.3;
}

.supplier-card p {
  margin-bottom: 0;
}

.supplier-card-top p,
.supplier-details span,
.supplier-card-footer {
  color: var(--muted);
  font-size: 13px;
}

.supplier-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.supplier-details p {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #f8fbf9;
  padding: 10px;
}

.supplier-details .wide {
  grid-column: 1 / -1;
}

.supplier-details strong,
.supplier-details span,
td small {
  display: block;
}

.supplier-details strong {
  margin-bottom: 4px;
  color: var(--foreground);
  font-size: 12px;
}

.supplier-details span {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.supplier-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.card-actions.compact,
.card-actions.table-actions {
  display: flex;
  grid-template-columns: none;
  margin-top: 0;
}

.card-actions.table-actions button {
  min-width: 62px;
}

td small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.suppliers-page {
  background: var(--background);
}

.suppliers-page svg {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.suppliers-page .supplier-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.supplier-stat-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  column-gap: 13px;
  min-height: 94px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.supplier-stat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
}

.stat-teal .supplier-stat-icon {
  background: var(--primary);
}

.stat-green .supplier-stat-icon {
  background: var(--primary-2);
}

.stat-orange .supplier-stat-icon {
  background: #f59e0b;
}

.supplier-stat-card span:not(.supplier-stat-icon),
.supplier-stat-card strong,
.supplier-stat-card small {
  display: block;
}

.supplier-stat-card span:not(.supplier-stat-icon) {
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
}

.supplier-stat-card strong {
  margin-top: 2px;
  color: #062b38;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.supplier-stat-card small {
  margin-top: 7px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
}

.supplier-table-panel {
  overflow: hidden;
  padding: 0;
}

.supplier-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px 14px;
}

.supplier-table-header h2 {
  margin-bottom: 4px;
  color: #062b38;
  font-size: 15px;
  font-weight: 700;
}

.supplier-table-header p {
  margin-bottom: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
}

.supplier-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(390px, 100%);
}

.supplier-search-field {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.supplier-search-field svg {
  position: absolute;
  left: 12px;
  top: 50%;
  color: var(--primary);
  transform: translateY(-50%);
  pointer-events: none;
}

.supplier-search-field input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #c7dace;
  border-radius: 7px;
  background: #e5f1e4;
  color: #174855;
  padding: 0 12px 0 38px;
  font-size: 14px;
  font-weight: 400;
}

.supplier-search-field input::placeholder {
  color: #7b9694;
}

.supplier-add-button {
  gap: 8px;
  min-height: 36px;
  border-radius: 7px;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.suppliers-table {
  min-width: 1020px;
}

.suppliers-table thead {
  background: #eff6f2;
}

.suppliers-table th {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.suppliers-table td {
  height: 68px;
  color: var(--primary);
  font-size: 12px;
  vertical-align: middle;
}

.suppliers-table tbody tr:last-child td {
  border-bottom: 0;
}

.supplier-name-cell {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.supplier-row-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: #e0ecde;
  color: var(--primary);
}

.suppliers-table td strong,
.suppliers-table td small {
  display: block;
}

.suppliers-table td strong {
  color: #062b38;
  font-size: 12px;
  font-weight: 700;
}

.suppliers-table td small {
  margin-top: 3px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 400;
}

.suppliers-table .status {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
}

.supplier-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.supplier-row-actions form {
  display: contents;
}

.supplier-row-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

.supplier-row-actions .danger-action {
  color: #ff1f2d;
}

.supplier-row-actions button.is-loading {
  display: inline-flex;
  width: auto;
  min-width: 76px !important;
  padding: 0 8px;
  font-size: 12px;
}

.supplier-row-actions button:hover {
  background: #e5f1e4;
}

.supplier-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: rgba(3, 31, 39, 0.58);
  backdrop-filter: blur(5px);
  padding: 24px;
  animation: supplier-modal-fade 180ms ease-out;
}

.supplier-modal-overlay[hidden] {
  display: none;
}

.supplier-modal {
  width: min(480px, 100%);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 26px 70px rgba(6, 43, 56, 0.28);
  animation: supplier-modal-rise 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.supplier-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  border-bottom: 1px solid var(--border);
  padding: 0 18px;
}

.supplier-modal-header h2 {
  margin-bottom: 0;
  color: #263f47;
  font-size: 16px;
  font-weight: 700;
}

.supplier-modal-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #263f47;
  cursor: pointer;
}

.supplier-modal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
  padding: 20px 18px 18px;
}

.supplier-modal-form label {
  display: grid;
  gap: 7px;
  color: #263f47;
  font-size: 13px;
  font-weight: 700;
}

.supplier-modal-form .field-label {
  color: #263f47;
}

.supplier-modal-form .field-label b {
  color: #ff1f2d;
  font-weight: 700;
}

.supplier-modal-form .full {
  grid-column: 1 / -1;
}

.supplier-modal-form input,
.supplier-modal-form select,
.supplier-modal-form textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid #bdd4c2;
  border-radius: 7px;
  background: #e5f1e4;
  color: #263f47;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 400;
}

.supplier-modal-form textarea {
  min-height: 74px;
  padding-top: 10px;
  resize: vertical;
}

.supplier-modal-form input::placeholder,
.supplier-modal-form textarea::placeholder {
  color: #879d9b;
}

.supplier-modal-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.supplier-submit-button,
.supplier-cancel-button {
  min-height: 37px;
  border: 0;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
}

.supplier-submit-button {
  background: var(--primary);
  color: #fff;
}

.supplier-submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.supplier-cancel-button {
  border: 1px solid #b8ccc5;
  background: #eef8ef;
  color: var(--primary);
}

.supplier-submit-button:hover {
  background: #245f69;
}

.supplier-cancel-button:hover {
  background: #dfeee0;
}

@keyframes supplier-modal-fade {
  from {
    opacity: 0;
  }
}

@keyframes supplier-modal-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

@media (max-width: 900px) {
  .suppliers-page .supplier-stats {
    grid-template-columns: 1fr;
  }

  .supplier-table-header {
    align-items: stretch;
    flex-direction: column;
  }

  .supplier-table-actions {
    justify-content: stretch;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .supplier-table-actions,
  .supplier-modal-footer {
    grid-template-columns: 1fr;
  }

  .supplier-table-actions {
    display: grid;
  }

  .supplier-search-field {
    min-width: 0;
  }

  .supplier-modal-overlay {
    align-items: start;
    padding: 18px 12px;
    overflow-y: auto;
  }

  .supplier-modal-form {
    grid-template-columns: 1fr;
  }

  .supplier-modal-form .full {
    grid-column: auto;
  }
}

@media (max-width: 1020px) {
  .app-shell {
    display: block;
    min-height: 100dvh;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .sidebar-toggle {
    position: fixed;
    top: 10px;
    left: 12px;
    z-index: 85;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(44, 105, 117, 0.18);
    border-radius: 10px;
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(15, 64, 74, 0.14);
    cursor: pointer;
    transition:
      background 180ms ease,
      border-color 180ms ease,
      box-shadow 180ms ease,
      color 180ms ease,
      transform 180ms ease;
  }

  .sidebar-toggle:hover,
  .sidebar-toggle:focus-visible {
    border-color: var(--primary-2);
    background: #eef8ef;
    color: #073544;
    transform: translateY(-1px);
  }

  .sidebar-toggle svg,
  .sidebar-close svg {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    background: rgba(3, 31, 39, 0.42);
    backdrop-filter: blur(3px);
    animation: sidebar-backdrop-in 180ms ease-out;
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    width: min(286px, calc(100vw - 48px));
    max-width: 100%;
    height: 100dvh;
    padding: 20px 12px;
    overflow-y: auto;
    box-shadow: 18px 0 46px rgba(3, 31, 39, 0.22);
    transform: translateX(-105%);
    transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-toggle {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.92);
  }

  .sidebar-close {
    position: absolute;
    top: 16px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition:
      background 180ms ease,
      transform 180ms ease;
  }

  .sidebar-close:hover,
  .sidebar-close:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    outline: none;
    transform: translateY(-1px);
  }

  .brand {
    padding-right: 46px;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .logout-link {
    margin-top: 20px;
  }

  .main-content {
    width: 100%;
    min-height: 100dvh;
  }

  .app-body .topbar {
    margin-right: -22px;
    margin-left: -22px;
    padding-left: 74px;
  }

  .dashboard-hero,
  .landing-hero,
  .public-feedback-card,
  .resident-feedback-filter-form,
  .content-grid,
  .inventory-toolbar,
  .issuance-layout,
  .calendar-layout,
  .user-role-grid,
  .report-filters,
  .announcement-toolbar,
  .calendar-toolbar,
  .users-toolbar {
    grid-template-columns: 1fr;
  }

  .inventory-toolbar {
    display: grid;
    align-items: stretch;
  }

  .inventory-toolbar-actions {
    justify-content: flex-end;
  }

  .toolbar-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stock-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid,
  .dashboard-stat-grid,
  .announcement-stats,
  .inventory-summary,
  .inventory-grid,
  .supplier-grid,
  .alert-summary-grid,
  .report-type-grid,
  .report-filter-grid,
  .public-shortcuts,
  .public-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-chart-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .public-filter-bar {
    grid-template-columns: minmax(0, 1fr) 180px;
  }

  .public-filter-bar small {
    grid-column: 1 / -1;
  }

  .report-filters {
    display: grid;
    align-items: stretch;
  }

  .announcement-toolbar {
    display: grid;
    align-items: stretch;
  }

  .calendar-toolbar {
    display: grid;
    align-items: stretch;
  }

  .users-toolbar {
    display: grid;
    align-items: stretch;
  }
}

@keyframes sidebar-backdrop-in {
  from {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .notification-popover {
    top: 72px;
    right: 14px;
    width: calc(100vw - 28px);
  }

  .notification-item {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 12px 14px;
  }

  .notification-item-icon {
    width: 30px;
    height: 30px;
  }

  .main-content,
  .public-nav,
  .landing-hero,
  .public-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .panel-header,
  .priority-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-body .topbar {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    min-height: 62px;
    margin-right: -16px;
    margin-left: -16px;
    margin-bottom: 18px;
    padding-right: 16px;
    padding-left: 68px;
  }

  .app-body .topbar h1 {
    min-width: 0;
    overflow: hidden;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-body .topbar-actions {
    flex: 0 0 auto;
    gap: 8px;
    margin-left: auto;
  }

  .sidebar-toggle {
    top: 10px;
    left: 12px;
    width: 40px;
    height: 40px;
  }

  .sidebar-nav,
  .stat-grid,
  .dashboard-stat-grid,
  .announcement-stats,
  .public-stats,
  .public-shortcuts,
  .public-filter-bar,
  .public-feedback-form-grid,
  .resident-feedback-filter-form,
  .public-footer-inner,
  .inventory-summary,
  .inventory-grid,
  .supplier-grid,
  .alert-summary-grid,
  .report-type-grid,
  .report-filter-grid,
  .supplier-details,
  .toolbar-main,
  .demo-form,
  .stock-form {
    grid-template-columns: 1fr;
  }

  .public-pagination {
    flex-wrap: wrap;
    justify-content: center;
  }

  .public-pagination > span {
    order: -1;
    width: 100%;
    text-align: center;
  }

  .public-feedback-card {
    padding: 18px;
  }

  .inventory-toolbar,
  .announcement-toolbar,
  .calendar-toolbar,
  .users-toolbar,
  .supplier-toolbar,
  .report-filters {
    gap: 14px;
    margin-bottom: 18px;
  }

  .toolbar-main label,
  .demo-form label,
  .supplier-modal-form label {
    min-width: 0;
  }

  .toolbar-main input,
  .toolbar-main select,
  .demo-form input,
  .demo-form select,
  .demo-form textarea,
  .public-feedback-form input,
  .public-feedback-form select,
  .public-feedback-form textarea,
  .resident-feedback-filter-form input,
  .resident-feedback-filter-form select,
  .supplier-modal-form input,
  .supplier-modal-form select,
  .supplier-modal-form textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .demo-form .span-2 {
    grid-column: 1 / -1;
  }

  .medicine-inventory-page .medicine-form-grid {
    grid-template-columns: 1fr;
  }

  .medicine-inventory-page .medicine-form-section {
    padding: 12px;
  }

  .medicine-inventory-page .medicine-category-label-row {
    align-items: stretch;
    flex-direction: column;
  }

  .medicine-inventory-page .medicine-add-category-button {
    width: 100%;
  }

  .medicine-inventory-page .medicine-category-actions {
    grid-template-columns: 1fr;
  }

  .inventory-toolbar-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .inventory-view-toggle {
    align-self: flex-start;
  }

  .inventory-add-btn,
  .supplier-add-button,
  .calendar-add-button,
  .announcement-new-button,
  .user-add-button,
  .report-actions .btn,
  .report-actions .ghost-button,
  .medicine-request-action-buttons .btn {
    width: 100%;
  }

  .medicine-inventory-page .inventory-grid.is-list .medicine-card,
  .medicine-inventory-page .inventory-grid.is-list .medicine-card-body {
    grid-template-columns: 1fr;
  }

  .medicine-inventory-page .inventory-grid.is-list {
    overflow-x: auto;
  }

  .medicine-inventory-page .inventory-grid.is-list .medicine-list-header,
  .medicine-inventory-page .inventory-grid.is-list .medicine-card-body {
    grid-template-columns: minmax(150px, 190px) 132px 70px 80px 140px 96px;
    min-width: 726px;
  }

  .medicine-inventory-page .inventory-grid.is-list .medicine-meta-grid {
    grid-column: auto;
    grid-row: auto;
  }

  .inventory-pagination {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .inventory-page-size {
    justify-content: space-between;
    width: 100%;
  }

  .inventory-page-size select {
    width: 86px;
    min-width: 86px;
    min-height: 44px;
    font-size: 16px;
  }

  .inventory-page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .inventory-page-numbers {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }

  .inventory-page-button {
    width: 100%;
    min-height: 44px;
  }

  .inventory-page-number {
    min-width: 42px;
    min-height: 42px;
    font-size: 13px;
  }

  .dashboard-hero {
    padding: 24px;
  }

  .dashboard-topbar {
    align-items: flex-start;
    gap: 12px;
  }

  .dashboard-user {
    border-left: 0;
    padding-left: 0;
  }

  .dashboard-alert {
    align-items: flex-start;
  }

  .dashboard-stat-card {
    min-height: 86px;
  }

  .dashboard-stat-modal {
    align-items: start;
    padding: 18px 12px;
    overflow-y: auto;
  }

  .dashboard-stat-modal-panel {
    width: 100%;
    max-height: none;
  }

  .dashboard-stat-modal-header {
    align-items: flex-start;
    padding: 16px;
  }

  .dashboard-stat-modal-summary,
  .dashboard-stat-breakdown-list {
    padding-left: 16px;
    padding-right: 16px;
  }

  .dashboard-stat-breakdown-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dashboard-stat-breakdown-row > span {
    white-space: normal;
  }

  .line-chart {
    height: 220px;
  }

  .weekly-bars {
    height: 170px;
  }

  .public-nav {
    height: auto;
    align-items: flex-start;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .public-nav-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
  }

  .landing-hero {
    min-height: 0;
    padding-top: 44px;
    padding-bottom: 52px;
  }

  .public-footer dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .footer-copy {
    margin-top: 0 !important;
  }

  .report-actions,
  .report-header,
  .main-content.announcements-page .announcement-card,
  .activity-card {
    flex-direction: column;
  }

  .report-header-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .report-header-actions .btn,
  .report-header-actions .ghost-button {
    width: 100%;
  }

  .activity-card {
    display: flex;
  }

  .activity-date {
    width: 72px;
  }

  .activity-meta {
    grid-template-columns: 1fr;
  }

  .access-card header {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .access-card .role-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .profile-card-body {
    align-items: flex-start;
    flex-direction: column;
  }

  .announcement-actions,
  .activity-actions {
    width: 100%;
  }

  .announcement-actions button,
  .activity-actions button,
  .card-actions button,
  .card-actions .btn,
  .supplier-modal-footer .btn,
  .confirm-modal-actions button {
    min-height: 44px;
  }

  .supplier-card-top,
  .supplier-card-footer {
    align-items: flex-start;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .supplier-card-top .status,
  .supplier-card-footer .card-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .app-body .dashboard-user {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .app-body .dashboard-user > div {
    display: none;
  }

  .app-body .dashboard-avatar {
    width: 32px;
    height: 32px;
  }

  .confirm-modal {
    align-items: end;
    padding: 12px;
  }

  .confirm-modal-panel {
    width: 100%;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 16px;
  }

  .confirm-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .supplier-modal,
  .medicine-inventory-page .medicine-edit-panel,
  .medicine-inventory-page .medicine-category-dialog,
  .dashboard-stat-modal-panel {
    width: 100%;
  }
}

.app-body .topbar h1 {
  font-size: 18px;
  font-weight: 600;
}

.app-body .dashboard-user strong,
.app-body .brand strong,
.app-body .sidebar-nav a,
.app-body .logout-link {
  font-weight: 600;
}

.app-body .dashboard-user small,
.app-body .brand small {
  font-weight: 500;
}

.app-body .panel-header h2,
.app-body .stock-section-title h2,
.app-body .supplier-table-header h2,
.app-body .stock-history-header h2,
.app-body .supplier-modal-header h2,
.app-body .report-header h2,
.app-body .users-table-header h2,
.app-body .access-card h2,
.app-body .profile-card h2 {
  font-size: 15px;
  font-weight: 600;
}

.app-body .panel-header p,
.app-body .supplier-table-header p,
.app-body .stock-history-header span,
.app-body .report-header p,
.app-body .access-card p {
  font-size: 12px;
  font-weight: 400;
}

.app-body .toolbar-main label,
.app-body .demo-form label,
.app-body .stock-page .stock-form label,
.app-body .stock-page .transaction-type,
.app-body .supplier-modal-form label,
.app-body .auth-form label {
  font-size: 12px;
  font-weight: 500;
}

.app-body input,
.app-body select,
.app-body textarea,
.app-body table,
.app-body td,
.app-body .medicine-description,
.app-body .supplier-table-header p {
  font-size: 13px;
  font-weight: 400;
}

.app-body th,
.app-body .medicine-meta-grid span,
.app-body .users-table-header span,
.app-body .medicine-card-panel-header h2,
.app-body .section-kicker {
  font-size: 11px;
  font-weight: 600;
}

.app-body .btn,
.app-body .ghost-button,
.app-body .inventory-add-btn,
.app-body .supplier-add-button,
.app-body .stock-page .stock-form .btn,
.app-body .card-actions button,
.app-body .medicine-inventory-page .card-actions button,
.app-body .supplier-submit-button,
.app-body .supplier-cancel-button {
  font-size: 13px;
  font-weight: 600;
}

.app-body .status,
.app-body .stock-type-badge,
.app-body .expired-flag,
.app-body .future-note-inline,
.app-body .role-badge {
  font-size: 11px;
  font-weight: 500;
}

.app-body .dashboard-stat-card strong,
.app-body .stock-counter-card strong,
.app-body .issuance-counter-card strong,
.app-body .supplier-stat-card strong,
.app-body .medicine-inventory-page .inventory-summary strong,
.app-body .alert-summary-card strong,
.app-body .stat-card strong {
  font-size: 22px;
  font-weight: 600;
}

.app-body .dashboard-stat-card span:not(.dashboard-stat-icon),
.app-body .stock-counter-card span:not(.stock-counter-icon),
.app-body .issuance-counter-card span:not(.issuance-counter-icon),
.app-body .supplier-stat-card span:not(.supplier-stat-icon),
.app-body .inventory-summary span,
.app-body .stat-card span {
  font-size: 12px;
  font-weight: 500;
}

.app-body .dashboard-stat-card small,
.app-body .stock-counter-card small,
.app-body .issuance-counter-card small,
.app-body .supplier-stat-card small,
.app-body .stat-card small {
  font-size: 12px;
  font-weight: 400;
}

.app-body .medicine-card-visual strong {
  font-size: clamp(22px, 2.1vw, 30px);
  font-weight: 500;
}

.app-body .medicine-title-row h3,
.app-body .medicine-inventory-page .medicine-title-row h3,
.app-body .supplier-card h2,
.app-body .suppliers-table td strong,
.app-body .stock-history-table td strong,
.app-body .medicine-meta-grid strong,
.app-body td strong {
  font-size: 13px;
  font-weight: 600;
}

.app-body .empty-state {
  font-weight: 500;
}

@media (max-width: 640px) {
  .app-body .topbar h1 {
    font-size: 17px;
    font-weight: 600;
  }

  .app-body .dashboard-stat-card strong,
  .app-body .stock-counter-card strong,
  .app-body .issuance-counter-card strong,
  .app-body .supplier-stat-card strong,
  .app-body .medicine-inventory-page .inventory-summary strong,
  .app-body .alert-summary-card strong,
  .app-body .stat-card strong {
    font-size: 20px;
  }
}

@media (max-width: 520px) {
  .app-body .dashboard-user {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .app-body .dashboard-user > div {
    display: none;
  }
}

@media (max-width: 640px) {
  .app-body {
    background: #e3f0e2;
  }

  .app-body .main-content {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    padding: 14px 16px 28px;
  }

  .app-body .topbar {
    min-width: 0;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 8px 22px rgba(18, 63, 72, 0.1);
  }

  .app-body .topbar-actions {
    min-width: 0;
  }

  .panel,
  .medicine-card-panel,
  .dashboard-alert,
  .inventory-toolbar,
  .calendar-toolbar,
  .report-filters,
  .issuance-layout,
  .issuance-page .panel,
  .calendar-activities-page .activity-card,
  .medicine-request-form-note,
  .medicine-request-form-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .inventory-toolbar,
  .calendar-toolbar {
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .medicine-inventory-page .toolbar-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .medicine-inventory-page .inventory-search-field {
    grid-column: 1 / -1;
  }

  .medicine-inventory-page .toolbar-main input,
  .medicine-inventory-page .toolbar-main select {
    min-width: 0;
    min-height: 38px;
    padding-right: 8px;
    padding-left: 10px;
    font-size: 12px;
  }

  .medicine-inventory-page .inventory-search-field input {
    padding-left: 36px !important;
  }

  .inventory-toolbar-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .inventory-view-toggle {
    align-self: stretch;
    min-height: 38px;
  }

  .inventory-add-btn {
    width: 100%;
    min-height: 38px;
  }

  .medicine-inventory-page .inventory-summary,
  .issuance-counter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .medicine-inventory-page .inventory-summary article,
  .issuance-counter-card,
  .announcement-stat-card {
    min-width: 0;
    min-height: 78px;
    padding: 12px;
  }

  .medicine-inventory-page .inventory-summary article,
  .issuance-counter-card {
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 10px;
  }

  .inventory-counter svg,
  .issuance-counter-icon,
  .announcement-stat-icon {
    width: 34px;
    height: 34px;
  }

  .medicine-card-panel .inventory-grid {
    padding: 12px;
  }

  .medicine-inventory-page .inventory-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  .medicine-card {
    width: 100%;
    min-width: 0;
  }

  .medicine-card-visual {
    min-height: 148px;
    padding: 28px 14px 20px;
  }

  .medicine-card-body {
    min-width: 0;
  }

  .medicine-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .medicine-inventory-page .card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .issuance-counter-grid {
    margin-bottom: 14px;
  }

  .issuance-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .issuance-form,
  .issuance-search {
    grid-template-columns: 1fr !important;
    width: 100%;
    min-width: 0;
  }

  .issuance-form-panel,
  .issuance-page .panel {
    overflow: hidden;
  }

  .issuance-form select,
  .issuance-form input,
  .issuance-form textarea {
    min-width: 0;
  }

  .calendar-activities-page .announcement-stats {
    gap: 12px;
  }

  .calendar-activities-page .activity-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .calendar-activities-page .activity-title-row {
    gap: 7px;
  }

  .calendar-activities-page .activity-title-row h2 {
    width: 100%;
  }

  .calendar-activities-page .activity-meta {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .calendar-activities-page .activity-actions {
    justify-content: flex-start;
  }

  .calendar-activities-page .activity-actions button {
    width: 44px;
  }

  .medicine-request-form-page .topbar {
    padding-left: 64px;
  }

  .medicine-request-form-page .topbar h1 {
    display: none;
  }

  .medicine-request-form-page .topbar-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 36px;
    width: 100%;
    gap: 8px;
  }

  .medicine-request-form-page .medicine-request-back-button,
  .medicine-request-form-page .medicine-request-page-print,
  .medicine-request-form-page .medicine-request-page-download {
    min-width: 0;
    min-height: 40px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .medicine-request-form-page .notification-button {
    width: 36px;
    height: 36px;
  }

  .medicine-request-form-page .dashboard-user {
    display: none;
  }

  .medicine-request-form-note {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .medicine-request-action-icon {
    width: 40px;
    height: 40px;
  }

  .medicine-request-form-note h2 {
    font-size: 16px;
    line-height: 1.25;
  }

  .medicine-request-form-panel {
    padding: 12px;
    overflow: hidden;
  }

  .medicine-request-paper {
    padding: 12px;
    font-size: 10px;
  }

  .request-form-title-block strong {
    font-size: 11px;
    line-height: 1.25;
  }

  .request-form-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 430px) {
  .resident-feedback-card-header,
  .resident-feedback-actions,
  .resident-feedback-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .resident-feedback-actions form,
  .resident-feedback-actions .btn,
  .resident-feedback-actions .ghost-button,
  .resident-feedback-filter-actions .btn,
  .resident-feedback-filter-actions .ghost-button {
    width: 100%;
  }

  .medicine-inventory-page .toolbar-main {
    grid-template-columns: 1fr;
  }

  .inventory-toolbar-actions {
    grid-template-columns: 1fr;
  }

  .inventory-view-toggle {
    width: max-content;
  }

  .medicine-inventory-page .inventory-summary,
  .issuance-counter-grid {
    grid-template-columns: 1fr;
  }

  .calendar-activities-page .announcement-stats {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body,
  .app-body {
    background: #fff !important;
    color: #111 !important;
  }

  .app-shell {
    display: block !important;
  }

  .sidebar,
  .sidebar-toggle,
  .sidebar-backdrop,
  .topbar,
  .report-type-grid,
  .report-filters,
  .report-header-actions,
  .confirm-modal,
  .notification-popover,
  .notification-button,
  .topbar-actions {
    display: none !important;
  }

  .main-content {
    width: 100% !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .medicine-request-form-page > :not(.medicine-request-form-panel) {
    display: none !important;
  }

  .medicine-request-form-page .medicine-request-form-panel {
    display: block !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .medicine-request-form-page .medicine-request-paper {
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    color: #111827 !important;
    font-size: 9.5px !important;
    line-height: 1.25 !important;
  }

  .medicine-request-form-page .request-form-title-block {
    gap: 3px !important;
    margin-bottom: 10px !important;
  }

  .medicine-request-form-page .request-form-title-block strong {
    font-size: 10.5px !important;
  }

  .medicine-request-form-page .request-form-field-grid,
  .medicine-request-form-page .request-form-total-grid,
  .medicine-request-form-page .request-form-signoff-grid {
    gap: 5px 14px !important;
  }

  .medicine-request-form-page .request-form-field span,
  .medicine-request-form-page .request-form-purpose span {
    min-height: 13px !important;
  }

  .medicine-request-form-page .request-form-purpose {
    gap: 5px !important;
    margin-top: 8px !important;
    margin-bottom: 10px !important;
  }

  .medicine-request-form-page .request-form-table-wrap {
    margin-bottom: 8px !important;
    overflow: visible !important;
  }

  .medicine-request-form-page .request-form-table {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 9px !important;
  }

  .medicine-request-form-page .request-form-table th,
  .medicine-request-form-page .request-form-table td {
    border: 1px solid #111827 !important;
    padding: 3px 5px !important;
    line-height: 1.2 !important;
  }

  .medicine-request-form-page .request-form-table td {
    height: 22px !important;
  }

  .medicine-request-form-page .request-form-signoff {
    margin-top: 10px !important;
    padding-top: 8px !important;
  }

  .medicine-request-form-page .request-form-signoff > b {
    margin-bottom: 8px !important;
  }

  .reports-page .report-panel {
    display: none !important;
  }

  .reports-page .report-panel.active {
    display: block !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #111 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .reports-page {
    display: block !important;
    color: #111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
  }

  .reports-page .print-report-letterhead {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 0 16px !important;
    border-bottom: 1.5px solid #111 !important;
    padding-bottom: 12px !important;
  }

  .reports-page .print-report-letterhead img {
    width: 52px !important;
    height: 52px !important;
    filter: grayscale(1) contrast(1.08) !important;
    object-fit: contain;
  }

  .reports-page .print-report-letterhead div {
    display: grid !important;
    gap: 2px !important;
  }

  .reports-page .print-report-letterhead strong {
    color: #111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }

  .reports-page .print-report-letterhead span {
    color: #111 !important;
    font-size: 10.5px !important;
    font-weight: 400 !important;
  }

  .reports-page .print-report-letterhead b {
    margin-top: 6px !important;
    color: #111 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
  }

  .reports-page .print-report-letterhead small {
    color: #333 !important;
    font-size: 10px !important;
    font-weight: 400 !important;
  }

  .reports-page .report-header {
    display: block !important;
    margin: 0 0 12px !important;
    border-bottom: 1px solid #999 !important;
    padding-bottom: 9px !important;
  }

  .reports-page .report-header h2 {
    margin: 0 0 4px !important;
    color: #111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
  }

  .reports-page .report-header p {
    margin: 0 !important;
    color: #333 !important;
    font-size: 10.5px !important;
    line-height: 1.4 !important;
  }

  .reports-page .report-chart {
    display: none !important;
  }

  .reports-page .monthly-usage-cards {
    display: none !important;
  }

  .reports-page .monthly-print-summary {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0 !important;
    margin: 0 0 12px !important;
    border: 1px solid #111 !important;
    color: #111 !important;
  }

  .reports-page .monthly-print-summary div {
    display: grid !important;
    gap: 3px !important;
    border-right: 1px solid #777 !important;
    padding: 7px 8px !important;
  }

  .reports-page .monthly-print-summary div:last-child {
    border-right: 0 !important;
  }

  .reports-page .monthly-print-summary span {
    color: #333 !important;
    font-size: 8.8px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-transform: uppercase !important;
  }

  .reports-page .monthly-print-summary strong {
    color: #111 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
  }

  .reports-page .monthly-print-table {
    display: block !important;
  }

  .reports-page .table-wrap {
    overflow: visible !important;
    width: 100% !important;
  }

  .reports-page .report-movement-scroll {
    max-height: none !important;
    overflow: visible !important;
  }

  .reports-page table {
    min-width: 0 !important;
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1px solid #111 !important;
    margin-top: 6px !important;
    table-layout: fixed !important;
    page-break-inside: auto;
  }

  .reports-page .monthly-usage-print-report .monthly-print-month {
    width: 12% !important;
  }

  .reports-page .monthly-usage-print-report .monthly-print-units {
    width: 12% !important;
  }

  .reports-page .monthly-usage-print-report .monthly-print-top {
    width: 19% !important;
  }

  .reports-page .monthly-usage-print-report .monthly-print-medicines {
    width: 24% !important;
  }

  .reports-page .monthly-usage-print-report .monthly-print-used {
    width: 25% !important;
  }

  .reports-page .monthly-usage-print-report .monthly-print-trend {
    width: 8% !important;
  }

  .reports-page thead {
    display: table-header-group;
  }

  .reports-page tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }

  .reports-page th,
  .reports-page td {
    border: 1px solid #777 !important;
    padding: 6px 7px !important;
    color: #111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 9.2px !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere !important;
    vertical-align: top !important;
  }

  .reports-page th {
    background: #f2f2f2 !important;
    color: #111 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
  }

  .reports-page td strong {
    color: #111 !important;
    font-weight: 700 !important;
  }

  .reports-page .status {
    display: inline !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #111 !important;
    padding: 0 !important;
    font-size: 9.2px !important;
    font-weight: 600 !important;
  }

  .reports-page .monthly-report-list {
    display: block !important;
    max-width: none !important;
    color: #111 !important;
    font-size: 9.2px !important;
    line-height: 1.4 !important;
  }

  .medicine-request-form-page .request-form-table th,
  .medicine-request-form-page .request-form-table td {
    border: 1px solid #111827 !important;
    padding: 3px 5px !important;
    color: #111827 !important;
    font-size: 9px !important;
    line-height: 1.2 !important;
  }

  .medicine-request-form-page .request-form-table th {
    background: #f3f4f6 !important;
  }
}
