/* training/css/training.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f4f4;
  color: #222;
  min-height: 100vh;
}

.site-header {
  background: #1a1a2e;
  color: white;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header h1 { font-size: 1.1rem; }
.site-header .brand { color: #e74c3c; font-weight: bold; }

.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.card {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: box-shadow 0.15s;
  border-left: 4px solid transparent;
}
.card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
.card.status-behind { border-left-color: #e74c3c; }
.card.status-in-progress { border-left-color: #e67e22; }
.card.status-certified { border-left-color: #27ae60; }

/* Avatar */
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: #c0392b; color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 1rem; flex-shrink: 0;
}

/* Status badge */
.badge {
  font-size: 0.7rem; padding: 2px 8px; border-radius: 10px;
  font-weight: bold; text-transform: uppercase;
}
.badge-certified { background: #eafaf1; color: #27ae60; }
.badge-in-progress { background: #fef9e7; color: #e67e22; }
.badge-behind { background: #fdedec; color: #e74c3c; }
.card.status-inactive { border-left-color: #95a5a6; opacity: 0.6; }
.badge-inactive { background: #f2f3f4; color: #7f8c8d; }

/* Progress bar */
.progress-bar { background: #eee; border-radius: 4px; height: 6px; }
.progress-bar-fill { height: 6px; border-radius: 4px; transition: width 0.3s; }
.fill-green { background: #27ae60; }
.fill-orange { background: #e67e22; }
.fill-red { background: #e74c3c; }

/* Stat panels */
.stat-panels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-panel {
  background: white; border-radius: 8px; padding: 1rem;
  text-align: center; border-top: 3px solid #ccc;
}
.stat-panel .stat-value { font-size: 2rem; font-weight: bold; }
.stat-panel .stat-label { font-size: 0.8rem; color: #888; margin-top: 4px; }
.stat-panel.blue { border-top-color: #2980b9; }
.stat-panel.blue .stat-value { color: #2980b9; }
.stat-panel.green { border-top-color: #27ae60; }
.stat-panel.green .stat-value { color: #27ae60; }
.stat-panel.purple { border-top-color: #8e44ad; }
.stat-panel.purple .stat-value { color: #8e44ad; }

/* FY summary bar */
.fy-bar {
  background: #1a1a2e; color: #eee;
  border-radius: 8px; padding: 0.8rem 1.2rem;
  display: flex; gap: 2rem; align-items: center;
  margin-bottom: 1rem; flex-wrap: wrap;
}

/* Toolbar */
.toolbar {
  display: flex; gap: 0.6rem; align-items: center;
  margin-bottom: 1rem; flex-wrap: wrap;
}
.toolbar input {
  flex: 1; min-width: 200px; padding: 0.45rem 0.8rem;
  border: 1px solid #ddd; border-radius: 4px; font-size: 0.9rem;
}

/* Buttons */
.btn {
  padding: 0.45rem 0.9rem; border: none; border-radius: 4px;
  font-size: 0.85rem; cursor: pointer; font-weight: 500;
}
.btn-primary { background: #c0392b; color: white; }
.btn-primary:hover { background: #a93226; }
.btn-secondary { background: #555; color: white; }
.btn-secondary:hover { background: #444; }
.btn-outline { background: white; border: 1px solid #ddd; color: #444; }
.btn-outline:hover { background: #f5f5f5; }
.btn-danger { background: #e74c3c; color: white; }

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 100;
  align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 2rem 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: 10px;
  padding: 1.5rem; width: 100%; max-width: 560px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  margin: auto; overflow: hidden;
}
.modal h2 { font-size: 1.1rem; margin-bottom: 1.2rem; color: #c0392b; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.2rem; }

/* Form fields */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.8rem; color: #555; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  padding: 0.4rem 0.7rem; border: 1px solid #ddd;
  border-radius: 4px; font-size: 0.9rem; width: 100%;
}

/* Cert cards */
.cert-list { display: flex; flex-direction: column; gap: 0.5rem; }
.cert-card {
  border-radius: 6px; padding: 0.6rem 0.8rem;
  border-left: 3px solid #ccc;
}
.cert-card.complete { background: #eafaf1; border-left-color: #27ae60; }
.cert-card.in-progress { background: #fdf3e7; border-left-color: #e67e22; }

/* Training log table */
.log-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.log-table th {
  background: #f5f5f5; text-align: left;
  padding: 0.4rem 0.6rem; font-size: 0.78rem; color: #888;
}
.log-table td { padding: 0.45rem 0.6rem; border-bottom: 1px solid #eee; }

/* Category pill */
.cat-pill {
  display: inline-block; padding: 1px 8px;
  border-radius: 10px; font-size: 0.75rem; font-weight: 500;
}

/* Checkbox list (bulk modal) */
.ff-list { border: 1px solid #eee; border-radius: 6px; overflow: hidden; }
.ff-list-header {
  display: grid; grid-template-columns: 32px 1fr 1fr 1fr;
  background: #f5f5f5; padding: 0.4rem 0.8rem;
  font-size: 0.78rem; color: #888; font-weight: bold;
}
.ff-list-row {
  display: grid; grid-template-columns: 32px 1fr 1fr 1fr;
  padding: 0.5rem 0.8rem; border-bottom: 1px solid #eee;
  align-items: center; font-size: 0.85rem;
}
.ff-list-row.behind { background: #fff8f8; }
.ff-list-row:last-child { border-bottom: none; }

/* Admin panel indicator */
.admin-bar {
  background: #c0392b; color: white;
  padding: 0.4rem 1.5rem; font-size: 0.8rem;
  display: flex; justify-content: space-between; align-items: center;
}

/* Login page */
.login-wrap {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: #f4f4f4;
}
.login-card {
  background: white; border-radius: 10px;
  padding: 2rem; width: 320px; text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.login-card .login-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.login-card h2 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.login-card .subtitle { color: #888; font-size: 0.82rem; margin-bottom: 1.2rem; }
.login-card input {
  width: 100%; padding: 0.5rem 0.8rem;
  border: 1px solid #ddd; border-radius: 4px;
  font-size: 0.9rem; margin-bottom: 0.7rem; display: block;
}
.login-error { font-size: 0.82rem; margin-bottom: 0.5rem; display: none; padding: 0.5rem 0.75rem; border-radius: 6px; border: 1px solid transparent; }

/* Two-column profile layout */
.profile-columns {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .profile-columns { grid-template-columns: 1fr; }
  .stat-panels { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* Section heading */
.section-heading {
  font-size: 0.9rem; font-weight: bold;
  margin-bottom: 0.6rem; color: #333;
}

/* Utility */
.hidden { display: none !important; }
.text-sm { font-size: 0.82rem; }
.text-muted { color: #888; }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

.site-footer {
  background: #1a1a2e;
  color: white;
  padding: 0.8rem 1.5rem;
  text-align: center;
  justify-content: center;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  font-size: 0.8rem;
}