/* ==============================
   Constrói Já — Global Styles
   Dark Mode Premium Design
============================== */

/* RESET & BASE */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --bg-primary:    #0f172a;
  --bg-secondary:  #1e293b;
  --bg-tertiary:   #243044;
  --bg-card:       #1e293b;
  --bg-hover:      #2d3f5a;
  --border:        #334155;
  --border-light:  #475569;

  /* Text */
  --text-primary:  #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --text-white:    #ffffff;

  /* Accent */
  --accent:        #f59e0b;
  --accent-hover:  #d97706;
  --accent-light:  rgba(245,158,11,0.15);
  --accent-glow:   0 0 20px rgba(245,158,11,0.3);

  /* Status */
  --success:       #10b981;
  --success-light: rgba(16,185,129,0.15);
  --danger:        #ef4444;
  --danger-light:  rgba(239,68,68,0.15);
  --warning:       #f59e0b;
  --warning-light: rgba(245,158,11,0.15);
  --info:          #3b82f6;
  --info-light:    rgba(59,130,246,0.15);

  /* Gradients */
  --gradient-main:   linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-dark:   linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --gradient-card:   linear-gradient(135deg, #1e293b 0%, #243044 100%);
  --gradient-amber:  linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-hero:   linear-gradient(135deg, #0f172a 0%, #1a1f35 50%, #0f172a 100%);

  /* Layout */
  --navbar-h:       64px;
  --sidebar-w:      260px;
  --sidebar-w-sm:   72px;
  --bottom-nav-h:   64px;
  --content-max:    1200px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl:48px;

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-card:0 2px 8px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);

  /* Transitions */
  --transition:  all 0.3s ease;
  --transition-fast: all 0.15s ease;
}

html { scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--accent-hover); }

/* ==============================
   SCROLLBAR
============================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ==============================
   NAVBAR
============================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--navbar-h);
  background: rgba(15,23,42,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  display: flex; align-items: center; gap: var(--space-md);
  height: 100%; padding: 0 var(--space-lg); max-width: 100%;
}
.navbar-left { display: flex; align-items: center; gap: var(--space-md); flex-shrink: 0; }
.navbar-center { flex: 1; max-width: 480px; margin: 0 auto; }
.navbar-right { display: flex; align-items: center; gap: var(--space-sm); flex-shrink: 0; }

.sidebar-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-md);
  background: transparent; border: none; cursor: pointer;
  color: var(--text-secondary); transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--bg-secondary); color: var(--text-primary); }
.sidebar-toggle svg { width: 20px; height: 20px; }

.navbar-logo { display: flex; align-items: center; gap: var(--space-sm); }
.logo-icon { font-size: 24px; line-height: 1; }
.logo-text {
  font-size: 18px; font-weight: 800; color: var(--text-white);
  background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Search Form */
.search-form {
  position: relative; display: flex; align-items: center; width: 100%;
}
.search-icon {
  position: absolute; left: 12px; width: 16px; height: 16px;
  color: var(--text-muted); pointer-events: none;
}
.search-input {
  width: 100%; padding: 8px 16px 8px 40px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-full); color: var(--text-primary);
  font-size: 14px; transition: var(--transition);
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

/* Nav Icon Buttons */
.nav-icon-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-md);
  color: var(--text-secondary); transition: var(--transition);
}
.nav-icon-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.nav-icon-btn svg { width: 20px; height: 20px; }
.nav-icon-btn .badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; border-radius: var(--radius-full);
  background: var(--danger); color: white; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* User Avatar */
.user-avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.user-avatar-md { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

/* User Menu */
.user-menu-wrap { position: relative; }
.user-menu-btn { background: none; border: none; cursor: pointer; padding: 0; border-radius: 50%; }

.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 240px; background: var(--bg-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); z-index: 200;
  display: none; animation: fadeInDown 0.2s ease;
}
.user-dropdown.open { display: block; }

.user-dropdown-header { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md); }
.user-dropdown-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.user-dropdown-email { font-size: 12px; color: var(--text-muted); }

.dropdown-item {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 10px var(--space-md); font-size: 14px; color: var(--text-secondary);
  cursor: pointer; transition: var(--transition-fast); width: 100%;
  background: none; border: none; text-align: left;
}
.dropdown-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.dropdown-item svg { width: 16px; height: 16px; }
.dropdown-admin { color: var(--warning) !important; }
.dropdown-logout { color: var(--danger) !important; width: 100%; }
.dropdown-logout:hover { background: var(--danger-light) !important; }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ==============================
   LAYOUT
============================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--navbar-h);
}
.app-layout.has-sidebar .main-content {
  margin-left: var(--sidebar-w);
  transition: margin-left 0.3s ease;
}

/* ==============================
   SIDEBAR
============================== */
.sidebar {
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 90;
  overflow-y: auto;
  transition: transform 0.3s ease;
}
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 89;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.sidebar-nav { flex: 1; padding: var(--space-md) var(--space-sm); }
.sidebar-section { margin-bottom: var(--space-md); }
.sidebar-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-muted);
  padding: 0 var(--space-md) var(--space-xs);
}
.sidebar-divider { height: 1px; background: var(--border); margin: var(--space-sm) var(--space-md); }

.sidebar-link {
  display: flex; align-items: center; gap: var(--space-md);
  padding: 10px var(--space-md); border-radius: var(--radius-md);
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  transition: var(--transition-fast); position: relative; cursor: pointer;
}
.sidebar-link:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.sidebar-link.active { background: var(--accent-light); color: var(--accent); }
.sidebar-link.active::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 3px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link-admin { color: var(--warning); }
.sidebar-link-admin:hover { color: var(--warning); background: var(--warning-light); }

.sidebar-badge {
  margin-left: auto; min-width: 20px; height: 20px;
  background: var(--danger); color: white; font-size: 11px; font-weight: 700;
  border-radius: var(--radius-full); display: flex; align-items: center;
  justify-content: center; padding: 0 5px;
}

.sidebar-footer { padding: var(--space-md); border-top: 1px solid var(--border); }
.sidebar-user-mini { display: flex; align-items: center; gap: var(--space-sm); }
.sidebar-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.sidebar-user-info { overflow: hidden; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==============================
   MAIN CONTENT
============================== */
.main-content {
  flex: 1;
  min-height: calc(100vh - var(--navbar-h));
  padding-bottom: var(--bottom-nav-h);
}

/* ==============================
   BOTTOM NAV
============================== */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 0 var(--space-sm);
  align-items: center; justify-content: space-around;
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); font-size: 10px; font-weight: 500;
  padding: 6px 12px; border-radius: var(--radius-md);
  transition: var(--transition-fast); flex: 1; max-width: 80px;
}
.bottom-nav-item svg { width: 20px; height: 20px; }
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item:hover { color: var(--text-primary); }

/* ==============================
   BUTTONS
============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  padding: 9px 18px; border-radius: var(--radius-md); font-size: 14px;
  font-weight: 600; cursor: pointer; transition: var(--transition);
  border: none; text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--gradient-amber); color: #0f172a;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--accent-glow); color: #0f172a; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-tertiary); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text-primary); }

.btn-danger {
  background: var(--danger); color: white;
}
.btn-danger:hover { background: #dc2626; color: white; }

.btn-success {
  background: var(--success); color: white;
}
.btn-success:hover { background: #059669; color: white; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-md); aspect-ratio: 1; }

/* Loading state */
.btn.loading { pointer-events: none; opacity: 0.7; }
.btn.loading::after {
  content: ''; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: white;
  animation: spin 0.6s linear infinite;
}

/* ==============================
   CARDS
============================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
}
.card-hover:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.card-header { padding: var(--space-lg); border-bottom: 1px solid var(--border); }
.card-body { padding: var(--space-lg); }
.card-footer { padding: var(--space-lg); border-top: 1px solid var(--border); }
.card-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Glass card */
.card-glass {
  background: rgba(30,41,59,0.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
}

/* ==============================
   FORMS
============================== */
.form-group { margin-bottom: var(--space-md); }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 14px; font-family: inherit; transition: var(--transition);
  outline: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-control.error { border-color: var(--danger); }
.form-control:disabled { opacity: 0.6; cursor: not-allowed; }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

.input-group { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.input-group .form-control { padding-left: 40px; }

/* ==============================
   BADGES
============================== */
.badge-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-amber  { background: var(--accent-light); color: var(--accent); }
.badge-green  { background: var(--success-light); color: var(--success); }
.badge-red    { background: var(--danger-light); color: var(--danger); }
.badge-blue   { background: var(--info-light); color: var(--info); }
.badge-muted  { background: rgba(100,116,139,0.2); color: var(--text-muted); }

/* ==============================
   FLASH MESSAGES
============================== */
.flash-message {
  margin: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  animation: slideInDown 0.3s ease;
}
.flash-inner {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 12px var(--space-md);
}
.flash-inner svg { width: 18px; height: 18px; flex-shrink: 0; }
.flash-inner span { flex: 1; font-size: 14px; }
.flash-close { background: none; border: none; cursor: pointer; padding: 4px; border-radius: var(--radius-sm); opacity: 0.7; }
.flash-close:hover { opacity: 1; }
.flash-close svg { width: 14px; height: 14px; }

.flash-success { background: var(--success-light); border: 1px solid var(--success); color: var(--success); }
.flash-error   { background: var(--danger-light); border: 1px solid var(--danger); color: var(--danger); }
.flash-warning { background: var(--warning-light); border: 1px solid var(--warning); color: var(--warning); }
.flash-info    { background: var(--info-light); border: 1px solid var(--info); color: var(--info); }

/* ==============================
   TOASTS
============================== */
.toast-container {
  position: fixed; bottom: 80px; right: var(--space-lg); z-index: 999;
  display: flex; flex-direction: column; gap: var(--space-sm);
  max-width: 360px; width: calc(100% - 2 * var(--space-lg));
}
.toast {
  display: flex; align-items: flex-start; gap: var(--space-sm);
  padding: var(--space-md); border-radius: var(--radius-md);
  background: var(--bg-secondary); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); animation: slideInRight 0.3s ease;
  font-size: 14px; color: var(--text-primary);
}
.toast-icon svg { width: 18px; height: 18px; }
.toast-success .toast-icon { color: var(--success); }
.toast-error   .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info    .toast-icon { color: var(--info); }
.toast-text { flex: 1; }
.toast-title { font-weight: 600; margin-bottom: 2px; }
.toast-msg { color: var(--text-secondary); font-size: 13px; }
.toast-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0; }
.toast-close svg { width: 14px; height: 14px; }

/* ==============================
   MODAL
============================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-lg);
}
.modal-box {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column;
  animation: scaleIn 0.2s ease;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-lg); border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 6px; border-radius: var(--radius-sm); transition: var(--transition-fast); }
.modal-close:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: var(--space-lg); overflow-y: auto; flex: 1; }
.modal-footer { padding: var(--space-lg); border-top: 1px solid var(--border); display: flex; gap: var(--space-sm); justify-content: flex-end; }

/* ==============================
   LOADING
============================== */
.loading-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(15,23,42,0.8);
  display: flex; align-items: center; justify-content: center;
}
.loading-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ==============================
   TABS
============================== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: var(--space-lg); }
.tab {
  padding: 10px var(--space-md); font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: var(--transition-fast);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  background: none; border-top: none; border-left: none; border-right: none;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ==============================
   AVATAR GROUP
============================== */
.avatar-group { display: flex; }
.avatar-group img {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--bg-secondary);
  margin-left: -8px; object-fit: cover;
}
.avatar-group img:first-child { margin-left: 0; }

/* ==============================
   STAT CARDS
============================== */
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-lg);
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.stat-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text-primary); }
.stat-change { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon-amber { background: var(--accent-light); color: var(--accent); }
.stat-icon-green { background: var(--success-light); color: var(--success); }
.stat-icon-blue  { background: var(--info-light); color: var(--info); }
.stat-icon-red   { background: var(--danger-light); color: var(--danger); }

/* ==============================
   PAGE HEADER
============================== */
.page-header {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-md);
}
.page-title { font-size: 24px; font-weight: 800; color: var(--text-primary); }
.page-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.page-body { padding: var(--space-xl); max-width: var(--content-max); margin: 0 auto; }

/* ==============================
   FEED / POSTS
============================== */
.feed-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-lg); align-items: start; }
.feed-list { display: flex; flex-direction: column; gap: var(--space-md); }

.post-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.post-card-header { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md) var(--space-lg); }
.post-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-user-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.post-meta { font-size: 12px; color: var(--text-muted); }
.post-body { padding: 0 var(--space-lg) var(--space-md); }
.post-content { font-size: 14px; color: var(--text-primary); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.post-image { width: 100%; max-height: 480px; object-fit: cover; display: block; }
.post-actions { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-lg) var(--space-md); border-top: 1px solid var(--border); }
.post-action-btn {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: var(--radius-md); font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; transition: var(--transition-fast);
  background: none; border: none;
}
.post-action-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.post-action-btn.liked { color: var(--danger); }
.post-action-btn svg { width: 16px; height: 16px; }

/* Comments */
.comments-section { padding: 0 var(--space-lg) var(--space-lg); display: flex; flex-direction: column; gap: var(--space-sm); }
.comment-item { display: flex; gap: var(--space-sm); }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-bubble { background: var(--bg-tertiary); border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md); padding: 8px 12px; flex: 1; }
.comment-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.comment-text { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.comment-form { display: flex; gap: var(--space-sm); padding: 0 var(--space-lg) var(--space-md); }
.comment-form input { flex: 1; }

/* ==============================
   PROJECT CARDS
============================== */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-lg); }
.project-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-light); }
.project-cover { height: 180px; object-fit: cover; width: 100%; background: var(--gradient-dark); }
.project-cover-placeholder { height: 180px; background: var(--gradient-card); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.project-info { padding: var(--space-md) var(--space-lg); }
.project-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.project-location { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.project-stats { display: flex; gap: var(--space-lg); padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--border); }
.project-stat { display: flex; flex-direction: column; gap: 2px; }
.project-stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.project-stat-value { font-size: 14px; font-weight: 700; color: var(--text-primary); }

/* ==============================
   TABLES
============================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); padding: 10px var(--space-md);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 12px var(--space-md); font-size: 14px; color: var(--text-primary); border-bottom: 1px solid rgba(51,65,85,0.5); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(36,48,68,0.5); }

/* ==============================
   PROGRESS BAR
============================== */
.progress { height: 8px; background: var(--bg-tertiary); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--radius-full); background: var(--gradient-amber); transition: width 0.5s ease; }
.progress-bar.danger  { background: var(--danger); }
.progress-bar.success { background: var(--success); }

/* ==============================
   EMPTY STATE
============================== */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-2xl) var(--space-lg); text-align: center; gap: var(--space-md);
}
.empty-state-icon { font-size: 64px; opacity: 0.4; }
.empty-state-title { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.empty-state-text { font-size: 14px; color: var(--text-muted); max-width: 400px; }

/* ==============================
   NOTIFICATION ITEMS
============================== */
.notif-item {
  display: flex; gap: var(--space-md); padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border); transition: var(--transition-fast);
  cursor: pointer;
}
.notif-item:hover { background: var(--bg-tertiary); }
.notif-item.unread { border-left: 3px solid var(--accent); background: rgba(245,158,11,0.04); }
.notif-item.unread:hover { background: rgba(245,158,11,0.08); }
.notif-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.notif-content { flex: 1; }
.notif-text { font-size: 14px; color: var(--text-primary); line-height: 1.5; }
.notif-text strong { font-weight: 700; }
.notif-time { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 6px; }

/* ==============================
   MESSAGES
============================== */
.messages-layout { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - var(--navbar-h) - 1px); }
.conv-list { border-right: 1px solid var(--border); overflow-y: auto; }
.conv-item { display: flex; gap: var(--space-md); padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition-fast); }
.conv-item:hover { background: var(--bg-tertiary); }
.conv-item.active { background: var(--accent-light); }
.conv-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.conv-info { flex: 1; overflow: hidden; }
.conv-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.conv-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-area { display: flex; flex-direction: column; }
.chat-header { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border); }
.chat-messages { flex: 1; overflow-y: auto; padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); }
.chat-input-area { padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--border); display: flex; gap: var(--space-sm); }

.msg-bubble {
  max-width: 65%; padding: 10px 14px;
  border-radius: var(--radius-lg); font-size: 14px; line-height: 1.5;
}
.msg-sent { background: var(--accent); color: #0f172a; margin-left: auto; border-bottom-right-radius: 4px; }
.msg-received { background: var(--bg-tertiary); color: var(--text-primary); border-bottom-left-radius: 4px; }
.msg-time { font-size: 10px; opacity: 0.6; margin-top: 4px; }

/* ==============================
   HERO (Landing)
============================== */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: var(--gradient-hero);
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(245,158,11,0.1) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(239,68,68,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero-content { position: relative; text-align: center; padding: var(--space-2xl) var(--space-lg); max-width: 800px; }
.hero-badge { display: inline-flex; align-items: center; gap: var(--space-sm); padding: 6px 16px; background: var(--accent-light); border: 1px solid var(--accent); border-radius: var(--radius-full); font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: var(--space-lg); }
.hero-title { font-size: clamp(36px, 6vw, 72px); font-weight: 900; line-height: 1.1; margin-bottom: var(--space-lg); }
.hero-title .gradient-text { background: var(--gradient-main); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-text { font-size: 18px; color: var(--text-secondary); margin-bottom: var(--space-xl); max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: var(--space-md); justify-content: center; flex-wrap: wrap; }

/* Feature cards */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-lg); }
.feature-card { background: var(--gradient-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-xl); transition: var(--transition); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.feature-icon { width: 52px; height: 52px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-md); background: var(--accent-light); }
.feature-icon svg { width: 26px; height: 26px; color: var(--accent); }
.feature-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-sm); }
.feature-text { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ==============================
   AUTH PAGES
============================== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--space-lg); background: var(--gradient-hero); }
.auth-card { width: 100%; max-width: 440px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-2xl); box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: var(--space-xl); }
.auth-title { font-size: 26px; font-weight: 800; text-align: center; color: var(--text-primary); margin-bottom: 8px; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); text-align: center; margin-bottom: var(--space-xl); }
.auth-divider { display: flex; align-items: center; gap: var(--space-md); margin: var(--space-lg) 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 12px; color: var(--text-muted); }

/* ==============================
   PROFILE
============================== */
.profile-cover { height: 220px; background: var(--gradient-main); position: relative; }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-info-wrap { padding: 0 var(--space-xl) var(--space-xl); }
.profile-avatar-wrap { position: relative; width: 96px; margin-top: -48px; }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--bg-secondary); object-fit: cover; }
.profile-name { font-size: 24px; font-weight: 800; color: var(--text-primary); margin-top: var(--space-md); }
.profile-username { font-size: 14px; color: var(--text-muted); }
.profile-bio { font-size: 14px; color: var(--text-secondary); margin-top: var(--space-sm); }
.profile-stats { display: flex; gap: var(--space-xl); margin-top: var(--space-lg); }
.profile-stat-num { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.profile-stat-label { font-size: 12px; color: var(--text-muted); }

/* ==============================
   DROPDOWN / SELECT
============================== */
.select-group { position: relative; }
.select-group select { appearance: none; padding-right: 36px; cursor: pointer; }
.select-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-muted); width: 16px; height: 16px; }

/* ==============================
   TAGS INPUT
============================== */
.tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: var(--radius-md); min-height: 44px; cursor: text; }
.tags-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.tag-item { display: flex; align-items: center; gap: 4px; background: var(--accent-light); color: var(--accent); border-radius: var(--radius-sm); padding: 2px 8px; font-size: 12px; font-weight: 600; }
.tag-remove { background: none; border: none; cursor: pointer; color: var(--accent); opacity: 0.7; padding: 0; line-height: 1; font-size: 14px; }
.tag-remove:hover { opacity: 1; }
.tags-input { flex: 1; min-width: 100px; background: transparent; border: none; outline: none; color: var(--text-primary); font-size: 14px; }

/* ==============================
   FILE UPLOAD
============================== */
.file-drop {
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  padding: var(--space-xl); text-align: center; cursor: pointer;
  transition: var(--transition); color: var(--text-muted);
}
.file-drop:hover, .file-drop.drag-over { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.file-drop svg { width: 32px; height: 32px; margin: 0 auto var(--space-sm); display: block; }
.file-drop p { font-size: 14px; }
.file-drop small { font-size: 12px; opacity: 0.7; }

/* ==============================
   PHASE COLORS
============================== */
.phase-tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* ==============================
   ANIMATIONS
============================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideOutUp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ==============================
   UTILITY CLASSES
============================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.rounded { border-radius: var(--radius-md); }
.rounded-full { border-radius: var(--radius-full); }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.opacity-50 { opacity: 0.5; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 1024px) {
  .feed-layout { grid-template-columns: 1fr; }
  .feed-sidebar { display: none; }
  .messages-layout { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .app-layout.has-sidebar .main-content { margin-left: 0; }
  .bottom-nav { display: flex; }
  .main-content { padding-bottom: calc(var(--bottom-nav-h) + var(--space-md)); }
  .navbar-center { display: none; }
  .page-header { padding: var(--space-lg); }
  .page-body { padding: var(--space-md) var(--space-lg); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 36px; }
  .auth-card { padding: var(--space-xl); }
  .modal-box { margin: var(--space-md); }
}

@media (max-width: 480px) {
  .navbar-inner { padding: 0 var(--space-md); }
  .logo-text { display: none; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-body { padding: var(--space-md); }
  .hero-actions { flex-direction: column; }
  .profile-stats { gap: var(--space-lg); }
}
