/* ============================================================
   BLINK GIGS - Main Stylesheet
   Nigerian Freelance Marketplace
   ============================================================ */

:root {
  --primary:     #008751;
  --primary-dark:#005a35;
  --primary-light:#e6f4ee;
  --secondary:   #FF6B35;
  --success:     #22C55E;
  --warning:     #F59E0B;
  --danger:      #EF4444;
  --dark:        #071a0f;
  --gray-900:    #0a2e1a;
  --gray-700:    #374151;
  --gray-500:    #6B7280;
  --gray-300:    #D1D5DB;
  --gray-100:    #F3F4F6;
  --white:       #FFFFFF;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 4px 24px rgba(0,135,81,0.10);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
  --transition:  0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: #F8F7FF;
  color: var(--gray-700);
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: var(--primary); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* ─── NAVBAR ─────────────────────────────────────────────── */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.navbar-brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

@media (max-width: 480px) {
  .navbar-brand img { height: 32px; }
}

.navbar-brand span { color: var(--secondary); }

.navbar-search {
  flex: 1;
  max-width: 480px;
  margin: 0 32px;
  position: relative;
}

.navbar-search input {
  width: 100%;
  padding: 10px 20px 10px 44px;
  border: 1.5px solid var(--gray-200, #e5e7eb);
  border-radius: 50px;
  font-size: 14px;
  background: var(--gray-100);
  outline: none;
  transition: var(--transition);
}

.navbar-search input:focus {
  border-color: var(--primary);
  background: white;
}

.navbar-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition);
}

.navbar-nav a:hover { background: var(--gray-100); color: var(--primary); }
.navbar-nav .active { color: var(--primary); font-weight: 600; }

.btn-nav-signup {
  background: var(--primary);
  color: white !important;
  padding: 9px 20px !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
}

.btn-nav-signup:hover { background: var(--primary-dark) !important; }

.navbar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.navbar-toggle:hover { background: var(--gray-100); }

.navbar-mobile-search { display: none; }
.navbar-mobile-overlay { display: none; }
.nav-text { display: none; }

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary   { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: #e55a25; color: white; }
.btn-outline   { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-success   { background: var(--success); color: white; }
.btn-danger    { background: var(--danger); color: white; }
.btn-gray      { background: var(--gray-100); color: var(--gray-700); }
.btn-gray:hover { background: var(--gray-300); }
.btn-sm        { padding: 7px 16px; font-size: 13px; }
.btn-lg        { padding: 14px 32px; font-size: 17px; }
.btn-block     { width: 100%; }

/* ─── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-body  { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--gray-100); }

/* ─── GIG CARD ────────────────────────────────────────────── */
.gig-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
  border: 1.5px solid transparent;
}

.gig-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: var(--primary-light);
}

.gig-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gig-card-image-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary-light), #c2e8d0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.gig-card-body { padding: 16px; }

.gig-card-seller {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.seller-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.gig-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gig-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--warning);
  margin-bottom: 8px;
}

.gig-card-rating span { color: var(--gray-500); }

.gig-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--gray-100);
  font-size: 13px;
  color: var(--gray-500);
}

.gig-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.gig-featured-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── HERO SECTION ────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--gray-900) 50%, #0a2e1a 100%);
  padding: 80px 24px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(0,135,81,0.3) 0%, transparent 60%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 span { color: var(--secondary); }

.hero p {
  font-size: clamp(15px, 2vw, 19px);
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-search {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.hero-search input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--gray-700);
}

.hero-search button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 16px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.hero-search button:hover { background: var(--primary-dark); }

.hero-tags {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hero-tag {
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-tag:hover { background: rgba(255,255,255,0.25); }

/* ─── SECTION ─────────────────────────────────────────────── */
.section { padding: 60px 0; }
.section-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}
.section-subtitle { color: var(--gray-500); margin-bottom: 32px; }

/* ─── CATEGORIES ──────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.category-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid var(--gray-100);
  text-decoration: none;
  display: block;
}

.category-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-icon { font-size: 36px; margin-bottom: 10px; display: block; }
.category-name { font-size: 14px; font-weight: 600; color: var(--gray-700); }
.category-count { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ─── GIGS GRID ───────────────────────────────────────────── */
.gigs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* ─── CONTAINER ───────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ─── FORMS ───────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--gray-700);
  background: white;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,135,81,0.1); }
.form-control.error { border-color: var(--danger); }

textarea.form-control { resize: vertical; min-height: 120px; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ─── ALERTS ──────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.alert-info    { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #c2e8d0; }

/* ─── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success  { background: #dcfce7; color: #15803d; }
.badge-danger   { background: #fee2e2; color: #dc2626; }
.badge-warning  { background: #fef3c7; color: #d97706; }
.badge-primary  { background: var(--primary-light); color: var(--primary); }
.badge-gray     { background: var(--gray-100); color: var(--gray-500); }

/* ─── STATS CARD ──────────────────────────────────────────── */
.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--primary);
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label { font-size: 13px; color: var(--gray-500); }
.stat-change { font-size: 13px; color: var(--success); margin-top: 6px; }

/* ─── DASHBOARD LAYOUT ────────────────────────────────────── */
.dashboard-wrapper {
  display: flex;
  min-height: calc(100vh - 64px);
}

.sidebar {
  width: 240px;
  background: var(--white);
  border-right: 1px solid var(--gray-100);
  padding: 24px 0;
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-section { padding: 0 12px; margin-bottom: 8px; }
.sidebar-label { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; padding: 0 12px; margin-bottom: 4px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-link:hover { background: var(--gray-100); color: var(--primary); }
.sidebar-link.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sidebar-link .icon { font-size: 18px; width: 24px; text-align: center; }
.sidebar-badge { margin-left: auto; background: var(--danger); color: white; font-size: 11px; padding: 2px 7px; border-radius: 50px; font-weight: 700; }

.sidebar-mobile-toggle { display: none; }
.sidebar-overlay { display: none; }
.sticky-aside { position: sticky; }

.main-content { flex: 1; padding: 32px; overflow-x: hidden; }

/* ─── TABLES ──────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-card); }

table { width: 100%; border-collapse: collapse; background: white; }
thead th { background: var(--gray-100); padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--gray-500); text-align: left; }
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
tbody tr:hover { background: #fafafa; }
tbody tr:last-child td { border-bottom: none; }

/* ─── PAGINATION ──────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; row-gap: 8px; }
.page-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500; cursor: pointer;
  border: 1.5px solid var(--gray-300); background: white; color: var(--gray-700);
  text-decoration: none; transition: var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ─── AVATAR ──────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-sm  { width: 32px;  height: 32px;  font-size: 13px; }
.avatar-md  { width: 48px;  height: 48px;  font-size: 18px; }
.avatar-lg  { width: 80px;  height: 80px;  font-size: 28px; }
.avatar-xl  { width: 100px; height: 100px; font-size: 36px; }

/* ─── STARS ───────────────────────────────────────────────── */
.stars { color: var(--warning); letter-spacing: 2px; }
.star-empty { color: var(--gray-300); }

/* ─── STEPS ───────────────────────────────────────────────── */
.steps { display: flex; gap: 0; margin-bottom: 32px; }
.step {
  flex: 1; padding: 14px; text-align: center; position: relative;
  background: var(--gray-100); font-size: 13px; font-weight: 500; color: var(--gray-500);
}
.step:not(:last-child)::after {
  content: '›';
  position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--gray-300); z-index: 1;
}
.step.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.step.completed { background: var(--primary); color: white; }

/* ─── TABS ────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--gray-100); margin-bottom: 24px; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 10px 20px; font-size: 14px; font-weight: 500;
  color: var(--gray-500); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: var(--transition); text-decoration: none;
  flex-shrink: 0; white-space: nowrap;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ─── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 24px;
}
.empty-state-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.empty-state p { color: var(--gray-500); margin-bottom: 24px; }

/* ─── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 9999;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: var(--radius); padding: 32px;
  max-width: 520px; width: 90%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.modal-close { float: right; font-size: 22px; cursor: pointer; color: var(--gray-500); background: none; border: none; }

/* ─── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand { font-size: 22px; font-weight: 800; color: white; margin-bottom: 12px; }
.footer-brand span { color: var(--secondary); }
.footer-desc { font-size: 14px; line-height: 1.7; }

.footer-col h4 { color: white; font-size: 14px; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 8px; transition: var(--transition); }
.footer-col a:hover { color: white; padding-left: 4px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */

/* Two-equal-column layouts (forms, dashboard panels) collapse to one column */
@media (max-width: 768px) {
  .responsive-grid-2 { grid-template-columns: 1fr !important; }
}

/* Four-column layouts step down to two, then one */
@media (max-width: 768px) {
  .responsive-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .responsive-grid-4 { grid-template-columns: 1fr !important; }
}

/* Main content + fixed-width side panel layouts stack on mobile */
@media (max-width: 900px) {
  .grid-aside { grid-template-columns: 1fr !important; }
  .grid-aside-reverse > *:last-child { order: -1; }
  .sticky-aside { position: static !important; top: auto !important; }
}

/* Gig browse page: filter sidebar stacks above the results on mobile */
@media (max-width: 900px) {
  .browse-layout { flex-direction: column !important; }
  .browse-sidebar { width: 100% !important; position: static !important; top: auto !important; }
}

@media (max-width: 768px) {
  /* Navbar */
  .navbar-search { display: none; }
  .navbar-toggle { display: inline-flex; }

  .navbar-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 16px;
    box-shadow: 0 16px 32px rgba(0,0,0,0.14);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1100;
  }
  .navbar-nav.open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
  .navbar-nav a, .navbar-nav .navbar-icon-link { width: 100%; padding: 13px 14px; }
  .navbar-nav .btn-nav-signup { display: block; text-align: center; }

  .navbar-mobile-search { display: block; position: relative; margin-bottom: 10px; }
  .navbar-mobile-search input {
    width: 100%; padding: 12px 16px 12px 42px; border-radius: 50px;
    border: 1.5px solid #e5e7eb; background: var(--gray-100);
    font-size: 14px; outline: none; font-family: inherit;
  }
  .navbar-mobile-search .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--gray-500); }

  .navbar-icon-link { display: flex !important; align-items: center; gap: 10px; }
  .nav-text { display: inline; font-size: 14px; font-weight: 500; }

  .navbar-mobile-overlay { display: none; }

  #userMenuWrap { width: 100%; }
  #userMenuWrap > div:first-child { width: 100%; justify-content: space-between; }
  #userMenu {
    position: static !important; box-shadow: none !important; border: none !important;
    width: 100% !important; margin-top: 6px !important; padding: 4px 0 0 !important;
  }

  /* Dashboard sidebar becomes an off-canvas drawer */
  .dashboard-wrapper { flex-direction: column; position: relative; }
  .sidebar-mobile-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%;
    background: var(--white); border: none; border-bottom: 1px solid var(--gray-100);
    padding: 14px 20px; font-size: 15px; font-weight: 600; color: var(--gray-700);
    cursor: pointer; position: sticky; top: 64px; z-index: 200;
  }
  .sidebar {
    display: block;
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 260px; max-width: 80vw;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1400;
    padding-top: 80px;
    box-shadow: 4px 0 28px rgba(0,0,0,0.18);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open {
    display: block; position: fixed; inset: 0;
    background: rgba(15,15,26,0.4); z-index: 1300;
  }
  .main-content { width: 100%; padding: 20px 16px; }

  .hero { padding: 48px 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .gigs-grid { grid-template-columns: 1fr 1fr; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .gig-gallery-img { height: 280px !important; }
}

@media (max-width: 480px) {
  .gigs-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; text-align: left; }
  .navbar-brand { font-size: 18px; }
  .order-thumb { display: none; }
  .gig-gallery-img { height: 220px !important; }
}

/* ─── UTILITIES ───────────────────────────────────────────── */
.d-flex   { display: flex; }
.d-grid   { display: grid; }
.d-none   { display: none; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-1   { flex: 1; }
.gap-8    { gap: 8px; }
.gap-12   { gap: 12px; }
.gap-16   { gap: 16px; }
.gap-24   { gap: 24px; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--gray-500); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-sm  { font-size: 13px; }
.text-xs  { font-size: 12px; }
.fw-bold  { font-weight: 700; }
.fw-600   { font-weight: 600; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.p-0   { padding: 0; }
.w-100 { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── LOADING SPINNER ─────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--gray-100);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── LIVE TICKER BAR ─────────────────────────────────────── */
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.live-ticker-bar {
  background: linear-gradient(90deg, #005a35, #008751);
  color: white;
  padding: 9px 0;
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 100;
}

.live-ticker-inner {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: tickerScroll 45s linear infinite;
}

.live-ticker-inner:hover {
  animation-play-state: paused;
}

.live-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  padding: 0 28px;
  border-right: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.live-ticker-badge {
  background: #FF6B35;
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ─── TICKER ADMIN NOTICE STYLE ──────────────────────────── */
.ticker-admin .live-ticker-badge {
  background: #FF6B35;
}
.ticker-admin {
  font-weight: 600;
}

/* ============================================================
   BLINKGIGS MOBILE RESPONSIVE OVERRIDES
   Full mobile-first responsiveness — cards, tables, grids
   ============================================================ */

/* ─── GLOBAL MOBILE TABLE SYSTEM ─────────────────────────── */
/* All tables get card-style row layout on mobile */
@media (max-width: 640px) {

  /* Wrap every table in overflow so it scrolls if needed */
  .table-wrapper,
  [style*="overflow-x:auto"] {
    border-radius: var(--radius);
  }

  /* Tables that have a data-label on each td convert to card rows */
  table.mobile-cards thead {
    display: none;
  }
  table.mobile-cards tbody tr {
    display: block;
    background: white;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
    padding: 14px 16px;
    border: 1px solid var(--gray-100);
  }
  table.mobile-cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
  }
  table.mobile-cards tbody td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  table.mobile-cards tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--gray-500);
    font-size: 12px;
    flex-shrink: 0;
    min-width: 90px;
  }
  table.mobile-cards tbody tr:last-child td { border-bottom: none; }
}

/* ─── ADMIN PAGES ─────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Admin / dashboard grid-aside layouts collapse to 1 col */
  .grid-aside,
  [class*="grid-aside"],
  [style*="grid-template-columns:1fr 320px"],
  [style*="grid-template-columns:1fr 300px"],
  [style*="grid-template-columns:1fr 360px"],
  [style*="grid-template-columns:1fr 280px"] {
    grid-template-columns: 1fr !important;
  }

  /* Header flex rows that stack on small screens */
  .main-content > div[style*="display:flex"][style*="justify-content:space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  /* Make admin action buttons full-width on mobile */
  .main-content .btn + .btn,
  [style*="display:flex"][style*="gap:10px"] > .btn {
    width: auto;
  }

  /* Stat cards grid — 2 cols on tablet */
  [style*="grid-template-columns:repeat(auto-fit,minmax(180px"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  /* Stat cards — 1 per row on phone */
  [style*="grid-template-columns:repeat(auto-fit,minmax(180px"] {
    grid-template-columns: 1fr !important;
  }

  /* Settings page grids (2-col form sections) */
  .responsive-grid-2,
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Reduce main-content padding on very small screens */
  .main-content {
    padding: 14px 12px !important;
  }
}

/* ─── MESSAGES PAGE ───────────────────────────────────────── */
@media (max-width: 768px) {
  .msg-grid {
    grid-template-columns: 1fr !important;
    height: auto !important;
    min-height: unset !important;
  }

  .msg-sidebar,
  .msg-chat {
    height: calc(100vh - 160px) !important;
    border-radius: 12px !important;
  }
}

/* ─── ORDERS VIEW PAGE ────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-aside[style*="grid-template-columns:1fr 300px"],
  .grid-aside[style*="grid-template-columns:1fr 360px"],
  .grid-aside[style*="grid-template-columns:1fr 320px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── GIG SINGLE PAGE ─────────────────────────────────────── */
@media (max-width: 900px) {
  /* Gig detail layout: main content + order sidebar stack */
  [style*="grid-template-columns:1fr 380px"],
  [style*="grid-template-columns:1fr 340px"],
  [style*="grid-template-columns:1fr 360px"],
  [style*="grid-template-columns:1fr 400px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── BROWSE PAGE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .browse-layout {
    flex-direction: column !important;
  }
  .browse-sidebar {
    width: 100% !important;
    position: static !important;
    top: auto !important;
  }
  /* Mobile filter toggle for browse sidebar */
  .browse-filter-toggle {
    display: flex !important;
  }
  .browse-sidebar.collapsed {
    display: none !important;
  }
}

/* ─── SELLER DASHBOARD PAGES ──────────────────────────────── */
@media (max-width: 768px) {
  /* Analytics page charts side by side -> stack */
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Earnings page withdrawal form + history */
  .grid-aside {
    grid-template-columns: 1fr !important;
  }
}

/* ─── PROFILE & GIG CREATION FORMS ───────────────────────── */
@media (max-width: 640px) {
  /* Two-column form fields collapse to one */
  [style*="display:grid"][style*="grid-template-columns:1fr 1fr"],
  [style*="display:grid"][style*="grid-template-columns:repeat(2"] {
    grid-template-columns: 1fr !important;
  }

  /* Package pricing grid on create-gig page */
  [style*="grid-template-columns:200px 1fr 1fr 1fr"],
  [style*="grid-template-columns:180px 1fr 1fr 1fr"],
  [style*="grid-template-columns:150px 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    overflow-x: unset !important;
  }

  /* Checkout steps */
  .steps {
    flex-direction: column !important;
    gap: 4px !important;
  }
  .step:not(:last-child)::after {
    display: none;
  }
}

/* ─── CARDS — GENERAL ─────────────────────────────────────── */
@media (max-width: 640px) {
  /* Card body padding reduction for small screens */
  .card-body { padding: 14px; }

  /* Stats cards — ensure labels don't overflow */
  .stat-card {
    padding: 16px;
  }
  .stat-value {
    font-size: 22px;
  }

  /* Gig card image height reduction */
  .gig-card-image,
  .gig-card-image-placeholder {
    height: 150px;
  }

  /* Hero search — stays inline on mobile, just smaller */
  .hero-search {
    border-radius: 50px;
    overflow: hidden;
    max-width: 100%;
  }
  .hero-search input {
    padding: 13px 16px;
    font-size: 14px;
    min-width: 0;
  }
  .hero-search button {
    padding: 13px 18px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 0 50px 50px 0;
  }

  /* Modal full-screen on mobile */
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    max-height: 85vh !important;
  }
  .modal-overlay {
    align-items: flex-end !important;
  }
}

/* ─── ADMIN TABLE CARDS ON MOBILE ─────────────────────────── */
@media (max-width: 640px) {

  /* Turn admin tables into stacked card rows */
  .admin-table-wrap table thead,
  [style*="overflow-x:auto"] table thead,
  [style*="overflow-x:auto;overflow-y:hidden"] table thead {
    display: none;
  }

  .admin-table-wrap table tbody tr,
  [style*="overflow-x:auto"] table tbody tr,
  [style*="overflow-x:auto;overflow-y:hidden"] table tbody tr {
    display: block;
    background: white;
    border-radius: var(--radius-sm);
    margin: 0 0 10px;
    padding: 12px 14px;
    border-bottom: 2px solid var(--gray-100) !important;
  }

  .admin-table-wrap table tbody td,
  [style*="overflow-x:auto"] table tbody td,
  [style*="overflow-x:auto;overflow-y:hidden"] table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-100) !important;
    font-size: 13px;
    flex-wrap: wrap;
  }

  .admin-table-wrap table tbody td:last-child,
  [style*="overflow-x:auto"] table tbody td:last-child,
  [style*="overflow-x:auto;overflow-y:hidden"] table tbody td:last-child {
    border-bottom: none !important;
    padding-bottom: 0;
  }

  /* table-wrapper class tables */
  .table-wrapper table thead { display: none; }
  .table-wrapper table tbody tr {
    display: block;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--gray-100) !important;
  }
  .table-wrapper table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-100) !important;
    font-size: 13px;
    flex-wrap: wrap;
  }
  .table-wrapper table tbody td:last-child {
    border-bottom: none !important;
    padding-bottom: 0;
  }
}

/* ─── FOOTER ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .footer { padding: 32px 0 20px; margin-top: 48px; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

/* ─── NOTIFICATIONS & SUPPORT PAGES ──────────────────────── */
@media (max-width: 640px) {
  /* Notification items stack nicely */
  [style*="display:flex"][style*="gap:12px"][style*="padding:16px"],
  [style*="display:flex"][style*="gap:14px"][style*="padding:16px"] {
    flex-wrap: wrap;
  }

  /* Support / ticket list items */
  [style*="display:flex"][style*="justify-content:space-between"][style*="padding:14px"] {
    flex-direction: column !important;
    gap: 10px !important;
  }
}

/* ─── BUYER DASHBOARD ─────────────────────────────────────── */
@media (max-width: 768px) {
  /* Wallet & orders layout on buyer dashboard */
  [style*="grid-template-columns:1fr 1fr;gap:24px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── INVOICE PAGE ────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Invoice header info (two-column) */
  [style*="display:grid"][style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Invoice action buttons */
  [style*="display:flex"][style*="gap:10px;margin-top"] > .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ─── PAGE HEADER ACTIONS (title + button row) ───────────── */
@media (max-width: 640px) {
  /* Any flex row with justify-between in main content heading area */
  .main-content > div[style*="margin-bottom:28px"],
  .main-content > div[style*="margin-bottom:24px"] {
    flex-wrap: wrap !important;
  }
  .main-content > div[style*="margin-bottom:28px"] > a.btn,
  .main-content > div[style*="margin-bottom:24px"] > a.btn {
    width: 100%;
    justify-content: center;
  }
}

/* ─── CATEGORY GRID ───────────────────────────────────────── */
@media (max-width: 640px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  .category-card {
    padding: 16px 10px;
  }
  .category-icon { font-size: 28px; }
}

/* ─── VERIFICATION PAGE ───────────────────────────────────── */
@media (max-width: 640px) {
  [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns:repeat(2"][style*="gap:12px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── SELLER PORTFOLIO & CERTIFICATIONS ───────────────────── */
@media (max-width: 640px) {
  [style*="grid-template-columns:repeat(auto-fill,minmax(200px"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 400px) {
  [style*="grid-template-columns:repeat(auto-fill,minmax(200px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── GLOBAL UTILITY: prevent overflow on small screens ─── */
@media (max-width: 480px) {
  body { overflow-x: hidden; }

  /* Ensure all containers don't escape viewport */
  .container,
  .container-sm,
  .container-lg {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  /* Buttons in tight rows should wrap */
  [style*="display:flex"][style*="gap:8px"] > .btn,
  [style*="display:flex"][style*="gap:10px"] > .btn,
  [style*="display:flex"][style*="gap:12px"] > .btn {
    flex-shrink: 0;
  }

  /* Tab bars already scroll, but add padding for touch */
  .tabs {
    padding-bottom: 4px;
  }
  .tab {
    padding: 10px 14px;
    font-size: 13px;
  }
}

/* ─── SETTINGS PAGE (admin) ───────────────────────────────── */
@media (max-width: 768px) {
  /* Settings tabs become horizontally scrollable */
  [style*="display:flex"][style*="border-bottom:2px solid"] {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
  }

  /* Settings two-column form rows */
  [style*="display:grid"][style*="gap:20px"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── SECURITY PAGE ───────────────────────────────────────── */
@media (max-width: 640px) {
  /* Login sessions table → card rows */
  [style*="overflow-x:auto"] + table,
  .security-table { width: 100%; }
}

/* ─── GIG SINGLE PAGE — package tabs ─────────────────────── */
@media (max-width: 640px) {
  /* Package selection tabs */
  [style*="display:grid"][style*="grid-template-columns:1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── TOUCH FRIENDLY IMPROVEMENTS ────────────────────────── */
@media (max-width: 768px) {
  /* Larger tap targets for links in tables and lists */
  tbody td a,
  .sidebar-link,
  .tab,
  .page-btn {
    min-height: 40px;
  }

  /* Smooth scrolling for all overflow containers */
  [style*="overflow-x:auto"],
  .table-wrapper {
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent text selection on interactive UI elements */
  .navbar-toggle,
  .sidebar-mobile-toggle,
  .tab,
  .page-btn {
    user-select: none;
    -webkit-user-select: none;
  }
}
