/* ============================================================
   portal-brand.css — foodprints partner portal, brand refresh.
   Loaded AFTER styles.css + portal.css. Overrides only.
   Keeps all logic/markup; re-skins onto the terracotta / Titan One
   brand as a comfortable functional app (not a poster).
   ============================================================ */

/* ---------- Token remap (portal only) ---------- */
:root {
  --blue-500: #C75B3F;   /* primary action -> terracotta */
  --blue-600: #A8452C;
  --blue-50:  #FBEEE9;
  --blue-100: #F2D6CC;
  --accent-pink: #C75B3F;   /* unify the lone pink stat into the brand */

  --terra: #C75B3F; --terra-deep: #A8452C; --terra-tint: #D77C63;
  --terra-bg: #FBEEE9;      /* soft terracotta wash for icon chips */
  --espresso: #3A2018; --espresso-2: #4A2C22;
  --cheese: #F0A62E;

  --surface-primary: #FFFDF9;   /* card white, a touch warmer */
  --surface-secondary: #F6F1E8; /* app background, warm paper */
  --surface-tertiary: #F1EADD;
}

.portal-body { background: var(--surface-secondary); }

/* ---------- Display typography (Titan One for large titles only) ---------- */
.portal-nav-wordmark,
.login-title, .verify-title, .dialog-title,
.dashboard-name, .deals-title, .form-screen-title,
.picker-title, .manage-deals-title,
.stat-value {
  font-family: 'Titan One', 'Inter', sans-serif !important;
  font-weight: 400 !important;
  letter-spacing: -.01em;
}
.login-title, .deals-title, .form-screen-title, .picker-title,
.dashboard-name, .verify-title, .dialog-title { line-height: 1.08; }

/* Smaller titles read better in bold Inter than a display face */
.dashboard-action-title, .chart-title, .section-label,
.result-title, .opening-hours-title, .insights-col-title,
.manage-deals-subtitle {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
}

/* Code / mono fields -> JetBrains Mono (kills Courier New) */
.form-input.code-input, .insider-code-field, .influencer-code-value,
.proposal-chip-code, .rs-team-claim-url input, #login-code,
.code-display, .verify-code-input {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace !important;
}

/* ---------- Nav ---------- */
.portal-nav {
  background: rgba(246,241,232,.82);
  border-bottom: 1px solid rgba(58,32,24,.10);
}
.portal-nav-brand { gap: 9px; }
.portal-nav-mark { width: 32px; height: 32px; border-radius: 8px; background: #fff; padding: 2px; box-shadow: 0 1px 3px rgba(58,32,24,.12); }
.portal-nav-wordmark { font-size: 22px; color: var(--espresso); }
.portal-nav-lockup { display: none; }  /* replaced by mark + wordmark */

.lang-switcher-btn { color: var(--text-secondary); font-weight: 600; }
.portal-profile-avatar { background: var(--terra) !important; }

/* ---------- Buttons ---------- */
.btn-portal { border-radius: 12px; font-weight: 700; letter-spacing: -.01em; }
.btn-portal-primary { box-shadow: 0 2px 10px rgba(199,91,63,.24); }
.btn-portal-primary:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(199,91,63,.30); transform: translateY(-1px); }
.deals-add-btn, .btn-template { border-radius: 12px; }
.deals-add-btn { background: var(--terra); color: #fff; }

/* Neutralise leftover pink accents into the brand */
.btn-template { background: var(--terra-bg); color: var(--terra-deep); border-color: rgba(199,91,63,.28); }
.btn-template:hover { background: #F6E1D8; border-color: var(--terra); }
.login-divider span, .login-subtitle { color: var(--text-secondary); }

/* ---------- Dashboard header ---------- */
.dashboard-header { margin-bottom: 26px; }
.dashboard-avatar { background: var(--terra-bg) !important; box-shadow: inset 0 0 0 1px rgba(199,91,63,.18); }
.dashboard-name { font-size: 30px; color: var(--espresso); }
.dashboard-subtitle { color: var(--terra-deep); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }

/* ---------- Action cards ---------- */
.dashboard-action-card {
  background: var(--surface-primary);
  border: 1px solid rgba(58,32,24,.10);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(58,32,24,.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dashboard-action-card:hover {
  background: var(--surface-primary);
  border-color: var(--terra);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(58,32,24,.10);
}
.dashboard-action-icon {
  background: var(--terra-bg) !important;
  color: var(--terra-deep);
  display: grid; place-items: center;
}
.dashboard-action-icon svg { width: 24px; height: 24px; stroke: var(--terra-deep); }
.dashboard-action-title span:first-child { color: var(--espresso); font-weight: 700; }
.dashboard-action-arrow { color: var(--terra); font-weight: 700; }

/* ---------- Stat tiles ---------- */
.stats-row, .portal-card {
  background: var(--surface-primary);
  border: 1px solid rgba(58,32,24,.09);
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(58,32,24,.04);
}
.stat-value { font-size: 26px; }
.stat-label { color: var(--text-tertiary); letter-spacing: .05em; }

/* ---------- Filter chips ---------- */
.filter-chip {
  border-radius: 999px;
  border: 1px solid rgba(58,32,24,.14);
  font-weight: 600;
}
.filter-chip.active {
  background: var(--terra);
  border-color: var(--terra);
  color: #fff;
}

/* ---------- Forms ---------- */
.form-input, .form-select, textarea.form-input {
  border-radius: 12px;
  border: 1px solid rgba(58,32,24,.16);
}
.form-input:focus, .form-select:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(199,91,63,.14);
}
.form-label { font-weight: 600; color: var(--espresso); }
.form-panel, .form-with-preview .form-preview-panel {
  border-radius: 18px;
}
.form-back-btn { color: var(--espresso); }
.form-back-btn:hover { color: var(--terra); }

/* ---------- Login / picker ---------- */
.login-card {
  border-radius: 24px;
  border: 1px solid rgba(58,32,24,.08);
  box-shadow: 0 20px 50px rgba(58,32,24,.14);
}
.login-mark { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 18px; display: block; box-shadow: 0 6px 18px rgba(58,32,24,.14); }
.login-title { font-size: 26px; color: var(--espresso); }

/* ---------- Value banner ----------
   Its text is set display:none in portal.css, leaving an empty coloured
   shell. Hide the whole thing so the dashboard doesn't show a blank box. */
.value-banner, .dashboard-top-row:empty { display: none; }

/* ---------- Empty states ---------- */
.empty-state-icon { color: var(--terra); }

/* ---------- Insights / chart accents ---------- */
.insights-col-title.insights-positive { color: var(--success); }
.insights-col-title.insights-improvement { color: var(--terra-deep); }
.insights-toggle { border-radius: 14px; border: 1px solid rgba(58,32,24,.10); background: var(--surface-primary); font-weight: 700; }
.time-filter-btn.active { background: var(--terra); border-color: var(--terra); color: #fff; }

/* ============================================================
   Profile avatar button + account dropdown
   ============================================================ */
.portal-profile-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px 4px 4px; border-radius: 999px;
}
.portal-profile-btn:hover { background: var(--terra-bg); }
.portal-profile-avatar {
  width: 34px; height: 34px; border-radius: 11px;   /* soft square reads more branded than a bare circle */
  background: var(--terra) !important;
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(58,32,24,.18);
  font-family: 'Inter', sans-serif; font-weight: 700;
}
.portal-profile-avatar img { border-radius: 11px; }
.portal-profile-caret { width: 13px; height: 13px; color: var(--text-tertiary); transition: transform .2s var(--ease-default); }
.portal-profile-btn[aria-expanded="true"] .portal-profile-caret { transform: rotate(180deg); }

.portal-profile-dropdown {
  width: 250px; padding: 8px; border-radius: 18px;
  border: 1px solid rgba(58,32,24,.10);
  box-shadow: 0 18px 44px rgba(58,32,24,.18), 0 4px 12px rgba(58,32,24,.08);
}
.profile-dropdown-header {
  padding: 13px 13px; margin-bottom: 6px;
  background: var(--terra-bg); border-radius: 12px;
}
.profile-dropdown-name { font-weight: 800; font-size: 15px; color: var(--espresso); padding: 0; }
.profile-dropdown-email { padding: 3px 0 0; color: var(--terra-deep); font-weight: 500; font-size: 12.5px; }
.profile-dropdown-divider { background: rgba(58,32,24,.10); margin: 6px 4px; }
.profile-dropdown-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: 11px; font-weight: 600; color: var(--espresso);
}
.profile-dropdown-item .pd-icon { width: 18px; height: 18px; color: var(--terra-deep); flex: 0 0 auto; }
.profile-dropdown-item:hover { background: var(--terra-bg); }
.profile-dropdown-item.danger { color: #B23A26; }
.profile-dropdown-item.danger .pd-icon { color: #B23A26; }
.profile-dropdown-item.danger:hover { background: #F6E1D8; }

/* ============================================================
   Profile & Users screen — structured, not a blob
   ============================================================ */
.settings-header { margin-bottom: 20px; }
.settings-avatar {
  background: var(--terra-bg) !important; border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(199,91,63,.18);
  color: var(--terra-deep) !important; font-family: 'Titan One', sans-serif; font-weight: 400;
}

/* Team subpage link -> full-width card row */
.rs-subpage-links { margin-bottom: 18px; }
.rs-subpage-link {
  display: flex !important; width: 100%; align-items: center; gap: 13px;
  padding: 15px 18px; border-radius: 14px; border: 1px solid rgba(58,32,24,.10);
  background: var(--surface-primary); font-weight: 700; color: var(--espresso);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.rs-subpage-link:hover { border-color: var(--terra); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(58,32,24,.09); }
.rs-subpage-link-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--terra-bg); display: grid; place-items: center; flex: 0 0 auto; }
.rs-subpage-link-icon svg { width: 21px; height: 21px; stroke: var(--terra-deep); }
.rs-subpage-link-arrow { margin-left: auto; color: var(--terra); font-weight: 700; font-size: 20px; }

/* Card headings with icon chips */
.rs-card-heading { display: flex; align-items: center; gap: 12px; }
.rs-card-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--terra-bg); display: grid; place-items: center; flex: 0 0 auto; }
.rs-card-icon svg { width: 20px; height: 20px; stroke: var(--terra-deep); }
.rs-card-title { font-weight: 800; font-size: 16px; color: var(--espresso); }

#rs-info-card, #rs-photos-card { padding: 20px 24px 24px; }

/* Info rows -> clean two-column definition list */
.rs-info-row {
  display: grid; grid-template-columns: 172px 1fr; gap: 18px; align-items: baseline;
  padding: 15px 0; border-bottom: 1px solid rgba(58,32,24,.08);
}
.rs-info-label { margin-bottom: 0 !important; color: var(--text-tertiary); letter-spacing: .06em; padding-top: 1px; }
.rs-info-value { font-size: 15px; color: var(--espresso); font-weight: 500; }
@media (max-width: 560px) {
  .rs-info-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Google sync block reads as a distinct footer note */
.rs-sync-block { border-top-color: rgba(58,32,24,.10); margin-top: 20px; padding-top: 18px; }

/* ---------- Profile & Users: subsections ---------- */
.rs-section { margin-bottom: 24px; }
.rs-section:last-child { margin-bottom: 0; }
.rs-section-head {
  font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--terra-deep); padding-bottom: 8px; margin-bottom: 2px;
  border-bottom: 1px solid rgba(58,32,24,.10);
}
.rs-section .form-group:first-of-type { margin-top: 14px; }
.rs-section .rs-info-row:last-child { border-bottom: 0; }
.rs-hours-block { padding-top: 12px; }

/* Refresh-from-Google as a distinct action bar at the top of the card */
.rs-sync-block {
  margin: 0 0 22px !important; padding: 14px 16px !important;
  background: var(--terra-bg); border: 1px solid rgba(199,91,63,.16) !important;
  border-radius: 14px;
}
.rs-sync-row { display: flex; align-items: center; gap: 12px; }
.rs-sync-block .btn-portal-outline { background: #fff; }
.rs-sync-hint { color: var(--espresso); opacity: .82; font-size: 12.5px; line-height: 1.5; margin-top: 9px; }
.rs-sync-last { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; }

/* ---------- Google suggestions banner + photo picker ---------- */
.rs-sug-banner {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; cursor: pointer;
  background: #fff; border: 1px solid rgba(199,91,63,.30);
  box-shadow: 0 2px 10px rgba(199,91,63,.12);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rs-sug-banner:hover { border-color: var(--terra); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(199,91,63,.16); }
.rs-sug-banner-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--terra); flex: 0 0 auto; box-shadow: 0 0 0 4px rgba(199,91,63,.15); }
.rs-sug-banner-text { flex: 1; font-size: 13.5px; color: var(--espresso); line-height: 1.4; }
.rs-sug-banner-text strong { color: var(--terra-deep); }
.rs-sug-banner-cta { font-weight: 800; color: var(--terra); font-size: 13px; white-space: nowrap; }

.sync-photos { padding: 4px 20px 10px; }
.sync-photos-head { font-weight: 800; color: var(--espresso); font-size: 14px; }
.sync-photos-hint { font-size: 12.5px; color: var(--text-tertiary); margin: 3px 0 12px; }
.sync-photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.sync-photo { position: relative; cursor: pointer; display: block; }
.sync-photo input { position: absolute; opacity: 0; pointer-events: none; }
.sync-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 2px solid transparent; transition: border-color .15s; display: block; }
.sync-photo-tick { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--terra-deep); display: grid; place-items: center; font-weight: 800; font-size: 12px; opacity: 0; transition: opacity .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sync-photo input:checked ~ img { border-color: var(--terra); }
.sync-photo input:checked ~ .sync-photo-tick { opacity: 1; background: var(--terra); color: #fff; }
.sync-diff-check { accent-color: var(--terra); width: 18px; height: 18px; }
