/* ===================================
🎨 JOBSHUB GLOBAL THEME — Dark Green
=================================== */

:root{

  /* MAIN COLORS — Dark (default) */
  --bg:#0d1f16;

  --card-bg:
  linear-gradient(
  rgba(22, 163, 74, 0.25),
  rgba(15, 35, 24, 0.35)
  );

  --primary:#22c55e;

  --white:#ffffff;

  --border-tint:#4ade8034;
  --border-tint-strong:#4ade8046;
  --input-bg:#0f2318;

}

/* MAIN COLORS — Light (default for new visitors; toggleable) */
[data-theme="light"]{

  --bg:#f1f5f2;

  --card-bg:
  linear-gradient(
  rgba(22, 163, 74, 0.06),
  rgba(255, 255, 255, 0.9)
  );

  --primary:#16a34a;

  --white:#0f1a14;

  --border-tint:#16a34a2e;
  --border-tint-strong:#16a34a4a;
  --input-bg:#ffffff;

}


/* ===================================
🌍 GLOBAL
=================================== */

body{

  background:var(--bg);

  color:var(--white);

  transition: background-color .3s ease, color .3s ease;
}


/* TEXT */
h1,h2,h3,h4,h5,h6,
p,
span,
small,
a,
li,
i{

  color:var(--white);
}


/* LINKS */
a{
  text-decoration:none;
}


/* ===================================
📦 ALL CARDS
=================================== */

.job-card,
.stat-card,
.section-box,
.welcome-box,
.resume-card,
.alert-card,
.chart-card,
.auth-container,
.footer,
.header{

  background:var(--card-bg);

  border:1px solid var(--border-tint);

  backdrop-filter:blur(10px);
}


/* ===================================
📝 INPUTS
=================================== */

input,
textarea,
select{

  background:var(--input-bg);

  border:1px solid var(--border-tint-strong);

  color:var(--white);

  outline:none;
}

/* Dropdowns specifically — always black background, in either
   theme, per explicit request. !important because several pages
   define their own more specific select background otherwise. */
select{
  background:#000000 !important;
  color:#ffffff !important;
}

select option{
  background:#000000 !important;
  color:#ffffff !important;
}


/* ===================================
🔘 BUTTONS
=================================== */

button,
.btn-primary,
.primary-btn,
.theme-btn,
.logout-btn{

  background:var(--primary);

  color:#ffffff;

  border:none;

  transition:.3s;
}


/* HOVER */
button:hover,
.btn-primary:hover,
.primary-btn:hover{

  transform:translateY(-2px);

  opacity:.9;
}


/* ===================================
✨ ICONS
=================================== */

i{

  color:var(--primary);
}


/* ===================================
📌 BORDERS
=================================== */

hr{

  border-color:var(--border-tint);
}


/* global style */

::-webkit-scrollbar{

  width:10px;
  
  }
  
  ::-webkit-scrollbar-track{
  
  background:#0c1a13;
  
  }
  
  ::-webkit-scrollbar-thumb{
  
  background:#16a34a;
  
  border-radius:20px;
  
  }
  
  ::-webkit-scrollbar-thumb:hover{
  
  background:#34d399;
  
  }
  


/* Theme toggle visibility */
#themeToggleBtn.theme-toggle-btn {
  background:#ffffff;
  color:#15803d;
  border:1px solid #16a34a66;
}

#themeToggleBtn.theme-toggle-btn:hover {
  background:#f0fdf4;
}

html:not([data-theme="light"]) #themeToggleBtn.theme-toggle-btn {
  background:#0f2318;
  color:#ffffff;
  border-color:#4ade8066;
}

html:not([data-theme="light"]) #themeToggleBtn.theme-toggle-btn:hover {
  background:#163522;
}

/* ===================================
   JOBSHUB GLOBAL SITE SHELL
   Shared header / navbar / footer / theme toggle
=================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(13, 31, 22, 0.96);
  border-bottom: 1px solid var(--border-tint-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.navbar {
  width: min(1200px, 100%);
  min-height: 72px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary) !important;
  font-size: 23px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li { list-style: none; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  color: #cbd5e1 !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.active { color: var(--primary) !important; }

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .2s ease;
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-buttons .btn,
.nav-buttons a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 9px;
  text-decoration: none;
}

.btn-outline {
  border: 1px solid var(--primary) !important;
  color: var(--primary) !important;
  background: transparent !important;
}

.btn-outline:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 5px;
  cursor: pointer;
  flex: 0 0 auto;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 4px;
  background: var(--primary);
  transition: transform .2s ease, opacity .2s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.footer {
  width: 100%;
  margin-top: 40px;
  padding: 55px 20px 20px;
  background: #07130d;
  border-top: 1px solid var(--border-tint);
}

.footer-container {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.footer-col { min-width: 0; }
.footer-logo { color: var(--primary) !important; margin: 0 0 12px; }
.footer-col h3 { color: #fff; margin: 0 0 12px; }
.footer-col p { color: #cbd5e1; font-size: 14px; line-height: 1.7; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 8px; }
.footer-col a { color: #cbd5e1; text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: var(--primary); }
.footer-col i { color: #94a3b8; margin-right: 8px; }
.footer-bottom {
  width: min(1200px, 100%);
  margin: 28px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
.footer-bottom p { margin: 0; }

/* Theme switch: present on every page, not just Legal/Blog. */
#themeToggleBtn.theme-toggle-btn {
  position: fixed !important;
  right: 20px !important;
  bottom: 145px !important;
  z-index: 10000 !important;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.22) !important;
}

html[data-theme="light"] #themeToggleBtn.theme-toggle-btn {
  background: #fff !important;
  color: #15803d !important;
  border: 1px solid #16a34a66 !important;
}

html:not([data-theme="light"]) #themeToggleBtn.theme-toggle-btn {
  background: #0f2318 !important;
  color: #fff !important;
  border: 1px solid #4ade8066 !important;
}

@media (max-width: 900px) {
  .nav-menu { gap: 14px; }
  .nav-link { font-size: 13px; }
  .nav-buttons .btn { padding: 8px 11px; }
  .footer-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .navbar { min-height: 64px; padding: 11px 15px; }
  .hamburger { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 15px 18px;
    background: #0f2318;
    border-top: 1px solid var(--border-tint);
    box-shadow: 0 14px 28px rgba(0,0,0,.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .nav-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-menu li { width: 100%; }
  .nav-link { display: block; width: 100%; padding: 11px 8px; text-align: center; }
  .nav-link::after { display: none; }
  .nav-buttons { display: none; }
  .nav-menu-buttons { width: 100%; padding: 8px 8px 0; }
  .nav-menu-buttons .nav-buttons { display: flex !important; flex-direction: column; width: 100%; gap: 8px; }
  .nav-menu-buttons .btn { width: 100%; }
  [data-theme="light"] .nav-menu { background: #fff !important; }
  .footer { padding: 42px 18px 18px; }
  .footer-container { grid-template-columns: 1fr; gap: 24px; }
  #themeToggleBtn.theme-toggle-btn { right: 15px !important; bottom: 140px !important; }
}

/* Light-theme shell overrides (must come after the global shell rules). */
[data-theme="light"] .header {
  background: #ffffff !important;
  border-bottom-color: #d1fae5 !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
[data-theme="light"] .nav-menu { background: #ffffff; }
[data-theme="light"] .nav-link { color: #1a1f1c !important; }
[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active { color: #15803d !important; }
[data-theme="light"] .footer { background: #ffffff !important; border-top-color: #d1fae5; }
[data-theme="light"] .footer-col h3,
[data-theme="light"] .footer-col p,
[data-theme="light"] .footer-col a,
[data-theme="light"] .footer-col li { color: #4b5563 !important; }
[data-theme="light"] .footer-bottom { color: #6b7280 !important; border-top-color: #e5e7eb; }
[data-theme="light"] .footer-bottom p { color: #6b7280 !important; }

[data-theme="light"] .legal-section { color: #374151 !important; }
[data-theme="light"] .legal-section h1 { color: #111827 !important; }
[data-theme="light"] .legal-section h2 { color: #15803d !important; }
[data-theme="light"] .legal-section p,
[data-theme="light"] .legal-section li { color: #374151 !important; }
[data-theme="light"] .legal-section a { color: #15803d !important; }

.footer-availability {
  color: #cbd5e1;
  font-size: 14px;
}
.footer-availability i { color: var(--primary) !important; }
[data-theme="light"] .footer-availability { color: #4b5563 !important; }

/* Keep form controls visually consistent with the selected theme. */
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: #ffffff !important;
  color: #1a1f1c !important;
  border-color: #b7dfc4 !important;
}
[data-theme="light"] select option {
  background: #ffffff !important;
  color: #1a1f1c !important;
}
html:not([data-theme="light"]) input,
html:not([data-theme="light"]) textarea,
html:not([data-theme="light"]) select {
  color-scheme: dark;
}


/* =========================================================
   FINAL SITE-WIDE VISUAL CONSISTENCY PATCH
   ========================================================= */
html:not([data-theme="light"]) body {
  background: #0b1f16;
}

html:not([data-theme="light"]) .header,
html:not([data-theme="light"]) .footer,
html:not([data-theme="light"]) .nav-menu {
  background: #0d2419 !important;
}

/* Keep the green theme genuinely green instead of navy/purple. */
html:not([data-theme="light"]) #letestjobsSection,
html:not([data-theme="light"]) #scholarshipsSection,
html:not([data-theme="light"]) .about-section,
html:not([data-theme="light"]) .team-section {
  background: linear-gradient(135deg,#0b1f16,#102a1d,#0d3b25) !important;
}

html:not([data-theme="light"]) .admin-box,
html:not([data-theme="light"]) .overview-card,
html:not([data-theme="light"]) .dashboard-card,
html:not([data-theme="light"]) .chart-card,
html:not([data-theme="light"]) .application-card,
html:not([data-theme="light"]) .dashboard-empty-card,
html:not([data-theme="light"]) .profile-dropdown,
html:not([data-theme="light"]) .dropdown-header,
html:not([data-theme="light"]) .settings-drawer,
html:not([data-theme="light"]) .settings-header {
  background: #0d2419 !important;
}

html:not([data-theme="light"]) .dashboard-empty-card,
html:not([data-theme="light"]) .admin-box {
  background: linear-gradient(135deg,#0d2419,#102a1d) !important;
}

/* Footer: one centered, fluid layout on every page. */
.footer {
  width: 100%;
  overflow: hidden;
}
.footer-container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding-left: 10px;
  padding-right: 10px;
  align-items: start;
}
.footer-col {
  min-width: 0;
  text-align: center;
}
.footer-col ul { padding: 0; margin: 0; }
.footer-col ul li { list-style: none; }
.footer-col ul li a { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; }
.footer-logo { display: flex; justify-content: center; align-items: center; gap: 8px; }
.social-icons { justify-content: center !important; flex-wrap: wrap; }
.footer-newsletter { width: 100%; max-width: 360px; margin: 0 auto; }
.footer-bottom { text-align: center !important; }
.footer-bottom p { margin: 0; }

@media (max-width: 900px) {
  .footer-container { grid-template-columns: repeat(2,minmax(0,1fr)) !important; text-align:center; }
}
@media (max-width: 600px) {
  .footer { padding: 38px 14px 18px !important; }
  .footer-container { grid-template-columns: 1fr !important; gap: 22px !important; padding:0 !important; }
  .footer-col, .footer-newsletter { width:100%; max-width:100%; }
  .footer-col p { max-width: 520px; margin: 0 auto; }
  .footer-col ul li a { white-space: normal; overflow-wrap:anywhere; }
  .newsletter-box { width:100%; }
}

/* Theme-safe icons. The light-theme wildcard must never hide/flatten them. */
[data-theme="light"] .category-card i,
[data-theme="light"] .company-card i,
[data-theme="light"] .stat-card i,
[data-theme="light"] .team-card i,
[data-theme="light"] .about-item i,
[data-theme="light"] .footer-col i,
[data-theme="light"] .footer-logo i,
[data-theme="light"] .nav-link i,
[data-theme="light"] .profile-dropdown i,
[data-theme="light"] .settings-header i,
[data-theme="light"] .settings-tab i,
[data-theme="light"] .overview-card h3 i,
[data-theme="light"] .admin-box-header i {
  color: #16a34a !important;
}

html:not([data-theme="light"]) .category-card i,
html:not([data-theme="light"]) .company-card i,
html:not([data-theme="light"]) .stat-card i,
html:not([data-theme="light"]) .team-card i,
html:not([data-theme="light"]) .about-item i,
html:not([data-theme="light"]) .footer-col i,
html:not([data-theme="light"]) .overview-card h3 i,
html:not([data-theme="light"]) .admin-box-header i {
  color: #4ade80 !important;
}

/* Homepage cards: give mobile cards breathing room; Browse page keeps its existing layout. */
@media (max-width: 768px) {
  #letestjobsSection .jobs-grid,
  #scholarshipsSection .jobs-grid {
    width: calc(100% - 16px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 18px !important;
  }
  #letestjobsSection .job-card,
  #scholarshipsSection .job-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
}

/* Admin overview: equal cards and internal scrolling instead of expanding the whole box. */
.overview-grid {
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  align-items: stretch !important;
}
.overview-card {
  min-width: 0 !important;
  width: 100% !important;
  display: flex;
  flex-direction: column;
  min-height: 250px;
}
.overview-card > div[id="recentApplications"],
.overview-card > div[id="recentJobs"],
.overview-card > div[id="recentMessages"] {
  min-height: 0;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
}
.overview-card > div[id="recentApplications"] > *,
.overview-card > div[id="recentJobs"] > *,
.overview-card > div[id="recentMessages"] > * { min-width:0; }

.stats-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; align-items:stretch !important; }
.dashboard-card { width:100% !important; min-width:0 !important; }
.dashboard-card h2 { overflow-wrap:anywhere; }
.admin-box { width:100%; min-width:0; }
.admin-box:hover { transform:none !important; }
.overview-card:hover,
.dashboard-card:hover { transform: none !important; }

/* Profile dropdown actions should be stable click targets, not shifting hover boxes. */
.dropdown-menu a {
  transform: none !important;
  transition: background-color .18s ease, color .18s ease !important;
}
.dropdown-menu a:hover {
  transform: none !important;
}

@media (max-width: 1100px) {
  .overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width: 700px) {
  .overview-grid,
  .stats-grid { grid-template-columns: 1fr !important; }
  .overview-card > div[id="recentApplications"],
  .overview-card > div[id="recentJobs"],
  .overview-card > div[id="recentMessages"] { max-height: 260px; }
}

/* Admin forms/empty states use green theme in dark mode, not navy/purple. */
html:not([data-theme="light"]) .admin-form,
html:not([data-theme="light"]) textarea,
html:not([data-theme="light"]) .admin-search {
  background: #0a1f16 !important;
}

/* Settings drawer must open cleanly above the profile dropdown. */
.settings-overlay { z-index: 200000 !important; }
.settings-drawer { z-index: 200001 !important; }
.settings-content { overflow-y:auto; min-height:0; }

@media (max-width: 600px) {
  .settings-drawer { width:100% !important; }
  .settings-content { padding-bottom: 30px; }
}
