/* ============================================================
   CAPACITY CONNECT - TRAINEE DESIGN SYSTEM
   Palette: #023047 | #A1CCA5 | #8FB996 | #80ED99 | #A8DADC
   ============================================================ */

:root {
  --navy: #023047;
  --sage-soft: #A1CCA5;
  --sage-dark: #8FB996;
  --mint: #80ED99;
  --aqua: #A8DADC;
  --bg-light: #F7FAFC;
  --white: #FFFFFF;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-600: #475569;
  --gray-800: #1E293B;
  --shadow-sm: 0 2px 8px rgba(2, 48, 71, 0.06);
  --shadow-md: 0 6px 18px rgba(2, 48, 71, 0.1);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-family: Arial, Helvetica, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--navy);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- NAVBAR --- */
.navbar {
  /* background-color: var(--white);
  border-bottom: 2px solid var(--gray-200);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm); */
    min-height: 70px;
    padding: 0 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #d7edf2;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.brand-logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.2px;
}

.brand-logo .capacity {
  color: var(--navy);
  font-size: 17px;
}

.brand-logo .connect {
  color: #05a86a; /* High contrast mint green */
  font-size: 17px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: #05a86a;
}

.btn-logout {
  background: transparent;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background-color: var(--navy);
  color: var(--white);
}

/* --- MAIN CONTAINER --- */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 28px auto;
  padding: 0 20px;
  flex: 1;
}

/* --- PAGE TITLE HEADER --- */
.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 26px;
  color: var(--navy);
  font-weight: 700;
}

.page-header p {
  color: var(--gray-600);
  font-size: 14px;
}

/* --- WELCOME PANEL --- */
.welcome-panel {
  background: linear-gradient(135deg, rgba(168, 218, 220, 0.3) 0%, rgba(161, 204, 165, 0.3) 100%);
  border: 1px solid var(--sage-soft);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

.welcome-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--white);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.welcome-info h2 {
  font-size: 24px;
  color: var(--navy);
  font-weight: 700;
}

.welcome-info .sub-text {
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
  margin-top: 2px;
}

.quote-box {
  margin-top: 8px;
  font-style: italic;
  font-size: 13px;
  color: var(--gray-600);
  background: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  border-left: 3px solid #05a86a;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.welcome-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- BUTTONS --- */
.btn {
  padding: 8px 120px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #011b29;
}

.btn-secondary {
  background-color: var(--aqua);
  color: var(--navy);
}

.btn-secondary:hover {
  background-color: #91c8cb;
}

.btn-accent {
  background-color: var(--mint);
  color: var(--navy);
}

.btn-accent:hover {
  background-color: #61e87f;
}

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

.btn-icon-only {
  padding: 8px;
  border-radius: 50%;
  border: 1px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}

.btn-icon-only:hover {
  background-color: var(--aqua);
}

/* .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
} */

/* --- DASHBOARD LAYOUT (70/30) --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 24px;
  margin-bottom: 30px;
}

.section-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}

.link-btn {
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

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

/* --- COURSE CARDS --- */
.courses-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-card-horizontal {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.course-card-horizontal:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.course-meta-tags {
  display: flex;
  gap: 8px;
  margin: 6px 0 10px 0;
}

.tag {
  background-color: var(--aqua);
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.progress-bar-wrap {
  width: 220px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.progress-track {
  height: 8px;
  background-color: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #05a86a;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* --- STREAK & STATS SIDEBAR --- */
.stats-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.streak-card {
  background: linear-gradient(135deg, var(--navy) 0%, #034b6e 100%);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.streak-card .fire-icon {
  font-size: 32px;
  margin-bottom: 4px;
}

.streak-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--mint);
}

.streak-card p {
  font-size: 12px;
  opacity: 0.85;
}

.stats-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.stat-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}

.stat-label {
  font-size: 11px;
  color: var(--gray-600);
  font-weight: 600;
}

/* --- FEATURE CARDS GRID --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 10px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--gray-200);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--sage-dark);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 42px;
  height: 42px;
  background-color: rgba(168, 218, 220, 0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--navy);
}

.feature-card h4 {
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 4px;
}

.feature-card p {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.feature-action {
  font-size: 12px;
  font-weight: 700;
  color: #05a86a;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-count {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #e63946;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

/* --- EXPLORE COURSES GRID --- */
.filters-bar {
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-input, .filter-select {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
}

.filter-input { flex: 1; min-width: 200px; }

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.course-card-vertical {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.course-card-vertical img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.course-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-body h3 {
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 6px;
}

.course-card-body .trainer {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 10px;
}

.course-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

/* --- TABLE STYLES (Resources) --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.data-table th {
  background-color: var(--gray-100);
  color: var(--navy);
  font-weight: 700;
}

/* --- FORM STYLES --- */
.form-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  max-width: 700px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
}

.form-control:disabled {
  background-color: var(--gray-100);
  cursor: not-allowed;
}

/* --- MODAL SYSTEM --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 48, 71, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--white);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  transform: translateY(-20px);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  color: var(--navy);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--gray-600);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --- EMPTY STATES --- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px dashed var(--gray-200);
}

.empty-state h3 {
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 16px;
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--mint);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- CERTIFICATE DISPLAY --- */
.certificate-card {
  border: 10px solid var(--navy);
  padding: 30px;
  background: #FFFDF9;
  text-align: center;
  border-radius: var(--radius-sm);
  position: relative;
}

.certificate-card h2 {
  letter-spacing: 2px;
  font-size: 22px;
  color: var(--navy);
}

.certificate-card .recipient {
  font-size: 24px;
  font-weight: 800;
  color: #05a86a;
  margin: 15px 0;
  text-decoration: underline;
}

/* --- FOOTER --- */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--gray-600);
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  margin-top: auto;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .welcome-panel { flex-direction: column; text-align: center; }
  .welcome-left { flex-direction: column; }
  .feature-grid { grid-template-columns: 1fr; }
  .courses-grid { grid-template-columns: 1fr; }
  .course-card-horizontal { flex-direction: column; align-items: flex-start; gap: 12px; }
  .progress-bar-wrap { width: 100%; }
}

.avatar-lg.trainee-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--navy);
    color: white;

    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;

    flex-shrink: 0;
}