/* Isolated Partner Dashboard. Do not import landing-page component CSS. */

:root {
  --pd-green: #2ecc71;
  --pd-green-dark: #27ae60;
  --pd-green-soft: #f3fbf6;
  --pd-ink: #1b1b1b;
  --pd-muted: #6b7280;
  --pd-line: #eceef1;
  --pd-bg: #f6f7f8;
  --pd-surface: #ffffff;
  --pd-font: "Poppins", system-ui, sans-serif;
  --pd-sidebar: 220px;
  --pd-radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--pd-bg);
  color: var(--pd-ink);
  font-family: var(--pd-font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body.pd-drawer-open {
  overflow: hidden;
}

#pd-app {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  min-height: 100vh;
  width: 100%;
}

#pd-sidebar {
  position: relative;
  flex: 0 0 var(--pd-sidebar);
  width: var(--pd-sidebar);
  min-height: 100vh;
  background: var(--pd-surface);
  border-right: 1px solid var(--pd-line);
  padding: 24px 16px 16px;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.pd-sidebar__brand img {
  height: 22px;
  width: auto;
  display: block;
}

.pd-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 36px;
}

.pd-nav__link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--pd-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.pd-nav__link:hover {
  color: var(--pd-ink);
  background: #f4f5f6;
}

.pd-nav__link.is-active {
  color: var(--pd-ink);
  background: var(--pd-green-soft);
  box-shadow: inset 2px 0 0 var(--pd-green);
}

.pd-sidebar__foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--pd-line);
}

.pd-partner-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.pd-partner-chip strong,
.pd-partner-chip small {
  display: block;
}

.pd-partner-chip small {
  color: var(--pd-muted);
  font-size: 12px;
}

.pd-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--pd-ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.pd-avatar--lg {
  width: 36px;
  height: 36px;
}

.pd-main {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: calc(100% - var(--pd-sidebar));
  padding: 20px 28px 40px;
  align-self: flex-start;
}

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

.pd-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pd-muted);
  font-weight: 500;
}

.pd-header__partner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.pd-header__partner strong {
  font-size: 18px;
  font-weight: 600;
}

.pd-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--pd-muted);
  border: 1px solid var(--pd-line);
  border-radius: 999px;
  padding: 2px 8px;
  background: #fff;
}

.pd-badge.is-live {
  color: var(--pd-green-dark);
  border-color: #cfeedd;
  background: var(--pd-green-soft);
}

.pd-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pd-seg-group {
  display: flex;
  background: #fff;
  border: 1px solid var(--pd-line);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.pd-seg {
  border: 0;
  background: transparent;
  color: var(--pd-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.pd-seg.is-on {
  background: var(--pd-ink);
  color: #fff;
}

.pd-custom-dates {
  display: flex;
  gap: 6px;
}

.pd-custom-dates input {
  border: 1px solid var(--pd-line);
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
}

.pd-menu {
  display: none;
  border: 1px solid var(--pd-line);
  background: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
}

#pd-filters {
  display: none;
}

.pd-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.pd-select span {
  font-size: 11px;
  color: var(--pd-muted);
}

.pd-select select,
.pd-search {
  border: 1px solid var(--pd-line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  color: var(--pd-ink);
}

.pd-search {
  min-width: 240px;
}

#pd-page {
  display: block;
  max-width: 920px;
  margin: 0;
}

#pd-page > * + * {
  margin-top: 16px;
}

.pd-welcome h1,
.pd-pagehead h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.pd-welcome p,
.pd-pagehead p {
  margin: 0;
  color: var(--pd-muted);
}

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

.pd-kpi-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.pd-kpi,
.pd-panel {
  background: var(--pd-surface);
  border: 1px solid var(--pd-line);
  border-radius: var(--pd-radius);
}

.pd-kpi {
  padding: 16px 18px 18px;
  overflow: visible;
  position: relative;
}

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

.pd-kpi__label {
  color: var(--pd-muted);
  font-size: 12px;
  font-weight: 500;
}

.pd-kpi__value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.pd-kpi__trend {
  margin-top: 8px;
  font-size: 12px;
}

.pd-kpi__hint {
  margin: 8px 0 0;
  color: var(--pd-muted);
  font-size: 12px;
}

.is-up {
  color: var(--pd-green-dark);
}

.is-down {
  color: #b42318;
}

.is-flat {
  color: var(--pd-muted);
}

.pd-info {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--pd-line);
  background: #fff;
  color: var(--pd-muted);
  font-size: 11px;
  line-height: 1;
  cursor: help;
  position: relative;
}

.pd-info:hover::after,
.pd-info:focus::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: var(--pd-ink);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 8px;
  z-index: 20;
  text-align: left;
}

.pd-panel {
  padding: 20px 22px 22px;
}

.pd-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pd-panel h2,
.pd-panel h3,
.pd-split h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

.pd-panel__head h2 {
  margin: 0;
}

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

.pd-hero__grid .pd-kpi {
  border: 0;
  padding: 8px 4px 4px;
}

.pd-hero__note {
  margin: 16px 0 0;
  color: var(--pd-muted);
  font-size: 13px;
}

.pd-chart {
  width: 100%;
  height: auto;
  display: block;
}

.pd-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}

.pd-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pd-muted);
  font-size: 12px;
}

.pd-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pd-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--pd-line);
  border-radius: var(--pd-radius);
}

.pd-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.pd-table th,
.pd-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--pd-line);
  white-space: nowrap;
}

.pd-table th {
  font-size: 12px;
  font-weight: 500;
  color: var(--pd-muted);
}

.pd-table tr.is-own {
  background: var(--pd-green-soft);
}

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

.pd-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.pd-switch-list,
.pd-mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pd-switch-list li,
.pd-mini-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--pd-line);
}

.pd-switch-list__flow {
  color: var(--pd-ink);
}

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

.pd-price-stats span {
  display: block;
  color: var(--pd-muted);
  font-size: 12px;
}

.pd-price-stats strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.pd-price-bar {
  position: relative;
  height: 8px;
  background: #eef0f2;
  border-radius: 99px;
  margin: 18px 0 10px;
}

.pd-price-bar__avg,
.pd-price-bar__own {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pd-price-bar__own {
  background: var(--pd-green);
}

.pd-price-bar__avg {
  background: #9ca3af;
}

.pd-price-legend {
  display: flex;
  gap: 16px;
  color: var(--pd-muted);
  font-size: 12px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.dot-own {
  background: var(--pd-green);
}

.dot-avg {
  background: #9ca3af;
}

.pd-geo__row,
.pd-hbar {
  display: grid;
  grid-template-columns: 110px 1fr 64px;
  gap: 12px;
  align-items: center;
  margin: 10px 0;
}

.pd-geo__track,
.pd-hbar__track {
  height: 8px;
  background: #eef0f2;
  border-radius: 99px;
  overflow: hidden;
}

.pd-geo__track span,
.pd-hbar__track span {
  display: block;
  height: 100%;
  background: var(--pd-ink);
  border-radius: 99px;
}

.pd-geo__row strong,
.pd-hbar__value {
  text-align: right;
  font-size: 12px;
}

.pd-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.pd-linkish {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

.pd-linkish small {
  display: block;
  color: var(--pd-muted);
  font-size: 12px;
}

.pd-empty {
  background: #fff;
  border: 1px solid var(--pd-line);
  border-radius: var(--pd-radius);
  padding: 48px 24px;
  text-align: center;
}

.pd-empty h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.pd-empty p {
  margin: 0;
  color: var(--pd-muted);
}

.pd-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(27, 27, 27, 0.28);
  z-index: 40;
}

.pd-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100vh;
  background: #fff;
  z-index: 50;
  padding: 28px 24px 40px;
  overflow: auto;
  border-left: 1px solid var(--pd-line);
}

.pd-drawer__close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 0;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--pd-muted);
}

.pd-setting {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--pd-line);
}

@media (max-width: 1100px) {
  .pd-kpi-grid,
  .pd-kpi-grid--4,
  .pd-hero__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pd-main {
    padding: 16px 18px 36px;
  }
}

@media (max-width: 900px) {
  #pd-app {
    display: block;
  }

  #pd-app.is-nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(27, 27, 27, 0.28);
    z-index: 20;
  }

  #pd-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 30;
    width: var(--pd-sidebar);
    min-height: 100vh;
    height: 100vh;
    transform: translateX(-102%);
    transition: transform 160ms ease;
  }

  #pd-app.is-nav-open #pd-sidebar {
    transform: none;
  }

  .pd-main {
    width: 100%;
    max-width: 100%;
  }

  .pd-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .pd-split,
  .pd-price-stats,
  .pd-kpi-grid--2 {
    grid-template-columns: 1fr;
  }

  .pd-welcome h1,
  .pd-pagehead h1 {
    font-size: 22px;
  }

  .pd-geo__row,
  .pd-hbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pd-kpi-grid,
  .pd-kpi-grid--4,
  .pd-hero__grid {
    grid-template-columns: 1fr;
  }

  #pd-header,
  .pd-header__right {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Sign-in (email + code) */
#pd-app[hidden] {
  display: none !important;
}

.pd-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(1200px 500px at 50% -10%, var(--pd-green-soft), var(--pd-bg));
}

.pd-auth__card {
  width: 100%;
  max-width: 400px;
  padding: 32px 28px 26px;
  border: 1px solid var(--pd-line);
  border-radius: 18px;
  background: var(--pd-surface);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
}

.pd-auth__logo {
  display: block;
  height: 36px;
  width: auto;
  margin: 0 0 22px;
}

.pd-auth h1 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

.pd-auth__lead {
  margin: 0 0 18px;
  color: var(--pd-muted);
  line-height: 1.55;
}

.pd-auth__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.pd-auth input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d5d9de;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
}

.pd-auth input:focus {
  outline: none;
  border-color: var(--pd-green);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.18);
}

.pd-auth__code {
  letter-spacing: 0.4em;
  font-size: 22px !important;
  font-weight: 700;
  text-align: center;
}

.pd-auth__btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--pd-green);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.pd-auth__btn:hover {
  background: var(--pd-green-dark);
}

.pd-auth__btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.pd-auth__info,
.pd-auth__error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.pd-auth__info {
  background: var(--pd-green-soft);
  color: #166534;
}

.pd-auth__error {
  background: #fef2f2;
  color: #b42318;
}

.pd-auth__foot {
  margin: 14px 0 0;
  color: var(--pd-muted);
  font-size: 12px;
  text-align: center;
}

.pd-auth__links {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
}

.pd-auth__link {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--pd-green-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Partner switch (Pricely team) + sign out */
.pd-switch {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0 4px;
  font-size: 11px;
  color: var(--pd-muted);
}

.pd-switch select {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--pd-line);
  border-radius: 8px;
  background: var(--pd-surface);
  font: inherit;
  font-size: 13px;
  color: var(--pd-ink);
}

.pd-signout {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* ---- Live tabs: actions upload + challenge receipts ---- */
:root {
  --pd-accent: var(--pd-green);
  --pd-accent-soft: var(--pd-green-soft);
}

body.pd-theme-spin {
  --pd-accent: #d42a2f;
  --pd-accent-soft: #fdf1f1;
}

.pd-nav__section {
  margin: 16px 10px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}

.pd-brandhead {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pd-brandhead__logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}

.pd-pagehead--brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pd-pagehead__logo {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(212, 42, 47, 0.14);
}

.pd-muted {
  color: var(--pd-muted);
  font-size: 13px;
}

.pd-upload__lead {
  margin: -4px 0 14px;
}

.pd-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-bottom: 16px;
}

.pd-kinds__title {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pd-muted);
}

.pd-kinds__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pd-pill {
  padding: 8px 14px;
  border: 1px solid var(--pd-line);
  border-radius: 999px;
  background: #fff;
  color: var(--pd-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.pd-pill.is-on {
  border-color: var(--pd-accent);
  background: var(--pd-accent-soft);
  color: var(--pd-accent);
  font-weight: 600;
}

.pd-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.pd-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pd-muted);
}

.pd-field input,
.pd-field textarea {
  padding: 10px 12px;
  border: 1px solid #d5d9de;
  border-radius: 10px;
  background: #fff;
  color: var(--pd-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 400;
}

.pd-field input:focus,
.pd-field textarea:focus {
  outline: none;
  border-color: var(--pd-accent);
  box-shadow: 0 0 0 3px var(--pd-accent-soft);
}

.pd-field--wide {
  margin-bottom: 14px;
}

.pd-form-grid .pd-field--wide {
  margin-bottom: 0;
}

.pd-drops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 10px;
}

.pd-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 14px;
  border: 1.5px dashed #cfd5dc;
  border-radius: 14px;
  background: #fafbfc;
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.pd-drop:hover {
  border-color: var(--pd-accent);
  background: var(--pd-accent-soft);
}

.pd-drop.is-busy {
  opacity: 0.6;
  cursor: default;
}

.pd-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pd-drop__icon {
  font-size: 26px;
}

.pd-files {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.pd-files li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--pd-line);
  font-size: 13px;
}

.pd-files__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-files__size {
  color: var(--pd-muted);
  font-size: 12px;
}

.pd-files__x {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: #f3f4f6;
  font-size: 16px;
  cursor: pointer;
}

.pd-alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.pd-alert.is-error {
  background: #fef2f2;
  color: #b42318;
}

.pd-alert.is-ok {
  background: var(--pd-green-soft);
  color: #166534;
}

.pd-progress {
  height: 8px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: #eef0f3;
  overflow: hidden;
}

.pd-progress div {
  height: 100%;
  border-radius: 999px;
  background: var(--pd-accent);
  transition: width 160ms ease;
}

.pd-btn {
  min-width: 160px;
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--pd-accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.pd-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.pd-upitem {
  padding: 14px 0;
  border-bottom: 1px solid var(--pd-line);
}

.pd-upitem:last-child {
  border-bottom: 0;
}

.pd-upitem__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.pd-upitem__note {
  margin: 6px 0 0;
  font-size: 13px;
}

.pd-upitem__files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pd-upitem__meta {
  margin: 8px 0 0;
  font-size: 12px;
}

.pd-tag {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.pd-tag.is-standard {
  background: #eef2ff;
  color: #3730a3;
}

.pd-tag.is-special {
  background: var(--pd-accent-soft);
  color: var(--pd-accent);
}

.pd-chip {
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--pd-line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-chip:hover {
  border-color: var(--pd-accent);
}

.pd-link-danger {
  margin-left: auto;
  border: 0;
  background: none;
  color: #b42318;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pd-kpi--accent {
  border-color: var(--pd-accent);
  background: linear-gradient(180deg, var(--pd-accent-soft), #fff 70%);
}

.pd-kpi--accent .pd-kpi__value {
  color: var(--pd-accent);
}

.pd-totals .pd-kpi__value {
  font-size: 30px;
}

.pd-dayfilter__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.pd-dayfilter__updated {
  margin-left: auto;
  align-self: center;
}

.pd-icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--pd-line);
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  cursor: pointer;
}

.pd-daychips {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pd-daychip {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--pd-line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pd-daychip b {
  margin-left: 4px;
  color: var(--pd-accent);
}

.pd-daychip.is-on {
  border-color: var(--pd-accent);
  background: var(--pd-accent-soft);
}

.pd-num {
  text-align: right;
  white-space: nowrap;
}

.pd-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
}

.pd-link {
  color: var(--pd-accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.pd-note {
  margin: 12px 0 0;
}

@media (max-width: 900px) {
  .pd-form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pd-form-grid .pd-field--wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .pd-drops {
    grid-template-columns: 1fr;
  }

  .pd-pagehead__logo {
    width: 54px;
    height: 54px;
  }

  .pd-dayfilter__updated {
    margin-left: 0;
    width: 100%;
  }

  .pd-only-wide {
    display: none;
  }

  .pd-only-narrow {
    display: block !important;
  }
}

.pd-only-narrow {
  display: none;
}

.pd-rtable td.pd-wrap {
  white-space: normal;
  min-width: 180px;
}

.pd-rtable td > div {
  margin-top: 3px;
}

.pd-rcard {
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--pd-line);
  border-left: 3px solid var(--pd-accent);
  border-radius: 12px;
  background: #fff;
}

.pd-rcard__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.pd-rcard__top strong {
  font-size: 17px;
}

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

.pd-rcard__place {
  margin: 4px 0 8px;
  font-size: 13px;
}

.pd-rcard dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  margin: 0 0 8px;
  font-size: 12px;
}

.pd-rcard dt {
  color: var(--pd-muted);
}

.pd-rcard dd {
  margin: 0;
  word-break: break-all;
}


.pd-table .pd-num {
  text-align: right;
}

/* "Vidi još" under the receipts list */
.pd-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  text-align: center;
}
.pd-more__btn {
  min-width: 180px;
}
@media (max-width: 640px) {
  .pd-more {
    flex-direction: column;
  }
  .pd-more__btn {
    width: 100%;
  }
}

/* ---- Mlekara Lazar: theme, challenge photos, clicks ---- */
body.pd-theme-lazar {
  --pd-accent: #0a93c4;
  --pd-accent-soft: #eaf7fc;
}

body.pd-theme-lazar .pd-brandhead__logo {
  border-radius: 50%;
}

.pd-empty-panel {
  text-align: center;
  padding: 40px 20px;
}

.pd-empty-panel h2 {
  margin: 0 0 6px;
}

.pd-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.pd-gallery__item {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--pd-border, #e5e7eb);
  border-radius: 12px;
  background: #f3f4f6;
  cursor: zoom-in;
}

.pd-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.pd-gallery__item:hover img,
.pd-gallery__item:focus-visible img {
  transform: scale(1.04);
}

.pd-gallery__item:focus-visible {
  outline: 2px solid var(--pd-accent);
  outline-offset: 2px;
}

.pd-gallery__fallback {
  display: none;
}

/* e.g. HEIC photos, which only Safari can show inline */
.pd-gallery__item.is-broken img {
  display: none;
}

.pd-gallery__item.is-broken .pd-gallery__fallback {
  display: flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 12px;
  color: var(--pd-accent);
}

.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 64px;
}

.pd-lightbox__bg {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.86);
  cursor: zoom-out;
}

.pd-lightbox__fig {
  position: relative;
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-lightbox__fig img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 10px;
  background: #111827;
}

.pd-lightbox__fig figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #e5e7eb;
  font-size: 13px;
}

.pd-lightbox__fig figcaption .pd-link {
  color: #fff;
}

.pd-lightbox__nav,
.pd-lightbox__close {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
}

.pd-lightbox__nav {
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  font-size: 28px;
  line-height: 1;
}

.pd-lightbox__nav.is-prev {
  left: 12px;
}

.pd-lightbox__nav.is-next {
  right: 12px;
}

.pd-lightbox__close {
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  font-size: 24px;
}

.pd-lightbox__nav:hover,
.pd-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.26);
}

@media (max-width: 640px) {
  .pd-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .pd-lightbox {
    padding: 56px 8px 16px;
  }

  .pd-lightbox__nav {
    top: auto;
    bottom: 16px;
  }

  .pd-lightbox__fig figcaption {
    flex-direction: column;
  }
}

.pd-clicks td:not(:first-child) {
  min-width: 160px;
}

.pd-cbar {
  display: grid;
  grid-template-columns: minmax(60px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.pd-cbar__track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.pd-cbar__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.pd-cbar__fill.is-accent {
  background: var(--pd-accent);
}

.pd-cbar__fill.is-soft {
  background: #9ca3af;
}

.pd-cbar b {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .pd-clicks thead {
    display: none;
  }

  .pd-table.pd-clicks {
    min-width: 0;
  }

  .pd-clicks,
  .pd-clicks tbody,
  .pd-clicks tr,
  .pd-clicks td {
    display: block;
    width: 100%;
  }

  .pd-clicks tr {
    box-sizing: border-box;
    padding: 12px 14px;
    border-bottom: 1px solid var(--pd-border, #e5e7eb);
  }

  .pd-clicks td {
    box-sizing: border-box;
    padding: 4px 0 !important;
    border: 0 !important;
    min-width: 0 !important;
  }

  .pd-clicks td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    color: var(--pd-muted, #6b7280);
  }
}

.pd-kpi__sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--pd-muted, #6b7280);
}

.pd-clicks-foot {
  margin: 4px 2px 0;
  font-size: 13px;
}

/* Smaller thumbnails and a modest zoom for challenge photos */
.pd-gallery {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.pd-gallery__item {
  border-radius: 10px;
}

.pd-lightbox__fig {
  max-width: min(520px, 100%);
}

.pd-lightbox__fig img {
  max-height: min(62vh, 620px);
}

@media (max-width: 640px) {
  .pd-gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  .pd-lightbox__fig {
    max-width: 88%;
  }

  .pd-lightbox__fig img {
    max-height: 60vh;
  }
}

.pd-more__btn .pd-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: pd-spin 0.8s linear infinite;
}

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