/* ============================================================
   LINKME – Corporate Design
   ============================================================ */

:root {
  --primary:       #1D4ED8;
  --primary-hover: #1E40AF;
  --primary-light: #EFF6FF;
  --accent:        #0EA5E9;
  --bg:            #F1F5F9;
  --surface:       #FFFFFF;
  --border:        #E2E8F0;
  --text:          #0F172A;
  --text-muted:    #64748B;
  --text-dim:      #94A3B8;
  --success:       #16A34A;
  --danger:        #DC2626;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: inherit; outline: none; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Spinner ───────────────────────────────────────────────── */
.spinner-wrap { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  border-left: 3px solid var(--primary);
  animation: toastIn 0.25s ease;
  max-width: 300px;
}
.toast-success { border-left-color: var(--success); }
.toast-error   { border-left-color: var(--danger); }
.toast-info    { border-left-color: var(--primary); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.navbar-brand {
  font-size: 18px; font-weight: 800; color: var(--primary); letter-spacing: -0.3px;
}
.navbar-actions { display: flex; align-items: center; gap: 4px; }
.nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  background: transparent; transition: all 0.15s;
}
.nav-btn:hover  { color: var(--text); background: var(--bg); }
.nav-btn.active { color: var(--primary); background: var(--primary-light); }
.nav-btn i { font-size: 14px; }

.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; cursor: pointer;
  border: 2px solid var(--border);
}
.nav-avatar-placeholder {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; cursor: pointer;
  border: 2px solid var(--border);
}

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); min-width: 170px;
  padding: 4px; display: none; z-index: 200;
  box-shadow: var(--shadow-md);
}
.dropdown-menu.open { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 6px;
  font-size: 14px; color: var(--text-muted);
  cursor: pointer; background: transparent;
  width: 100%; text-align: left; transition: all 0.15s;
}
.dropdown-item:hover { background: var(--bg); color: var(--text); }
.dropdown-item.danger:hover { background: #FEF2F2; color: var(--danger); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; transition: all 0.15s; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; border: none; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-muted); border: none; }
.btn-ghost:hover { color: var(--text); background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { background: #B91C1C; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.form-control {
  width: 100%; padding: 10px 12px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,0.1); }
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 88px; }
select.form-control {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
.form-hint  { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 13px; color: var(--danger); margin-top: 5px; font-weight: 500; }

/* ── Layout ────────────────────────────────────────────────── */
.page { padding: 28px 20px; max-width: 680px; margin: 0 auto; }

/* ── Landing ───────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 20px; text-align: center;
  background: linear-gradient(180deg, #EFF6FF 0%, var(--bg) 100%);
}
.hero-inner { max-width: 560px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary);
  font-size: 13px; font-weight: 600; padding: 5px 12px;
  border-radius: 20px; margin-bottom: 20px;
  border: 1px solid #BFDBFE;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 800;
  line-height: 1.15; color: var(--text); margin-bottom: 16px; letter-spacing: -0.5px;
}
.hero h1 span { color: var(--primary); }
.hero p { font-size: 17px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.6; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-top: 64px; text-align: left;
}
.feature-card {
  padding: 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 10px;
  background: var(--primary-light); color: var(--primary);
}
.feature-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.feature-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── Auth ──────────────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center; padding: 24px 20px;
  background: linear-gradient(180deg, #EFF6FF 0%, var(--bg) 100%);
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-md);
}
.auth-logo { font-size: 22px; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: 4px; }
.auth-tagline { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.auth-footer { text-align: center; font-size: 14px; color: var(--text-muted); margin-top: 18px; }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ── Dashboard ─────────────────────────────────────────────── */
.dash-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.dash-tabs::-webkit-scrollbar { height: 0; }
.dash-tab {
  padding: 10px 16px; font-size: 14px; font-weight: 500;
  color: var(--text-muted); background: transparent; border: none;
  border-bottom: 2px solid transparent; cursor: pointer;
  white-space: nowrap; margin-bottom: -1px; transition: all 0.15s;
}
.dash-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.dash-tab:hover:not(.active) { color: var(--text); }
.dash-panel { display: none; }
.dash-panel.active { display: block; }

/* Cover + avatar edit */
.cover-wrap { position: relative; }
.cover-preview {
  height: 150px;
  background: linear-gradient(135deg, #1E3A5F, #2563EB);
  cursor: pointer; position: relative;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-edit-btn {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.45); color: #fff;
  padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; backdrop-filter: blur(4px); border: none;
  display: flex; align-items: center; gap: 5px;
}

.avatar-section {
  display: flex; align-items: flex-end; gap: 14px;
  padding: 0 20px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 20px;
  position: relative; z-index: 1;
}
.avatar-edit-outer {
  position: relative; flex-shrink: 0;
  margin-top: -48px; z-index: 2;
}
.avatar-preview {
  width: 88px; height: 88px; border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative; z-index: 2;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-edit-btn {
  position: absolute; bottom: 2px; right: 2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff; border: 2px solid var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; cursor: pointer; z-index: 3;
}
.avatar-meta { padding-top: 8px; }
.avatar-meta .name { font-size: 16px; font-weight: 700; color: var(--text); }
.avatar-meta .uname { font-size: 13px; color: var(--text-muted); }

/* ── Links ─────────────────────────────────────────────────── */
.links-list { display: flex; flex-direction: column; gap: 8px; }
.link-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: border-color 0.15s;
}
.link-item:hover { border-color: #93C5FD; }
.link-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.link-info { flex: 1; min-width: 0; }
.link-type  { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.link-value { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-label { font-size: 13px; color: var(--primary); font-weight: 500; }
.link-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.link-toggle {
  width: 40px; height: 22px; border-radius: 11px;
  background: var(--border); border: none; cursor: pointer;
  position: relative; transition: background 0.2s; flex-shrink: 0;
}
.link-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.link-toggle.on { background: var(--primary); }
.link-toggle.on::after { left: 21px; }

.add-link-card {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; background: var(--surface);
}
.link-type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px;
  margin-bottom: 16px;
}
.link-type-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 10px 6px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1.5px solid var(--border);
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s;
}
.link-type-btn:hover    { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.link-type-btn.selected { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.link-type-btn i { font-size: 18px; }

/* ── QR ────────────────────────────────────────────────────── */
.qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 0;
}
.qr-box {
  background: #fff; padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  display: inline-block;
}
.qr-url { font-size: 13px; color: var(--primary); font-weight: 500; }

/* ── Public Profile ────────────────────────────────────────── */
.profile-page { max-width: 520px; margin: 0 auto; padding-bottom: 60px; }

.profile-cover-wrap { position: relative; }
.profile-cover {
  height: 180px;
  background: linear-gradient(135deg, #1E3A5F, #2563EB);
  overflow: hidden;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.profile-header-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  padding: 0 20px 20px;
  position: relative; z-index: 1;
}
.profile-avatar-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: -50px; margin-bottom: 12px;
  position: relative; z-index: 2;
}
.profile-avatar {
  width: 92px; height: 92px; border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; color: #fff;
  overflow: hidden; flex-shrink: 0;
  box-shadow: var(--shadow-md);
  position: relative; z-index: 2;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-action-btns { display: flex; gap: 8px; padding-bottom: 4px; }
.profile-name     { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.profile-username { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.profile-bio      { font-size: 14px; color: var(--text-muted); line-height: 1.55; margin-bottom: 10px; }
.profile-views    { font-size: 13px; color: var(--text-dim); }
.profile-views i  { margin-right: 4px; }

.profile-links-section { padding: 16px 0; }
.profile-links { display: flex; flex-direction: column; gap: 10px; padding: 0 12px; }
.profile-link-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
  text-decoration: none; width: 100%;
  box-shadow: var(--shadow);
}
.profile-link-btn:hover {
  border-color: var(--primary); background: var(--primary-light); color: var(--primary);
  box-shadow: var(--shadow-md);
}
.profile-link-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.profile-footer {
  text-align: center; padding: 32px 0 16px;
  font-size: 13px; color: var(--text-dim);
}
.profile-footer a { color: var(--primary); font-weight: 600; }

/* ── Scanner ───────────────────────────────────────────────── */
.scanner-wrap { max-width: 640px; margin: 0 auto; padding: 28px 20px; }
.scanner-header { margin-bottom: 20px; }
.scanner-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.scanner-header p  { font-size: 14px; color: var(--text-muted); }
#reader {
  border-radius: var(--radius) !important; overflow: hidden;
  border: 1px solid var(--border) !important;
  background: #fff;
}
.scanner-result {
  margin-top: 14px; padding: 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 14px;
}

/* ── Contacts ──────────────────────────────────────────────── */
.contacts-list { display: flex; flex-direction: column; gap: 8px; }
.contact-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); cursor: pointer; transition: border-color 0.15s;
}
.contact-card:hover { border-color: #93C5FD; }
.contact-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; flex-shrink: 0; overflow: hidden;
}
.contact-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contact-info { flex: 1; min-width: 0; }
.contact-name     { font-weight: 600; font-size: 14px; color: var(--text); }
.contact-username { font-size: 13px; color: var(--text-muted); }
.contact-remove {
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; cursor: pointer; transition: all 0.15s;
  flex-shrink: 0;
}
.contact-remove:hover { border-color: var(--danger); color: var(--danger); background: #FEF2F2; }

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 20px; color: var(--text-muted);
}
.empty-state i { font-size: 40px; opacity: 0.25; margin-bottom: 14px; color: var(--text); display: block; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.empty-state p  { font-size: 14px; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 20px; cursor: pointer; line-height: 1; padding: 2px;
}
.modal-close:hover { color: var(--text); }

/* ── Cards & Sections ──────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.section-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.page-title    { font-size: 22px; font-weight: 700; margin-bottom: 2px; color: var(--text); }
.page-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── Utilities ─────────────────────────────────────────────── */
.flex         { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.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; }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 13px; }
.fw-600      { font-weight: 600; }
.text-center { text-align: center; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* ── Link type colours ─────────────────────────────────────── */
.lc-whatsapp   { background: #DCFCE7; color: #16A34A; }
.lc-website    { background: #DBEAFE; color: #1D4ED8; }
.lc-phone      { background: #DCFCE7; color: #16A34A; }
.lc-email      { background: #FEF3C7; color: #D97706; }
.lc-instagram  { background: #FCE7F3; color: #BE185D; }
.lc-twitter    { background: #F0F9FF; color: #0369A1; }
.lc-facebook   { background: #EFF6FF; color: #1D4ED8; }
.lc-linkedin   { background: #EFF6FF; color: #0369A1; }
.lc-tiktok     { background: #FDF2F8; color: #9D174D; }
.lc-youtube    { background: #FEF2F2; color: #DC2626; }

/* ── Info rows (settings) ──────────────────────────────────── */
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-muted); font-weight: 500; }
.info-row .value { color: var(--text); font-weight: 600; }

/* ── Sidenav ───────────────────────────────────────────────── */
.hamburger {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border);
  color: var(--text); font-size: 16px; cursor: pointer;
  transition: background 0.15s;
}
.hamburger:hover { background: var(--bg); }

.sidenav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,23,42,0.45); z-index: 300;
}
.sidenav-overlay.open { display: block; }

.sidenav {
  position: fixed; top: 0; left: -290px; width: 270px; height: 100vh;
  background: var(--surface); border-right: 1px solid var(--border);
  z-index: 400; display: flex; flex-direction: column;
  transition: left 0.25s ease; box-shadow: var(--shadow-md);
}
.sidenav.open { left: 0; }

.sidenav-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.sidenav-brand { font-size: 17px; font-weight: 800; color: var(--primary); }
.sidenav-close {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.sidenav-user {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.sidenav-user:hover { background: var(--bg); }
.sidenav-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.sidenav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidenav-user-name  { font-weight: 700; font-size: 14px; color: var(--text); }
.sidenav-user-uname { font-size: 12px; color: var(--text-muted); }

.sidenav-links { flex: 1; padding: 10px; overflow-y: auto; }
.sidenav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; background: transparent; border: none;
  width: 100%; text-align: left; transition: all 0.15s; margin-bottom: 2px;
}
.sidenav-link:hover  { background: var(--bg); color: var(--text); }
.sidenav-link.active { background: var(--primary-light); color: var(--primary); }
.sidenav-link i { width: 18px; text-align: center; font-size: 15px; }
.sidenav-link.danger:hover { background: #FEF2F2; color: var(--danger); }

.sidenav-footer { padding: 12px 10px; border-top: 1px solid var(--border); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .navbar { padding: 0 14px; }
  /* Hide desktop nav items, show hamburger */
  .navbar-actions .nav-btn,
  .navbar-actions .dropdown { display: none; }
  .hamburger { display: flex; }

  .page { padding: 20px 14px; }
  .hero { padding: 36px 16px; }
  .hero h1 { font-size: 1.9rem; }
  .hero-features { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 24px 20px; }
  .link-type-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
  .modal { padding: 20px 16px; }
  .dash-tab { padding: 10px 12px; font-size: 13px; }

  /* Mobile profile: centered, bigger avatar */
  .profile-header-card { padding: 0 16px 20px; text-align: center; }
  .profile-avatar-row {
    flex-direction: column; align-items: center;
    margin-top: -56px; margin-bottom: 10px; gap: 12px;
  }
  .profile-avatar { width: 112px; height: 112px; font-size: 42px; }
  .profile-action-btns { justify-content: center; }
  .profile-links { padding: 0 8px; }
}
