/* =========================================
   SEEME.CLICK – Design System
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────── */
:root {
  /* seeme.click Brand */
  --brand-blue:   #0e58fd;
  --brand-purple: #bc67f0;
  --brand-cyan:   #03d4d4;
  --brand-grad:   linear-gradient(135deg, #0e58fd, #bc67f0, #03d4d4);
  --brand-glow:   0 8px 32px rgba(14,88,253,.35);

  --primary:       #0e58fd;
  --primary-light: #5a8fff;
  --primary-dark:  #0a42c8;
  --primary-bg:    rgba(14,88,253,.10);

  --accent:        #03d4d4;
  --accent-light:  #5eeaea;
  --accent-purple: #bc67f0;

  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;

  --bg:            #0b0f2a;
  --bg-card:       #121637;
  --bg-sidebar:    #080c22;
  --bg-sidebar-hover: #0f1438;
  --bg-section:    #121637;

  --text-primary:   #f0f4ff;
  --text-secondary: #8895c0;
  --text-muted:     #5a6490;
  --text-inverse:   #0b0f2a;

  --border:       rgba(255,255,255,.08);
  --border-focus: #0e58fd;

  --shadow-sm:      0 1px 4px rgba(0,0,0,.4);
  --shadow:         0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:      0 12px 48px rgba(0,0,0,.6);
  --shadow-primary: 0 8px 32px rgba(14,88,253,.35);

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --sidebar-w: 250px;
  --header-h:  64px;
  --transition: .2s cubic-bezier(.4,0,.2,1);

  --font: 'Inter', system-ui, sans-serif;
}

/* ── Reset ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Added to prevent horizontal scroll during sidebar transitions */
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font); border: none; }
input, textarea, select { font-family: var(--font); }
ul { list-style: none; }

/* ── Typography ────────────────────────── */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-secondary); }

/* ── Utility ───────────────────────────── */
.hidden { display: none !important; }
.flex   { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* ── Buttons ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .625rem 1.25rem; border-radius: var(--radius-sm); border: none;
  font-weight: 600; font-size: .875rem; cursor: pointer; transition: var(--transition);
  text-decoration: none; font-family: inherit; min-height: 44px;
}
.btn-primary  { background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-primary); border: none; }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 12px 36px rgba(14,88,253,.45); }
.btn-secondary { background: var(--primary-bg); color: var(--brand-cyan); border: 1px solid rgba(3,212,212,.2); }
.btn-secondary:hover { background: rgba(3,212,212,.15); }
.btn-danger { background: #fef2f2; color: var(--danger); }
.btn-danger:hover { background: #fee2e2; }
.btn-ghost  { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--border); color: var(--text-primary); }
.btn-sm   { padding: .4rem .875rem; font-size: .8rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

/* ── Form Elements ─────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label { font-size: .85rem; font-weight: 600; color: var(--text-primary); }
.form-control {
  width: 100%; padding: .625rem .75rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: rgba(255,255,255,.04); color: var(--text-primary);
  font-family: inherit; font-size: .875rem; transition: var(--transition);
  min-height: 44px; outline: none;
}
.form-control:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(14,88,253,.18); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; display: block; }

/* ── Card ──────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-body  { padding: 1.5rem; }
.card-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); }

/* ── Badge ─────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .625rem; border-radius: var(--radius-full); font-size: .75rem; font-weight: 600; }
.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: #d1fae5; color: #065f46; }

/* ── Toast ─────────────────────────────── */
#toast-container {
  position: fixed; top: 1.25rem; right: 1.25rem;
  z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: .875rem 1.25rem; font-size: .875rem; font-weight: 500;
  display: flex; align-items: center; gap: .625rem;
  animation: slideInRight .3s ease forwards;
  min-width: 260px; max-width: 340px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--primary); }
.toast-icon    { font-size: 1.1rem; }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================
   MODALS & OVERLAYS (Responsive & Sticky Footers)
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem; opacity: 0; animation: fadeIn .2s forwards ease;
}
.modal {
  background: var(--bg-card); width: 100%; max-width: 440px;
  border-radius: var(--radius-lg); overflow: hidden; transform: scale(.95);
  animation: scaleUp .2s forwards ease; box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
  max-height: 90vh; display: flex; flex-direction: column;
}
.modal-header {
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-card); z-index: 2;
}
.modal-title  { font-size: 1.05rem; font-weight: 700; }
.modal-body {
  padding: 1.25rem; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch;
}
.modal-footer {
  padding: 1rem 1.25rem; border-top: 1px solid var(--border);
  background: var(--bg-card); position: sticky; bottom: 0; z-index: 10;
  display: flex; justify-content: flex-end; gap: .75rem;
}
.modal-close  { background: none; font-size: 1.4rem; color: var(--text-muted); line-height: 1; transition: var(--transition); }
.modal-close:hover { color: var(--text-primary); }

@keyframes fadeIn  { from { opacity: 0; }           to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-wrapper {
  min-height: 100vh;
  background: #0b0f2a;
  display: flex; flex-direction: column;
}
.landing-nav {
  padding: 1.25rem 2rem; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(11,15,42,.85); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
}
.landing-logo { display: flex; align-items: center; gap: .625rem; font-size: 1.25rem; font-weight: 800; color: #fff; }
.landing-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.landing-nav-actions { display: flex; gap: .75rem; align-items: center; }
.btn-outline-white {
  border: 1.5px solid rgba(255,255,255,.3); color: #fff;
  background: transparent; padding: .5rem 1.1rem;
  border-radius: var(--radius-sm); font-size: .875rem; font-weight: 600; transition: var(--transition);
}
.btn-outline-white:hover { background: rgba(255,255,255,.08); }
.landing-hero {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 5rem 1.5rem 4rem;
  background:
    radial-gradient(ellipse 70% 50% at 20% 30%, rgba(14,88,253,.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(188,103,240,.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(3,212,212,.12) 0%, transparent 60%);
  position: relative;
}
.landing-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(14,88,253,.15); border: 1px solid rgba(14,88,253,.35);
  color: var(--brand-cyan); padding: .35rem 1rem;
  border-radius: var(--radius-full); font-size: .8rem; font-weight: 600; margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(3,212,212,.15);
}
.landing-hero h1 { color: #fff; margin-bottom: 1.25rem; }
.landing-hero h1 span {
  background: var(--brand-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.landing-hero p { color: rgba(255,255,255,.60); font-size: 1.1rem; max-width: 560px; margin: 0 auto 2.5rem; }
.landing-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.btn-white {
  background: var(--brand-grad); color: #fff; padding: .75rem 1.75rem;
  border-radius: var(--radius-sm); font-size: 1rem; font-weight: 700;
  box-shadow: var(--brand-glow); transition: var(--transition); border: none;
}
.btn-white:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(14,88,253,.5); }
.landing-features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem; padding: 3rem 2rem 4rem; max-width: 1100px; margin: 0 auto; width: 100%;
}
.feature-card {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-lg); padding: 1.75rem; transition: var(--transition);
}
.feature-card:hover { background: rgba(14,88,253,.08); border-color: rgba(14,88,253,.25); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(14,88,253,.15); }
.feature-icon {
  width: 48px; height: 48px;
  background: var(--brand-grad);
  border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(14,88,253,.3);
}
.feature-card h3 { color: #fff; margin-bottom: .4rem; font-size: .95rem; }
.feature-card p  { color: rgba(255,255,255,.55); font-size: .85rem; }

.landing-pricing {
  max-width: 1100px; margin: 0 auto; padding: 4rem 2rem; width: 100%;
}
.pricing-header { text-align: center; margin-bottom: 3rem; color: #fff; }
.pricing-header h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.pricing-header p { color: rgba(255,255,255,.6); font-size: 1.1rem; }
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem; align-items: stretch;
}
.pricing-card {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-lg); padding: 2.5rem 2rem;
  display: flex; flex-direction: column; position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.pricing-card:hover { transform: translateY(-5px); border-color: rgba(14,88,253,.3); box-shadow: 0 12px 40px rgba(14,88,253,.15); }
.pricing-card.popular {
  background: rgba(14,88,253,.08);
  border-color: rgba(14,88,253,.5);
  box-shadow: 0 10px 40px -10px rgba(14,88,253,.3);
}
.popular-badge {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  background: var(--brand-grad);
  color: #fff; font-size: 0.75rem; font-weight: 700; padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.5px;
  box-shadow: var(--brand-glow);
}
.plan-name { font-size: 1.25rem; font-weight: 600; color: #fff; margin-bottom: 0.5rem; }
.plan-price { font-size: 2.5rem; font-weight: 800; color: #fff; margin-bottom: 1.5rem; }
.plan-price span { font-size: 1rem; color: rgba(255,255,255,.5); font-weight: 500; }
.plan-features { list-style: none; padding: 0; margin: 0 0 2rem 0; flex: 1; }
.plan-features li {
  display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem;
  color: rgba(255,255,255,.8); font-size: 0.95rem; line-height: 1.4;
}
.plan-features li .chk { color: #10b981; font-weight: bold; }
.plan-features li.disabled { color: rgba(255,255,255,.3); }
.plan-features li.disabled .chk { color: rgba(255,255,255,.2); }

.landing-footer {
  border-top: 1px solid rgba(255,255,255,.08); padding: 1.5rem 2rem;
  text-align: center; color: rgba(255,255,255,.35); font-size: .8rem;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dash-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); background: var(--bg-sidebar);
  flex-shrink: 0; display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 5; /* Lowered so it doesn't block header buttons while closed */
  transition: transform var(--transition), z-index var(--transition); 
  overflow-y: auto;
}
.sidebar-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: .625rem;
}
.sidebar-logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.sidebar-logo-text { font-size: .9rem; font-weight: 700; color: #fff; }
.sidebar-nav { padding: 1rem 0; flex: 1; }
.nav-section-title {
  padding: .5rem 1.5rem .3rem;
  font-size: .65rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.3);
}
.nav-item {
  display: flex; align-items: center; gap: .875rem; padding: .875rem 1.5rem;
  color: rgba(255,255,255,.6); font-size: .9rem; font-weight: 500;
  transition: var(--transition); cursor: pointer; border: none;
  background: none; width: 100%; text-decoration: none;
  min-height: 52px; /* Improved touch target */
}
.nav-item:hover { background: var(--bg-sidebar-hover); color: #fff; }
.nav-item { border-left: 3px solid transparent; padding-left: calc(1.5rem - 3px); }
.nav-item.active { background: rgba(14,88,253,.2); color: #fff; border-left: 3px solid var(--brand-cyan); border-right: none; }
.nav-item .nav-icon { 
  font-size: 1.25rem; width: 24px; text-align: center; 
  display: flex; align-items: center; justify-content: center;
}
.current-plan-sidebar {
  padding: .25rem 1.25rem .75rem;
  font-size: .7rem; color: rgba(255,255,255,.3);
  text-transform: uppercase; letter-spacing: .05em; font-weight: 700;
}
.current-plan-sidebar strong { color: var(--primary-light); font-size: .75rem; }
.sidebar-footer { padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-user {
  margin: 0 1rem;
  display: flex; align-items: center; gap: .75rem; padding: .625rem;
  border-radius: var(--radius-sm); background: rgba(255,255,255,.05);
}
.sidebar-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0; overflow: hidden;
}
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name { font-size: .8rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: .7rem; color: rgba(255,255,255,.4); }

.sidebar-logout {
  display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem;
  color: #ef4444 !important; font-size: .875rem; font-weight: 600;
  border-radius: var(--radius-sm); margin: .75rem 1rem .25rem;
  transition: var(--transition); text-decoration: none;
  background: rgba(239,68,68,.05);
}
.sidebar-logout:hover { background: rgba(239,68,68,.12); color: #f87171 !important; transform: translateX(2px); }
.sidebar-logout .nav-icon { font-size: 1.15rem; }

.dash-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dash-header {
  height: var(--header-h); background: var(--bg-card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.75rem; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm);
}
.dash-header-left { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; }
.page-title { font-size: 1.1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-breadcrumb { font-size: .8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-title-wrap { min-width: 0; }
.dash-header-right { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.current-plan-badge { display: none; } /* Moved to sidebar */
.current-plan-badge strong { color: var(--primary-dark); font-weight: 700; }
.limit-upgrade-msg {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: .85rem;
  display: flex; align-items: center; gap: .5rem; font-weight: 500;
}
.limit-upgrade-msg a { color: #b45309; text-decoration: underline; font-weight: 700; }
.mobile-menu-btn { 
  display: none; background: none; padding: 0; 
  width: 48px; height: 48px; /* Standard mobile touch target */
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm); color: var(--text-secondary); 
  font-size: 1.75rem; /* Larger icon */
  z-index: 70; /* Above header z-index 50 */
  position: relative; cursor: pointer; border: none;
}
.dash-content { padding: 1.75rem; flex: 1; }
.profile-preview-link {
  display: flex; align-items: center; gap: .5rem;
  background: var(--primary-bg); color: var(--brand-cyan);
  padding: .4rem .875rem; border-radius: var(--radius-full);
  font-size: .8rem; font-weight: 600; transition: var(--transition);
  text-decoration: none; border: 1.5px solid rgba(3,212,212,.25);
}
.profile-preview-link:hover { background: rgba(3,212,212,.12); border-color: var(--brand-cyan); transform: translateY(-1px); }
.profile-preview-link .preview-icon { line-height: 1; font-size: 1rem; }
.dash-section { display: none; }
.dash-section.active { display: block; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.section-title-group h2 { font-size: 1.3rem; margin-bottom: .2rem; }
.section-title-group p  { font-size: .85rem; color: var(--text-muted); }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 1.75rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-sm); transition: var(--transition); }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: .875rem; }
.stat-icon.purple { background: var(--primary-bg); }
.stat-icon.cyan   { background: #ecfeff; }
.stat-icon.green  { background: #d1fae5; }
.stat-icon.orange { background: #fff7ed; }
.stat-value { font-size: 1.75rem; font-weight: 800; margin-bottom: .2rem; }
.stat-label { font-size: .8rem; color: var(--text-muted); font-weight: 500; }

/* Item list */
.item-list { display: flex; flex-direction: column; gap: .75rem; }
.item-row {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem; display: flex; align-items: center; gap: 1rem;
  transition: var(--transition); box-shadow: var(--shadow-sm);
}
.item-row:hover { box-shadow: var(--shadow); }
.item-row-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-sm); background: var(--primary-bg); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.item-row-info { flex: 1; min-width: 0; }
.item-row-title { font-weight: 600; font-size: .9rem; margin-bottom: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row-sub   { font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row-actions { display: flex; gap: .5rem; flex-shrink: 0; }.item-row-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 12px;
  color: var(--text-muted);
  cursor: grab;
  transition: var(--transition);
}
.item-row-handle:hover {
  background: rgba(99,102,241,.08);
}
.sortable-ghost {
  opacity: .45 !important;
}
/* Product cards */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.product-card-dash { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.product-card-dash:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card-img { height: 140px; background: linear-gradient(135deg, #e0e7ff, #f0f9ff); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; overflow: hidden; position: relative; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.product-card-body { padding: 1rem; }
.product-card-title { font-weight: 700; margin-bottom: .3rem; font-size: .9rem; }
.product-card-desc  { font-size: .78rem; color: var(--text-muted); margin-bottom: .625rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-price { font-size: 1rem; font-weight: 800; color: var(--primary); margin-bottom: .75rem; }
.product-card-actions { display: flex; gap: .5rem; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .875rem; }
.gallery-item { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; position: relative; cursor: pointer; background: var(--primary-bg); border: 2px solid var(--border); transition: var(--transition); }
.gallery-item:hover { border-color: var(--primary); transform: scale(1.02); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item-overlay { position: absolute; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; gap: .5rem; opacity: 0; transition: var(--transition); }
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

/* Upload zone */
.upload-zone { border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 2.5rem; text-align: center; cursor: pointer; transition: var(--transition); background: var(--bg); }
.upload-zone:hover { border-color: var(--primary); background: var(--primary-bg); }
.upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.upload-zone p { color: var(--text-muted); font-size: .875rem; }
.upload-zone strong { color: var(--primary); }

/* Avatar / Cover preview */
.avatar-upload-wrap { display: flex; align-items: center; gap: 1.25rem; }
.avatar-preview { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-bg), #e0e7ff); border: 3px solid var(--border); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0; position: relative; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.cover-preview { width: 100%; height: 120px; border-radius: var(--radius); background: linear-gradient(135deg, #e0e7ff, #f0f9ff); border: 2px dashed var(--border); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 2rem; cursor: pointer; position: relative; transition: var(--transition); }
.cover-preview:hover { border-color: var(--primary); }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cover-preview-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; background: rgba(0,0,0,.25); color: #fff; font-size: .8rem; font-weight: 600; opacity: 0; transition: var(--transition); }
.cover-preview:hover .cover-preview-label { opacity: 1; }

/* Empty state */
.empty-state { text-align: center; padding: 3.5rem 1.5rem; background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--radius-lg); }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3   { color: var(--text-primary); margin-bottom: .4rem; }
.empty-state p    { color: var(--text-muted); font-size: .875rem; margin-bottom: 1.25rem; }

/* Input group */
.input-group { display: flex; }
.input-group-prefix { background: var(--bg); border: 1.5px solid var(--border); border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); padding: .625rem .875rem; font-size: .9rem; color: var(--text-muted); white-space: nowrap; display: flex; align-items: center; }
.input-group .form-control { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ============================================
   PUBLIC PROFILE PAGE
   ============================================ */
.profile-cover-wrap { position: relative; }
.profile-cover { width: 100%; height: 240px; background: linear-gradient(135deg, var(--primary-dark), var(--accent)); overflow: hidden; }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-wrap { position: absolute; bottom: -50px; left: 50%; transform: translateX(-50%); }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; border: 4px solid #fff; box-shadow: var(--shadow-lg); background: linear-gradient(135deg, var(--primary), var(--accent)); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-header { text-align: center; padding: 4rem 1.5rem 1.5rem; background: var(--bg-card); border-bottom: 1px solid var(--border); }
.profile-name { font-size: 1.6rem; font-weight: 800; margin-bottom: .3rem; }
.profile-bio  { color: var(--text-secondary); font-size: .925rem; max-width: 480px; margin: 0 auto .875rem; }
.profile-meta { display: flex; align-items: center; justify-content: center; gap: 1.25rem; flex-wrap: wrap; }
.profile-meta-item { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--text-muted); }

/* Social icons – fully theme-controlled, no hardcoded platform colors */
.social-icons-row { display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap; padding: 1.5rem; }
.social-icon-btn {
  width: var(--theme-social-size, 48px);
  height: var(--theme-social-size, 48px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  transition: var(--transition);
  /* No border / background by default – style variants below control this */
  border: none; background: transparent; box-shadow: none;
}
.social-icon-btn:hover { transform: translateY(-3px) scale(1.08); }
/* circle (default): subtle border + light bg from theme */
[data-social-style="circle"] .social-icon-btn,
body:not([data-social-style]) .social-icon-btn {
  border: 2px solid var(--theme-social-bg, rgba(128,128,128,0.3));
  background: transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Profile sections */
#tab-store, #tab-media { padding-top: 4rem; }
.profile-container { max-width: 780px; margin: 0 auto; padding: 1.5rem 1.25rem calc(80px + env(safe-area-inset-bottom, 0px)); }
.profile-section { margin-bottom: 2.5rem; margin-top: 50px; }
.profile-section-title { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--border); }

/* Custom link cards */
.custom-link-card { display: flex; align-items: center; gap: 1rem; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; margin-bottom: .75rem; transition: var(--transition); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text-primary); cursor: pointer; }
.custom-link-card:hover { border-color: var(--primary); box-shadow: var(--shadow-primary); transform: translateY(-2px); color: var(--primary); }
.custom-link-icon-wrap { width: 42px; height: 42px; flex-shrink: 0; border-radius: var(--radius-sm); background: var(--theme-btn-icon-bg, var(--primary-bg)); color: var(--theme-btn-icon-color, var(--primary)); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.custom-link-title { font-weight: 700; font-size: .95rem; }
.custom-link-arrow { margin-left: auto; color: var(--text-muted); font-size: 1rem; }

/* Public products */
.pub-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.pub-product-card  { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); }
.pub-product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.pub-product-img   { height: 160px; background: linear-gradient(135deg, #e0e7ff, #f0f9ff); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; overflow: hidden; position: relative; }
.pub-product-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.pub-product-body  { padding: 1rem; }
.pub-product-title { font-weight: 700; font-size: .925rem; margin-bottom: .3rem; }
.pub-product-desc  { font-size: .78rem; color: var(--text-muted); margin-bottom: .625rem; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pub-product-price { font-size: 1.05rem; font-weight: 800; color: var(--primary); margin-bottom: .875rem; }
.pub-product-btn   { width: 100%; padding: .6rem; background: var(--primary); color: #fff; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 600; transition: var(--transition); text-align: center; display: block; }
.pub-product-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* Gallery (public) */
.pub-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; }
.pub-gallery-item { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative; background: linear-gradient(135deg, #e0e7ff, #f0f9ff); border: 2px solid var(--border); transition: var(--transition); }
.pub-gallery-item:hover { transform: scale(1.04); border-color: var(--primary); }
.pub-gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* Gallery modal */
.gallery-modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.88); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fadeIn .2s ease; }
.gallery-modal-content { position: relative; max-width: 85vw; max-height: 85vh; }
.gallery-modal-content img { max-width: 85vw; max-height: 85vh; border-radius: var(--radius-lg); box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.gallery-modal-close { position: absolute; top: -16px; right: -16px; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--text-primary); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); border: none; cursor: pointer; transition: var(--transition); }
.gallery-modal-close:hover { background: var(--danger); color: #fff; }

/* WhatsApp float */
.whatsapp-float { position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 900; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.75rem; box-shadow: 0 4px 20px rgba(37,211,102,.45); text-decoration: none; transition: var(--transition); animation: waFloat 2.5s ease-in-out infinite; }
.whatsapp-float:hover { background: #128c7e; transform: scale(1.12); box-shadow: 0 8px 28px rgba(37,211,102,.5); }
@keyframes waFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Public header */
.pub-header { background: var(--bg-sidebar); padding: .875rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.pub-header-logo { display: flex; align-items: center; gap: .5rem; color: #fff; font-weight: 700; }
.pub-header-logo .logo-icon { width: 28px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: flex; align-items: center; justify-content: center; font-size: .85rem; }

/* ============================================
   SIDEBAR OVERLAY (mobile)
   ============================================ */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 99; }
.sidebar-overlay.open { display: block; }

/* ============================================
   AUTH PAGES (login.php / register.php)
   ============================================ */
.auth-body {
  min-height: 100vh;
  background: #0b0f2a;
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  position: relative; overflow: hidden;
}
.auth-body::before {
  content: ''; position: absolute;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(14,88,253,.18) 0%, transparent 70%);
  top: -200px; left: -100px; pointer-events: none;
}
.auth-body::after {
  content: ''; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(188,103,240,.14) 0%, transparent 70%);
  bottom: -150px; right: -100px; pointer-events: none;
}
.auth-wrapper { width: 100%; max-width: 460px; }
.auth-card { background: rgba(18,22,55,.95); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg), 0 0 80px rgba(14,88,253,.1); padding: 2.5rem; border: 1px solid rgba(255,255,255,.08); animation: scaleIn .25s ease; position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.75rem; }
.auth-logo img { height: 34px; width: auto; }
.auth-logo-icon { width: 34px; height: 34px; background: var(--brand-grad); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #fff; }
.auth-header { margin-bottom: 1.5rem; }
.auth-header h2 { font-size: 1.5rem; margin-bottom: .3rem; color: var(--text-primary); }
.auth-header p  { font-size: .875rem; color: var(--text-muted); }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-submit { margin-top: .5rem; padding: .75rem; font-size: .95rem; }
.auth-alert { border-radius: var(--radius-sm); padding: .875rem 1rem; font-size: .85rem; margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: .25rem; }
.auth-alert-error   { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.auth-alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.auth-footer { margin-top: 1.5rem; text-align: center; font-size: .85rem; color: var(--text-muted); }
.auth-footer a { color: var(--brand-cyan); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .grid-3    { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w); box-shadow: 10px 0 30px rgba(0,0,0,0.5); }
  .sidebar.open { transform: translateX(0); z-index: 100; }
  .dash-main { margin-left: 0; width: 100%; }
  .dash-header { padding: 0 1rem; }
  .page-breadcrumb { display: none; }
  .mobile-menu-btn { display: flex; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pub-products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .page-title { font-size: 1rem; }
  .stats-row { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .dash-header-right .btn span { display: none; } /* Hide button text if any */
  .profile-preview-link { padding: 0; width: 42px; height: 42px; border-radius: 50%; justify-content: center; min-width: 42px; }
  .profile-preview-link .preview-text { display: none; }
  .profile-preview-link .preview-icon { font-size: 1.25rem; }
}
@media (min-width: 2560px) {
  .dash-content { max-width: 1600px; margin: 0 auto; }
}

/* Fix global table overflow in card-body */
.card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ================================================
   PROFILE ACTION BUTTONS  (Contact / QR / Share)
   ================================================ */
.pub-header-actions {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.pub-action-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .7rem;
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-full);
  font-size: .78rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); text-decoration: none; white-space: nowrap;
}
.pub-action-btn:hover {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.5);
  transform: translateY(-1px);
}
.pub-action-icon { font-size: .95rem; line-height: 1; }
@media (max-width: 420px) {
  .pub-action-label { display: none; }
  .pub-action-btn   { padding: .38rem .5rem; }
}

/* Dashboard Profile Actions section */
.contact-checklist { display: flex; flex-direction: column; gap: .6rem; }
.contact-check-item {
  display: flex; align-items: center; gap: .625rem; font-size: .875rem;
  padding: .625rem .875rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.contact-check-item .ck-icon { font-size: 1.05rem; flex-shrink: 0; }
.contact-check-item.ok   { border-color: #6ee7b7; background: #f0fdf4; }
.contact-check-item.warn { border-color: #fcd34d; background: #fffbeb; }
.profile-qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  padding: 1.5rem; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border);
}

/* ── Bottom Navigation ──────────────────────────────── */
.profile-page {
    padding-bottom: 120px; /* Space for bottom nav */
    padding-bottom: calc(120px + env(safe-area-inset-bottom));
  }

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .bnav-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.75rem 0.5rem;
  background: transparent; border: none;
  color: var(--text-muted, #6b7280);
  font-size: 0.75rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
  gap: 0.25rem;
}

.bottom-nav .bnav-btn span:first-child {
  font-size: 1.25rem;
  filter: grayscale(100%) opacity(0.6);
  transition: all 0.2s;
}

.bottom-nav .bnav-btn:hover {
  color: var(--text-primary, #111827);
  background: rgba(0,0,0,0.03);
}

.bottom-nav .bnav-btn.active {
  color: var(--button-bg, #4f46e5);
}

.bottom-nav .bnav-btn.active span:first-child {
  filter: grayscale(0%) opacity(1);
  transform: translateY(-2px);
}

/* ── Media Video Embeds ──────────────────────────────── */
.video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
}

/* ── Cover Action Buttons ────────────────────────────── */
.cover-actions {
  position: absolute;
  top: 1rem; right: 1rem;
  display: flex; gap: 0.5rem;
  z-index: 10;  

}
.pub-action-btn-cover {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: none;
  
  display: flex; align-items: center; justify-content: center;
   cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  padding: 0;
  background: rgba(0,0,0,0.5);
 
  border-color: rgba(255,255,255,0.3);
  flex-shrink: 0;
  aspect-ratio: 1/1;
 
  backdrop-filter: blur(10px);
}
 
.pub-action-btn-cover .pub-action-icon {
  font-size: 1.1rem; line-height: 1;
}
.pub-action-btn-cover .pub-action-icon img {
  filter: brightness(200);
}

/* ── Cart & Product UI ──────────────────────────────── */
.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--button-bg, #4f46e5); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}
.product-modal-img {
  width: 100%; height: 220px;
  background: #f3f4f6;
  border-bottom: 1px solid var(--border);
}
.product-modal-body { padding: 1.25rem; }
.product-modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; }
.product-modal-price { font-size: 1.15rem; font-weight: 600; color: var(--button-bg, #4f46e5); margin-bottom: 1rem; }
.product-modal-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 1.5rem; }
.product-modal-actions {
  display: flex; gap: 0.75rem; align-items: center;
}
.qty-selector {
  display: flex; align-items: center; border: 2px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; height: 42px;
}
.qty-selector button {
  width: 38px; height: 100%; border: none; background: #f9fafb; cursor: pointer; font-size: 1.25rem; font-weight: 600; color: var(--text-primary, #111827); outline: none; transition: background 0.2s;
}
.qty-selector button:hover { background: #f3f4f6; }
.qty-selector input {
  width: 44px; text-align: center; border: none; border-left: 2px solid var(--border); border-right: 2px solid var(--border); font-weight: 600; font-size: 1rem; color: var(--text-primary, #111827); height: 100%; outline: none; background: transparent; pointer-events: none;
}
.qty-selector.small { height: 32px; border-width: 1px; }
.qty-selector.small button { width: 28px; font-size: 1rem; }
.qty-selector.small input { width: 32px; font-size: 0.9rem; border-width: 1px; }

.cart-item-row { display: flex; align-items: center; gap: 0.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.cart-item-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.ci-title { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.15rem; }
.ci-price { font-size: 0.85rem; color: var(--text-muted); }

.cart-footer { padding: 1.25rem; border-top: 1px solid var(--border); background: #f9fafb; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.cart-total-row { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; }

.cart-toast {
  position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff;
  padding: 0.75rem 1rem; border-radius: var(--radius-md); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
  display: flex; align-items: center; gap: 1rem; width: 90%; max-width: 400px; z-index: 3000;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); opacity: 0;
}
/* Move toast up higher on mobile to avoid bottom nav */
.cart-toast.show { bottom: calc(85px + env(safe-area-inset-bottom)); opacity: 1; }
.cart-toast .toast-btn {
  background: #4f46e5; color: #fff; border: none; padding: 0.4rem 0.75rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: opacity 0.2s; min-height: 36px;
}
.cart-toast .toast-btn:hover { opacity: 0.9; }

/* ── Global Media Queries ──────────────────────────────── */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cover-actions { flex-wrap: wrap; justify-content: flex-end; }
  
  /* Make tables responsive */
  .admin-table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .profile-cover { height: 160px; }
}

/* ── Dashboard Mobile Sidebar ──────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 90; opacity: 0; transition: opacity 0.3s ease;
}
@media (max-width: 768px) {
  .dash-main { margin-left: 0; width: 100%; }
  .sidebar {
    transform: translateX(-100%); width: 260px;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu-btn { display: inline-block; }
  .sidebar-overlay.open { display: block; opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════
   THEME SYSTEM EXTENSIONS – settings_json driven
   All rules here are controlled by CSS vars injected by
   profile.php from settings_json, plus [data-*] attributes
   set on <body> for variant selection.
   ══════════════════════════════════════════════════════════════ */

/* ── Profile Name & Meta Color/Size ───────────────────────── */
.profile-name {
  font-size:   var(--theme-name-size, 1.85rem) !important;
  color:       var(--theme-name-color, var(--text-primary)) !important;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.profile-bio { color: var(--text-secondary) !important; }
.profile-meta-info .meta-item,
.profile-meta-info .meta-item a {
  color: var(--theme-meta-color, var(--text-secondary)) !important;
}

/* Hero layout: force white text/border over cover image */
[data-layout="hero"] .profile-main-header .profile-name {
  color:       #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
[data-layout="hero"] .profile-main-header .profile-bio {
  color: rgba(255,255,255,0.9) !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
[data-layout="hero"] .profile-main-header .meta-item,
[data-layout="hero"] .profile-main-header .meta-item a,
[data-layout="hero"] .profile-main-header .meta-link,
[data-layout="hero"] .profile-main-header .meta-username {
  color: rgba(255,255,255,0.85) !important;
}
[data-layout="hero"] .profile-avatar-container {
  border-color: rgba(255,255,255,0.35) !important;
}
 

/* ── Form title / label / placeholder colors ───────────────── */
.profile-contact-form-title {
  color: var(--theme-form-title-color, var(--text-primary)) !important;
}
.profile-contact-form label {
  color: var(--theme-form-label-color, var(--text-primary)) !important;
}
.profile-contact-form .form-control::placeholder {
  color: var(--theme-form-placeholder-color, rgba(128,128,128,0.6)) !important;
  opacity: 1;
}

/* ── Avatar Shape Variants ─────────────────────────────────── */
.profile-avatar-container {
  width:  var(--theme-avatar-size, 120px);
  height: var(--theme-avatar-size, 120px);
  border-width:  var(--theme-avatar-border-w, 4px);
  border-color:  var(--theme-avatar-border-color, #fff);
  box-shadow:    var(--theme-avatar-shadow, 0 10px 30px rgba(0,0,0,0.12));
  border-style: solid;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 3rem;
  transition: border-radius 0.3s ease;
}
/* Shape: circle (default – radius set inline in PHP) */
[data-avatar-shape="circle"]  .profile-avatar-container { border-radius: 50%; }
[data-avatar-shape="rounded"] .profile-avatar-container { border-radius: 1.5rem !important; }
[data-avatar-shape="square"]  .profile-avatar-container { border-radius: 0.375rem !important; }

/* ── Social Icon Style Variants ────────────────────────────── */
.social-icon-btn {
  width:  var(--theme-social-size, 48px);
  height: var(--theme-social-size, 48px);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
/* rounded square */
[data-social-style="rounded"] .social-icon-btn {
  border-radius: 0.875rem !important;
}
/* filled: solid background, white icon */
[data-social-style="filled"] .social-icon-btn {
  background:   var(--theme-social-bg, var(--button-bg)) !important;
  border-color: var(--theme-social-bg, var(--button-bg)) !important;
  border-radius: 50% !important;
}
[data-social-style="filled"] .social-icon-btn img {
  filter: brightness(0) invert(1);
}
/* outline: transparent bg, colored border */
[data-social-style="outline"] .social-icon-btn {
  background:   transparent !important;
  border: 2px solid var(--theme-social-bg, var(--button-bg)) !important;
  border-radius: 50% !important;
}
[data-social-style="outline"] .social-icon-btn img {
  opacity: 0.8;
}

/* ── Link / Button Style Variants ──────────────────────────── */

/* Base: white card, subtle theme-tinted border */
.custom-link-card {
  background:    var(--surface-card, #fff) !important;
  border-color:  color-mix(in srgb, var(--button-bg) 18%, transparent) !important;
  border-radius: var(--button-radius, 0.75rem) !important;
  color:         var(--text-primary) !important;
  box-shadow:    none;
}
.custom-link-card:hover {
  background:   var(--button-bg) !important;
  color:        var(--button-text) !important;
  border-color: var(--button-bg) !important;
  transform:    translateY(-2px);
}
/* When card fills on hover, icon wrap adapts to the filled context */
.custom-link-card:hover .custom-link-icon-wrap {
  background: rgba(255,255,255,0.18);
  color:      #fff;
}

/* card – inherits base */
[data-link-style="card"] .custom-link-card { /* inherits base */ }

/* pill – always filled, full radius, icon always white-tinted */
[data-link-style="pill"] .custom-link-card {
  border-radius: 9999px !important;
  background:    var(--button-bg) !important;
  color:         var(--button-text) !important;
  border-color:  transparent !important;
  padding-left:  1.5rem !important;
  padding-right: 1.25rem !important;
}
[data-link-style="pill"] .custom-link-card:hover {
  filter:     brightness(1.08);
  background: var(--button-bg) !important;
  color:      var(--button-text) !important;
  transform:  translateY(-2px);
}
[data-link-style="pill"] .custom-link-icon-wrap {
  background: rgba(255,255,255,0.18);
  color:      #fff;
}

/* outline – border-based, transparent at rest; fills on hover */
[data-link-style="outline"] .custom-link-card {
  background: transparent !important;
  border:     var(--theme-btn-border-width, 2px) solid var(--theme-btn-border-color, var(--button-bg)) !important;
  color:      var(--theme-btn-border-color, var(--button-bg)) !important;
}
[data-link-style="outline"] .custom-link-card:hover {
  background:   var(--button-bg) !important;
  color:        var(--button-text) !important;
  border-color: var(--button-bg) !important;
}
/* Outline icon: transparent bg, matches border color at rest */
[data-link-style="outline"] .custom-link-icon-wrap {
  background: transparent;
  color:      var(--theme-btn-border-color, var(--button-bg));
}

/* floating – elevated card, stays card-colored on hover */
[data-link-style="floating"] .custom-link-card {
  box-shadow:   0 4px 18px rgba(0,0,0,0.13) !important;
  border-color: transparent !important;
}
[data-link-style="floating"] .custom-link-card:hover {
  transform:    translateY(-3px) !important;
  box-shadow:   0 10px 28px rgba(0,0,0,0.18) !important;
  background:   var(--surface-card, #fff) !important;
  color:        var(--text-primary) !important;
  border-color: transparent !important;
}
/* Floating stays white on hover — icon keeps its own colors */
[data-link-style="floating"] .custom-link-card:hover .custom-link-icon-wrap {
  background: var(--theme-btn-icon-bg, var(--primary-bg));
  color:      var(--theme-btn-icon-color, var(--primary));
}

/* minimal – text row with bottom divider only; no card chrome */
[data-link-style="minimal"] .custom-link-card {
  background:    transparent !important;
  border:        none !important;
  border-bottom: 1px solid rgba(128,128,128,0.15) !important;
  border-radius: 0 !important;
  box-shadow:    none !important;
}
[data-link-style="minimal"] .custom-link-card:last-child {
  border-bottom: none !important;
}
[data-link-style="minimal"] .custom-link-card:hover {
  background: rgba(128,128,128,0.06) !important;
  transform:  none !important;
  color:      var(--text-primary) !important;
}
/* Minimal: no icon container chrome */
[data-link-style="minimal"] .custom-link-icon-wrap,
[data-link-style="minimal"] .custom-link-card:hover .custom-link-icon-wrap {
  background: transparent;
  color:      var(--text-primary);
}
[data-link-style="minimal"] .custom-link-arrow { display: none !important; }

/* ── New schema: solid / glass / outline ───────────────────── */
[data-link-style="solid"] .custom-link-card {
  background:   var(--theme-accent, var(--button-bg)) !important;
  color:        var(--button-text, #fff) !important;
  border:       none !important;
  box-shadow:   none !important;
}
[data-link-style="solid"] .custom-link-card:hover {
  filter:       brightness(1.08);
  transform:    translateY(-1px) !important;
}
[data-link-style="solid"] .custom-link-icon-wrap {
  background: rgba(255,255,255,0.18);
  color:      #fff;
}
[data-link-style="solid"] .custom-link-card:hover .custom-link-icon-wrap {
  background: rgba(255,255,255,0.25);
}

[data-link-style="glass"] .custom-link-card {
  background:          rgba(255,255,255,0.15) !important;
  backdrop-filter:     blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border:              1px solid rgba(255,255,255,0.3) !important;
  color:               var(--button-text, #fff) !important;
  box-shadow:          0 2px 12px rgba(0,0,0,0.08) !important;
}
[data-link-style="glass"] .custom-link-card:hover {
  background:   rgba(255,255,255,0.25) !important;
  transform:    translateY(-1px) !important;
}
[data-link-style="glass"] .custom-link-icon-wrap {
  background: rgba(255,255,255,0.2);
  color:      var(--button-text, #fff);
}
[data-link-style="glass"] .custom-link-card:hover .custom-link-icon-wrap {
  background: rgba(255,255,255,0.3);
}

/* ── Button radius (new schema data-btn-radius) ─────────────── */
[data-btn-radius="square"]  .custom-link-card { border-radius: 4px    !important; }
[data-btn-radius="round"]   .custom-link-card { border-radius: 8px    !important; }
[data-btn-radius="rounder"] .custom-link-card { border-radius: 16px   !important; }
[data-btn-radius="full"]    .custom-link-card { border-radius: 9999px !important; }

/* ── Product Card Variants ─────────────────────────────────── */
.pub-product-card {
  border-radius: var(--theme-products-card-radius, 12px) !important;
}
.pub-product-img {
  border-radius: var(--theme-products-card-radius, 12px) var(--theme-products-card-radius, 12px) 0 0 !important;
  overflow: hidden;
}
.pub-product-title { color: var(--theme-products-title, inherit); }
.pub-product-price { color: var(--theme-products-price, var(--button-bg)); }

/* Mobile product grid fix */
@media (max-width: 480px) {
  .pub-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .pub-product-img { min-height: 110px; }
  .pub-product-body { padding: 0.625rem; }
  .pub-product-title { font-size: 0.82rem; }
  .pub-product-price { font-size: 0.82rem; }
}

/* ── Form Style Variants ────────────────────────────────────── */
.profile-contact-form .form-control {
  border-radius:   var(--theme-form-radius, 0.5rem) !important;
  background:      var(--theme-form-input-bg, #f8f9fa) !important;
  border: 1px solid var(--theme-form-input-border, rgba(128,128,128,0.3)) !important;
  color: var(--text-primary) !important;
}
/* soft */
[data-form-style="soft"] .profile-contact-form .form-control {
  border-radius: 1.25rem !important;
  border-color:  transparent !important;
  background:    rgba(128,128,128,0.08) !important;
}
/* outline */
[data-form-style="outline"] .profile-contact-form .form-control {
  background:   transparent !important;
  border: 2px solid var(--theme-form-input-border, #cbd5e1) !important;
}
/* minimal */
[data-form-style="minimal"] .profile-contact-form .form-control {
  background:    transparent !important;
  border:        none !important;
  border-bottom: 1.5px solid var(--theme-form-input-border, rgba(128,128,128,0.4)) !important;
  border-radius: 0 !important;
  padding-left:  0 !important;
  padding-right: 0 !important;
}

/* ── Floating Action Tools (FAB) ────────────────────────────── */
.fab-tools {
  position: fixed;
  top: 5rem; right: 1.25rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  transition: top 0.3s ease;
}
.fab-tools.scrolled { top: 1.25rem; }

.fab-action-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer; text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  position: relative; flex-shrink: 0;
}
.fab-action-btn:hover { background: rgba(0,0,0,0.65); transform: scale(1.08); }
.fab-action-btn img { display: block; }

.fab-toggle-btn { display: none; }
.fab-actions-group { display: contents; }

@media (max-width: 640px) {
  /* Reposition FAB to bottom-right on mobile, above bottom nav */
  .fab-tools {
    top: unset !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    align-items: flex-end;
  }

  /* The collapsible group */
  .fab-actions-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    position: absolute;
    bottom: calc(100% + 0.625rem);
    right: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.9);
    transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.4,0,0.2,1);
  }
  .fab-tools.open .fab-actions-group {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
  }

  /* Each action gets a label */
  .fab-action-btn::before {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 0.5rem);
    background: rgba(0,0,0,0.72);
    color: #fff; font-size: 0.7rem; font-weight: 600;
    padding: 0.25rem 0.5rem; border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
  }
  .fab-tools.open .fab-action-btn::before { opacity: 1; }

  /* Toggle button: shown on mobile */
  .fab-toggle-btn {
    display: flex;
    width: 50px; height: 50px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.25);
    align-items: center; justify-content: center;
    color: #fff; cursor: pointer;
    font-size: 1.35rem; font-weight: 300;
    transition: background 0.2s, transform 0.25s cubic-bezier(0.4,0,0.2,1);
    position: relative; z-index: 2; flex-shrink: 0;
  }
  .fab-toggle-btn.open {
    background: rgba(0,0,0,0.75);
    transform: rotate(45deg);
  }
}
