/* ============================================================
   FreelanceHub - Global Design System
   ============================================================ */

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

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #f6f8fb;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fcfdfe;
  --bg-input: #f1f5f9;
  --border: #eef2f6;
  --border-active: rgba(99, 102, 241, 0.4);

  --blue: #6366f1;
  --blue-light: #4f46e5;
  --blue-dark: #3730a3;
  --green: #10b981;
  --green-light: #059669;
  --orange: #d97706;
  --red: #ef4444;
  --purple: #8b5cf6;
  --pink: #ec4899;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --gradient-blue: linear-gradient(135deg, #6366f1, #4f46e5);
  --gradient-green: linear-gradient(135deg, #10b981, #059669);
  --gradient-orange: linear-gradient(135deg, #f59e0b, #d97706);
  --gradient-purple: linear-gradient(135deg, #8b5cf6, #7c3aed);
  --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);

  --shadow-sm: 0 4px 15px rgba(0,0,0,0.03);
  --shadow-md: 0 12px 30px rgba(99,102,241,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --shadow-blue: 0 8px 32px rgba(99,102,241,0.1);
  --shadow-green: 0 8px 32px rgba(16,185,129,0.1);

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

  --transition: all 0.25s ease;
  --transition-slow: all 0.4s ease;

  --navbar-height: 70px;
  --sidebar-width: 260px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--blue-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text-primary); }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
p { color: var(--text-secondary); }
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-blue { color: var(--blue-light) !important; }
.text-green { color: var(--green) !important; }
.text-orange { color: var(--orange) !important; }
.text-red { color: var(--red) !important; }
.text-purple { color: var(--purple) !important; }

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-layout { display: flex; min-height: calc(100vh - var(--navbar-height)); }
.page-content { flex: 1; padding: 2rem; overflow-y: auto; }
.page-content.with-sidebar { margin-left: var(--sidebar-width); }

/* ---- Glassmorphism Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition);
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--blue-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card-padded { padding: 1.5rem; }
.card-padded-lg { padding: 2rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--gradient-blue); color: #fff; box-shadow: var(--shadow-blue); }
.btn-success { background: var(--gradient-green); color: #fff; box-shadow: var(--shadow-green); }
.btn-warning { background: var(--gradient-orange); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.btn-purple { background: var(--gradient-purple); color: #fff; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-light); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Forms ---- */
.form-group { margin-bottom: 1.2rem; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
select.form-control option { background: var(--bg-secondary); color: var(--text-primary); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }
.form-error { font-size: 0.82rem; color: var(--red); margin-top: 0.35rem; display: none; }
.form-error.show { display: block; }
.input-icon { position: relative; }
.input-icon input { padding-left: 2.8rem; }
.input-icon .icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}
.navbar-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.navbar-brand .logo {
  width: 36px;
  height: 36px;
  background: var(--gradient-blue);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: 'Outfit', sans-serif;
  color: white;
}
.navbar-brand .brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text-primary);
}
.navbar-brand .brand-name span { color: var(--blue-light); }
.navbar-search { flex: 1; max-width: 380px; }
.navbar-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}
.navbar-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(99,102,241,0.15); }
.navbar-search { position: relative; }
.navbar-search .search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.navbar-actions { display: flex; align-items: center; gap: 0.75rem; }
.navbar-actions .notif-btn {
  position: relative;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.navbar-actions .notif-btn:hover { border-color: var(--blue); color: var(--blue-light); }
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}
.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.avatar-btn:hover { border-color: var(--blue-light); }

/* ---- Sidebar ---- */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.5rem 0;
  z-index: 100;
}
.sidebar-section { margin-bottom: 0.5rem; }
.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0.5rem 1.2rem;
  margin-bottom: 0.25rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.2rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
  cursor: pointer;
}
.sidebar-link:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar-link.active {
  background: rgba(99,102,241,0.1);
  color: var(--blue-light);
  border-left-color: var(--blue);
}
.sidebar-link .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-link .badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

/* ---- Dropdown ---- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 200px;
  padding: 0.5rem 0;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: var(--transition);
}
.dropdown-menu.open { opacity: 1; transform: translateY(0); pointer-events: all; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.dropdown-item.danger { color: var(--red); }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.1); }
.dropdown-divider { height: 1px; background: var(--border); margin: 0.25rem 0; }

/* ---- Badges / Tags ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  gap: 0.3rem;
}
.badge-blue { background: rgba(99,102,241,0.15); color: var(--blue-light); }
.badge-green { background: rgba(16,185,129,0.15); color: var(--green); }
.badge-orange { background: rgba(245,158,11,0.15); color: var(--orange); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-purple { background: rgba(139,92,246,0.15); color: var(--purple); }
.badge-gray { background: rgba(100,116,139,0.15); color: var(--text-secondary); }
.tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: rgba(99,102,241,0.12);
  color: var(--blue-light);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid rgba(99,102,241,0.2);
  cursor: default;
}

/* ---- Stars ---- */
.stars { display: inline-flex; gap: 2px; color: var(--orange); font-size: 0.85rem; }
.stars-lg { font-size: 1.1rem; }

/* ---- Stats Cards ---- */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.08;
}
.stat-card.blue::before { background: var(--blue); }
.stat-card.green::before { background: var(--green); }
.stat-card.orange::before { background: var(--orange); }
.stat-card.purple::before { background: var(--purple); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}
.stat-icon.blue { background: rgba(99,102,241,0.15); }
.stat-icon.green { background: rgba(16,185,129,0.15); }
.stat-icon.orange { background: rgba(245,158,11,0.15); }
.stat-icon.purple { background: rgba(139,92,246,0.15); }
.stat-value { font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 600; color: var(--text-primary); }
.stat-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.stat-change { font-size: 0.78rem; font-weight: 600; }
.stat-change.up { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ---- Grid Layouts ---- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---- Flex utilities ---- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }

/* ---- Spacing ---- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-0 { padding: 0; }

/* ---- Avatar ---- */
.avatar {
  border-radius: 50%;
  background: var(--gradient-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 44px; height: 44px; font-size: 0.95rem; }
.avatar-lg { width: 60px; height: 60px; font-size: 1.2rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.6rem; }
.avatar-xxl { width: 100px; height: 100px; font-size: 2rem; }
.avatar-green { background: var(--gradient-green); }
.avatar-orange { background: var(--gradient-orange); }
.avatar-purple { background: var(--gradient-purple); }

/* ---- Page Header ---- */
.page-header { margin-bottom: 2rem; }
.page-header h2 { color: var(--text-primary); margin-bottom: 0.35rem; }
.page-header p { color: var(--text-secondary); font-size: 0.95rem; }
.page-header-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 0.5rem; font-size: 1.1rem; }
.empty-state p { font-size: 0.9rem; max-width: 320px; margin: 0 auto 1.5rem; }

/* ---- Modals ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-lg { max-width: 700px; }
.modal-header {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1.25rem; }
.modal-close {
  background: var(--bg-input);
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); border-color: var(--red); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 0 1.5rem 1.5rem; display: flex; gap: 0.75rem; justify-content: flex-end; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 0.25rem; background: var(--bg-card); border-radius: var(--radius-full); padding: 0.3rem; margin-bottom: 2rem; border: 1px solid var(--border); }
.tab-btn {
  flex: 1;
  padding: 0.6rem 1.2rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}
.tab-btn.active { background: var(--gradient-blue); color: #fff; box-shadow: var(--shadow-blue); }
.tab-btn:hover:not(.active) { color: var(--text-primary); background: var(--bg-card-hover); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---- Progress ---- */
.progress { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.progress-bar.blue { background: var(--gradient-blue); }
.progress-bar.green { background: var(--gradient-green); }
.progress-bar.orange { background: var(--gradient-orange); }

/* ---- Alerts ---- */
.alert {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.25); color: var(--green-light); }
.alert-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25); color: #fca5a5; }
.alert-info { background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25); color: var(--blue-light); }
.alert-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25); color: #fcd34d; }

/* ---- Toast Notification ---- */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--blue); }
.toast.warning { border-left: 3px solid var(--orange); }
.toast-icon { font-size: 1.1rem; }
.toast.success .toast-icon { color: var(--green); }
.toast.error .toast-icon { color: var(--red); }
.toast.info .toast-icon { color: var(--blue-light); }
.toast.warning .toast-icon { color: var(--orange); }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ---- Notification Panel ---- */
.notif-panel {
  position: fixed;
  top: calc(var(--navbar-height) + 0.5rem);
  right: 1.5rem;
  width: 360px;
  max-height: 500px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1500;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.notif-panel.open { transform: translateY(0); opacity: 1; pointer-events: all; }
.notif-panel-header {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-panel-header h4 { font-size: 0.95rem; }
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.notif-item:hover { background: var(--bg-card); }
.notif-item.unread { background: rgba(99,102,241,0.06); }
.notif-item .notif-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.notif-text { flex: 1; }
.notif-text .notif-msg { font-size: 0.85rem; color: var(--text-primary); line-height: 1.4; }
.notif-text .notif-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ---- Loader ---- */
.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

/* ---- Section Divider ---- */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ---- Filter Bar ---- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-chip {
  padding: 0.45rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.filter-chip:hover { border-color: var(--blue); color: var(--blue-light); }
.filter-chip.active { background: rgba(99,102,241,0.15); border-color: var(--blue); color: var(--blue-light); }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2rem; }
.page-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--blue); color: var(--blue-light); }
.page-btn.active { background: var(--gradient-blue); border-color: var(--blue); color: white; }

/* ---- Search Input ---- */
.search-box {
  position: relative;
  flex: 1;
}
.search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.search-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(99,102,241,0.15); }
.search-box .search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ---- Bid Card ---- */
.bid-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
}
.bid-card:hover { border-color: rgba(255,255,255,0.15); }
.bid-card.accepted { border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.05); }
.bid-card.rejected { opacity: 0.6; }

/* ---- Project Card ---- */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), transparent) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: var(--transition);
}
.project-card:hover::after { opacity: 1; }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ---- Milestone ---- */
.milestone-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}
.milestone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.milestone-dot.completed { background: var(--green); border-color: var(--green); }
.milestone-dot.active { background: var(--blue); border-color: var(--blue); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.4); } 50% { box-shadow: 0 0 0 6px rgba(99,102,241,0); } }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .page-content.with-sidebar { margin-left: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .navbar-search { display: none; }
  .page-content { padding: 1.25rem; }
  .modal { max-width: 100%; border-radius: var(--radius-lg); }
}

/* ---- Animations ---- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeIn 0.4s ease forwards; }

.glow-blue { box-shadow: 0 0 20px rgba(99,102,241,0.3); }
.glow-green { box-shadow: 0 0 20px rgba(16,185,129,0.3); }

/* ---- Custom Select ---- */
.range-input { display: flex; align-items: center; gap: 0.75rem; }
.range-input input[type="range"] {
  -webkit-appearance: none;
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  outline: none;
}
.range-input input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
}

/* ---- Sidebar Toggle (Mobile) ---- */
.sidebar-toggle {
  display: none;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
}
@media (max-width: 1024px) { .sidebar-toggle { display: flex; } }

/* ---- Chat Bubble ---- */
.chat-bubble {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}
.chat-bubble.sent { background: var(--gradient-blue); color: white; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-bubble.received { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); border-bottom-left-radius: 4px; align-self: flex-start; }
.chat-bubble .time { font-size: 0.72rem; opacity: 0.7; margin-top: 0.25rem; }

/* ---- User Type Badge ---- */
.user-type {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.user-type.client { background: rgba(245,158,11,0.15); color: var(--orange); border: 1px solid rgba(245,158,11,0.25); }
.user-type.freelancer { background: rgba(99,102,241,0.15); color: var(--blue-light); border: 1px solid rgba(99,102,241,0.25); }

/* ---- Floating Chat Window ---- */
.floating-chat {
  position: fixed;
  bottom: 0;
  right: 2rem;
  width: 340px;
  height: 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: height 0.3s ease, transform 0.3s ease;
}
.floating-chat.minimized {
  height: 48px;
}
.floating-chat-header {
  height: 48px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.floating-chat-header h4 {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.floating-chat-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.floating-chat-actions button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.floating-chat-actions button:hover {
  color: var(--text-primary);
}
.floating-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-primary);
}
.floating-chat-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  gap: 0.5rem;
}
.floating-chat-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
}
.floating-chat-send {
  background: var(--blue);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  width: 36px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.floating-chat-send:hover {
  background: var(--blue-dark);
}

/* ---- Message Panel Dropdown Specifics ---- */
#msg-panel {
  right: 5rem;
}
.msg-panel-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.msg-panel-item:hover {
  background: var(--bg-card);
}
.msg-panel-item.unread {
  background: rgba(99,102,241,0.06);
}
.msg-panel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}
.msg-panel-info {
  flex: 1;
  min-width: 0;
}
.msg-panel-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}
.msg-panel-last {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-panel-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.msg-panel-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ---- Responsive Page Grids ---- */
.responsive-profile-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.responsive-project-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.bids-analytics-grid {
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.1);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
  .responsive-profile-grid,
  .responsive-project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .bids-analytics-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

/* ============================================================
   Peregrine Freelancer Marketplace Styles (Global Scope)
   ============================================================ */
.marketplace-page {
  background-color: #0b0f19;
  color: #f1f5f9;
  font-family: 'Inter', sans-serif;
}

svg {
  max-width: 100%;
}
.logo-icon {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
}
.search-icon {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}
.btn-icon {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
}

/* ============================================================
   Peregrine Light Theme Marketplace Design System (Human-Crafted)
   ============================================================ */
.light-theme {
  background-color: #f8fafc;
  color: #0f172a;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  line-height: 1.5;
}

/* TOP ANNOUNCEMENT BAR */
.top-bar {
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.825rem;
  padding: 0.5rem 1rem;
}
.top-bar-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar-text strong { color: #38bdf8; }
.top-bar-link { color: #93c5fd; text-decoration: none; font-weight: 600; }
.top-bar-link:hover { text-decoration: underline; }

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-logo, .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.nav-logo:hover, .footer-logo:hover {
  transform: translateY(-1px);
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
  flex-shrink: 0;
}
.logo-svg {
  width: 26px;
  height: 26px;
}
.logo-brand {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.6px;
  line-height: 1;
}
.brand-dot {
  color: #2563eb;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 0;
}

.nav-search-bar {
  flex: 1;
  max-width: 380px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 99px;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-search-icon { width: 16px; height: 16px; color: #64748b; }
.nav-search-bar input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.875rem;
  color: #0f172a;
}

.nav-menu { display: flex; align-items: center; gap: 1.75rem; }
.nav-item {
  color: #475569;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s;
}
.nav-item:hover { color: #2563eb; }
.nav-item.active {
  color: #2563eb !important;
  font-weight: 700 !important;
  position: relative;
}
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -24px;
  left: 0;
  right: 0;
  height: 3px;
  background: #2563eb;
  border-radius: 99px;
}

.nav-buttons { display: flex; align-items: center; gap: 0.6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.btn-ghost { background: transparent; color: #475569; }
.btn-ghost:hover { color: #0f172a; background: #f1f5f9; }

.btn-secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}
.btn-secondary:hover { background: #f8fafc; border-color: #94a3b8; }

.btn-outline-dark {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
  font-weight: 600;
}
.btn-outline-dark:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}
.btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.825rem; }
.btn-lg { padding: 0.85rem 1.85rem; font-size: 0.975rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* HERO LIGHT */
.hero-light {
  padding: 4.5rem 1.5rem 4rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}
.hero-light-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.9rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 99px;
  font-size: 0.825rem;
  color: #1e40af;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.pill-badge {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.hero-heading {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
}
.highlight-blue { color: #2563eb; }
.hero-subheading {
  font-size: 1.15rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-search-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
  margin-bottom: 1.25rem;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  padding-left: 0.85rem;
}
.search-card-icon { width: 20px; height: 20px; color: #64748b; }
.search-field input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: #0f172a;
}
.btn-search { padding: 0.75rem 1.5rem; }

.popular-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tags-title { font-size: 0.825rem; color: #64748b; font-weight: 600; }
.tag-item {
  font-size: 0.8rem;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
}
.tag-item:hover { background: #e2e8f0; color: #0f172a; }

/* HERO WIDGET CARD */
.hero-card-widget {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.1);
}
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.widget-user { display: flex; gap: 0.85rem; align-items: center; }
.widget-avatar {
  width: 44px;
  height: 44px;
  background: #2563eb;
  color: #ffffff;
  border-radius: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.widget-user h4 { font-size: 1rem; font-weight: 700; color: #0f172a; }
.widget-user p { font-size: 0.8rem; color: #64748b; }
.verified-tag {
  font-size: 0.725rem;
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
}
.widget-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem;
  text-align: center;
  margin-bottom: 1.25rem;
}
.m-val { font-size: 1.05rem; font-weight: 800; color: #0f172a; display: block; }
.m-lbl { font-size: 0.75rem; color: #64748b; }
.widget-skills { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; }
.widget-skills span {
  font-size: 0.75rem;
  background: #f1f5f9;
  color: #334155;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}
.widget-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}
.rate-text { font-size: 1.1rem; font-weight: 800; color: #0f172a; }

/* TRUST STRIP */
.trust-strip {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.5rem 1.5rem;
  text-align: center;
}
.strip-container { max-width: 1240px; margin: 0 auto; }
.strip-title { font-size: 0.825rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  margin-top: 1rem;
}
.company-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: -0.5px;
}

/* GLOBAL SITE SECTIONS */
.site-container { max-width: 1240px; margin: 0 auto; padding: 4.5rem 1.5rem; }
.section-title-box { margin-bottom: 2.5rem; }
.section-head { font-size: 2rem; font-weight: 800; color: #0f172a; letter-spacing: -0.5px; }
.section-sub { font-size: 1rem; color: #64748b; margin-top: 0.3rem; }
.section-sub a { color: #2563eb; text-decoration: none; font-weight: 600; }

/* CATEGORIES LIGHT */
.category-grid-light {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.cat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cat-card:hover {
  border-color: #2563eb;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}
.cat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cat-icon-box { font-size: 1.5rem; }
.cat-rating { font-size: 0.8rem; font-weight: 600; color: #334155; }
.cat-card h3 { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin-bottom: 0.3rem; }
.cat-card p { font-size: 0.85rem; color: #64748b; line-height: 1.45; margin-bottom: 1rem; }
.cat-skills-count { font-size: 0.775rem; color: #2563eb; font-weight: 600; }

/* JOBS MARKETPLACE LIGHT */
.jobs-flex-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.jobs-list { display: flex; flex-direction: column; gap: 1rem; }
.job-card-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 2rem;
  align-items: center;
  transition: border-color 0.2s;
}
.job-card-item:hover { border-color: #94a3b8; }
.job-meta-top { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.6rem; }
.job-posted-time { font-size: 0.8rem; color: #64748b; }
.payment-status-tag { font-size: 0.75rem; color: #16a34a; font-weight: 700; background: #f0fdf4; padding: 2px 8px; border-radius: 4px; }
.job-item-title { font-size: 1.15rem; font-weight: 700; color: #0f172a; margin-bottom: 0.6rem; }
.job-item-desc { font-size: 0.9rem; color: #475569; line-height: 1.5; margin-bottom: 1rem; }
.job-item-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.job-item-tags span { font-size: 0.775rem; background: #f1f5f9; color: #334155; padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 500; }
.client-info-row { display: flex; gap: 1.25rem; font-size: 0.8rem; color: #64748b; font-weight: 500; }
.job-item-side { text-align: right; border-left: 1px solid #f1f5f9; padding-left: 1.5rem; }
.job-price-box { margin-bottom: 1.25rem; }
.price-type { font-size: 0.75rem; color: #64748b; display: block; }
.price-val { font-size: 1.15rem; font-weight: 800; color: #0f172a; }

/* FREELANCERS LIGHT */
.freelancer-grid-light {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.free-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
}
.free-card-header { display: flex; gap: 0.85rem; margin-bottom: 1rem; }
.free-avatar-wrap { position: relative; }
.free-avatar {
  width: 48px;
  height: 48px;
  background: #2563eb;
  color: #ffffff;
  border-radius: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-blue { background: #0284c7; }
.avatar-green { background: #059669; }
.online-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border: 2px solid #ffffff;
  border-radius: 50%;
}
.free-details h4 { font-size: 1.05rem; font-weight: 700; color: #0f172a; }
.kyc-check { font-size: 0.675rem; background: #dcfce7; color: #15803d; padding: 1px 5px; border-radius: 4px; font-weight: 700; margin-left: 0.3rem; }
.free-title { font-size: 0.825rem; color: #475569; }
.free-location { font-size: 0.775rem; color: #64748b; margin-top: 0.1rem; }

.free-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.65rem;
  text-align: center;
  margin-bottom: 1rem;
}
.f-stat-val { font-size: 0.9rem; font-weight: 700; color: #0f172a; display: block; }
.f-stat-lbl { font-size: 0.7rem; color: #64748b; }

.free-skills-list { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.free-skills-list span { font-size: 0.75rem; background: #f1f5f9; color: #475569; padding: 0.15rem 0.45rem; border-radius: 4px; }

/* HOW IT WORKS */
.how-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.how-card-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
}
.how-icon-circle {
  width: 36px;
  height: 36px;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 800;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.how-card-box h3 { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin-bottom: 0.5rem; }
.how-card-box p { font-size: 0.9rem; color: #64748b; line-height: 1.5; }

/* SECURITY BANNER LIGHT */
.banner-card-white {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}
.shield-badge { font-size: 0.85rem; font-weight: 700; color: #2563eb; background: #eff6ff; padding: 0.3rem 0.75rem; border-radius: 99px; display: inline-block; margin-bottom: 0.75rem; }
.banner-left h2 { font-size: 1.85rem; font-weight: 800; color: #0f172a; margin-bottom: 0.6rem; letter-spacing: -0.5px; }
.banner-left p { font-size: 1rem; color: #475569; max-width: 600px; margin-bottom: 1.25rem; }
.shield-checklist { display: flex; gap: 1.25rem; font-size: 0.85rem; font-weight: 600; color: #1e293b; }

/* FOOTER LIGHT */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 4.5rem 1.5rem 2.5rem;
  color: #0f172a;
}
.footer-inner-container {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-top-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 3.5rem;
  margin-bottom: 3.5rem;
}
.footer-brand-col .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-bottom: 1rem;
}
.footer-tagline {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 340px;
}
.footer-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #166534;
}
.footer-status-tag .green-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.footer-links-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.25rem;
  letter-spacing: -0.2px;
}
.footer-links-col a {
  display: block;
  font-size: 0.88rem;
  color: #64748b;
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}
.footer-links-col a:hover {
  color: #2563eb;
  transform: translateX(3px);
}
.footer-bottom-bar {
  border-top: 1px solid #f1f5f9;
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #64748b;
}
.footer-security-badges span {
  font-weight: 500;
  color: #475569;
}

/* AUTH MODALS LIGHT */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3500;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.auth-modal-card-light {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
}
.modal-close-btn-light {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
}
.modal-tab-header {
  display: flex;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.m-tab-btn {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  border: none;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
}
.m-tab-btn.active { background: #ffffff; color: #0f172a; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.modal-text-head h3 { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin-bottom: 0.25rem; }
.modal-text-head p { font-size: 0.85rem; color: #64748b; margin-bottom: 1.25rem; }
.input-field-group { margin-bottom: 1rem; }
.input-field-group label { display: block; font-size: 0.8rem; font-weight: 600; color: #334155; margin-bottom: 0.35rem; }
.input-field-group input, .input-field-group select {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  color: #0f172a;
  outline: none;
}
.input-field-group input:focus, .input-field-group select:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

/* ============================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS (Smartphones, Tablets & Desktops)
   ============================================================ */

/* Mobile Hamburger Toggle Button */
.mobile-menu-btn {
  display: none;
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  color: var(--text-primary, #0f172a);
  font-size: 1.35rem;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.mobile-menu-btn:hover { background: #f1f5f9; }

/* Mobile Menu Drawer */
.navbar { position: relative; }
.mobile-nav-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 2px solid #e2e8f0;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.15);
  padding: 1.25rem 1.5rem;
  z-index: 2500;
  flex-direction: column;
  gap: 0.5rem;
  animation: slideDown 0.2s ease forwards;
}
.mobile-nav-drawer.open { display: flex !important; }
.mobile-nav-drawer a {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}
.mobile-nav-drawer a:active, .mobile-nav-drawer a:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.mobile-nav-drawer .mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Table Responsiveness --- */
.table-responsive, .table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
}

/* --- Tablet Breakpoint (<= 992px) --- */
@media (max-width: 992px) {
  .mobile-menu-btn { display: flex; }
  .navbar .nav-menu { display: none; }
  .nav-search-bar { display: none; }
  
  .hero-light-container { grid-template-columns: 1fr; }
  .category-grid-light { grid-template-columns: repeat(2, 1fr); }
  .freelancer-grid-light { grid-template-columns: 1fr; }
  .how-grid-3 { grid-template-columns: 1fr; }
  .job-card-item { grid-template-columns: 1fr; }
  .job-item-side { border-left: none; border-top: 1px solid #f1f5f9; padding-left: 0; padding-top: 1rem; text-align: left; }
  .banner-card-white { flex-direction: column; text-align: center; }
  .footer-top-grid { grid-template-columns: 1fr 1fr; }
  
  /* Dashboard Responsive Layout */
  .dashboard-container, .app-layout {
    grid-template-columns: 1fr !important;
    display: block !important;
    padding: 1rem !important;
  }
  .dashboard-sidebar, .sidebar {
    width: 100% !important;
    margin-bottom: 1.5rem !important;
    position: static !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    padding: 0.75rem !important;
    overflow-x: auto !important;
  }
  .dashboard-sidebar a, .sidebar a {
    flex: 1 1 calc(33.33% - 0.5rem);
    min-width: 100px;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    text-align: center;
    justify-content: center;
  }
  .dashboard-content, .main-content {
    width: 100% !important;
  }
  
  .dashboard-sidebar.open, .sidebar.open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    height: 100dvh !important;
    background: #ffffff !important;
    z-index: 2500 !important;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3) !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 1.5rem 1rem !important;
    overflow-y: auto !important;
    margin: 0 !important;
  }
  .dashboard-sidebar.open a, .sidebar.open a {
    flex: none !important;
    text-align: left !important;
    justify-content: flex-start !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
  }

  /* Grids Stack */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  .projects-grid {
    grid-template-columns: 1fr !important;
  }
}

/* --- Mobile Breakpoint (<= 580px) --- */
@media (max-width: 580px) {
  /* Top Bar */
  .top-bar-text { font-size: 0.75rem; text-align: center; }
  .top-bar-link { display: none; }
  .nav-container { padding: 0 1rem; }
  .logo-brand { font-size: 1.2rem; }
  .nav-buttons .btn-ghost, .nav-buttons .btn-secondary { display: none; } /* Handled in Mobile Drawer */
  
  /* Hero & Headings */
  .hero-title { font-size: 1.75rem !important; line-height: 1.25 !important; }
  .hero-subtitle { font-size: 0.95rem !important; }
  .hero-search-box { flex-direction: column !important; gap: 0.5rem !important; padding: 0.6rem !important; }
  .hero-search-box input { width: 100% !important; }
  .hero-search-box button { width: 100% !important; justify-content: center; }
  
  /* Stat Cards */
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Cards & Padding */
  .card, .banner-card-white, .auth-modal-card-light {
    padding: 1.25rem !important;
    border-radius: 12px !important;
  }
  
  /* Floating Chat Widget on Mobile */
  #floating-chat {
    width: calc(100vw - 2rem) !important;
    right: 1rem !important;
    bottom: 1rem !important;
    max-height: 450px !important;
  }
  
  /* Auth Modal on Mobile */
  .auth-modal-card-light {
    width: 92% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  
  /* Footer */
  .footer-top-grid, .categories-grid, .steps-grid, .footer-grid {
    grid-template-columns: 1fr !important;
  }
}
