/* =========================================================================
   LinkMeUp — Design System
   Luxury dark theme derived from the product screenshots.
   ========================================================================= */

:root {
  /* Backgrounds */
  --bg-0: #08080A;
  --bg-1: #0B0B10;
  --bg-2: #101117;
  /* Surfaces */
  --card: #12131B;
  --card-2: #171923;
  --elevated: #1B1D27;
  /* Borders */
  --border: #23242F;
  --border-soft: #1B1C26;
  /* Text */
  --text: #FFFFFF;
  --text-2: #B3B6C4;
  --text-3: #8A8D9B;
  /* Accents */
  --pink: #FF4F8B;
  --pink-soft: rgba(255, 79, 139, .12);
  --purple: #C145FF;
  --purple-soft: rgba(193, 69, 255, .12);
  --amber: #F59E0B;
  --green: #34D399;
  --red: #F87171;
  /* Effects */
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, .35);
  --shadow-glow: 0 8px 30px rgba(255, 79, 139, .25);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --ring: 0 0 0 2px rgba(255, 79, 139, .35);
  --sidebar-w: 264px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; margin: 0; }
::selection { background: var(--pink); color: #fff; }

/* Serif display for landing headlines */
.font-display { font-family: 'Fraunces', 'Playfair Display', Georgia, serif; font-weight: 600; letter-spacing: -.01em; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #20212c; border-radius: 10px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: #2c2d3a; }

/* ---- Layout helpers ------------------------------------------------------ */
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 22px; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.hidden { display: none !important; }

/* ---- Cards --------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-2 { background: var(--card-2); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 22px; }
.glass {
  background: rgba(18, 19, 27, .72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .06);
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 14px; border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--pink); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { background: #ff6699; box-shadow: 0 10px 36px rgba(255, 79, 139, .42); transform: translateY(-1px); }
.btn-purple { background: var(--purple); color: #fff; box-shadow: 0 8px 30px rgba(193, 69, 255, .3); }
.btn-purple:hover { background: #cb5cff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--card-2); border-color: #33343f; }
.btn-dark { background: var(--card-2); color: var(--text); border-color: var(--border); }
.btn-dark:hover { background: var(--elevated); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---- Inputs -------------------------------------------------------------- */
.input, .select, textarea.input {
  width: 100%; padding: 12px 14px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.input::placeholder { color: var(--text-3); }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--pink); box-shadow: var(--ring); }
.label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; font-weight: 500; }
.field { margin-bottom: 16px; }

/* ---- Badges & chips ------------------------------------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  background: var(--card-2); color: var(--text-2); border: 1px solid var(--border);
}
.badge-pink { background: var(--pink-soft); color: var(--pink); border-color: transparent; }
.badge-purple { background: var(--purple-soft); color: var(--purple); border-color: transparent; }
.badge-green { background: rgba(52, 211, 153, .12); color: var(--green); border-color: transparent; }
.badge-amber { background: rgba(245, 158, 11, .14); color: var(--amber); border-color: transparent; }
.badge-red { background: rgba(248, 113, 113, .14); color: var(--red); border-color: transparent; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--card-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .18s ease;
}
.chip:hover { border-color: #36374420; background: var(--elevated); color: var(--text); }
.chip.selected { background: var(--pink-soft); border-color: var(--pink); color: var(--pink); }

/* status dots */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-online { background: var(--green); box-shadow: 0 0 0 3px rgba(52,211,153,.18); }
.dot-off { background: #4b4d59; }

/* verified pip */
.verified { color: #38bdf8; }

/* ---- Tables -------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-3); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.table td { padding: 14px; border-bottom: 1px solid var(--border-soft); font-size: 14px; color: var(--text-2); }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(255,255,255,.02); }
.table td .strong { color: var(--text); font-weight: 600; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; }

/* ---- Avatars ------------------------------------------------------------- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--card-2); }
.avatar-ring { padding: 2px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--purple)); }
.avatar-wrap { position: relative; display: inline-block; }
.avatar-wrap .dot { position: absolute; right: 0; bottom: 2px; border: 2px solid var(--card); }

/* ---- Stat cards ---------------------------------------------------------- */
.stat-card { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 2px; }
.stat-up { color: var(--green); } .stat-down { color: var(--red); }

/* ---- Animations ---------------------------------------------------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes pop { 0% { transform: scale(.8); opacity: 0; } 60% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.fade-up { animation: fadeUp .5s ease both; }
.fade-in { animation: fadeIn .4s ease both; }
.scale-in { animation: scaleIn .35s ease both; }
.floaty { animation: floaty 6s ease-in-out infinite; }
.delay-1 { animation-delay: .07s; } .delay-2 { animation-delay: .14s; }
.delay-3 { animation-delay: .21s; } .delay-4 { animation-delay: .28s; }

/* Skeleton loaders */
.skeleton { position: relative; overflow: hidden; background: var(--card-2); border-radius: var(--radius-sm); }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent); animation: shimmer 1.4s infinite; }

/* ---- App shell (user + admin) ------------------------------------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--bg-1);
  border-right: 1px solid var(--border); padding: 20px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.content { flex: 1; min-width: 0; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; padding: 6px 8px 18px; }
.brand .logo { width: 30px; height: 30px; }

.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin: 18px 12px 8px; font-weight: 700; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); font-size: 14px; font-weight: 500; margin-bottom: 2px; transition: all .16s;
}
.nav-link svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-link:hover { background: var(--card); color: var(--text); }
.nav-link.active { background: var(--pink-soft); color: var(--pink); }
.nav-link .count { margin-left: auto; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.nav-link.active .count { background: var(--pink); }

.topbar {
  display: flex; align-items: center; gap: 16px; padding: 14px 26px;
  border-bottom: 1px solid var(--border); background: var(--bg-1); position: sticky; top: 0; z-index: 30;
}
.searchbar { flex: 1; max-width: 440px; position: relative; }
.searchbar input { width: 100%; padding: 10px 14px 10px 40px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; color: var(--text); outline: none; }
.searchbar svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }

.page { padding: 26px; }
.page-head h1 { font-size: 24px; }
.page-head p { color: var(--text-3); margin: 4px 0 0; font-size: 14px; }

.grid { display: grid; gap: 18px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--text-2); position: relative; transition: all .16s; }
.icon-btn:hover { color: var(--text); border-color: #33343f; }
.icon-btn .pip { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; background: var(--pink); border-radius: 50%; border: 2px solid var(--bg-1); }

/* ---- Mobile bottom nav --------------------------------------------------- */
.bottom-nav { display: none; }
.mobile-only { display: none; }

@media (max-width: 980px) {
  .sidebar { display: none; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: rgba(11,11,16,.92); backdrop-filter: blur(16px);
    border-top: 1px solid var(--border); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-3); font-size: 10px; font-weight: 600; padding: 4px 10px; position: relative; }
  .bottom-nav a svg { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--pink); }
  .bottom-nav a .nv-badge { position: absolute; top: 0; right: 4px; background: var(--pink); color: #fff; font-size: 9px; min-width: 15px; height: 15px; border-radius: 8px; display: grid; place-items: center; padding: 0 3px; }
  .content { padding-bottom: 78px; }
  .mobile-only { display: block; }
  .page { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .hide-mobile { display: none !important; }
}

@media (min-width: 981px) { .show-mobile { display: none !important; } }

/* ---- PWA install button -------------------------------------------------- */
#pwa-install {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: none;
  align-items: center; gap: 8px; padding: 12px 18px; border-radius: var(--radius-pill);
  background: var(--pink); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-glow); border: none; animation: pop .4s ease both;
}
@media (max-width: 980px) { #pwa-install { bottom: 90px; } }

/* ---- Swipe card ---------------------------------------------------------- */
.swipe-stack { position: relative; }
.swipe-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--card-2); border: 1px solid var(--border); box-shadow: var(--shadow);
  aspect-ratio: 3/4; will-change: transform;
}
.swipe-card img { width: 100%; height: 100%; object-fit: cover; }
.swipe-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,10,0) 42%, rgba(8,8,10,.5) 70%, rgba(8,8,10,.92) 100%);
}
.swipe-actions { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: -34px; position: relative; z-index: 5; }
.swipe-btn {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); background: rgba(18,19,27,.85); backdrop-filter: blur(10px);
  transition: transform .16s, box-shadow .2s, background .2s;
}
.swipe-btn svg { width: 26px; height: 26px; }
.swipe-btn:hover { transform: scale(1.08); }
.swipe-btn.pass { color: var(--text-2); }
.swipe-btn.pass:hover { color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.swipe-btn.like { background: var(--pink); color: #fff; box-shadow: var(--shadow-glow); width: 66px; height: 66px; }
.swipe-btn.like:hover { box-shadow: 0 10px 36px rgba(255,79,139,.5); }
.swipe-btn.star { color: var(--amber); }
.swipe-btn.star:hover { box-shadow: 0 0 0 1px var(--amber); }

.like-stamp, .nope-stamp {
  position: absolute; top: 30px; font-size: 30px; font-weight: 800; letter-spacing: .04em;
  padding: 6px 16px; border-radius: 12px; border: 3px solid; opacity: 0; transform: rotate(-12deg); z-index: 6;
}
.like-stamp { left: 22px; color: var(--green); border-color: var(--green); }
.nope-stamp { right: 22px; color: var(--red); border-color: var(--red); transform: rotate(12deg); }

/* ---- Progress ------------------------------------------------------------ */
.progress { height: 6px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--purple)); border-radius: 999px; transition: width .4s ease; }

/* ---- Misc ---------------------------------------------------------------- */
.divider { height: 1px; background: var(--border); border: none; margin: 18px 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.empty { text-align: center; padding: 50px 20px; color: var(--text-3); }
.empty svg { width: 46px; height: 46px; margin: 0 auto 14px; opacity: .5; }
.link-pink { color: var(--pink); font-weight: 600; }
.link-pink:hover { text-decoration: underline; }

.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 100;
  padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); animation: fadeUp .35s ease both;
}
.toast-success { background: #10271f; color: var(--green); border: 1px solid rgba(52,211,153,.3); }
.toast-error { background: #2a1416; color: var(--red); border: 1px solid rgba(248,113,113,.3); }

/* ---- Chat ---------------------------------------------------------------- */
.chat-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 0; height: calc(100vh - 64px); }
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; }
.chat-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); transition: background .15s; }
.chat-item:hover, .chat-item.active { background: var(--card); }
.chat-item .ci-name { font-weight: 600; font-size: 14px; }
.chat-item .ci-last { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.chat-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-1); }
.msg-row { display: flex; }
.msg-row.mine { justify-content: flex-end; }
.bubble { max-width: 70%; padding: 10px 14px 16px; border-radius: 16px; font-size: 14px; position: relative; line-height: 1.45; }
.msg-row.theirs .bubble { background: var(--card-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg-row.mine .bubble { background: var(--pink); color: #fff; border-bottom-right-radius: 5px; }
.msg-time { position: absolute; right: 12px; bottom: 4px; font-size: 10px; opacity: .65; }
.chat-input-bar { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.chat-input-bar input { flex: 1; }
@media (max-width: 980px) { .chat-wrap { grid-template-columns: 1fr; height: calc(100vh - 140px); } .chat-list.has-thread { display: none; } }

/* ---- Landing-specific ---------------------------------------------------- */
.lp-nav { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.lp-nav .links { display: flex; gap: 30px; }
.lp-nav .links a { color: var(--text-2); font-weight: 500; font-size: 14.5px; }
.lp-nav .links a:hover { color: var(--text); }
.hero-eyebrow { color: var(--pink); font-weight: 600; font-size: 14px; letter-spacing: .01em; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; margin: 16px 0 20px; }
.section { padding: 80px 0; }
.section-eyebrow { color: var(--pink); font-weight: 600; text-align: center; font-size: 14px; }
.section-title { text-align: center; font-size: clamp(28px, 4vw, 44px); margin: 8px 0 0; }
.feature-row { display: flex; gap: 16px; align-items: flex-start; }
.feature-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--pink-soft); color: var(--pink); }
.lp-light { background: #F4F4F6; color: #14141a; }
.lp-light .section-title, .lp-light h3 { color: #14141a; }
.lp-light .muted { color: #5a5b66; }
.testimonial { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.phone-mock { border-radius: 36px; border: 8px solid #1b1c26; background: #000; overflow: hidden; box-shadow: var(--shadow); }
.footer { background: var(--bg-1); border-top: 1px solid var(--border); padding: 56px 0 30px; }
.footer a { color: var(--text-3); font-size: 14px; display: block; padding: 5px 0; }
.footer a:hover { color: var(--text); }
.social-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); }
.social-ic:hover { color: var(--pink); border-color: var(--pink); }

/* ---- Pricing ------------------------------------------------------------- */
.price-card { padding: 28px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--border); position: relative; transition: transform .2s, border-color .2s; }
.price-card:hover { transform: translateY(-4px); }
.price-card.popular { border-color: var(--pink); box-shadow: var(--shadow-glow); }
.price-card .amount { font-size: 38px; font-weight: 800; letter-spacing: -.03em; }
.price-feat { display: flex; align-items: center; gap: 10px; padding: 7px 0; color: var(--text-2); font-size: 14px; }
.price-feat svg { width: 17px; height: 17px; color: var(--green); flex-shrink: 0; }
.price-feat.off { color: var(--text-3); opacity: .55; }
.price-feat.off svg { color: var(--text-3); }

/* ---- Onboarding ---------------------------------------------------------- */
.ob-wrap { max-width: 540px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding: 24px 20px 36px; }
.ob-step { display: none; animation: fadeUp .4s ease both; }
.ob-step.active { display: block; }
.ob-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); cursor: pointer; transition: all .18s; }
.ob-card:hover { border-color: #34353f; transform: translateY(-2px); }
.ob-card.selected { border-color: var(--pink); background: var(--pink-soft); }
.ob-card .oc-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--card-2); display: grid; place-items: center; color: var(--pink); }
.ob-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ob-q { font-size: 26px; font-weight: 700; margin: 22px 0 6px; }
.ob-sub { color: var(--text-3); margin-bottom: 22px; }

/* utilities */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; } .text-center { text-align: center; } .text-sm { font-size: 13px; } .text-xs { font-size: 12px; }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; }
.flex-1 { flex: 1; } .flex-wrap { flex-wrap: wrap; } .flex-col { flex-direction: column; }
.rounded { border-radius: var(--radius-sm); } .relative { position: relative; }
