/* public/assets/css/main.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:        #0a0a0f;
  --bg-card:   #13131a;
  --bg-input:  #1c1c27;
  --border:    #2a2a3d;
  --accent:    #4F7DF3;
  --accent-2:  #22C7B5;
  --text:      #f0f0f8;
  --muted:     #7878a0;
  --success:   #34d399;
  --danger:    #f87171;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 4px 32px rgba(79,125,243,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3 { font-family: 'Inter', sans-serif; line-height: 1.15; }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 4vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p  { color: var(--muted); }

/* ── Layout ── */
.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 1.25rem; }
.container--wide { max-width: 800px; }

/* ── Navbar ── */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
}
.navbar-brand {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.navbar-actions { display: flex; gap: .75rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.4rem;
  border: none; border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif; font-size: .875rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: opacity .2s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.btn--primary:hover { opacity: .9; }
.btn--ghost {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--sm { padding: .4rem .9rem; font-size: .8rem; }
.btn--full { width: 100%; }
.btn--icon { padding: .6rem; border-radius: 50%; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }
.form-label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: .45rem;
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  padding: .7rem 1rem;
  transition: border-color .2s;
  outline: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted); opacity: .6; }

/* Icon inside input */
.input-wrap { position: relative; }
.input-wrap .input-icon {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 1rem; pointer-events: none;
}
.input-wrap .form-input { padding-left: 2.4rem; }

/* ── Alert ── */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500;
  margin-bottom: 1rem;
}
.alert--error { background: rgba(248,113,113,.1); color: var(--danger); border: 1px solid rgba(248,113,113,.3); }
.alert--success { background: rgba(52,211,153,.1); color: var(--success); border: 1px solid rgba(52,211,153,.3); }

/* ── Auth Pages ── */
.auth-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem 1.25rem;
}
.auth-card { width: 100%; max-width: 420px; }
.auth-logo {
  text-align: center; margin-bottom: 2rem;
}
.auth-logo span {
  font-family: 'Inter', sans-serif; font-size: 1.6rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-logo p { font-size: .85rem; margin-top: .3rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--muted); }
.auth-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ── Dashboard — soft glass theme (matches public profile page) ── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, #252525, transparent 70%),
    #1D1D1D;
}
.sidebar {
  background: #262626;
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: inset 0 0 12px 4px rgba(255,255,255,.015);
  padding: 1.5rem 1rem;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  font-family: 'Inter', sans-serif; font-size: 1.1rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-decoration: none;
  padding: .5rem .5rem 1.5rem;
  display: block;
}
.sidebar-nav { display: flex; flex-direction: column; gap: .3rem; }
.sidebar-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .9rem;
  border-radius: 14px;
  text-decoration: none;
  color: #a0a0a8; font-size: .9rem; font-weight: 500;
  transition: background .2s, color .2s, box-shadow .2s;
}
.sidebar-link:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.sidebar-link.active {
  background: #343434;
  box-shadow: inset 0 -2px 4px rgba(45,45,45,.2), inset 0 1.5px 6px rgba(255,255,255,.07);
  color: var(--accent);
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.06); margin: 1rem 0; }
.main-content { padding: 2rem 1.5rem; overflow-y: auto; }
.page-title { margin-bottom: 1.5rem; }
.page-title h2 { margin-bottom: .25rem; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: #2F2F2F;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(0,0,0,.25), inset 0 0 12px 4px rgba(255,255,255,.02);
  padding: 1.2rem 1rem;
  text-align: center;
}
.stat-value {
  font-family: 'Inter', sans-serif; font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { font-size: .75rem; color: var(--muted); margin-top: .25rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }

/* ── Soft / glass variant — matches public profile page (card/index.php) ──
   Scoped via modifier classes so it doesn't affect other pages. */
.card--soft {
  background: #2F2F2F;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,.25), inset 0 0 12px 4px rgba(255,255,255,.02);
}
.section-label--soft { color: #a8a8b8; }
.section-label--soft::after { background: rgba(255,255,255,.08); }

.form-input--soft, .form-textarea--soft {
  background: #343434;
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: inset 0 -2px 4px rgba(45,45,45,.2), inset 0 1.5px 6px rgba(255,255,255,.07);
  border-radius: 16px;
}
.form-input--soft:focus, .form-textarea--soft:focus { border-color: var(--accent); }
.input-wrap .form-input--soft { padding-left: 2.4rem; }

.btn--pill { border-radius: 32px; }

/* Soft ghost button — matches the contact-icon-btn / social-pill look */
.btn--soft {
  background: #343434;
  color: #f0f0f0;
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: 0 0 4px rgba(0,0,0,.2), inset 0 -2px 4px rgba(45,45,45,.2), inset 0 1.5px 6px rgba(255,255,255,.07);
}
.btn--soft:hover { background: #3f3f3f; color: #fff; opacity: 1; }

.alert--soft {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: inset 0 -2px 4px rgba(45,45,45,.15), inset 0 1.5px 6px rgba(255,255,255,.05);
}

.photo-preview--soft, .photo-placeholder--soft { border-radius: 28px; border-color: rgba(255,255,255,.1); }

/* ── Profile photo upload ── */
.photo-upload-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.photo-preview {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  background: var(--bg-input);
}
.photo-placeholder {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--bg-input); border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 2rem;
}

/* ── Section heading ── */
.section-label {
  font-size: .7rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: .75rem; margin-top: 1.5rem;
  display: flex; align-items: center; gap: .5rem;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Card URL Box ── */
.url-box {
  display: flex; align-items: center;
  background: #343434; border: 1px solid rgba(255,255,255,.05);
  box-shadow: inset 0 -2px 4px rgba(45,45,45,.2), inset 0 1.5px 6px rgba(255,255,255,.07);
  border-radius: 18px; overflow: hidden;
}
.url-box-text {
  flex: 1; padding: .7rem 1rem;
  font-size: .8rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.url-box-copy {
  padding: .7rem 1rem;
  background: rgba(79,125,243,.18); color: var(--accent);
  border: none; cursor: pointer; font-size: .8rem; font-weight: 600;
  transition: background .2s;
}
.url-box-copy:hover { background: rgba(79,125,243,.32); }

/* ── QR Code ── */
.qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 1.5rem;
  background: #343434; border-radius: 22px;
  box-shadow: inset 0 -2px 4px rgba(45,45,45,.15), inset 0 1.5px 6px rgba(255,255,255,.05);
}
#qr-canvas { border-radius: var(--radius-sm); }

/* ── Analytics chart ── */
.chart-bar-wrap { display: flex; flex-direction: column; gap: .5rem; }
.chart-bar-row { display: flex; align-items: center; gap: .75rem; font-size: .8rem; }
.chart-bar-label { width: 60px; color: var(--muted); text-align: right; }
.chart-bar-track { flex: 1; height: 8px; background: #343434; border-radius: 99px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.3); }
.chart-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s ease; }
.chart-bar-count { width: 36px; color: var(--text); font-weight: 600; font-size: .8rem; }

/* ── PUBLIC PROFILE PAGE (glass card style) ── */
.profile-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1.25rem;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, #252525, transparent 70%),
    #1D1D1D;
}
.profile-card {
  width: 100%; max-width: 320px;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 8px 28px;
  background: #2F2F2F;
  box-shadow: 0 42px 60px rgba(0,0,0,.35), 0 5px 18px rgba(0,0,0,.25),
              inset 0 0 12px 4px rgba(255,255,255,.02);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 36px;
}
.profile-photo {
  width: 100%; aspect-ratio: 264 / 280;
  object-fit: cover;
  border-radius: 28px;
  background: var(--bg-input);
  display: block;
}
.profile-photo-placeholder {
  width: 100%; aspect-ratio: 264 / 280;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-size: 3rem; font-weight: 800; color: #fff;
}
.profile-info { width: 100%; padding: 1.3rem 1.4rem 0; }
.profile-name-row { display: flex; align-items: center; gap: .45rem; }
.profile-name { font-size: 1.3rem; font-weight: 600; color: #f9f9f9; font-family: 'Inter', sans-serif; }
.verified-badge {
  width: 19px; height: 19px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #fdfdfd 0%, #d7d7d7 100%);
}
.verified-badge svg { width: 11px; height: 11px; }
.profile-title {
  color: var(--muted); font-size: .85rem; line-height: 1.6; margin-top: .3rem;
}
.profile-title .profile-company { color: var(--muted); }
.profile-arrow { margin: 0 .2rem; opacity: .7; }
.profile-bio {
  font-size: .8rem; color: #929292; line-height: 1.6;
  letter-spacing: -.01em; margin: .75rem 0 0;
}

/* Circular contact icon row (whatsapp / email / website) */
.contact-icons-row {
  display: flex; align-items: center; justify-content: center;
  gap: .9rem; margin-top: 1.4rem;
}
.contact-icon-btn {
  width: 35px; height: 35px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #343434;
  border: 1px solid rgba(24,24,24,.05);
  box-shadow: 0 0 4px rgba(0,0,0,.2), inset 0 -2px 4px rgba(45,45,45,.2), inset 0 1.5px 6px rgba(255,255,255,.07);
  color: #f9f9f9;
  text-decoration: none;
  transition: transform .15s, background .2s;
}
.contact-icon-btn:hover { background: #3f3f3f; transform: translateY(-1px); }
.contact-icon-btn svg { width: 17px; height: 17px; }

/* Social media pill buttons */
.social-pills { display: flex; flex-direction: column; gap: .6rem; width: 100%; margin-top: .85rem; }
.social-pill {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  width: 100%; padding: .68rem 1.2rem;
  background: #343434;
  border: 1px solid rgba(24,24,24,.05);
  box-shadow: 0 0 4px rgba(0,0,0,.2), inset 0 -2px 4px rgba(45,45,45,.2), inset 0 1.5px 6px rgba(255,255,255,.07);
  border-radius: 32px;
  text-decoration: none; color: #fff;
  font-size: .8rem; font-weight: 400;
  transition: transform .15s, background .2s;
}
.social-pill:hover { background: #3f3f3f; transform: translateY(-1px); }
.social-pill svg { width: 17px; height: 17px; flex-shrink: 0; }

.profile-footer {
  text-align: center; margin-top: 1.5rem;
}
.profile-footer span {
  font-family: 'Inter', sans-serif; font-size: .78rem; color: var(--muted);
}
.profile-footer .brand {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700;
}

/* ── Mobile nav (hamburger) ── */
.mobile-top {
  display: none;
  position: sticky; top: 0; z-index: 100;
  background: rgba(29,29,29,.92); backdrop-filter: blur(12px);
  padding: .85rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  align-items: center; justify-content: space-between;
}
.hamburger { background: none; border: none; color: var(--text); cursor: pointer; padding: .25rem; }
.mobile-sidebar {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
}
.mobile-sidebar-inner {
  background: #262626;
  width: 260px; height: 100%;
  padding: 1.5rem 1rem;
  display: flex; flex-direction: column;
}
.mobile-sidebar.open { display: block; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-top { display: flex; }
  .main-content { padding: 1.25rem 1rem; }
}

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ── */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: .5rem; }
.text-center { text-align: center; }
.text-sm { font-size: .85rem; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .65rem; border-radius: 99px;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.badge--success { background: rgba(52,211,153,.15); color: var(--success); }
.badge--muted { background: var(--bg-input); color: var(--muted); }

.input-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}