/* ============================================================
   main.css — CreatorHub Design System
   Professional / Corporate — Blue & Steel palette
   ============================================================ */

/* ── Google Fonts loaded in HTML ─────────────────────────────
   Display : Syne (800 bold, 700, 600)
   Body    : DM Sans (300 light, 400, 500)
   ──────────────────────────────────────────────────────────── */

/* ── CSS Custom Properties ──────────────────────────────────── */
:root {
  /* Brand Colors */
  --blue-950:  #060d1f;
  --blue-900:  #0b1a38;
  --blue-800:  #102354;
  --blue-700:  #163070;
  --blue-600:  #1e40a0;
  --blue-500:  #2563eb;
  --blue-400:  #3b82f6;
  --blue-300:  #93c5fd;
  --blue-100:  #dbeafe;
  --blue-50:   #eff6ff;

  /* Neutrals */
  --grey-950:  #09090b;
  --grey-900:  #111115;
  --grey-800:  #1c1c22;
  --grey-700:  #2d2d37;
  --grey-600:  #3f3f52;
  --grey-500:  #6b6b80;
  --grey-400:  #9494a8;
  --grey-300:  #c4c4d0;
  --grey-200:  #e2e2ea;
  --grey-100:  #f1f1f5;
  --grey-50:   #fafafa;
  --white:     #ffffff;

  /* Accent */
  --accent:       #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --accent-glow:  rgba(37, 99, 235, 0.35);

  /* Semantic */
  --success:    #16a34a;
  --success-bg: #dcfce7;
  --warning:    #d97706;
  --warning-bg: #fef3c7;
  --danger:     #dc2626;
  --danger-bg:  #fee2e2;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing (8pt grid) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs:   0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.14);
  --shadow-xl:   0 16px 48px rgba(0,0,0,.18);
  --shadow-blue: 0 4px 20px rgba(37,99,235,.28);

  /* Layout */
  --sidebar-w:  260px;
  --topbar-h:   64px;
  --content-max:900px;

  /* Transitions */
  --ease:       cubic-bezier(.22,.68,0,1.2);
  --ease-smooth:cubic-bezier(.4,0,.2,1);
  --dur-fast:   140ms;
  --dur-base:   220ms;
  --dur-slow:   360ms;

  /* Z-index ladder */
  --z-below:   -1;
  --z-base:     0;
  --z-float:   10;
  --z-nav:     100;
  --z-modal:   200;
  --z-toast:   300;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--grey-900);
  background: var(--grey-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
p  { line-height: 1.7; color: var(--grey-600); }
small { font-size: .8125rem; }
em { font-style: italic; color: var(--blue-500); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: .01em;
  transition: all var(--dur-base) var(--ease-smooth);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 60%);
  pointer-events: none;
  border-radius: inherit;
}
.btn--primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(37,99,235,.38);
}
.btn--primary:active { transform: translateY(0); }
.btn--secondary {
  background: var(--white);
  color: var(--grey-800);
  border: 1.5px solid var(--grey-200);
  box-shadow: var(--shadow-xs);
}
.btn--secondary:hover {
  border-color: var(--blue-400);
  color: var(--accent);
  background: var(--blue-50);
}
.btn--ghost {
  background: transparent;
  color: var(--grey-700);
  padding: 8px var(--space-4);
}
.btn--ghost:hover { background: var(--grey-100); color: var(--accent); }
.btn--danger  { background: var(--danger); color: var(--white); }
.btn--danger:hover { background: #b91c1c; }
.btn--sm { padding: 7px var(--space-4); font-size: .875rem; }
.btn--full { width: 100%; }
.btn-arrow { transition: transform var(--dur-fast) var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }
.btn--icon {
  width: 38px; height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--grey-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-smooth),
              transform  var(--dur-base) var(--ease-smooth);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card__body  { padding: var(--space-6); }
.card__head  { padding: var(--space-4) var(--space-6); border-bottom: 1px solid var(--grey-100); }
.card__foot  { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--grey-100); background: var(--grey-50); }

/* ── Avatar ─────────────────────────────────────────────────── */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-xs);
}
.avatar--xs  { width: 28px;  height: 28px; }
.avatar--sm  { width: 36px;  height: 36px; }
.avatar--md  { width: 48px;  height: 48px; }
.avatar--lg  { width: 72px;  height: 72px; }
.avatar--xl  { width: 96px;  height: 96px; }
.avatar--2xl { width: 128px; height: 128px; border-width: 4px; }

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.badge--blue    { background: var(--blue-100); color: var(--blue-700); }
.badge--green   { background: var(--success-bg); color: var(--success); }
.badge--grey    { background: var(--grey-100); color: var(--grey-600); }
.badge--creator { background: linear-gradient(90deg,#1e40a0,#2563eb); color: var(--white); }
.badge--verified {
  background: var(--accent);
  color: var(--white);
  font-size: .65rem;
  padding: 2px 7px;
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: var(--space-5);
  border-left: 3px solid;
  animation: slideDown var(--dur-base) var(--ease);
}
.alert--error   { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger); }
.alert--success { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.alert--info    { background: var(--blue-50);    color: var(--blue-700);border-color: var(--accent); }
.alert-icon     { font-size: 1.1em; flex-shrink: 0; }

/* ── Forms ──────────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-5); }
.field-group label {
  font-family: var(--font-display);
  font-size: .875rem;
  font-weight: 600;
  color: var(--grey-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.label-link { font-weight: 500; color: var(--accent); font-size: .85rem; }
.label-link:hover { text-decoration: underline; }

.input-wrap { position: relative; }
.input-wrap input,
.input-wrap textarea,
.input-wrap select {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--grey-900);
  font-size: .9375rem;
  transition: border-color var(--dur-fast) var(--ease-smooth),
              box-shadow   var(--dur-fast) var(--ease-smooth);
}
.input-wrap input:focus,
.input-wrap textarea:focus,
.input-wrap select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-wrap input::placeholder { color: var(--grey-400); }
.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  color: var(--grey-400);
}
.toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--grey-400);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast);
}
.toggle-pw:hover { color: var(--grey-700); }

.field-row   { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-5); }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: .9rem;
  color: var(--grey-600);
  user-select: none;
}
.checkbox-label input[type=checkbox] { display: none; }
.checkbox-custom {
  width: 18px; height: 18px;
  border: 2px solid var(--grey-300);
  border-radius: 5px;
  flex-shrink: 0;
  transition: all var(--dur-fast) var(--ease-smooth);
  position: relative;
}
.checkbox-label input:checked + .checkbox-custom {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-label input:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 700;
}

/* Password strength */
.password-strength { margin-top: 8px; }
.strength-bar      { height: 4px; background: var(--grey-200); border-radius: 4px; overflow: hidden; }
.strength-bar span { display: block; height: 100%; width: 0%; border-radius: 4px; transition: all .3s; }
.strength-label    { display: block; margin-top: 4px; color: var(--grey-500); }

/* Social buttons */
.social-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-bottom: var(--space-5); }
.btn--social {
  background: var(--white);
  border: 1.5px solid var(--grey-200);
  color: var(--grey-700);
  padding: 10px var(--space-4);
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: all var(--dur-base);
}
.btn--social:hover { border-color: var(--blue-400); background: var(--blue-50); color: var(--accent); }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  color: var(--grey-400);
  font-size: .85rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--grey-200);
}

/* ── Utilities ──────────────────────────────────────────────── */
.flex      { display: flex; }
.flex-col  { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.w-full { width: 100%; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.text-sm  { font-size: .875rem; }
.text-xs  { font-size: .75rem; }
.text-muted { color: var(--grey-500); }
.text-accent { color: var(--accent); }
.font-bold  { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-auto { margin-top: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--grey-300); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey-400); }

/* ── Layout Shell ───────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  min-height: 100vh;
}
.topbar  { grid-column: 1 / -1; position: sticky; top: 0; z-index: var(--z-nav); }
.sidebar { grid-row: 2; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; }
.main    { grid-row: 2; overflow-x: hidden; }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--grey-200);
  gap: var(--space-4);
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--grey-900);
  flex-shrink: 0;
  width: var(--sidebar-w);
  padding-right: var(--space-6);
}
.topbar-logo .logo-icon { color: var(--accent); font-size: 1.4rem; }
.topbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  padding: 9px 14px 9px 40px;
  background: var(--grey-100);
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  font-size: .9rem;
  transition: all var(--dur-fast);
}
.topbar-search input:focus {
  background: var(--white);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}
.topbar-search .search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-400);
  pointer-events: none;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}
.topbar-btn {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--grey-600);
  font-size: 1.1rem;
  transition: all var(--dur-fast);
}
.topbar-btn:hover { background: var(--grey-100); color: var(--accent); }
.topbar-btn .badge-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: var(--radius-full);
  border: 2px solid var(--white);
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 8px 4px 4px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--dur-fast);
  margin-left: var(--space-2);
}
.topbar-user:hover { background: var(--grey-100); }
.topbar-user-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .875rem;
  color: var(--grey-900);
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  background: var(--white);
  border-right: 1px solid var(--grey-200);
  padding: var(--space-5) 0;
  display: flex;
  flex-direction: column;
}
.sidebar-nav { flex: 1; }
.sidebar-section-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--grey-400);
  padding: var(--space-4) var(--space-5) var(--space-2);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 11px var(--space-5);
  color: var(--grey-600);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9375rem;
  border-radius: 0;
  transition: all var(--dur-fast);
  position: relative;
}
.nav-item:hover { color: var(--accent); background: var(--blue-50); }
.nav-item.active {
  color: var(--accent);
  background: var(--blue-50);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-icon { font-size: 1.15rem; width: 22px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
}
.sidebar-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--grey-100);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.sidebar-user:hover { background: var(--grey-100); }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  color: var(--grey-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-handle { font-size: .8rem; color: var(--grey-500); }

/* ── Post Card ───────────────────────────────────────────────── */
.post-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  transition: box-shadow var(--dur-base), transform var(--dur-base);
}
.post-card:hover { box-shadow: var(--shadow-md); }
.post-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
}
.post-user-info { flex: 1; min-width: 0; }
.post-user-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9375rem;
  color: var(--grey-900);
  display: flex;
  align-items: center;
  gap: 5px;
}
.post-user-name .verified { color: var(--accent); font-size: .85em; }
.post-user-handle { font-size: .825rem; color: var(--grey-500); }
.post-time { font-size: .8rem; color: var(--grey-400); margin-left: auto; }
.post-content {
  padding: 0 var(--space-5) var(--space-4);
  color: var(--grey-800);
  font-size: .9375rem;
  line-height: 1.65;
}
.post-media {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  background: var(--grey-100);
}
.post-media--video { width: 100%; }
.post-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--grey-100);
}
.post-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px var(--space-3);
  border-radius: var(--radius-md);
  color: var(--grey-500);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--dur-fast);
  cursor: pointer;
}
.post-action-btn:hover { color: var(--accent); background: var(--blue-50); }
.post-action-btn.liked  { color: var(--danger); }
.post-action-btn.liked:hover { background: var(--danger-bg); }
.post-action-btn.bookmarked { color: var(--accent); }
.post-action-count { font-size: .8rem; }
.post-action-spacer { margin-left: auto; }

/* ── Creator Card ────────────────────────────────────────────── */
.creator-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: background var(--dur-fast);
  cursor: pointer;
}
.creator-card:hover { background: var(--grey-50); }
.creator-info { flex: 1; min-width: 0; }
.creator-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  color: var(--grey-900);
  display: flex; align-items: center; gap: 4px;
}
.creator-handle { font-size: .8rem; color: var(--grey-500); }
.creator-stats  { font-size: .75rem; color: var(--grey-400); margin-top: 2px; }

/* ── Profile Header ──────────────────────────────────────────── */
.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  position: relative;
  overflow: hidden;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover-edit {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
}
.profile-info-bar {
  padding: 0 var(--space-6) var(--space-5);
  position: relative;
}
.profile-avatar-wrap {
  position: absolute;
  top: -54px;
  border: 4px solid var(--white);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
}
.profile-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  justify-content: flex-end;
  padding-top: var(--space-4);
  margin-bottom: var(--space-4);
}
.profile-name {
  margin-top: var(--space-8);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
}
.profile-handle { color: var(--grey-500); margin-top: 2px; }
.profile-bio    { color: var(--grey-700); margin-top: var(--space-3); max-width: 480px; }
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.profile-meta-item { display: flex; align-items: center; gap: 5px; font-size: .875rem; color: var(--grey-600); }
.profile-stats {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--grey-100);
}
.profile-stat strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--grey-900);
}
.profile-stat span { font-size: .85rem; color: var(--grey-500); display: block; }

/* ── Compose Box ─────────────────────────────────────────────── */
.compose-box {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.compose-inner { display: flex; gap: var(--space-3); }
.compose-textarea {
  flex: 1;
  border: none;
  resize: none;
  font-size: .9375rem;
  color: var(--grey-900);
  outline: none;
  background: transparent;
  line-height: 1.6;
  min-height: 70px;
}
.compose-textarea::placeholder { color: var(--grey-400); }
.compose-footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--grey-100);
}
.compose-tools { display: flex; gap: 2px; }
.compose-tool {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--grey-500);
  font-size: 1rem;
  transition: all var(--dur-fast);
}
.compose-tool:hover { background: var(--blue-50); color: var(--accent); }

/* ── Widgets (sidebar right) ─────────────────────────────────── */
.widget {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
}
.widget-head {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--grey-100);
  display: flex; align-items: center; justify-content: space-between;
}
.widget-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9375rem;
  color: var(--grey-900);
}
.widget-link { font-size: .85rem; color: var(--accent); font-weight: 500; }
.widget-link:hover { text-decoration: underline; }
.widget-body { padding: var(--space-3) 0; }

/* ── Dropdown ────────────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 200px;
  z-index: var(--z-modal);
  animation: scaleIn var(--dur-fast) var(--ease);
  transform-origin: top right;
  overflow: hidden;
}
.dropdown-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 10px var(--space-4);
  color: var(--grey-700);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--dur-fast);
  cursor: pointer;
}
.dropdown-item:hover { background: var(--grey-50); color: var(--accent); }
.dropdown-item.danger:hover { background: var(--danger-bg); color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--grey-100); margin: 4px 0; }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--grey-100);
  margin-bottom: var(--space-5);
}
.tab {
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: var(--grey-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all var(--dur-fast);
  white-space: nowrap;
}
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn var(--dur-base);
}
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 90%; max-width: 520px;
  box-shadow: var(--shadow-xl);
  animation: slideUp var(--dur-base) var(--ease);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--grey-100);
}
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--grey-500);
  transition: all var(--dur-fast);
}
.modal-close:hover { background: var(--grey-100); color: var(--grey-900); }
.modal-body { padding: var(--space-6); }
.modal-foot {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--grey-100);
  display: flex; gap: var(--space-3); justify-content: flex-end;
}

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: var(--space-6); right: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
  z-index: var(--z-toast);
  pointer-events: none;
}
.toast {
  background: var(--grey-900);
  color: var(--white);
  padding: 12px var(--space-5);
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 500;
  display: flex; align-items: center; gap: var(--space-3);
  box-shadow: var(--shadow-xl);
  animation: slideUp var(--dur-base) var(--ease);
  pointer-events: all;
  max-width: 340px;
}
.toast--success { background: var(--success); }
.toast--error   { background: var(--danger); }

/* ── Loading Skeleton ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--grey-100) 25%, var(--grey-200) 50%, var(--grey-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text  { height: 14px; margin-bottom: 8px; border-radius: 4px; }
.skeleton-title { height: 22px; width: 60%; margin-bottom: 12px; }
.skeleton-avatar{ border-radius: 50%; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
}
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar   { display: none; }
  .field-row-2 { grid-template-columns: 1fr; }
  .social-buttons { grid-template-columns: 1fr; }
}
