:root {
  --pzl-navy: #1b3a6b;
  --pzl-navy-dark: #071750;
  --pzl-mint: #33d6a6;
  --pzl-gold: #e8b84b;
  --pzl-coral: #ff6b6b;
  --pzl-ink: #203453;
  --pzl-muted: #6d7c91;
  --pzl-line: #dfe7ef;
  --pzl-bg: #f5f7fa;
}

body.rifd-zero-list-open {
  overflow: hidden !important;
}

#rifd-pharmacy-zero-list[hidden] {
  display: none !important;
}

#rifd-pharmacy-zero-list {
  position: fixed;
  inset: 0;
  z-index: 9010;
  overflow: auto;
  color: var(--pzl-ink);
  background:
    radial-gradient(circle at 6% 0%, rgba(51, 214, 166, .13), transparent 30rem),
    linear-gradient(180deg, #eef4f7 0, var(--pzl-bg) 240px);
  font-family: "Tajawal", "IBM Plex Sans Arabic", Tahoma, "Segoe UI", Arial, sans-serif;
}

.pzl-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 0 max(24px, 4vw);
  border-bottom: 1px solid rgba(27, 58, 107, .12);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 30px rgba(27, 58, 107, .06);
  backdrop-filter: blur(16px);
}

.pzl-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pzl-brand-mark {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--pzl-coral), #e54958);
  box-shadow: 0 8px 18px rgba(229, 73, 88, .22);
  font-size: 21px;
  font-weight: 900;
}

.pzl-brand strong,
.pzl-brand small {
  display: block;
}

.pzl-brand strong {
  color: var(--pzl-navy);
  font-size: 15px;
  font-weight: 900;
}

.pzl-brand small {
  margin-top: 3px;
  color: var(--pzl-muted);
  font-size: 10px;
}

.pzl-back,
.pzl-icon-button,
.pzl-btn,
.pzl-upload {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.pzl-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 15px;
  border: 1px solid var(--pzl-line);
  border-radius: 13px;
  color: var(--pzl-navy);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.pzl-back > span:first-child {
  font-size: 19px;
  line-height: 1;
}

.pzl-icon-button {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid var(--pzl-line);
  border-radius: 13px;
  color: var(--pzl-navy);
  background: #fff;
  font-size: 24px;
  line-height: 1;
}

.pzl-back:hover,
.pzl-icon-button:hover {
  border-color: rgba(27, 58, 107, .30);
  background: #f7fafc;
}

.pzl-main {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.pzl-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .72fr);
  align-items: end;
  gap: 36px;
  margin-bottom: 28px;
  padding: 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .44);
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 30%, rgba(255, 107, 107, .20), transparent 25rem),
    linear-gradient(135deg, #0a2455, var(--pzl-navy));
  box-shadow: 0 20px 44px rgba(7, 23, 80, .14);
}

.pzl-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 11px;
  border: 1px solid rgba(51, 214, 166, .42);
  border-radius: 999px;
  color: #8af0d2;
  background: rgba(51, 214, 166, .10);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pzl-hero h1 {
  margin: 14px 0 8px;
  font-size: clamp(31px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.pzl-hero p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 15px;
  line-height: 1.8;
}

.pzl-actions {
  display: grid;
  grid-template-columns: minmax(150px, .55fr) minmax(190px, 1fr);
  gap: 12px;
}

.pzl-month-field,
.pzl-upload {
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 15px;
  background: rgba(255, 255, 255, .09);
}

.pzl-month-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 9px 13px;
}

.pzl-month-field span,
.pzl-upload small {
  color: rgba(255, 255, 255, .66);
  font-size: 10px;
}

.pzl-month-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  color-scheme: dark;
  font: 800 14px/1.2 "IBM Plex Sans Arabic", Arial, sans-serif;
}

.pzl-upload {
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: #fff;
  background: rgba(51, 214, 166, .14);
}

.pzl-upload:hover {
  border-color: rgba(51, 214, 166, .56);
  background: rgba(51, 214, 166, .20);
}

.pzl-upload.disabled {
  cursor: not-allowed;
  opacity: .48;
}

.pzl-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.pzl-upload strong,
.pzl-upload small {
  display: block;
}

.pzl-upload strong {
  font-size: 13px;
  font-weight: 900;
}

.pzl-upload small {
  margin-top: 4px;
}

.pzl-actions > .pzl-btn {
  grid-column: 1 / -1;
  min-height: 44px;
}

.pzl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 18px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 900;
}

.pzl-btn.primary {
  color: #071f36;
  background: var(--pzl-mint);
}

.pzl-btn.secondary {
  border: 1px solid var(--pzl-line);
  color: var(--pzl-navy);
  background: #fff;
}

.pzl-actions .pzl-btn.secondary {
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
  background: rgba(255, 255, 255, .09);
}

.pzl-btn:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.pzl-notice,
.pzl-read-only {
  margin-bottom: 18px;
  padding: 13px 16px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 800;
}

.pzl-notice.success {
  border: 1px solid rgba(35, 177, 134, .26);
  color: #0b7659;
  background: #e9fbf5;
}

.pzl-notice.error {
  border: 1px solid rgba(229, 73, 88, .22);
  color: #a52838;
  background: #fff0f2;
}

.pzl-read-only {
  border: 1px solid rgba(232, 184, 75, .34);
  color: #735514;
  background: #fff8e5;
}

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

.pzl-stat {
  position: relative;
  min-height: 132px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--pzl-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 30px rgba(27, 58, 107, .06);
}

.pzl-stat-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin-bottom: 17px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--tone) 14%, transparent);
}

.pzl-stat.navy { --tone: var(--pzl-navy); }
.pzl-stat.mint { --tone: #20b88d; }
.pzl-stat.gold { --tone: var(--pzl-gold); }
.pzl-stat.coral { --tone: var(--pzl-coral); }

.pzl-stat strong,
.pzl-stat > span:last-child {
  display: block;
}

.pzl-stat strong {
  color: var(--pzl-navy-dark);
  font-family: "IBM Plex Sans Arabic", "Tajawal", Arial, sans-serif;
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
}

.pzl-stat > span:last-child {
  margin-top: 10px;
  color: var(--pzl-muted);
  font-size: 12px;
  font-weight: 700;
}

.pzl-panel {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--pzl-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 12px 32px rgba(27, 58, 107, .055);
}

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

.pzl-panel-heading h2 {
  margin: 0;
  color: var(--pzl-navy);
  font-size: 22px;
  font-weight: 900;
}

.pzl-panel-heading p {
  margin: 5px 0 0;
  color: var(--pzl-muted);
  font-size: 12px;
}

.pzl-panel-heading select,
.pzl-search {
  min-height: 43px;
  border: 1px solid var(--pzl-line);
  border-radius: 12px;
  color: var(--pzl-ink);
  background: #f9fbfc;
}

.pzl-panel-heading select {
  min-width: 180px;
  padding: 0 12px;
  font: 700 13px/1 "Tajawal", Arial, sans-serif;
}

.pzl-search {
  display: flex;
  align-items: center;
  min-width: min(310px, 100%);
  padding: 0 12px;
}

.pzl-search span {
  color: var(--pzl-muted);
  font-size: 20px;
}

.pzl-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 9px;
  color: var(--pzl-ink);
  background: transparent;
  font: 700 13px/1 "Tajawal", Arial, sans-serif;
}

.pzl-bars {
  display: flex;
  align-items: end;
  gap: 12px;
  min-height: 230px;
  padding: 14px 4px 0;
  overflow-x: auto;
}

.pzl-bar-column {
  display: grid;
  grid-template-rows: 24px 150px 24px;
  gap: 6px;
  min-width: 62px;
  border: 0;
  color: var(--pzl-muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.pzl-bar-value,
.pzl-bar-label {
  font: 800 11px/1 "IBM Plex Sans Arabic", Arial, sans-serif;
}

.pzl-bar-track {
  position: relative;
  display: block;
  width: 34px;
  height: 150px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  background: #edf2f5;
}

.pzl-bar-fill {
  position: absolute;
  inset: auto 0 0;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--pzl-mint), #1b9c78);
  transition: height 220ms ease;
}

.pzl-bar-column:hover .pzl-bar-fill,
.pzl-bar-column.active .pzl-bar-fill {
  background: linear-gradient(180deg, var(--pzl-gold), #d59022);
}

.pzl-bar-column.active .pzl-bar-label {
  color: var(--pzl-navy);
}

.pzl-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e7edf2;
  border-radius: 15px;
}

.pzl-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  text-align: start;
}

.pzl-table th,
.pzl-table td {
  padding: 14px 15px;
  border-bottom: 1px solid #eaf0f4;
  text-align: start;
  vertical-align: middle;
}

.pzl-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #66758a;
  background: #f7f9fb;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .035em;
}

.pzl-table td {
  color: #56677d;
  font-size: 12px;
}

.pzl-table tbody tr:last-child td {
  border-bottom: 0;
}

.pzl-table tbody tr:hover td {
  background: #fbfdfd;
}

.pzl-table td strong {
  color: var(--pzl-ink);
  font-size: 13px;
}

.pzl-table td small {
  display: block;
  margin-top: 3px;
  color: var(--pzl-muted);
  font-size: 10px;
}

.pzl-table code {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--pzl-navy);
  background: #edf3f8;
  font: 800 11px/1 "IBM Plex Sans Arabic", monospace;
}

.pzl-frequency {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 30px;
  padding: 0 8px;
  border-radius: 9px;
  color: #087257;
  background: #e7faf4;
  font: 900 12px/1 "IBM Plex Sans Arabic", Arial, sans-serif;
}

.pzl-frequency.high {
  color: #a52838;
  background: #ffedf0;
}

.pzl-month-pill {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #725411;
  background: #fff5d8;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.pzl-table-empty,
.pzl-mini-empty,
.pzl-loading,
.pzl-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  color: var(--pzl-muted);
  text-align: center;
  font-size: 13px;
}

.pzl-loading,
.pzl-empty {
  min-height: 390px;
  border: 1px dashed #cad6df;
  border-radius: 22px;
  background: rgba(255, 255, 255, .72);
}

.pzl-loading {
  align-content: center;
  gap: 14px;
}

.pzl-spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #dfe9ee;
  border-top-color: var(--pzl-mint);
  border-radius: 50%;
  animation: pzl-spin .75s linear infinite;
}

.pzl-empty {
  align-content: center;
  padding: 40px;
}

.pzl-empty-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 24px;
  color: #fff;
  background: var(--pzl-coral);
  font-size: 31px;
  font-weight: 900;
}

.pzl-empty h2 {
  margin: 18px 0 8px;
  color: var(--pzl-navy);
  font-size: 22px;
}

.pzl-empty p {
  max-width: 500px;
  margin: 0;
  line-height: 1.8;
}

.pzl-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 16, 47, .64);
  backdrop-filter: blur(7px);
}

.pzl-modal {
  width: min(920px, 100%);
  max-height: min(820px, calc(100dvh - 40px));
  overflow: auto;
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(4, 16, 47, .34);
}

.pzl-modal > header,
.pzl-modal > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
}

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

.pzl-modal > header > div > span {
  color: #15936f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pzl-modal h2 {
  margin: 6px 0 4px;
  color: var(--pzl-navy);
  font-size: 24px;
}

.pzl-modal p {
  margin: 0;
  color: var(--pzl-muted);
  font-size: 12px;
}

.pzl-review-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 24px 0;
}

.pzl-review-meta > div {
  padding: 13px;
  border: 1px solid var(--pzl-line);
  border-radius: 12px;
  background: #f8fafb;
}

.pzl-review-meta span,
.pzl-review-meta strong {
  display: block;
}

.pzl-review-meta span {
  color: var(--pzl-muted);
  font-size: 10px;
}

.pzl-review-meta strong {
  margin-top: 6px;
  color: var(--pzl-navy);
  font-size: 15px;
}

.pzl-review-file {
  margin: 14px 24px;
  padding: 13px 15px;
  border-radius: 12px;
  color: #0d7257;
  background: #eafaf5;
}

.pzl-review-file strong,
.pzl-review-file span {
  display: block;
}

.pzl-review-file span {
  margin-top: 5px;
  color: #478274;
  font-size: 10px;
}

.pzl-modal > .pzl-table-wrap {
  width: auto;
  margin: 0 24px;
}

.pzl-modal > footer {
  justify-content: flex-end;
  border-top: 1px solid var(--pzl-line);
}

@keyframes pzl-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1050px) {
  .pzl-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .pzl-topbar {
    grid-template-columns: auto 1fr auto;
    min-height: 68px;
    padding: 0 14px;
  }

  .pzl-back {
    width: 43px;
    padding: 0;
    justify-content: center;
  }

  .pzl-back > span:last-child,
  .pzl-brand small {
    display: none;
  }

  .pzl-brand {
    justify-self: center;
  }

  .pzl-main {
    width: min(100% - 22px, 680px);
    padding: 20px 0 100px;
  }

  .pzl-hero {
    gap: 24px;
    padding: 24px 18px;
    border-radius: 21px;
  }

  .pzl-hero h1 {
    font-size: 31px;
  }

  .pzl-actions {
    grid-template-columns: 1fr;
  }

  .pzl-actions > .pzl-btn {
    grid-column: auto;
  }

  .pzl-stats {
    gap: 10px;
  }

  .pzl-stat {
    min-height: 118px;
    padding: 18px;
    border-radius: 17px;
  }

  .pzl-stat strong {
    font-size: 27px;
  }

  .pzl-panel {
    padding: 17px 13px;
    border-radius: 18px;
  }

  .pzl-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .pzl-panel-heading select,
  .pzl-search {
    width: 100%;
    min-width: 0;
  }

  .pzl-review-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 15px;
  }

  .pzl-modal > header,
  .pzl-modal > footer {
    padding-inline: 15px;
  }

  .pzl-review-file {
    margin-inline: 15px;
  }

  .pzl-modal > .pzl-table-wrap {
    margin-inline: 15px;
  }
}

@media (max-width: 440px) {
  .pzl-stats {
    grid-template-columns: 1fr 1fr;
  }

  .pzl-stat {
    min-height: 108px;
    padding: 15px;
  }

  .pzl-review-meta {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pzl-spinner {
    animation-duration: 2s;
  }

  .pzl-bar-fill {
    transition: none;
  }
}
