/* ================================================================
   HOPED Company Ltd — Complete Stylesheet
   ================================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* brand palette */
  --blue-700:   #1d4ed8;
  --blue-600:   #2563eb;
  --blue-500:   #3b82f6;
  --blue-400:   #60a5fa;
  --blue-100:   #dbeafe;
  --blue-50:    #eff6ff;

  --amber-600:  #d97706;
  --amber-500:  #f59e0b;
  --amber-100:  #fef3c7;

  --emerald-600:#059669;
  --emerald-500:#10b981;
  --emerald-100:#d1fae5;

  --slate-900:  #0f172a;
  --slate-800:  #1e293b;
  --slate-700:  #334155;
  --slate-500:  #64748b;
  --slate-400:  #94a3b8;
  --slate-200:  #e2e8f0;
  --slate-100:  #f1f5f9;
  --slate-50:   #f8fafc;

  --red-500:    #ef4444;
  --red-100:    #fee2e2;

  --white:      #ffffff;

  /* spacing / shadows */
  --shadow-sm:  0 1px 3px  rgba(15,23,42,.06);
  --shadow-md:  0 4px 16px rgba(15,23,42,.10);
  --shadow-lg:  0 10px 40px rgba(15,23,42,.15);
  --shadow-card-hover: 0 16px 48px rgba(15,23,42,.18);
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --transition: all .25s ease;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--slate-700);
  background-color: var(--slate-50);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }

h1,h2,h3,h4,h5,h6 { color: var(--slate-900); font-weight: 700; line-height: 1.25; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* ---------- Utility helpers ---------- */
.container { max-width: 1140px; margin-inline: auto; padding-inline: 1.5rem; }
.container-fluid { width: 100%; padding-inline: 1.5rem; }
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-title h2 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-title p { color: var(--slate-500); font-size: 1.05rem; }
.text-gradient {
  background: linear-gradient(135deg, var(--blue-600), var(--amber-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  background: var(--slate-900) !important;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid var(--blue-600);
  min-height: 140px;
  height: 140px;
  padding-top: 10px;
  padding-bottom: 10px;
  overflow: visible;
}
.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  min-height: 120px;
  max-height: 120px;
}

/* navbar + footer logo */
.navbar-logo {
  display: block;
  height: 40px !important;
  max-height: 40px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 180px;
  object-fit: contain;
  flex-shrink: 0;
  aspect-ratio: auto;
}
.footer-logo {
  height: 32px;
  max-height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
.navbar-brand span { color: var(--blue-500); }
.navbar-nav .nav-link {
  color: var(--slate-100) !important;
  border-radius: var(--radius-sm);
  padding: .55rem 1.1rem !important;
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white) !important;
  background: rgba(59,130,246,.25);
  transform: translateY(-2px);
}
.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--blue-500);
}
.dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.dropdown-item {
  font-weight: 500;
  transition: var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.dropdown-item:hover {
  background: var(--blue-100);
  color: var(--blue-700);
}

/* === Mobile improvements === */
@media (max-width: 991px) {
  .navbar {
    min-height: auto;
    height: auto;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  .navbar-brand {
    min-height: 48px;
    max-height: 48px;
    font-size: 1.2rem;
  }
  .navbar-logo {
    height: 32px !important;
    max-height: 32px !important;
  }
  .navbar-collapse {
    background: var(--slate-900);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin-top: 0.25rem;
    padding: 0.5rem 1rem 1rem;
    max-height: 80vh;
    overflow-y: auto;
  }
  .navbar-nav {
    gap: 0.15rem;
  }
  .navbar-nav .nav-link {
    min-height: 48px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    width: 100%;
  }
  .navbar-toggler {
    min-width: 48px;
    min-height: 48px;
    padding: 0.5rem;
    border: 2px solid rgba(255,255,255,.2);
    border-radius: var(--radius-sm);
  }
  .navbar-toggler-icon {
    width: 1.4em;
    height: 1.4em;
  }
}

/* ================================================================
   HERO SECTION - Fully Responsive
   ================================================================ */
.hero {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--blue-700) 100%);
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,.04) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(245,158,11,.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero h1 {
  color: var(--white);
  font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 3.2rem);
  margin-bottom: 1rem;
  line-height: 1.2;
  word-wrap: break-word;
}
.hero p {
  color: rgba(255,255,255,.75);
  font-size: clamp(0.9rem, 4vw, 1.125rem);
  margin-bottom: 1.5rem;
  max-width: 540px;
}
.hero-img-wrap {
  position: relative;
  z-index: 2;
  text-align: center;
}
.hero-img-wrap img:not(.hero-logo-lg) {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255,255,255,.1);
  max-width: 100%;
  height: auto;
}

/* hero logo — fully responsive */
.hero-logo-lg,
.hero-logo-img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* hero badges */
.hero .badge {
  background: rgba(96, 165, 250, 0.15) !important;
  color: #60a5fa !important;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

/* hero button overrides */
.btn-hero-light {
  background: var(--white);
  color: var(--blue-700);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  border: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  font-size: clamp(0.85rem, 3.5vw, 1rem);
}
.btn-hero-light:hover {
  background: var(--blue-100);
  color: var(--blue-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-hero-outline {
  background: transparent;
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  border: 2px solid rgba(255,255,255,.5);
  transition: var(--transition);
  font-size: clamp(0.85rem, 3.5vw, 1rem);
}
.btn-hero-outline:hover {
  background: var(--white);
  color: var(--blue-700);
  border-color: var(--white);
  transform: translateY(-2px);
}

/* Hero Mobile Responsive */
@media (max-width: 991px) {
  .hero {
    padding: 3.5rem 0;
    text-align: center;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 1rem;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-logo-lg, .hero-logo-img {
    max-height: 150px;
    margin-top: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 2.5rem 0;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero p {
    font-size: 0.9rem;
  }
  .hero-logo-lg, .hero-logo-img {
    max-height: 120px;
    margin-top: 1rem;
  }
  .btn-hero-light, .btn-hero-outline {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: normal;
    width: 100%;
    margin: 5px 0;
  }
}

@media (max-width: 375px) {
  .hero-logo-lg, .hero-logo-img {
    max-height: 100px;
  }
  .hero h1 {
    font-size: 1.3rem;
  }
  .btn-hero-light, .btn-hero-outline {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* ================================================================
   STATS BAR - Responsive
   ================================================================ */
.stats-bar {
  background: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-30%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  z-index: 10;
  margin-bottom: 2rem;
}
.stat-item {
  text-align: center;
  padding: 1rem;
  border-right: 1px solid var(--slate-200);
}
.stat-item:last-child { border-right: none; }
.stat-item .stat-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .75rem;
  font-size: 1.25rem;
}
.stat-item .icon-blue   { background: var(--blue-100); color: var(--blue-600); }
.stat-item .icon-amber  { background: var(--amber-100); color: var(--amber-600); }
.stat-item .icon-green  { background: var(--emerald-100); color: var(--emerald-600); }
.stat-item h3 { font-size: 1.75rem; font-weight: 800; color: var(--slate-900); margin-bottom: .1rem; }
.stat-item p  { color: var(--slate-500); font-size: .875rem; font-weight: 500; }

/* Stats Bar Mobile */
@media (max-width: 768px) {
  .stats-bar {
    transform: translateY(-15%);
    padding: 1rem;
    margin-bottom: 1rem;
  }
  .stat-item {
    padding: 0.5rem;
    border-right: none;
    border-bottom: 1px solid var(--slate-200);
  }
  .stat-item:last-child {
    border-bottom: none;
  }
  .stat-item h3 {
    font-size: 1.25rem;
  }
  .stat-item .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ================================================================
   SECTION
   ================================================================ */
.content-section { padding: 4rem 0; }
.content-section-light { background: var(--slate-100); }

@media (max-width: 768px) {
  .content-section { padding: 2.5rem 0; }
}

/* ================================================================
   SERVICE CARDS - Responsive
   ================================================================ */
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-card-hover); }
.service-card:hover::before { height: 4px; }

.service-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
  transition: var(--transition);
}
.service-card:hover .service-icon { transform: scale(1.05) rotate(-3deg); }
.svc-blue  { background: var(--blue-100);  color: var(--blue-600); }
.svc-amber { background: var(--amber-100); color: var(--amber-600); }
.svc-green { background: var(--emerald-100); color: var(--emerald-600); }
.service-card.blue:hover  { border-color: var(--blue-500); }
.service-card.blue::before { background: var(--blue-600); }
.service-card.amber:hover { border-color: var(--amber-500); }
.service-card.amber::before { background: var(--amber-600); }
.service-card.green:hover { border-color: var(--emerald-500); }
.service-card.green::before { background: var(--emerald-600); }
.service-card h5 { font-size: clamp(0.95rem, 3.5vw, 1.125rem); margin-bottom: .5rem; }
.service-card p  { color: var(--slate-500); font-size: clamp(0.8rem, 3vw, 0.9rem); line-height: 1.5; }
.service-type { display: inline-block; background: var(--slate-100); border-radius: 20px; padding: .15rem .75rem; font-size: .7rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: .04em; }
.service-price { font-size: 1.1rem; color: var(--blue-600); }

/* ================================================================
   JOB CARDS - Responsive
   ================================================================ */
.job-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  transition: var(--transition);
  height: 100%;
  display: flex; flex-direction: column;
  margin-bottom: 20px;
}
.job-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }
.job-card-body { padding: 1.25rem; flex: 1; }
.job-card-footer {
  padding: 0.75rem 1.25rem;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
}
.job-card .badge {
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  font-size: clamp(0.65rem, 2.5vw, 0.75rem);
  letter-spacing: .3px;
}
.job-type-electricity { background: var(--blue-100); color: var(--blue-700); }
.job-type-plumbing    { background: var(--emerald-100); color: var(--emerald-700); }
.job-type-construction { background: var(--amber-100); color: var(--amber-700); }
.job-type-other       { background: var(--slate-200); color: var(--slate-700); }
.job-card-featured-img {
  width: 100%;
  height: clamp(100px, 20vw, 150px);
  object-fit: cover;
  object-position: center;
  border-bottom: 1px solid var(--slate-200);
  display: block;
  max-width: 100%;
}
.job-card h5 {
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  line-height: 1.3;
}
.job-card .card-text {
  font-size: clamp(0.8rem, 3vw, 0.9rem);
}
.featured-img-thumb {
  height: 90px;
  width: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  display: block;
}
.featured-img-xs {
  height: 48px;
  width: auto;
  max-width: 64px;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
  border: 1px solid var(--slate-200);
  display: block;
}
.job-location {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; color: var(--slate-500);
}

/* Job Card Mobile */
@media (max-width: 768px) {
  .job-card-body {
    padding: 1rem;
  }
  .job-card-featured-img {
    height: 100px;
  }
}

/* ================================================================
   CTA BANNER - Responsive
   ================================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--blue-700) 100%);
  border-radius: var(--radius-xl);
  padding: clamp(30px, 8vw, 70px) clamp(20px, 5vw, 50px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -40%; left: -15%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,.12) 0%, transparent 70%);
  border-radius: 50%;
}
.cta-banner h2 { 
  color: var(--white); 
  font-size: clamp(1.3rem, 5vw, 2rem); 
  margin-bottom: 1rem; 
}
.cta-banner p { 
  color: rgba(255,255,255,.75); 
  max-width: 560px; 
  margin: 0 auto 2rem; 
  font-size: clamp(0.85rem, 4vw, 1rem); 
}

@media (max-width: 576px) {
  .cta-banner {
    padding: 2rem 1rem;
  }
  .cta-banner .btn-hero-light,
  .cta-banner .btn-hero-outline {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    display: block;
    width: 100%;
    margin: 10px 0;
  }
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn-primary.primary-gradient {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  letter-spacing: .3px;
  transition: var(--transition);
  font-size: 0.9rem;
}
.btn-primary.primary-gradient:hover {
  background: linear-gradient(135deg, var(--blue-700), #1e40af);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline-primary {
  border-color: var(--blue-600);
  color: var(--blue-600);
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  transition: var(--transition);
  font-size: 0.9rem;
}
.btn-outline-primary:hover {
  background: var(--blue-600);
  color: var(--white);
  transform: translateY(-1px);
}

/* ================================================================
   FOOTER - Responsive
   ================================================================ */
footer {
  background: var(--slate-900);
  color: rgba(255,255,255,.8);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-600), var(--amber-600));
}
footer h5 { font-weight: 700; font-size: 1rem; color: var(--white); margin-bottom: 1rem; }
footer p { color: rgba(255,255,255,.6); font-size: 0.85rem; line-height: 1.6; }
footer a { color: rgba(255,255,255,.65); transition: var(--transition); font-size: 0.85rem; }
footer a:hover { color: var(--blue-500); }
.social-icons { display: flex; gap: .6rem; flex-wrap: wrap; }
.social-icons a {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  font-size: 0.85rem;
}
.social-icons a:hover {
  background: var(--blue-600);
  border-color: var(--blue-600);
  color: var(--white);
  transform: translateY(-2px);
}
.copyright {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.2rem;
  text-align: center;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,.4);
}

@media (max-width: 768px) {
  footer {
    padding: 40px 0 20px;
  }
  footer .col-md-4 {
    margin-bottom: 30px;
    text-align: center;
  }
  footer .d-flex.align-items-center {
    justify-content: center;
  }
  .social-icons {
    justify-content: center;
  }
}

/* ================================================================
   DASHBOARD LAYOUT - Responsive (FIXED OVERLAP)
   ================================================================ */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  background: var(--slate-50);
}
.dashboard-main {
  flex: 1;
  margin-left: 260px;  /* Same as sidebar width – prevents overlap */
  padding: 1.5rem;
  min-width: 0;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
}
.page-header .breadcrumb {
  font-size: .85rem;
  color: var(--slate-500);
}
.badge-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: .7rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
}

@media (max-width: 768px) {
  .dashboard-main {
    padding: 1rem;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Sidebar */
.sidebar {
  background: var(--slate-900);
  min-height: 100vh;
  width: 260px;
  padding: 1.5rem 0;
  box-shadow: 4px 0 32px rgba(15,23,42,.35);
  position: sticky;
  top: 0;
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.sidebar-header {
  padding: 0 1.5rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 1rem;
}
.sidebar-header h4 {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: .2rem;
}
.sidebar-header small {
  color: var(--blue-400);
  font-size: .7rem;
  letter-spacing: .3px;
  text-transform: uppercase;
  font-weight: 600;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: 0 .75rem;
}
.sidebar .sidebar-link {
  display: flex; align-items: center; gap: .7rem;
  color: rgba(255,255,255,.65);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.sidebar .sidebar-link i {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: rgba(255,255,255,.5);
}
.sidebar .sidebar-link:hover {
  background: rgba(59,130,246,.18);
  color: rgba(255,255,255,1);
  transform: translateX(4px);
}
.sidebar .sidebar-link.active {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: var(--white);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}
.sidebar .sidebar-link-logout {
  color: rgba(239,68,68,.7);
}
.sidebar .sidebar-link-logout:hover {
  color: rgba(239,68,68,1);
  background: rgba(239,68,68,.12);
}

@media (max-width: 991px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .dashboard-main {
    margin-left: 0;
    width: 100%;
  }
}

/* Stat Cards */
.stat-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition);
}
.stat-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-icon-box {
  width: 50px; height: 50px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-box-info h4 { 
  font-size: 1.5rem; 
  font-weight: 800; 
  line-height: 1; 
  margin-bottom: .2rem; 
}
.stat-box-info p { 
  color: var(--slate-500); 
  font-weight: 600; 
  font-size: .8rem; 
  margin: 0; 
}
.stat-box.blue-accent   .stat-icon-box { background: var(--blue-100);   color: var(--blue-600); }
.stat-box.green-accent  .stat-icon-box { background: var(--emerald-100);  color: var(--emerald-600); }
.stat-box.amber-accent  .stat-icon-box { background: var(--amber-100);   color: var(--amber-600); }
.stat-box.slate-accent  .stat-icon-box { background: var(--slate-100);   color: var(--slate-600); }
.stat-box.red-accent    .stat-icon-box { background: var(--red-100);     color: var(--red-500); }

@media (max-width: 576px) {
  .stat-box {
    flex-direction: row;
    text-align: left;
    padding: 12px;
  }
  .stat-icon-box {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
  .stat-box-info h4 {
    font-size: 1.2rem;
  }
}

/* ================================================================
   DATA TABLES - Responsive
   ================================================================ */
.table-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--slate-200);
  overflow: hidden;
}
.table-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--slate-200);
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.table-card-header h5 { font-size: 0.9rem; margin: 0; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-card .table {
  margin: 0;
  vertical-align: middle;
}
.table-card .table thead th {
  background: var(--slate-50);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--slate-500);
  letter-spacing: .3px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--slate-200);
}
.table-card .table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .table-card .table thead th,
  .table-card .table tbody td {
    padding: 10px 8px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .btn-sm {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
  .table-card .d-flex.gap-2 {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Badges */
.badge-status-approved  { background: var(--emerald-100);  color: var(--emerald-700); padding: 0.2rem 0.6rem; border-radius: 50px; font-size: 0.7rem; font-weight: 600; }
.badge-status-pending   { background: var(--amber-100);    color: var(--amber-700);  padding: 0.2rem 0.6rem; border-radius: 50px; font-size: 0.7rem; font-weight: 600; }
.badge-status-rejected  { background: var(--red-100);      color: var(--red-500);    padding: 0.2rem 0.6rem; border-radius: 50px; font-size: 0.7rem; font-weight: 600; }
.badge-role-admin       { background: var(--blue-700);     color: #fff;             padding: 0.2rem 0.6rem; border-radius: 50px; font-size: 0.7rem; font-weight: 600; }
.badge-role-client      { background: var(--slate-200);    color: var(--slate-700);  padding: 0.2rem 0.6rem; border-radius: 50px; font-size: 0.7rem; font-weight: 600; }
.badge-role-jobseeker   { background: var(--amber-100);    color: var(--amber-700);  padding: 0.2rem 0.6rem; border-radius: 50px; font-size: 0.7rem; font-weight: 600; }

/* ================================================================
   FORM ELEMENTS
   ================================================================ */
.form-label { font-weight: 600; color: var(--slate-700); margin-bottom: .35rem; font-size: 0.85rem; }
.form-control, .form-select {
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--slate-800);
  transition: var(--transition);
  background: var(--white);
}
.form-control:focus, .form-select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
  outline: none;
}
.form-control::placeholder { color: var(--slate-400); }

/* ================================================================
   AUTH PAGES (login / register) - Responsive
   ================================================================ */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--blue-700) 100%);
  position: relative;
  overflow: hidden;
  padding: 80px 15px 40px;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 440px;
  width: 100%;
  position: relative;
  z-index: 2;
  animation: fadeUp .5s ease;
  margin: 0 auto;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-card-header {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  padding: 1.5rem;
  text-align: center;
}
.auth-card-header .brand-logo-icon {
  width: 48px; height: 48px;
  border-radius: 16px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
  margin: 0 auto 0.75rem;
  backdrop-filter: blur(4px);
}
.auth-card-header h3 { color: var(--white); font-size: 1.2rem; margin-bottom: .2rem; }
.auth-card-header p  { color: rgba(255,255,255,.75); font-size: .8rem; }
.auth-card-body { padding: 1.5rem; }

@media (max-width: 576px) {
  .auth-card-header h3 {
    font-size: 1.2rem;
  }
  .auth-card-body {
    padding: 1rem;
  }
  .auth-field .form-control {
    font-size: 0.85rem;
    padding: 8px 12px 8px 35px;
  }
  .btn-auth {
    padding: 10px;
    font-size: 0.9rem;
  }
}

.auth-field { margin-bottom: 1rem; }
.auth-field label {
  display: block;
  font-weight: 600;
  color: var(--slate-700);
  font-size: 0.8rem;
  margin-bottom: .3rem;
}
.auth-field .input-wrap { position: relative; }
.auth-field .input-wrap .field-icon {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--slate-400);
  pointer-events: none;
  font-size: 0.8rem;
}
.auth-field .form-control { padding-left: 2.2rem; }

.btn-auth {
  width: 100%;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: .2px;
  transition: var(--transition);
  cursor: pointer;
}
.btn-auth:hover {
  background: linear-gradient(135deg, var(--blue-700), #1e40af);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.auth-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--slate-500);
}
.auth-footer a { color: var(--blue-600); font-weight: 600; }
.auth-divider {
  display: flex; align-items: center; gap: .5rem; margin: 1rem 0;
  color: var(--slate-400); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .5px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--slate-200);
}

/* ================================================================
   WHATSAPP FLOAT & DESIGN CREDIT - Mobile Optimized
   ================================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1000;
  text-decoration: none;
}
.whatsapp-float:hover {
  background-color: #128C7E;
  transform: scale(1.1);
  color: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.whatsapp-tooltip {
  position: absolute;
  left: 70px;
  background-color: #333;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}
.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
}
.design-credit {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 8px 15px;
  border-radius: 30px;
  font-size: 12px;
  z-index: 1000;
  backdrop-filter: blur(5px);
}
.design-credit a {
  color: #25D366;
  text-decoration: none;
  font-weight: 600;
}
.design-credit a:hover {
  color: #128C7E;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 15px;
    left: 15px;
    width: 45px;
    height: 45px;
    font-size: 22px;
  }
  .design-credit {
    bottom: 15px;
    right: 15px;
    font-size: 9px;
    padding: 4px 10px;
  }
  .whatsapp-tooltip {
    display: none;
  }
}

/* ================================================================
   GENERAL MOBILE IMPROVEMENTS
   ================================================================ */
@media (max-width: 576px) {
  h1 {
    font-size: 1.6rem;
  }
  h2 {
    font-size: 1.4rem;
  }
  h3 {
    font-size: 1.2rem;
  }
  .row.g-4 {
    --bs-gutter-y: 1rem;
  }
  .btn-lg {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  .modal-dialog {
    margin: 10px;
  }
  .modal-body {
    padding: 15px;
  }
  .d-flex.flex-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .d-flex.flex-wrap > * {
    width: 100%;
    margin: 5px 0;
  }
  .d-flex.gap-2 {
    flex-direction: column;
    gap: 10px !important;
  }
  .d-flex.gap-2 .btn {
    width: 100%;
    text-align: center;
  }
}

/* Utility classes */
.word-break {
  word-break: break-word;
  overflow-wrap: break-word;
}
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--slate-100); }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }
body { scrollbar-width: thin; scrollbar-color: var(--slate-300) var(--slate-100); }

/* Cookie Consent Banner */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 0.75rem;
  z-index: 1000;
  display: none;
  font-size: 0.8rem;
  line-height: 1.4;
}
#cookie-consent-banner .cookie-consent-content {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
#cookie-consent-banner .cookie-consent-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
#cookie-consent-banner .btn-primary {
  background: var(--blue-600);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
}
#cookie-consent-banner .btn-outline-light {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
}

/* Quill Editor */
.quill-editor-container {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.rich-editor {
  height: 400px;
  overflow-y: auto;
  padding: 1rem;
  border-bottom: 1px solid var(--slate-200);
}
.ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid var(--slate-200);
  background: var(--slate-50);
  padding: 0.5rem;
}
.ql-container.ql-snow {
  border: none;
  font-family: inherit;
  font-size: 1rem;
}
.ql-editor {
  min-height: 300px;
  max-height: 400px;
  overflow-y: auto;
}

/* ================================================================
   DASHBOARD & SIDEBAR RESPONSIVE FIXES
   ================================================================ */

/* Mobile Sidebar Toggle Button */
.mobile-sidebar-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: none;
  transition: all 0.3s ease;
}

.mobile-sidebar-toggle:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, var(--blue-700), #1e40af);
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
}

.sidebar-overlay.active {
  display: block;
}

/* Sidebar Header Close Button */
.sidebar-header {
  position: relative;
}

.sidebar-toggle-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  font-size: 1.2rem;
  display: none;
  transition: all 0.3s ease;
}

.sidebar-toggle-btn:hover {
  color: white;
}

/* Mobile Sidebar Styles */
@media (max-width: 991px) {
  .mobile-sidebar-toggle {
    display: flex;
  }
  
  .sidebar-toggle-btn {
    display: block;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transform: translateX(-100%);
    width: 280px;
    transition: transform 0.3s ease;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .dashboard-main {
    margin-left: 0;
    width: 100%;
    padding: 15px;
  }
  
  .dashboard-wrapper {
    position: relative;
  }
  
  /* Adjust stat cards on mobile */
  .stat-box {
    padding: 12px;
  }
  
  .stat-icon-box {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
  
  .stat-box-info h4 {
    font-size: 1.2rem;
  }
  
  .stat-box-info p {
    font-size: 0.7rem;
  }
}

/* Small Mobile Devices */
@media (max-width: 576px) {
  .dashboard-main {
    padding: 10px;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .page-header h1 {
    font-size: 1.3rem;
  }
  
  .badge-pill {
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
  }
  
  /* Stats grid on mobile */
  .dashboard-main .row.g-3 {
    --bs-gutter-y: 0.75rem;
  }
  
  .stat-box {
    padding: 10px;
  }
  
  .stat-icon-box {
    width: 40px;
    height: 40px;
  }
  
  .stat-box-info h4 {
    font-size: 1rem;
  }
  
  /* Table responsive */
  .table-card .table thead th,
  .table-card .table tbody td {
    padding: 8px 6px;
    font-size: 0.7rem;
  }
  
  .btn-sm {
    padding: 3px 6px;
    font-size: 0.65rem;
  }
  
  /* Quick action cards */
  .dashboard-main .card.text-center {
    padding: 1rem !important;
  }
  
  .dashboard-main .card.text-center .stat-icon-box {
    width: 45px;
    height: 45px;
  }
  
  .dashboard-main .card.text-center .stat-icon-box i {
    font-size: 1.3rem;
  }
  
  .dashboard-main .card.text-center h6 {
    font-size: 0.85rem;
  }
  
  .dashboard-main .card.text-center p {
    font-size: 0.7rem;
  }
}

/* Extra Small Devices */
@media (max-width: 375px) {
  .stat-icon-box {
    width: 35px;
    height: 35px;
  }
  
  .stat-box-info h4 {
    font-size: 0.9rem;
  }
  
  .sidebar {
    width: 260px;
  }
  
  .sidebar .sidebar-link {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* Tablet Landscape */
@media (min-width: 768px) and (max-width: 1024px) {
  .dashboard-main {
    padding: 20px;
  }
  
  .stat-icon-box {
    width: 50px;
    height: 50px;
  }
  
  .stat-box-info h4 {
    font-size: 1.3rem;
  }
}

/* Ensure sidebar doesn't overlap content when open on mobile */
body.sidebar-open {
  overflow: hidden;
}

/* Fix for table overflow on mobile */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-card .table {
    min-width: 500px;
  }
}

/* Fix for buttons on mobile */
@media (max-width: 576px) {
  .btn {
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
  }
  
  .d-flex.gap-2 {
    flex-direction: column;
  }
  
  .d-flex.gap-2 .btn {
    margin-right: 0 !important;
  }
  
  .page-header .btn {
    width: auto;
  }
}

/* Fix for form elements on mobile */
@media (max-width: 576px) {
  .form-control,
  .form-select,
  .input-group {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .auth-card-body {
    padding: 1rem;
  }
}

/* Sidebar scroll on mobile */
@media (max-width: 991px) {
  .sidebar {
    max-height: 100vh;
    overflow-y: auto;
    padding-bottom: 80px;
  }
}
/* Dashboard Layout Fix - Prevent Sidebar Overlap */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    background: #0f172a;
    overflow-y: auto;
}

.dashboard-main {
    flex: 1;
    margin-left: 260px;
    padding: 1.5rem;
    min-height: 100vh;
    width: calc(100% - 260px);
}

/* Footer inside dashboard-main */
.dashboard-main footer {
    margin-top: 2rem;
    padding: 1.5rem 0;
    background: transparent;
    position: relative;
    width: 100%;
}

/* Mobile responsive */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
}