/* ---------------------------------------------------------------
   Gem Reports - styled to match the FoodPartner web app.

   Colours below were sampled from FoodPartner screenshots. If any
   look off against the real app, they are all declared once in
   :root - change them here and the whole page follows.

   Layout is mobile-first. The card is a full-width sheet on a phone
   and a centred panel on a desktop browser.
   --------------------------------------------------------------- */

/* Snapp 1.9 - the FoodPartner typeface, converted from the supplied
   OTF files to woff2 (about 28KB each). Covers Persian, Latin and
   Persian digits. font-display: swap means text is readable in a
   fallback face while these load, rather than invisible. */
@font-face {
  font-family: "Snapp";
  src: url("/assets/fonts/snapp-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Snapp";
  src: url("/assets/fonts/snapp-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Snapp";
  src: url("/assets/fonts/snapp-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Snapp";
  src: url("/assets/fonts/snapp-black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand ------------------------------------------------------ */
  --pink: #e5106b;          /* primary CTA, as on "ایجاد کمپین جدید" */
  --pink-dark: #c50d5c;
  --pink-tint: #fdeaf2;

  --green: #00b074;         /* active tab / success */
  --green-tint: #e6f7f1;

  --red: #e4002b;           /* "جدید" badge */
  --amber: #f5c518;
  --amber-tint: #fff8e5;    /* info banner */

  /* Neutrals --------------------------------------------------- */
  --bg: #f3f4f6;
  --surface: #ffffff;
  --text: #1f2126;
  --text-soft: #5c6270;
  --text-muted: #8b909c;
  --border: #e8e9ed;

  --radius-card: 16px;
  --radius-ctl: 12px;
  --shadow: 0 1px 2px rgba(20, 24, 33, 0.04), 0 6px 20px rgba(20, 24, 33, 0.06);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Snapp", "IRANSansX", "IRANYekan", "Vazirmatn",
               "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* App bar ----------------------------------------------------- */

.app-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.app-bar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-bar__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}
.app-bar__badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}

/* Page -------------------------------------------------------- */

.screen {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
}

/* On a desktop browser, float the card in the middle instead of
   letting it sit stranded at the top of a wide empty page. */
@media (min-width: 768px) {
  .screen {
    align-items: center;
    padding: 48px 24px;
  }
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 28px 22px;
}

@media (min-width: 480px) {
  .card { padding: 36px 32px; }
}

.card--center { text-align: center; }

/* Success mark ------------------------------------------------ */

.check {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--green-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}
.check svg { width: 30px; height: 30px; stroke: var(--green); }

/* Typography -------------------------------------------------- */

.title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.5;
}
.subtitle {
  margin: 0 0 24px;
  color: var(--text-soft);
  font-size: 14px;
}

/* Vendor name, shown on the success screen -------------------- */

.vendor {
  background: var(--bg);
  border-radius: var(--radius-ctl);
  padding: 14px 16px;
  margin: 0 0 24px;
}
.vendor__label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.vendor__name {
  font-size: 16px;
  font-weight: 700;
  word-break: break-word;
}

/* Field ------------------------------------------------------- */

.field { display: block; margin-bottom: 20px; }

.field__label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.field__input {
  width: 100%;
  padding: 15px 16px;
  font-family: inherit;
  font-size: 17px;          /* >=16px stops iOS zooming in on focus */
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  direction: ltr;           /* the password itself is latin */
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-ctl);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field__input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.06em;
}
.field__input:focus {
  outline: none;
  border-color: var(--pink);
  background: var(--surface);
}
.field__input:disabled { opacity: 0.55; cursor: not-allowed; }

/* Buttons ----------------------------------------------------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--pink);
  border: none;
  border-radius: var(--radius-ctl);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover:not(:disabled) { background: var(--pink-dark); }
.btn:disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
}
.btn svg { width: 19px; height: 19px; stroke: currentColor; }

/* While the PDF is being fetched into memory (see download.js). */
.btn--busy {
  background: var(--pink-dark);
  cursor: progress;
  opacity: 0.85;
}

.link-muted {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.link-muted:hover { color: var(--text-soft); }

/* Notices ----------------------------------------------------- */

.note {
  display: flex;
  gap: 10px;
  text-align: right;
  background: var(--amber-tint);
  border-radius: var(--radius-ctl);
  padding: 12px 14px;
  margin-top: 20px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-soft);
}
.note__dot {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.alert {
  background: var(--pink-tint);
  color: var(--pink-dark);
  border-radius: var(--radius-ctl);
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.help {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}
