/* PARTNER PORTAL — MATCH SUPPORT STYLING */

/* ---- THEME (copied from support.html) ---- */
:root {
  --bg:#1A1C15;           /* primary */
  --bg-2:#383E31;         /* secondary */
  --text:#FFFFFF;         /* primaryText */
  --text-2:#B3FFFFFF;     /* secondaryText */
  --accent:#379392;       /* brand accent */
  --card:#22251d;         /* off-black card */
  --border:#383E31;       /* border */
  --error:#ff5c5c;
  --success:#2ecc71;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:#899878;          /* light mode background */
    --bg-2:#ffffff;        /* card */
    --text:#10130d;        /* dark text */
    --text-2:#2d3326;
    --accent:#379392;
    --card:#ffffff;
    --border:#dfe5d7;
  }
}

/* ---- BASE ---- */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}

/* Match support's centered layout using your existing wrappers */
.section.center {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
}

.overlay {
  width: 100%;
  max-width: 840px;
}

/* Card container (equivalent to .card on support) */
.partner-container.form-container {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ---- HEADER ---- */

.partner-container #trailasaur-logo {
  display: block;
  margin: 4px auto 10px;
  max-width: 120px;
}

.partner-container h1 {
  text-align: center;
  margin: 0;
  font-size: 32px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.partner-container .subtitle {
  text-align: center;
  margin: 4px 0 20px;
  font-size: 0.95rem;
  color: var(--text-2);
}

/* ---- TABS (Apply / Login) ---- */

.partner-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 16px;
  padding: 0;
  background: transparent;
}

.partner-tabs button {
  all: unset;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  min-width: 110px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.1s ease;
}

.partner-tabs button.active {
  background: var(--accent);
  color: #083c3a;
  border-color: var(--accent);
  transform: translateY(-1px);
}


/* ---- PANEL LAYOUT ---- */

.partner-panel {
  margin-top: 4px;
}

/* Fields & rows (mirroring support grid spacing) */

.field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.field-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

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

/* Labels + inputs (copied style from support.html) */

.field-group label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-group input,
.field-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  outline: none;
  font-size: 0.9rem;
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: var(--text-2);
}

.field-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* Helper text (same tone as support's .hint) */

.helper-text {
  font-size: 12px;
  color: var(--text-2);
  margin: 4px 0 12px;
}

/* ---- CHIPS (Business type, Reward type) ---- */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.chip {
  all: unset;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg-2);
  color: var(--text-2);
  user-select: none;
  font-size: 0.8rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.05s ease;
}

.chip-note {
  display: block;
  font-size: 0.7rem;
  opacity: 0.85;
  margin-top: 2px;
}

.chip:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.chip.chip--selected,
.chip[aria-checked="true"] {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px
    color-mix(in oklab, var(--accent) 30%, transparent);
}

/* ---- IMAGE DROPZONE (for coupon image) ---- */

.image-dropzone {
  border: 1px dashed rgba(179, 255, 255, 0.35);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  background: var(--bg-2);
  font-size: 0.82rem;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.05s ease;
}

.image-dropzone:hover {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, var(--bg-2));
  transform: translateY(-1px);
}

/* ---- BUTTONS ---- */

.partner-container button {
  all: unset;
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  width: 100%;
  padding: 12px 16px;
  margin-top: 8px;
  background: var(--accent);
  color: #083c3a;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  text-align: center;
}

.partner-container button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}



.partner-container button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- DASHBOARD PREVIEW ---- */

.partner-dashboard {
  margin-top: 24px;
}

.partner-dashboard h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

/* Use support-style cards inside preview */
.partner-dashboard .card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.partner-dashboard .card h3 {
  margin: 0;
  font-size: 1rem;
}

/* Coupon list preview */

.coupon-list-items {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coupon-list-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coupon-list-item strong {
  font-size: 0.9rem;
}

.coupon-list-item.empty {
  border-style: dashed;
  opacity: 0.85;
}

/* ---- SMALL-SCREEN TWEAKS ---- */

@media (max-width: 480px) {
  .section.center {
    padding: 16px;
  }

  .partner-container.form-container {
    padding: 16px;
  }

  .partner-container h1 {
    font-size: 26px;
  }

  .partner-tabs {
    width: 100%;
    justify-content: center;
  }

  .partner-tabs button {
    font-size: 0.8rem;
    padding-inline: 0.5rem;
  }
}
/* ---- DASHBOARD LAYOUT ---- */

.partner-dashboard {
  margin-top: 16px;
}

.dashboard-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-logo {
  max-width: 64px;
}

.partner-dashboard h1 {
  margin: 0;
  font-size: 1.4rem;
}

.dashboard-tagline {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--text-2);
}

.dashboard-top-right {
  text-align: right;
  font-size: 0.8rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.status-approved {
  background: color-mix(in oklab, var(--accent) 25%, var(--bg-2));
  color: #083c3a;
  border-color: var(--accent);
}

.status-pending {
  background: #f0b90b22;
  color: #f0b90b;
  border-color: #f0b90b55;
}

.status-subline {
  margin: 4px 0 0;
  color: var(--text-2);
}

/* Grid: creator + list */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1.6fr;
  gap: 16px;
}

.partner-dashboard .card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.partner-dashboard .card h2 {
  margin: 0;
  font-size: 1.1rem;
}

/* Coupon list details */
.coupon-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.coupon-list-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-2);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-live {
  background: color-mix(in oklab, var(--accent) 35%, var(--bg-2));
  color: #083c3a;
}

.badge-pending {
  background: #f0b90b22;
  color: #f0b90b;
}

.badge-paused {
  background: #555;
  color: #eee;
}

/* Small filter chips under list */
.coupon-filters {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-small {
  padding: 4px 10px;
  font-size: 0.75rem;
}

/* Responsive dashboard */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-top-right {
    text-align: left;
  }
}
