@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Color — warm ink-teal, one deliberate amber accent, no decorative gradients */
  --ink: #14201f;
  --ink-soft: #566664;
  --paper: #f6f3ec;
  --surface: #ffffff;
  --line: #e3ddcf;
  --line-strong: #cfc7b3;

  --teal: #0b6e6e;
  --teal-hover: #095858;
  --teal-deep: #0b2727;
  --teal-deep-soft: #17423f;
  --teal-tint: #e5f0ef;

  --amber: #e2762b;
  --amber-tint: #fbeadb;

  --success: #1f7a4d;
  --success-tint: #e4f3ea;
  --danger: #b23a2e;
  --danger-tint: #fbe9e6;
  --warn: #8a5a12;
  --warn-tint: #fbf0dd;

  --radius-lg: 22px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-elevated: 0 12px 32px rgba(11, 39, 39, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}

a { text-decoration: none; color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Navbar ---------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  background: var(--teal-deep);
  color: #fff;
}
.navbar .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: #fff;
}
.navbar .logo .dot { color: var(--amber); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.nav-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 6px; }
.navbar nav { display: flex; align-items: center; }
.navbar nav a {
  color: #cfe0dd;
  margin-left: 26px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}
.navbar nav a:hover { color: #fff; }
.navbar .nav-cta {
  background: var(--amber);
  padding: 9px 20px;
  border-radius: 999px;
  color: #fff !important;
  font-weight: 700;
}
.notif-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--amber);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--teal-deep);
}
.sidebar-badge {
  background: var(--amber);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  font-family: 'Manrope', sans-serif;
  transition: transform 0.12s, background 0.15s;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover { background: var(--teal-hover); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--teal);
  color: var(--teal);
}
.btn-outline:hover { background: var(--teal-tint); }
.btn-block { width: 100%; text-align: center; }

/* ---------- Hero ---------- */
.hero {
  background: var(--teal-deep);
  color: #fff;
  padding: 0;
  overflow: hidden;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 20px 100px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}
.hero-copy .eyebrow {
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.hero-copy h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 20px;
}
.hero-copy p {
  color: #b9cdca;
  font-size: 1.08rem;
  max-width: 460px;
  margin: 0 0 30px;
  line-height: 1.6;
}
.hero-copy .actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Simple hero visual — a stylized mock of a FiLoCon profile card */
.hero-mock {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-elevated);
  transform: rotate(-2deg);
}
.hero-mock .hm-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep-soft));
  margin-bottom: 12px;
}
.hero-mock .hm-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.hero-mock .hm-title { color: var(--ink-soft); font-size: 0.82rem; margin-bottom: 16px; }
.hero-mock .hm-link {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.hero-mock .hm-link .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding: 60px 20px 70px; }
  .hero-mock { max-width: 320px; margin: 0 auto; transform: none; }
  .hero-copy h1 { font-size: 2.2rem; }
}

/* ---------- How it works (legitimate sequence — numbered) ---------- */
.how-it-works {
  padding: 70px 0;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 36px;
}
.how-step .step-num {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 10px;
}
.how-step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.how-step p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; margin: 0; }

@media (max-width: 768px) {
  .how-grid { grid-template-columns: 1fr; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card .icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--teal-tint);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.stat-card .value { font-family: 'Fraunces', serif; font-size: 1.7rem; font-weight: 600; }
.stat-card .label { color: var(--ink-soft); font-size: 0.85rem; }
.stat-card .delta { color: var(--success); font-size: 0.8rem; font-weight: 700; }

/* ---------- Auth forms ---------- */
.auth-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  padding: 38px;
}
.auth-card h2 { margin-top: 0; font-size: 1.5rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--teal);
}
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.alert-error { background: var(--danger-tint); color: var(--danger); }
.alert-success { background: var(--success-tint); color: var(--success); }
.auth-switch { text-align: center; margin-top: 18px; font-size: 0.9rem; color: var(--ink-soft); }
.auth-switch a { color: var(--teal); font-weight: 700; }

/* ---------- Dashboard layout ---------- */
.dash-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 234px;
  background: var(--teal-deep);
  color: #fff;
  padding: 26px 16px;
  flex-shrink: 0;
}
.sidebar .logo { font-family: 'Fraunces', serif; color: #fff; font-weight: 600; font-size: 1.2rem; margin-bottom: 30px; padding: 0 8px; }
.sidebar a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: #b9cdca;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.sidebar a svg { flex-shrink: 0; opacity: 0.9; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,0.09); color: #fff; }
.dash-main { flex: 1; padding: 30px 34px; }
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.dash-header h1 { font-size: 1.5rem; }
.dash-header .greeting { color: var(--ink-soft); font-size: 0.9rem; margin-top: 4px; }
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--teal);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.link-card .info { display: flex; align-items: center; gap: 12px; }
.link-card .platform-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--teal-tint);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-family: 'Fraunces', serif;
}
.link-card .actions a { margin-left: 10px; font-size: 0.85rem; color: var(--ink-soft); }
.link-card .actions a:hover { color: var(--teal); }

/* ---------- Public profile page ---------- */
.profile-hero {
  background: var(--teal-deep);
  color: #fff;
  text-align: center;
  padding: 64px 20px 100px;
}
.profile-hero img.avatar-lg {
  width: 104px; height: 104px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.15);
  object-fit: cover;
  margin-bottom: 16px;
  background: var(--teal);
}
.profile-hero h1 { color: #fff; font-size: 1.7rem; margin-bottom: 4px; }
.profile-hero .title { color: var(--amber); font-size: 0.95rem; font-weight: 600; margin-bottom: 10px; }
.profile-hero .bio { color: #b9cdca; max-width: 480px; margin: 0 auto 20px; font-size: 0.94rem; line-height: 1.6; }

.profile-body {
  max-width: 560px;
  margin: -56px auto 60px;
  padding: 0 20px;
}
.profile-link-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  font-weight: 700;
  text-align: center;
  transition: border-color 0.12s, transform 0.12s;
}
.profile-link-item:hover { border-color: var(--teal); transform: translateY(-1px); }

/* ---------- Shop grid (affiliate/product links on public profile) ---------- */
.shop-section { max-width: 700px; margin: 0 auto 60px; padding: 0 20px; }
.shop-section .section-title { text-align: center; }
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 170px));
  justify-content: center;
  gap: 16px;
}
.shop-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.12s, transform 0.12s;
}
.shop-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.shop-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--teal-tint);
}
.shop-card .shop-card-body { padding: 12px 14px 16px; }
.shop-card .shop-card-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.shop-card .shop-card-desc { font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 10px; line-height: 1.4; }
.shop-card .btn { display: block; width: 100%; text-align: center; padding: 8px 12px; font-size: 0.8rem; }

/* ---------- Discover ---------- */
.search-box {
  display: flex;
  gap: 10px;
  margin: 24px 0;
}
.search-box input {
  flex: 1;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  font-size: 0.95rem;
  background: var(--surface);
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}
.pagination .btn { padding: 9px 20px; font-size: 0.85rem; }
.mini-profile-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.mini-profile-card:hover {
  border-color: var(--teal);
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevated);
}
.mpc-location {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 52%;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-soft);
  min-width: 0;
}
.mpc-location-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mpc-social-label {
  position: absolute;
  top: 16px;
  right: 16px;
  left: 52%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.mpc-location svg, .mpc-social-label svg { flex-shrink: 0; }
.mpc-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--teal);
  margin: 8px auto 14px;
  display: block;
  border: 3px solid var(--teal-tint);
}
.mini-profile-card .name {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.05rem;
}
.mini-profile-card .title {
  color: var(--ink-soft);
  font-size: 0.82rem;
  margin: 4px 0 16px;
  min-height: 1.2em;
}
.mpc-cta {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 8px 20px;
  border-radius: 999px;
  transition: background 0.15s;
}
.mini-profile-card:hover .mpc-cta { background: var(--teal-hover); }

@media (max-width: 640px) {
  .profile-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .mini-profile-card { padding: 30px 10px 16px; }
  .mpc-avatar { width: 64px; height: 64px; margin: 6px auto 10px; }
  .mpc-location, .mpc-social-label { font-size: 0.56rem; top: 10px; }
  .mpc-location { left: 8px; right: 52%; }
  .mpc-social-label { right: 8px; left: 52%; }
  .mpc-location svg, .mpc-social-label svg { width: 9px; height: 9px; }
  .mini-profile-card .name { font-size: 0.88rem; }
  .mini-profile-card .title { font-size: 0.72rem; margin: 3px 0 10px; }
  .mpc-cta { font-size: 0.68rem; padding: 6px 12px; }
}

/* ---------- Misc ---------- */
.section-title { font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 600; margin: 32px 0 12px; }
.text-muted { color: var(--ink-soft); }
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
footer { text-align: center; padding: 0 0 32px; color: var(--ink-soft); font-size: 0.85rem; margin-top: 40px; }

/* ---------- Quick Actions / Coming Soon ---------- */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0 32px;
}
.quick-action-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  position: relative;
  transition: transform 0.12s, border-color 0.12s;
}
.quick-action-card.active:hover { transform: translateY(-2px); border-color: var(--teal); cursor: pointer; }
.quick-action-card.disabled { opacity: 0.55; cursor: default; }
.quick-action-card .qa-icon {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: var(--teal-tint);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
}
.quick-action-card.disabled .qa-icon { background: #eee9dd; color: var(--ink-soft); }
.quick-action-card .qa-label { font-size: 0.85rem; font-weight: 700; }
.coming-soon-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--amber);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.coming-soon-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.coming-soon-tile {
  flex: 0 0 auto;
  width: 180px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.coming-soon-tile .qa-icon {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--teal-tint);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
}
.coming-soon-tile .title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 0.92rem; margin-bottom: 4px; }
.coming-soon-tile .desc { font-size: 0.78rem; color: var(--ink-soft); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
}
.tab-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }

.mobile-breadcrumb {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 2px 0 14px;
}
.mobile-breadcrumb a { color: var(--teal); font-weight: 600; }
.mobile-breadcrumb .current { font-weight: 600; color: var(--ink); }

@media (max-width: 768px) {
  .dash-layout { flex-direction: column; }
  .sidebar { width: 100%; display: flex; overflow-x: auto; gap: 4px; padding: 12px; }
  .sidebar .logo { display: none; }
  .sidebar a { white-space: nowrap; margin-bottom: 0; }
  .navbar nav a { margin-left: 12px; font-size: 0.85rem; }

  /* Mobile nav: hide inline links behind a hamburger, drop into a stacked panel */
  .nav-toggle { display: flex; }
  .navbar nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .navbar nav.open { display: flex; }
  .navbar nav a { margin-left: 0; padding: 9px 4px; width: 100%; }
  .navbar nav .nav-cta { width: auto; margin-top: 6px; }

  /* Coming Soon: stack instead of a cut-off horizontal scroll */
  .coming-soon-strip { flex-direction: column; overflow-x: visible; }
  .coming-soon-tile { width: 100%; }

  .mobile-breadcrumb { display: flex; }
  .dash-main { padding: 18px 16px; }
  .dash-header { flex-wrap: wrap; gap: 10px; }
  .dash-header h1 { font-size: 1.25rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-card { padding: 26px 22px; }

  /* Admin data tables: allow horizontal scroll instead of squeezing/breaking */
  .card table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-copy h1 { font-size: 1.7rem; }
}