/* ===== DigitalCadCam — modern UI ===== */
:root {
  --bg: #f6f8fc;
  --bg-soft: #eef3fa;
  --card: #ffffff;
  --ink: #0f1f33;
  --ink-soft: #44566e;
  --muted: #76869c;
  --brand: #1f7ae0;
  --brand-dark: #145fb8;
  --brand-soft: #e8f1fd;
  --accent: #12c2a0;
  --line: #e6ecf4;
  --whatsapp: #25d366;
  --telegram: #2aabee;
  --instagram: #e1306c;
  --facebook: #1877f2;
  --shadow-sm: 0 2px 8px rgba(15, 31, 51, 0.06);
  --shadow: 0 10px 34px rgba(15, 31, 51, 0.10);
  --shadow-lg: 0 22px 60px rgba(15, 31, 51, 0.16);
  --radius: 16px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }
/* the [hidden] attribute must always win over component display rules
   (otherwise the lightbox/overlay stays on screen as a "fog") */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* guard against any tiny horizontal overflow (won't break sticky header) */
}
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 22px; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
  border: none; border-radius: 12px; padding: 11px 20px;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), background .18s ease, box-shadow .2s ease, filter .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.96); transition-duration: .06s; }
.btn:focus-visible { outline: 3px solid rgba(31,122,224,.4); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(31,122,224,.32); }
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 10px 26px rgba(31,122,224,.42); }
.btn-ghost { background: var(--brand-soft); color: var(--brand-dark); }
.btn-ghost:hover { background: #dbe9fb; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 14px; }

/* ===== Ads — fixed, always visible; side rails (desktop) + moving banners (mobile) ===== */
.ad-tag {
  background: #b8860b; color: #fff; font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 5px; letter-spacing: .6px; flex-shrink: 0;
}

/* desktop side rails: a column of 5 ad cards */
.ad-rail {
  position: fixed; top: 84px; bottom: 16px; z-index: 40; width: 240px;
  display: none; flex-direction: column; gap: 10px;
}
.ad-rail-left { left: 16px; }
.ad-rail-right { right: 16px; }

/* mobile top/bottom bars: a scrolling marquee of ads each */
.ad-mbar {
  position: fixed; left: 0; right: 0; z-index: 70; height: 50px; padding: 5px 10px;
  display: none; background: #fff;
  /* keep fixed bars on their own layer so iOS Safari doesn't drop them while scrolling */
  transform: translateZ(0); -webkit-backface-visibility: hidden; will-change: transform;
}
.ad-mbar-top { top: 0; border-bottom: 1px solid var(--line); }
.ad-mbar-bottom { bottom: 0; border-top: 1px solid var(--line); }

/* shared ad card: circular picture + name + description */
.ad-item {
  display: flex; align-items: center; overflow: hidden; text-decoration: none;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
}
.ad-item:hover { filter: brightness(.985); text-decoration: none; }
.ad-item.empty { background: linear-gradient(160deg, #fff7e8, #fff1d6); border-color: #f0dfbe; }
.ad-pic {
  flex-shrink: 0; border-radius: 50%; background-size: cover; background-position: center;
  background-color: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.ad-item.empty .ad-pic { background: #fff; border: 1px dashed #d9b86a; color: #b8860b; }
.ad-plus { width: 52%; height: 52%; display: block; }
.ad-name { font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.ad-desc { color: var(--muted); font-weight: 500; }
.ad-item.empty .ad-name { color: #8a6a26; }
.ad-item.empty .ad-desc { color: #b8860b; font-weight: 700; }

/* desktop rail: 5 flip-cards per side, each flipping between its 2 spots */
.flip-card { flex: 1; perspective: 900px; min-height: 0; }
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .8s cubic-bezier(.4,.2,.2,1); transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateX(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex;
}
.flip-face.back { transform: rotateX(180deg); }
.ad-item-rail {
  flex: 1; flex-direction: column; justify-content: center; gap: 7px;
  min-height: 0; width: 100%; height: 100%; padding: 12px 10px;
  border-radius: 14px; text-align: center;
}
.ad-item-rail .ad-pic { width: 56px; height: 56px; font-size: 22px; margin-bottom: 2px; }
.ad-item-rail .ad-name { font-size: 14px; max-width: 100%; white-space: nowrap; }
.ad-item-rail .ad-desc {
  font-size: 11px; line-height: 1.3; max-width: 100%;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* mobile marquee: a track of horizontal pills scrolling sideways */
.ad-marquee { position: relative; width: 100%; height: 100%; overflow: hidden; }
.ad-track {
  display: flex; align-items: center; height: 100%;
  width: max-content; will-change: transform;
  animation: ad-scroll 32s linear infinite;
}
.ad-track-rev { animation-name: ad-scroll-rev; }
.ad-marquee:hover .ad-track { animation-play-state: paused; }
.ad-item-bar {
  flex: 0 0 auto; height: 40px; padding: 0 14px 0 5px; margin-right: 10px;
  border-radius: 20px; flex-direction: row; gap: 8px; max-width: 280px;
}
.ad-item-bar .ad-pic { width: 30px; height: 30px; font-size: 14px; }
.ad-item-bar .ad-text { display: flex; flex-direction: column; justify-content: center; min-width: 0; line-height: 1.2; }
.ad-item-bar .ad-name { font-size: 12px; white-space: nowrap; }
.ad-item-bar .ad-desc { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
@keyframes ad-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ad-scroll-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
  .ad-track { animation: none; }
  .btn, .card, .tab, .account-chip, .contact-btn, .slot-chip, .flip-inner { transition: none !important; }
  .btn:hover, .card:hover, .account-chip:hover { transform: none !important; }
}

/* show rails on desktop, bars on mobile */
@media (min-width: 1280px) {
  .container { max-width: min(1080px, calc(100vw - 560px)); }
  .ad-rail { display: flex; }
}
@media (max-width: 1279px) {
  body { padding-top: 50px; padding-bottom: 50px; }
  .ad-mbar { display: flex; }
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
/* on mobile the header must sit BELOW the fixed top ad bar (50px) so it
   pins right under it instead of sliding behind it — keep this after the
   base rule above so it actually wins. */
@media (max-width: 1279px) {
  .site-header { top: 50px; }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { display: inline-flex; align-items: center; }
.logo-mark svg { width: 25px; height: 25px; fill: var(--brand); display: block; }
.logo-text { line-height: 1; }
.logo-text b { color: var(--brand); }
.header-nav { display: flex; align-items: center; gap: 22px; min-width: 0; }
.j-short { display: none; } /* short "Join" label shown only on small screens */
.header-nav > a:not(.btn) { color: var(--ink-soft); font-weight: 600; transition: color .18s ease; }
.header-nav > a:not(.btn):hover { color: var(--brand); text-decoration: none; }

/* ===== Hero ===== */
.hero {
  position: relative; padding: 64px 0 56px; overflow: hidden;
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(31,122,224,.14), transparent 60%),
    radial-gradient(700px 340px at 5% 10%, rgba(18,194,160,.12), transparent 55%),
    var(--bg);
}
.hero-inner { max-width: 760px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  color: var(--ink-soft); font-weight: 600; font-size: 13.5px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; margin: 0 0 16px; }
.hero h1 span {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-soft); max-width: 620px; margin: 0 0 30px; }

.search-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  background: #fff; padding: 12px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.search-field { position: relative; flex: 1 1 260px; min-width: 200px; }
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--muted); pointer-events: none;
}
.search-field input {
  width: 100%; padding: 13px 14px 13px 42px;
  border: 1px solid var(--line); border-radius: 12px; font: inherit; background: var(--bg);
}
.search-bar select {
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; background: var(--bg); color: var(--ink); cursor: pointer;
}
.search-field input:focus, .search-bar select:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(31,122,224,.12);
}
.adv-toggle {
  padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-weight: 700; background: var(--bg); color: var(--ink-soft); cursor: pointer;
  white-space: nowrap; transition: border-color .12s, background .12s, color .12s;
}
.adv-toggle:hover { border-color: var(--brand); color: var(--brand); }
.adv-toggle.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

.adv-panel {
  display: flex; flex-wrap: wrap; align-items: end; gap: 14px;
  margin-top: 12px; padding: 16px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.adv-field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 13px; color: var(--ink-soft); flex: 1 1 200px; }
.adv-field input, .adv-field select {
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 500;
  background: var(--bg); color: var(--ink);
}
.adv-field input:focus, .adv-field select:focus {
  outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(31,122,224,.12);
}
.adv-check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink-soft); cursor: pointer; flex: 1 1 200px; }
.adv-check input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.adv-clear {
  padding: 11px 16px; border: none; border-radius: 10px; font: inherit; font-weight: 700;
  background: var(--bg-soft); color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.adv-clear:hover { background: #e6ecf4; color: var(--ink); }

/* ===== Section heads ===== */
.section { padding: 52px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { font-size: 28px; margin: 0; }
.section-sub { color: var(--muted); margin: 4px 0 0; font-size: 15px; }
.count { color: var(--muted); font-size: 18px; font-weight: 600; }

/* ===== Cards ===== */
.cards-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3e0f2; }
.card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.avatar {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800; color: #fff;
}
.card-name { font-size: 18px; font-weight: 700; margin: 0; }
.card-country { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.card-bio { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 14px; flex-grow: 1; }
/* keep directory cards a uniform height regardless of bio length / tag count */
.card .card-bio {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.7em; flex-grow: 0;
}
.card .tags { max-height: 28px; overflow: hidden; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.tag-soft { background: var(--brand-soft); color: var(--brand-dark); }
.tag-spec { background: #e4f8f2; color: #0a8f72; }

.contact-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.contact-btn {
  flex: 1 1 90px; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 6px; border-radius: 12px; color: #fff; font-weight: 700; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: filter .15s ease, transform .08s ease;
}
.contact-btn:hover { filter: brightness(1.06); text-decoration: none; }
.contact-btn:active { transform: translateY(1px); }
.contact-btn svg { width: 17px; height: 17px; fill: currentColor; }
.c-whatsapp { background: var(--whatsapp); }
.c-telegram { background: var(--telegram); }
.c-instagram { background: linear-gradient(45deg, #f09433, #e6683c 30%, #dc2743 60%, #cc2366 90%); }
.c-facebook { background: var(--facebook); }
.c-tiktok { background: #010101; }
.c-youtube { background: #ff0000; }
.c-website { background: #475569; }
.c-email { background: #0a8f72; }

/* skeleton loading */
.skeleton { position: relative; overflow: hidden; min-height: 230px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-line { background: #eef2f8; border-radius: 8px; height: 14px; margin-bottom: 10px; }

.empty-state { text-align: center; color: var(--muted); padding: 50px; font-size: 16px; }

/* ===== Inline bands (Add profile / Advertise) ===== */
.band { background: var(--bg-soft); padding: 60px 0; }
.band-alt { background: linear-gradient(180deg, #0f1f33, #16304f); color: #fff; }
.panel { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.panel-intro h2 { font-size: 30px; margin: 14px 0 12px; }
.panel-intro p { color: var(--ink-soft); font-size: 16px; margin: 0 0 18px; }
.band-alt .panel-intro p { color: #c4d3e6; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 30px; color: var(--ink-soft); font-weight: 500; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.price-tag { font-size: 17px; color: #c4d3e6; font-weight: 600; }
.price-tag span { font-size: 40px; font-weight: 800; color: #fff; letter-spacing: -.02em; }

/* ===== Forms ===== */
.form-card {
  background: #fff; border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.lbl { display: block; font-weight: 700; font-size: 13.5px; color: var(--ink); margin-bottom: 16px; }
.lbl small { font-weight: 500; color: var(--muted); }
.lbl input, .lbl textarea, .lbl select {
  width: 100%; margin-top: 7px; padding: 12px 14px; font: inherit; font-weight: 500;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink);
}
.lbl textarea { resize: vertical; }
.lbl input:focus, .lbl textarea:focus, .lbl select:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(31,122,224,.12);
}
/* spot picker — scrollable grid that always stays inside the form */
.slot-picker {
  margin-top: 7px; display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px;
  max-height: 168px; overflow-y: auto;
  padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
}
.slot-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; font: inherit; color: var(--ink); transition: border-color .12s, background .12s;
}
.slot-chip b { font-size: 14px; font-weight: 800; }
.slot-chip span { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.slot-chip:hover:not(:disabled) { border-color: var(--brand); }
.slot-chip[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.slot-chip.taken { cursor: not-allowed; opacity: .5; }
.slot-chip.taken span { color: var(--muted); }

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; flex-wrap: wrap; }

/* advertiser "Your ads" dashboard */
.panel-side { min-width: 0; }
.adv-login-toggle { margin-top: 14px; text-align: center; }
.adv-login-toggle a { font-weight: 700; }
/* this area sits on the dark advertise band — keep text readable */
.band-alt .adv-login-toggle { color: #c4d3e6; }
#advLoginForm { margin-top: 16px; }

/* full-width white dashboard surface sitting on the dark advertise band */
.adv-dash { background: #fff; border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.adv-dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.adv-dash-head h2 { margin: 0; font-size: 24px; color: var(--ink); }
.adv-dash-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.adv-dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.adv-summary { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.adv-stat { flex: 1 1 120px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.adv-stat-n { display: block; font-size: 30px; font-weight: 800; color: var(--brand); line-height: 1; }
.adv-stat-l { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.adv-ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.adv-ad-card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.adv-ad-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.adv-ad-name { margin: 8px 0 4px; color: var(--ink-soft); font-weight: 600; }
.adv-ad-clicks { margin: 6px 0 2px; color: var(--muted); font-size: 13px; }
.adv-ad-clicks b { font-size: 26px; color: var(--brand); margin-right: 4px; }
.adv-ad-exp { margin: 0; font-size: 12px; color: var(--muted); }
.adv-status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 9px; border-radius: 999px; }
.adv-active { background: #e7f7ee; color: #168a4b; }
.adv-pending { background: #fff3da; color: #b8860b; }
.adv-expired { background: #f1f1f4; color: #76869c; }

/* services & pricing list */
.price-list { display: flex; flex-direction: column; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.price-row:last-child { border-bottom: none; }
.price-name { color: var(--ink); font-weight: 600; }
.price-end { display: inline-flex; align-items: center; gap: 10px; }
.price-val { font-weight: 800; color: var(--brand); white-space: nowrap; }
.svc-del { border: none; background: #f1f1f4; color: #76869c; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.svc-del:hover { background: #fdeaea; color: var(--danger, #d63450); }
.service-form { display: grid; grid-template-columns: 1fr 130px auto; gap: 8px; margin-top: 14px; }
.service-form input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--bg); }
.service-form .btn { padding: 10px 16px; }
@media (max-width: 620px) { .service-form { grid-template-columns: 1fr 1fr; } .service-form .btn { grid-column: 1 / -1; } }

/* ad destination chooser (booking form) */
.link-mode { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.link-mode label { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.link-mode input { accent-color: var(--brand); }

/* on-site ad page (/ad/:id) */
.ad-page-card { max-width: 460px; margin: 30px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; text-align: center; box-shadow: var(--shadow); }
.ad-page-pic { width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 16px; background-size: cover; background-position: center; border: 1px solid var(--line); }
.ad-page-card h1 { font-size: 26px; margin: 0 0 8px; }
.ad-page-desc { color: var(--ink-soft); margin: 0 0 20px; }
.ad-page-tag { margin: 18px 0 0; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ===== Ratings & reviews ===== */
.star { color: #d9dee7; }
.star.on { color: #f5a623; }
.card-rating { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 700; color: #f5a623; }
.card-rating small { color: var(--muted); font-weight: 600; }
.rating-summary { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.rating-summary .rating-avg { font-size: 22px; font-weight: 800; color: var(--ink); }
.rating-summary .rating-stars { font-size: 18px; }
.rating-summary .rating-count { color: var(--muted); font-size: 13px; }
.reviews { display: grid; gap: 12px; margin: 6px 0 8px; }
.review { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.review-stars { font-size: 15px; }
.review-text { margin: 6px 0 6px; color: var(--ink-soft); }
.review-meta { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.rate-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 16px; max-width: 520px; }
.rate-form .card-title { margin: 0 0 10px; }
.star-picker { font-size: 30px; line-height: 1; margin-bottom: 12px; user-select: none; }
.star-picker .pick { color: #d9dee7; cursor: pointer; transition: color .12s, transform .12s; }
.star-picker .pick:hover { transform: scale(1.12); }
.star-picker .pick.on { color: #f5a623; }
.rate-form textarea, .rate-form input[type="text"], .rate-form input[type="email"] {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--bg); margin-bottom: 10px;
}
.rate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rate-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* honeypot */
@media (max-width: 620px) { .rate-row { grid-template-columns: 1fr; } }

/* "forgot password?" link under login forms */
.forgot-row { margin: -6px 0 14px; text-align: right; font-size: 13.5px; }
.forgot-row a { font-weight: 600; }

/* "verify your email" dashboard banner */
.verify-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff3da; color: #8a6a26; border: 1px solid #f0dfbe;
  border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600;
}
.verify-banner button {
  border: none; background: #b8860b; color: #fff; font: inherit; font-weight: 700;
  padding: 7px 13px; border-radius: 8px; cursor: pointer;
}
.verify-banner button:hover { filter: brightness(1.06); }

/* password show/hide toggle */
.pw-wrap { position: relative; display: block; margin-top: 7px; }
.pw-wrap input { margin-top: 0 !important; padding-right: 62px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--brand); cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 700; padding: 6px 9px; border-radius: 8px;
}
.pw-toggle:hover { background: rgba(31,122,224,.1); }
.form-note { font-size: 13px; color: var(--muted); margin: 0; flex: 1 1 200px; }

/* ===== Footer ===== */
.site-footer { background: #0f1f33; color: #cdd9e8; padding: 34px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer .logo-mark svg { width: 22px; height: 22px; }
.site-footer b { color: #fff; }
.site-footer .muted { color: #8da3bd; font-size: 14px; margin: 6px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.footer-links a { color: #cdd9e8; font-weight: 600; }
.footer-links a:hover { color: #fff; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 14px;
  box-shadow: var(--shadow-lg); font-weight: 600; z-index: 200; max-width: 90vw;
  opacity: 0; transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-success { background: #0a8f72; }
.toast.toast-error { background: #d63450; }

/* ===== Header account ===== */
.account-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 700;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  transition: background .18s ease, transform .18s cubic-bezier(.34,1.56,.64,1);
}
.account-chip:hover { background: #dbe9fb; text-decoration: none; transform: translateY(-1px); }
.account-chip:active { transform: scale(.97); }
.chip-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
  background-size: cover; background-position: center;
}

/* ===== Cards become clickable ===== */
.card { cursor: pointer; }
.card .card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; }
.gallery-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.view-link { font-size: 14px; font-weight: 700; color: var(--brand); }
.card-cover { width: 100%; height: 150px; object-fit: cover; border-radius: 12px; margin-bottom: 14px; background: var(--bg-soft); }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 6px; background: var(--bg-soft); padding: 5px; border-radius: 12px; margin-bottom: 20px; }
.tab {
  flex: 1; padding: 10px; border: none; background: transparent; border-radius: 9px;
  font: inherit; font-weight: 700; color: var(--ink-soft); cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.tab:hover { color: var(--brand-dark); }
.tab:active { transform: scale(.97); }
.tab.active { background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-sm); }

/* ===== Dashboard ===== */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.dash-head h2 { margin: 0; font-size: 28px; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.card-title { margin: 0 0 14px; font-size: 18px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.file-btn { cursor: pointer; display: inline-flex; }
.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar-lg {
  width: 72px; height: 72px; border-radius: 18px; font-size: 26px; flex-shrink: 0;
  background-size: cover; background-position: center;
}

/* ===== Gallery ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 16px; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: pointer; background: var(--bg-soft); }
.gallery-item { position: relative; }
.gallery-item .del {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(15,31,51,.72); color: #fff; border: none; cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.gallery-item .del:hover { background: var(--instagram); }
.gallery-empty { color: var(--muted); font-size: 14px; padding: 20px 0; }

/* ===== Profile page ===== */
.back-link { display: inline-block; margin-bottom: 20px; font-weight: 700; }
.profile-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.profile-hero .avatar { width: 84px; height: 84px; border-radius: 22px; font-size: 30px; background-size: cover; background-position: center; }
.profile-hero h1 { font-size: 30px; margin: 0 0 4px; }
.profile-meta { color: var(--muted); font-weight: 600; }
.profile-bio { color: var(--ink-soft); font-size: 16px; margin: 16px 0; max-width: 720px; }
.profile-contacts { max-width: 420px; }
.profile-section-title { font-size: 20px; margin: 32px 0 4px; }
body.profile-open .main-view,
body.page-open .main-view { display: none; }

/* smooth page transitions — each view fades + slides in when navigated to */
@keyframes page-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
#profileView, #designerPage, #advertiserPage, #join, #advertise,
.hero, #directory {
  animation: page-in .3s cubic-bezier(.22,.61,.36,1) both;
}
@media (prefers-reduced-motion: reduce) {
  #profileView, #designerPage, #advertiserPage, #join, #advertise,
  .hero, #directory { animation: none; }
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(8,16,28,.88);
  display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 12px; box-shadow: var(--shadow-lg); }

@media (max-width: 760px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .panel { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 620px) {
  .header-inner { height: 58px; gap: 10px; }
  .header-nav { gap: 10px; }
  .header-nav > a:not(.btn) { display: none; }
  .logo { font-size: 17px; gap: 6px; }
  .logo-mark svg { width: 22px; height: 22px; }
  .j-full { display: none; }
  .j-short { display: inline; }
  #navJoin { padding: 9px 14px; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; gap: 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head .btn { display: none; }
  .ad-text { font-size: 13px; }
  .form-foot .btn { width: 100%; }
}
