/* =========================================
   LOGIN PAGE (new layout)
========================================= */
.login-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f5f6fa;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid #e0e3eb;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  padding: 36px 32px 28px;
}

.auth-logo {
  width: 92px; height: 92px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  background: #eef2ff; /* soft, not the reference blue */
  border: 1px solid #dfe3ec;
  overflow: hidden;
}
.auth-logo img { width: 72px; height: 72px; object-fit: contain; }

.auth-title {
  text-align: center;
  letter-spacing: .18em;
  font-size: 15px;
  color: #003399;
  margin-bottom: 22px;
}

.auth-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 4px;
  border-bottom: 2px solid #dfe3ec;
  margin-bottom: 18px;
}
.auth-input-group:focus-within { border-color: #003399; }
.auth-input-group svg { width: 18px; height: 18px; flex: 0 0 18px; color: #667085; }
.auth-input-group input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 14px;
  padding: 10px 2px;
  outline: none;
  color: #111;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 16px;
  font-size: 13px;
}
.auth-row a { color: #003399; text-decoration: none; }
.auth-row a:hover { text-decoration: underline; }

.auth-actions .btn-primary {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.auth-hint {
  margin-top: 14px;
  font-size: 12px;
  color: #666;
  text-align: center;
}

.alert {
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.4;
}
.alert.error { background:#ffe9ea; color:#7a0c19; border:1px solid #f5c2c7; }
.alert.notice { background:#eef7ff; color:#0f3a78; border:1px solid #bad7ff; }

/* =========================================
   HEADER
========================================= */
header.main-header {
  background: #003399;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

header .logo h1 {
  font-size: 20px;
  margin: 0;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 4px;
  transition: background 0.3s;
  display: inline-block;
}

.top-nav a:hover {
  background: #002080;
}

.top-nav a.active {
  background: #fff;
  color: #003399;
  font-weight: bold;
}

.user-info {
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.user-info .username {
  margin-right: 15px;
  font-size: 14px;
}

.logout-btn {
  background: #ff4d4d;
  color: #fff;
  padding: 6px 10px;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
}

.logout-btn:hover {
  background: #cc0000;
}

/* =========================================
   DASHBOARD CARDS
========================================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.card {
  background: #fff;
  padding: 20px;
  border: 1px solid #e0e3eb;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card h3 {
  color: #003399;
  font-size: 16px;
  margin-bottom: 8px;
}

.card p {
  font-size: 28px;
  font-weight: bold;
  margin: 0;
  color: #111;
}

/* =========================================
   LEADS MANAGEMENT (CRM VIEW)
========================================= */
.leads-page {
  background: #f5f6fa;
  padding: 20px 0;
}

.leads-page h2 {
  font-size: 22px;
  color: #003399;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.leads-page h2::before { content: "📃"; font-size: 22px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
}

.search-box input,
.search-box select {
  height: 36px;
  border-radius: 8px;
  border: 1px solid #d0d4db;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0,0,0,0.02);
}

.search-box button {
  padding: 8px 16px;
  background: #003399;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.search-box button:hover {
  background: #002080;
}
.search-box .btn.secondary {
  background: #6c757d;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
}

/* === CRM Table Layout === */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

thead {
  position: sticky;
  top: 0;
  background: #f0f2f9;
  z-index: 1;
  box-shadow: inset 0 -1px 0 #d8dce6;
}

th {
  text-align: left;
  font-weight: 600;
  color: #003399;
  padding: 10px 12px;
  font-size: 14px;
  border-bottom: 2px solid #dfe3ec;
}

td {
  background: #fff;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-left: none;
  border-right: none;
  vertical-align: middle;
  font-size: 14px;
  color: #333;
}

tbody tr {
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}
tbody tr:hover td {
  background: #f0f6ff;
  cursor: pointer;
  border-color: #bcd0ff;
}

/* Status badge (CRM chip style) */
.status-badge {
  display: inline-block;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 50px;
  text-transform: capitalize;
  color: #fff;
}
.status-badge[data-status="Not Contacted"] { background: #808080; }
.status-badge[data-status="First Attempt"] { background: #9370DB; }
.status-badge[data-status="Second Attempt"] { background: #FFD700; color:#000; }
.status-badge[data-status="Under Negotiation"] { background: #1d6fff; }
.status-badge[data-status="Offer Denied"] { background: #dc3545; }
.status-badge[data-status="Closed - Successful"] { background: #28a745; }
.status-badge[data-status="For Follow-up"] { background: #ff7f00; }
.status-badge[data-status="For Assessment"] { background: #008000; }
.status-badge[data-status="For Training"] { background: #0069d9; }

/* Row hover indicator */
tbody tr:hover td:first-child {
  border-left: 3px solid #003399;
}

/* =========================================
   USERS MANAGEMENT ENHANCEMENTS
========================================= */
.actions-cell {
  display: flex;
  gap: 6px;
}

.btn.small {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
}

.btn.small.info { background: #17a2b8; color: #fff; }
.btn.small.info:hover { background: #117a8b; }

.btn.small.primary { background: #003399; color: #fff; }
.btn.small.primary:hover { background: #002080; }

.btn.small.danger { background: #dc3545; color: #fff; }
.btn.small.danger:hover { background: #a71d2a; }

.role-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #fff;
}

.role-badge.admin { background: #003399; }
.role-badge.staff { background: #28a745; }
.role-badge.viewer { background: #6c757d; }

/* =========================================
   USER VIEW PAGE
========================================= */
.user-card {
  background: #fff;
  padding: 25px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin: 25px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.user-card .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.user-card label {
  font-weight: 600;
  color: #003399;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.user-card p {
  margin: 0 0 15px;
  font-size: 15px;
  color: #333;
  background: #f9fafc;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #e0e3eb;
}

/* Role badges */
.role-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.role-badge.admin { background: #003399; }
.role-badge.staff { background: #28a745; }
.role-badge.viewer { background: #6c757d; }

/* Action buttons */
.actions-bar {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.actions-bar .btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}
.actions-bar .btn-primary { background: #003399; color: #fff; }
.actions-bar .btn-primary:hover { background: #002080; }
.actions-bar .btn-secondary { background: #6c757d; color: #fff; }
.actions-bar .btn-secondary:hover { background: #565e64; }
.actions-bar .btn-danger { background: #dc3545; color: #fff; }
.actions-bar .btn-danger:hover { background: #b02a37; }

/* =========================================
   CRM FORM STYLING (Users Create/Edit)
========================================= */
.crm-page {
  background: #fff;
  border: 1px solid #e0e3eb;
  border-radius: 10px;
  padding: 25px;
  margin: 20px auto;
  max-width: 700px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.crm-page h2 {
  font-size: 20px;
  color: #003399;
  margin-bottom: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-form .form-group {
  margin-bottom: 18px;
}

.crm-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}

.crm-form input,
.crm-form select {
  width: 96%;
  padding: 10px 12px;
  border: 1px solid #d0d4db;
  border-radius: 8px;
  font-size: 14px;
  background: #fafafa;
  transition: border-color 0.2s ease;
}

.crm-form input:focus,
.crm-form select:focus {
  border-color: #003399;
  outline: none;
  background: #fff;
}

.crm-form small {
  font-size: 12px;
  color: #777;
}

.crm-form .error {
  color: #dc3545;
  background: #ffe6e6;
  border: 1px solid #f5c2c7;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.crm-form .actions-bar {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.crm-form .btn-primary,
.crm-form .btn-secondary {
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background 0.3s ease;
}

.crm-form .btn-primary {
  background: #003399;
  color: #fff;
}
.crm-form .btn-primary:hover {
  background: #002080;
}

.crm-form .btn-secondary {
  background: #6c757d;
  color: #fff;
}
.crm-form .btn-secondary:hover {
  background: #565e64;
}

/* =========================================
   FOOTER
========================================= */
footer {
  background: #f0f2f5;
  text-align: center;
  padding: 10px;
  margin-top: 30px;
  border-top: 1px solid #ddd;
  font-size: 13px;
  color: #555;
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 768px) {
  .leads-page table, thead, tbody, th, td, tr {
    display: block;
  }
  thead { display: none; }
  td {
    padding: 10px;
    border: none;
    border-bottom: 1px solid #eee;
  }
  td::before {
    content: attr(data-label);
    display: block;
    font-weight: bold;
    color: #003399;
  }
}

/* =========================================
   SIDEBAR NAVIGATION (Collapsible Layout)
========================================= */
body {
  display: flex;
  min-height: 100vh;
  background: #f5f6fa;
  font-family: 'Inter', Arial, sans-serif;
}

.sidebar {
  width: 240px;
  background: #003399;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0,0,0,0.08);
  z-index: 1000;
}

.sidebar .logo {
  text-align: center;
  padding: 20px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.sidebar .logo img {
  height: 60px;
  margin-bottom: 6px;
}
.sidebar .logo h1 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.sidebar nav {
  padding: 10px;
}

.sidebar a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: background 0.25s ease;
  font-size: 14px;
}
.sidebar a:hover {
  background: rgba(255,255,255,0.12);
}
.sidebar a.active {
  background: #fff;
  color: #003399;
  font-weight: 700;
}

.sidebar-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 10px 0 4px;
  padding: 8px 14px;
  cursor: pointer;
  color: #cbd5e1;
  position: relative;
  transition: color 0.2s ease;
}
.sidebar-section h3:hover { color: #fff; }
.sidebar-section h3::after {
  content: '▸';
  float: right;
  transition: transform 0.25s ease;
}
.sidebar-section h3.open::after {
  content: '▾';
}
.submenu {
  display: none;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.2);
  margin-left: 8px;
}
.submenu a {
  font-size: 13px;
  padding: 7px 10px;
  margin: 2px 0;
  border-radius: 4px;
}
.submenu a.active {
  background: #fff;
  color: #003399;
}

.user-info {
  background: rgba(255,255,255,0.1);
  padding: 14px;
  font-size: 13px;
  line-height: 1.4;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.user-info a {
  color: #fff;
  text-decoration: underline;
}

.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 20px;
}

/* Responsive Sidebar */
@media (max-width: 900px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }
  .main-content {
    margin-left: 0;
  }
  .submenu {
    border-left: none;
  }
}

/* =========================================
   SIDEBAR ICON ENHANCEMENTS (Lucide-ready)
========================================= */
.sidebar a svg,
.sidebar-section h3 svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 8px;
  stroke: #cbd5e1;
  stroke-width: 2;
  transition: stroke 0.3s ease, transform 0.2s ease;
}

.sidebar a:hover svg {
  stroke: #fff;
  transform: scale(1.1);
}

.sidebar a.active svg {
  stroke: #003399;
}

.sidebar-section h3 svg {
  margin-right: 6px;
}

.sidebar-section h3.open svg {
  stroke: #fff;
}

.sidebar a span {
  vertical-align: middle;
}

.sidebar a,
.sidebar-section h3 {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================
   GLOBAL BUTTON SYSTEM (v2.8)
   - used by links/buttons with class="btn"
========================================= */

button,
input[type="submit"],
input[type="button"],
a.btn,
button.btn {
  font-family: 'Inter', Arial, sans-serif;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid #d0d4db;
  background: #ffffff;
  color: #003399;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition:
    background .18s ease,
    color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .08s ease;
}

.btn:hover {
  background: #f0f4ff;
  border-color: #003399;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* sizes */
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 10px 18px;
  font-size: 14px;
}

/* variants */
.btn.primary,
.btn-primary {
  background: #003399;
  color: #ffffff;
  border-color: #003399;
}

.btn.primary:hover,
.btn-primary:hover {
  background: #002080;
  border-color: #002080;
}

.btn.accent {
  background: #6CB33F;
  border-color: #6CB33F;
  color: #ffffff;
}
.btn.accent:hover {
  background: #5aa431;
  border-color: #5aa431;
}

.btn.secondary,
.btn-outline {
  background: #ffffff;
  color: #003399;
  border-color: #003399;
}

.btn.secondary:hover,
.btn-outline:hover {
  background: #f0f4ff;
}

.btn.danger,
.btn-danger {
  background: #dc3545;
  border-color: #dc3545;
  color: #ffffff;
}
.btn.danger:hover,
.btn-danger:hover {
  background: #b02a37;
  border-color: #b02a37;
}

.btn[disabled],
.btn.disabled {
  opacity: .6;
  cursor: not-allowed;
  box-shadow: none;
}

/* link-style inline (for Attendance / Results / Printable Summary / Finish) */
.btn-link {
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  color: #003399;
  box-shadow: none;
}
.btn-link:hover {
  text-decoration: underline;
  background: none;
}

/* keep login primary aligned with new system */
.auth-actions .btn-primary,
.auth-actions .btn.primary {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  letter-spacing: .08em;
}

/* ===== Global Button Base ===== */
.btn,
button.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 16px;
  border-radius: 6px;
  border: 1px solid #003399;
  background: #003399;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background .18s ease,
    color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .08s ease;
}

.btn:hover {
  background: #002080;
  border-color: #002080;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* small variant you already use */
.btn.small,
.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
.form-select, .form-control, #courseFilter, .filter-group>select, .filter-group>input
{
    width: 90%;
    padding: 9px 10px;
    border: 1px solid #d0d4db;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}
.form-label{
    font-style: bold;
}


