:root {
  --green: #0B5F16;
  --blue: #0D47A1;
  --orange: #FF7A2F;
  --bg: #F6F9F7;
  --text: #1F2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ===== HEADER ===== */
header {
  background: var(--green);
  color: #fff;
  padding: 14px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
}

header img {
  height: 42px;
  margin-right: 15px;
}

header h1 {
  font-size: 20px;
  margin: 0;
}

header nav a {
  color: #fff;
  margin-left: 18px;
  text-decoration: none;
  font-weight: 600;
}

header nav a:hover {
  text-decoration: underline;
}

/* ===== FOOTER ===== */
footer {
  background: #e5e7eb;
  color: #374151;
  text-align: center;
  padding: 12px;
  margin-top: 40px;
  font-size: 14px;
}

/* ===== PAGE WRAPPER ===== */
.container {
  padding: 25px 30px;
}

/* ===== BUTTONS ===== */
button {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

.btn-orange {
  background: var(--orange);
}

/* ===== TABLE ===== */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
}

th {
  background: var(--blue);
  color: #fff;
  padding: 10px;
  text-align: left;
}

td {
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
}

tr:hover {
  background: #F0FDF4;
}

/* ===== FORMS ===== */
input, select {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  margin: 4px 4px 8px 0;
}

/* ===== USER PROFILE CARD ===== */
.profile-card {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 500px;
}

.profile-left {
  margin-right: 20px;
}

.profile-left img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #0B5F16;
}

.avatar-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #0D47A1;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
}

.profile-right h3 {
  margin: 0 0 8px;
  color: #0B5F16;
}

.profile-right p {
  margin: 3px 0;
  font-size: 14px;
}
/* ===== DASHBOARD CARDS ===== */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.card-box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-left: 6px solid #0B5F16;
}

.card-box h4 {
  margin: 0;
  font-size: 15px;
  color: #6b7280;
}

.card-box p {
  font-size: 28px;
  font-weight: bold;
  margin: 8px 0 0;
  color: #0B5F16;
}
/* ===== CANDIDATE PHOTO (AGENT DASHBOARD) ===== */
.candidate-photo {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #0B5F16;
}

.photo-placeholder {
  width: 45px;
  height: 45px;
  border-radius: 8px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #6b7280;
}
/* =====================================================
   RESPONSIVE LAYOUT – GLOBAL (ALL PAGES)
   ===================================================== */

/* ---------- GENERAL ---------- */
img {
  max-width: 100%;
  height: auto;
}

/* ---------- HEADER ---------- */
header {
  flex-wrap: wrap;
}

header nav {
  margin-top: 10px;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  header nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  header nav a {
    padding: 6px 10px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
  }
}

/* ---------- CONTAINER ---------- */
.container {
  padding: 15px;
}

/* ---------- DASHBOARD CARDS ---------- */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

/* ---------- PROFILE CARD ---------- */
.profile-card {
  flex-wrap: wrap;
  text-align: center;
}

.profile-left {
  margin-right: 0;
  margin-bottom: 15px;
}

/* ---------- FORMS ---------- */
form {
  width: 100%;
}

form input,
form select,
form button {
  width: 100%;
  margin-bottom: 10px;
}

/* ---------- TABLES ---------- */
table {
  width: 100%;
  font-size: 14px;
}

/* Make tables scroll horizontally on small screens */
@media (max-width: 900px) {
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  th, td {
    padding: 8px;
  }
}

/* ---------- USER & CANDIDATE PHOTOS ---------- */
.user-photo,
.candidate-photo {
  width: 40px;
  height: 40px;
}

/* ---------- LOGIN PAGE ---------- */
.login-box {
  max-width: 420px;
  margin: 30px auto;
  padding: 20px;
}

@media (max-width: 480px) {
  h1, h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 18px;
  }

  button {
    font-size: 15px;
    padding: 10px;
  }
}

/* ---------- ACTION LINKS ---------- */
.actions a {
  display: inline-block;
  margin-bottom: 6px;
}

/* ---------- FOOTER ---------- */
footer {
  padding: 15px;
  font-size: 13px;
  text-align: center;
}
/* =====================================================
   MOBILE SIDEBAR
   ===================================================== */
.menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: #fff;
  margin-right: 10px;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  width: 240px;
  height: 100%;
  background: #0B5F16;
  padding: 20px;
  transition: left 0.3s ease;
  z-index: 9999;
}

.sidebar a {
  display: block;
  color: #fff;
  text-decoration: none;
  margin-bottom: 15px;
  font-size: 16px;
}

.sidebar.show {
  left: 0;
}

/* =====================================================
   STICKY TABLE HEADERS
   ===================================================== */
table thead th,
table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* =====================================================
   DARK MODE
   ===================================================== */
body.dark {
  background: #0f172a;
  color: #e5e7eb;
}

body.dark header,
body.dark .sidebar {
  background: #020617;
}

body.dark table {
  background: #020617;
}

body.dark th {
  background: #1e293b;
}

body.dark td {
  border-color: #1e293b;
}

body.dark .card,
body.dark .profile-card {
  background: #020617;
  box-shadow: none;
}

body.dark footer {
  background: #020617;
  color: #9ca3af;
}

/* =====================================================
   IMAGE SIZE & SPACING
   ===================================================== */
.profile-card {
  gap: 25px;
}

.profile-left img,
.avatar-placeholder {
  width: 110px;
  height: 110px;
}

.user-photo,
.candidate-photo {
  width: 60px;
  height: 60px;
}

td img {
  margin-right: 10px;
}

/* =====================================================
   RESPONSIVE NAV
   ===================================================== */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .menu-btn {
    display: inline-block;
  }
}
/* ===== STAFF DASHBOARD ENHANCEMENTS ===== */

.action-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.btn-primary {
  display: inline-block;
  margin-top: 10px;
  background: #0B5F16;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
}

.btn-primary:hover {
  opacity: 0.9;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.btn-link {
  color: #0D47A1;
  font-weight: 600;
  text-decoration: none;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Dark mode compatibility */
body.dark .btn-primary {
  background: #16a34a;
}

body.dark .btn-link {
  color: #93c5fd;
}


/* =====================================================
   CANDIDATES MANAGEMENT – PROFESSIONAL UI
   ===================================================== */

/* Page title */
.page-title,
h2 {
  font-size: 26px;
  font-weight: 700;
  color: #0B5F16;
  margin-bottom: 10px;
}

/* Export button */
.export-btn,
a[href*="export"] {
  background: #FF7A2F;
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-block;
  margin: 10px 0 25px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.export-btn:hover {
  opacity: 0.9;
}

/* Section titles */
.section-title,
h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 25px 0 15px;
  color: #0B5F16;
}

/* ================= FORM CARD ================= */
.form-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  margin-bottom: 35px;
}

/* Grid layout for form */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

/* Inputs */
.form-card input,
.form-card select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #f9fafb;
  transition: all 0.2s ease;
}

.form-card input:focus,
.form-card select:focus {
  background: #fff;
  border-color: #0B5F16;
  box-shadow: 0 0 0 3px rgba(11,95,22,0.15);
  outline: none;
}

/* File input */
.form-card input[type="file"] {
  background: #fff;
  padding: 10px;
}

/* Save button */
.form-actions {
  margin-top: 25px;
}

.form-actions button {
  width: 100%;
  background: linear-gradient(135deg, #0B5F16, #15803d);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(11,95,22,0.3);
}

.form-actions button:hover {
  opacity: 0.95;
}

/* ================= TABLE CARD ================= */
.table-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Table */
.table-card table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-card th {
  background: #0D47A1;
  color: #fff;
  padding: 14px 12px;
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.table-card th:first-child {
  border-top-left-radius: 10px;
}

.table-card th:last-child {
  border-top-right-radius: 10px;
}

.table-card td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid #e5e7eb;
}

.table-card tr:hover {
  background: #f0fdf4;
}

/* Candidate photo */
.candidate-photo {
  width: 55px;
  height: 55px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #0B5F16;
}

/* ================= DARK MODE ================= */
body.dark .form-card,
body.dark .table-card {
  background: #020617;
  box-shadow: none;
}

body.dark .form-card input,
body.dark .form-card select {
  background: #020617;
  border-color: #1e293b;
  color: #e5e7eb;
}

body.dark .table-card td {
  border-color: #1e293b;
}

body.dark .table-card tr:hover {
  background: #020617;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .page-title {
    font-size: 22px;
  }

  .form-card {
    padding: 18px;
  }

  .form-actions button {
    font-size: 15px;
  }
}
